Some drivers or tests need to execute some code before Zephyr is
booted, dynamically register command line arguments, etc.
For this purpose, we generalize the NATIVE_EXIT_TASK to also
provide hooks to run a function at a given point during the startup
of native_posix.
Also, test/boards/native_posix/exit_tasks is generalized to cover
this new functionality.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This brings in content from commits in the upstream West
repository. Since both the version here and upstream have diverged,
this synchronizes them again.
Signed-off-by: Marti Bolivar <marti@foundries.io>
Test to verify k_thread_user_mode_enter() when usermode is
not enabled or supported by architecture. The thread which calls
k_thread_user_mode_enter() with CONFIG_USERSPACE disabled or
architecture doesn't support usermode, should be marked
as usermode and if it is essential, then it has to be cleared.
This is added to improve code coverage.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
The .eh_frame symbol was causing __data_rom_start to contain the wrong
offset into the ROM, resulting in corrupt data copied into RAM by
_data_copy(). Fix by placing the .eh_frame in the .text section as is
done in include/arch/x86/linker.ld
Signed-off-by: Nathaniel Graff <nathaniel.graff@sifive.com>
No need to keep technologies in main L2 directory so for consistency
create a directory for each of them and place each L2 component to
relevant L2 directory.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Some Ethernet devices can filter out incoming packets through a list of
valid MAC addresses, so let's add a way to expose this capability, using
it through the ethernet device API.
Fixes#7596
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
The SMP_FLAG_ENC_PENDING flag indicates that we've generated an STK
and are waiting for encryption to happen. In case the remote enables
encryption prematurely we should not try to encrypt with whatever is
stored in smp->tk, rather reject the pairing attempt.
Fixes#3222
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
The recently added pairing_complete & pairing_failed callbacks
were missing a NULL-check for bt_auth, since it is possible that
there's no authentication callback structure registered at all.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When building the real mode, the linker definition has to place
the real mode entry code at the start of flash area.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The board config has been verified to boot with serial console
on the Atom version of the UP Squared board. So the references
to Pentium/Celeron can be removed. Moreover, add some notes on
BIOS settings, as it may change the MMIO addresses for various
IP blocks.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds PCI related configuration for UARTs and I2C controllers
to the Apollo Lake SoC configuration to support PCI devices.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Add the necessary bits to enable the I2C controllers on
the UP Squared board. Only the ones exposed through the HAT
connector(s) are enabled by default.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Disable CONFIG_I2C and CONFIG_SPI for minimum footprint test,
since we are doing "minimum" footprint.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This adds the necessary driver structs to support a total of 8
I2C controllers. This also allows each I2C controller to have
its own PCI vendor/device IDs.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This README is based on the commit that added the HAL:
* b94d572a6 (Import Atmel SAM E70 header files from ASF library)
And documents all the patches that were applied so far:
* 133306152 (Add missing header files symbols for Atmel SAM E70)
* 9670dc582 (Remove unused and broken preprocesor macros)
* e5e99d199 (Add missing interrupt number definitions)
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Use both PTP Peer Event and PTP Event timestamping registers when
necessary.
Also for non-PTP frames just use current time.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit adds support for multiple hardware TX and RX queues.
The number of the queues to use can be configured through defconfig.
Packets are sent and received through different hardware queues
depending on their priority.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit fixes how the registers values are calculated and makes sure
there is no overflow effect when converting back to int.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit makes the driver disallow drastic clock rate changes.
These changes happen mostly in the very beginning, when the timestamp in
hardware is zeroed.
In such cases the set callback is called soon after and fixes the large
offset. Without this limit the clock offset oscillates for a longer
period before it properly syncs as the requested ratio jumps between
very large and very small values.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit fixes a memory leak happening when both gPTP and VLAN are
enabled.
It also moves the get_iface function up in the file so it is accessible
earlier without a redundant function declaration.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This adds packet timestamping support to the GMAC driver.
It is based on the eth_native_posix and eth_mcux drivers.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The pointers to pkt->frags->data are changed after transmitting.
Other layers (e.g. the gPTP drivers) assume that these will remain
unchanged. This patch adds a workaround for that issue and restores the
original pointers.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commit adds the get_config callback to the fake driver and makes
use of it to get the number of priority queues. That number is in turn
used in Qav tests.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This makes use of the get_config callback added to the Ethernet API.
For now the only parameter to get is the number of available priority
queues.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This callback will be used to get HW specific configuration that cannot
be accessed through L2 directly.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
hci-cmd can be used to inject an arbritrary HCI command which can be
useful when testing vendor/new commands.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
commit 9b6ad4067b introduced some minor
coding style issues related to line splitting. Fix these.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
_Static_assert is not supported with all toolchains, use macro instead
which can handle _Static_assert not being defined.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Added two new callbacks for Bluetooth stack to notify
the application that pairing has been completed or failed.
fixes: #8390
Signed-off-by: Jun Li <jun.r.li@intel.com>
Trace list is required to obtain the queue objects
created and parse the list to get
the object count.
Signed-off-by: Spoorthi K <spoorthi.k@intel.com>
This reduces memory overhead on net_if_dhcpv4: 16 bytes vs 120 bytes
before. This might proove to be beneficial when there are many network
interface.
dhcpv4 ROM consumption is now 2132 bytes vs 4224 (many switches removed)
Fixes#8727
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Empty line before if (unless test uses previous line assignment) and
after } (unless it's another } ...)
Indentation fixed as well.
Fixes#8727
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- Pre-assigned are always coming first.
- Always declare at the beginning of a code block
Fixes#8727
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>