This test runs with ztest suite. It will verify get_entropy
operation of entropy driver.
Signed-off-by: Vikram Singh Shekhawat <vikramx.shekhawat@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Adding sleep before TX FIFO flash fixes splitting networking packets
sent over USB endpoints making ECM broken since there is no flow
control other then frame sizes.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The situation when FIFO is not empty is not a bug and it is spamming
console when only bugs are enabled.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Use documentation defined values for virtual devices MAC addresses in
Zephyr and Host OS.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Ethernet emulation device allows to use networking interface for
interaction with USB endpoints.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
The Designware FIFO is filled in units of 32 bit words, but the buffer
we are passed is not guaranteed to be a multiple of 4 bytes long, nor
aligned on a 4-byte boundary. So in theory we are reading 0-3 bytes
of unused garbage from the end of the array.
That's currently benign on supported platforms with this hardware,
which all support misaligned reads. But not all do. And the incoming
arrival of memory protection opens the possibility that those extra
bytes would cross a protection boundary and cause a crash or security
bug.
Do this right.
(Note that this is fixed to little endian byte order. The Designware
databook is frustratingly silent on the endianness it expects, but
existing hardware I can see is definitely LE and I see a few spots in
the Linux dwc2 driver that likewise assume LE).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
The designware hardware in dedicated FIFO mode (which is all we
support right now for lack of shared-FIFO hardware) has one hardware
FIFO per IN (i.e. transmit) endpoint. But it doesn't assign them on
its own, it's the drivers responsibility to populate the TxFNum field
of the DIEPCTL registers with integer indices corresponding to the
desired FIFO.
We weren't doing that, which meant that all IN endpoints were sharing
the same FIFO zero which is supposed to be dedicated to EP0 control
transfers. The net effect is that sometimes outbound transfers would
be corrupted, showing data from the wrong endpoint. More often that
not this would leak from control transfers over to the
higher-bandwidth bulk endpoints of the application, but occasionally
you'd see a control transfer itself get borked and the USB device
would glitch.
Get this right and set the FIFOs properly.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This reverts commit 1da0a9eebd.
The workaround caused a severe performance penalty, and only worked
for USB packets of 4-15 bytes in length (16+ byte packets weren't
subject to the hardware bug). Single-byte packets (very common for
cdc_acm serial port transfers) would still be duplicated sometimes.
The upcoming DMA implementation does not share the performance
penalty, and also is not subject to the bug for those sizes of packets
(though it DOES still have a problem with single-byte packets!).
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
There is no particular reason this spot in usb_dw_tx() cannot be
reached by racing threads on the same endpoint, though existing API
usage in the tree is all unithreaded. The FIFO state read at the top
of the function must still be true at the bottom or else the packet
byte count will be corrupt.
Also, as described in an existing comment, the databook has some
scary-sounding warnings about access to the registers during FIFO
operations, even if they "should" be on separate endpoints and
unrelated.
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
If NET_L2_IEEE802154 and NET_IPV6 are enabled:
- NET_6LO is enabled
- NET_L2_IEEE802154_FRAGMENT is enabled
Thus removing setting this config options to yes where applicable.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This rework commit 77b8f5c1f6
Comparing it to BT IPSP is a the wrong comparison: BT IPSP does specify
6lo/ipv6 for it to work. Whereas 802.15.4 does not.
Instead of selecting 6lo from 802.15.4's Kconfig, let's do the reverse
way. If the user enabled 802.15.4 and IPv6 as well (to which 6lo
depends on), then 6lo is enabled by default as using IPv6 on 15.4
without it does not make much sense.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Issue a error message, if the _mcr20a_read_reg fails.
Do not execute SPI burst read/write if the buffer is too small.
Unlock mutex if set_pan_id, set_short_addr or set_ieee_addr
fail.
Force abort of the sequence when the higher level changes the channel
even though a T or TR sequence is in progress.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Describe details and usecase for using this function. This follows
earlier updates for macros used to define buffers used by this
function (in 09b967366).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Intention of CONFIG_BOOT_DELAY is to delay booting of system for certain
time. Currently it is only delaying start of _main thread as delay is
created using k_sleep. This leads to putting _main thread into timeout
queue and continue kernel boot. This is causing some of undesirable
effects in some of test Automation usecase.
This patch changes k_sleep to k_busy_wait which result in delay in OS
boot instead of delaying start of _main.
Signed-off-by: Youvedeep Singh <youvedeep.singh@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add board configuration, dts and pinmux, based on
arm/stm32f4_disco and arm/nucleo_f411re boards.
Error free tests are executed on eval board with the following
sample applications:
- hello_world
- blinky-sample
- button-sample
- console_echo_sample
- console_getchar_sample
Signed-off-by: Jose F. Fernandez <jffernandez@fenix-es.com>
checkpatch returns the following errors:
"ERROR:COMPLEX_MACRO: Macros with complex values
should be enclosed in parentheses"
Let's fix all of them.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
The functionality of the shell scripts for flashing and debugging has
now been replaced by zephyr_flash_debug.py. Remove the legacy scripts
as part of transitioning all of this to Python.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Some of the flashing scripts try to be clever about picking unused
ports. That's convenient for the user, so add a helper class to
runner.core to accomplish similar ends portably.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Factor the classes which do the work into a new "runner" package. This
package has a core module where ZephyrBinaryRunner and common helpers
will live, and one file per subclass / runner front-end.
The top-level script, zephyr_flash_debug.py, still exists, but just
delegates its work to the core.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Though it isn't used by any in-tree Makefile.boards, looking at the
RIOT OS build system, this is meant to be split along lexical
boundaries defined by the shell, not just whitespace.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Several debugging scripts run setsid before executing a server
process, then run GDB with SIGINT ignored.
Relying on setsid is not portable. Add a popen_ignore_int() helper
that provides a portable alternative, and provide a generic
run_server_and_client() in ZephyrBinaryRunner which uses it to
abstract the pattern.
Subsequent patches will use this to implement the 'debug' command.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Just as was previously done for flashing, invoke zephyr_flash_debug.py
from the build system debug and debugserver targets by default. The
Python script will fall back on the corresponding shell script if it
doesn't have its own implementation.
The shell script can be used instead, just as with flashing, by
setting USE_ZEPHYR_FLASH_DEBUG_SHELL to any nonempty value.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Replace the 'flash' method with a 'run' method, which takes a command
to run (flash, debug, or debugserver).
Rename the classes involved appropriately, and generalize the factory
interfaces as needed.
Add documentation and theory of ops.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>