Some boards' configuration does not enable GPIO by default,
like nrf52_pca10056, it causes ASSERTION FAIL when running
this application. This fix is to enable GPIO by default for
the basic threads sample, like basic blinky sample does.
Signed-off-by: Aaron Tsui <aaron.tsui@outlook.com>
This patch adds overlay for nrf52_pca10040 and reel board to use
btp tester. These are based on nrf52840.
Signed-off-by: Tedd Ho-Jeong An <tedd.an@intel.com>
We want to show that performing various memory domain
operations, and then either dropping to user mode, or
swapping to a user thread in the same domain, has the
correct memory policy for the user context.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
On x86, if a supervisor thread belonging to a memory domain
adds a new partition to that domain, subsequent context switches
to another thread in the same domain, or dropping itself to user
mode, does not have the correct setup in the page tables.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This value always comes from DTS. No Kconfig symbol named
NS16550_REG_SHIFT ever existed.
Might've been missed in commit 603f068690 ("uart/ns16550: Use DT_ prefix
for remaining device configs").
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
We need a copy of the flags field for ever PTE we are
updating, we can't just keep OR-ing in the address
field.
Fixes issues seen when setting flags for memory regions
larger than a page.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Fixes: #13245
Remove the printing of: 'Including module(s)' when no modules are
included into the CMake build.
Signed-off-by: Torsten Rasmussen <torsten.rasmussen@nordicsemi.no>
According to the Coverity issue 188890 (github issue #10705)
Fix for overflowed or truncated value count-1U used as return value.
I decided to use a saturating subtract to avoid a vulnerability.
It will always return 0 or bigger value according to the conditions.
Now if count value is 0, function will return 0, not -1 as before.
Signed-off-by: Maksim Masalski <maxxliferobot@gmail.com>
Added __weak keyword to to support overriding assert_post_action().
This allows system designers to change/augment the assert behaviour,
i.e. add logging to persistant storage of program counter, line
number etc, and/or change reboot behaviour.
Signed-off-by: Tim Sørensen (TIMS) <tims@oticon.com>
The SimpleLink driver has been defining these macros for its local use.
Given these have been defined in a recent commit in Zephyr
(9c86dbfd8e), we should now avoid
redefining them to prevent build errors.
Signed-off-by: Vincent Wan <vincent.wan@linaro.org>
We are doing math of two 32-bit numbers and assigning into a 64-bit
result. Add explicit cast of one of the values being multipled to get
explicit promotion.
Fixes: #13883
Coverity CID: 190930
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The return from ipm_set_enabled wasn't assigned to 'status' so the check
right after the call to ipm_set_enabled() wasn't doing the right thing.
Fixes: #13881
Coverity CID: 190932
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Inside cmd_read(), result of fs_seek() is not checked which might
result in reading the wrong part of file. So fails the read if
fs_seek() fails.
Fixes#13862
Fixes CID-190953
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The reftime variable used for performance numbers is not initialized
prior to being used. Initialize it to the current uptime so delta
can be calculated correctly.
Fixes#13877
Fixes CID-190936
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Inside test_file_truncate(), the results of fs_seek() are not
checked. So adds some checks there.
Fixes#13874
Fixes CID-190939
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
If we receive the ARP request, then check if the ARP cache
contains an entry for this IP address already. If it does,
then update the MAC address in the cache.
Fixes#10188
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The INTMUX_LABEL define generated by DTS is marked as deprecated us
DT_OPENISA_RV32M1_INTMUX_INTMUX_LABEL instead.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
The driver was using non-'DT_' prefixed defines which are deprecated.
Move to using proper 'DT_' prefix defines.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
There is no symbol called CONFIG_SRAM. Mention CONFIG_SRAM_SIZE and
CONFIG_SRAM_BASE_ADDRESS instead, and also mention that the DT_* values
they're generated from.
This gets rid of a false-positive undefined Kconfig symbol reference
too.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
UART_QMSI_0_BAUDRATE was removed by commit 17c6456678 ("drivers/uart:
Use dts to set uart priorities for QMSI driver").
There's a reference to CONFIG_UART_QMSI_1_BAUDRATE as well, but getting
rid of it requires documentation updates.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Might have been overlooked in commit b52c0f24a6 ("net/ieee802154: Make
RAW mode generic") and commit f4664f1d9a ("drivers/ieee802154: Cleaning
up CMakeLists.txt").
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
CONFIG_ADC_QMSI_SAMPLE_WIDTH was removed in commit acc40d990a ("adc:
remove adc_qmsi driver"). It's only used as an example in the
documentation, but might as well use an existing symbol instead.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Exactly one caller of pthread_barrier_wait() should receive a return
value of PTHREAD_BARRIER_SERIAL_WAIT; all others should receive zero
(or an error code). Added a test to match.
Fixes: #9953
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
During speculative execution, non-present pages are treated
as valid, which may expose their contents through side
channels.
Any non-present PTE will now have its address bits zeroed,
such that any speculative reads to them will go to the NULL
page.
The expected hit on performance is so minor that this is
enabled at all times.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Removing the build_only option for tickless broke CI (for reasons
unrelated to the new tests I added in the prior commit).
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
In some circumstances (e.g., a tickless kernel), k_timer_remaining_get()
would not account for time passed that didn't involve clock interrupts.
This adds a simple fix for that, and adds a test case. In addition, the
return value of k_timer_remaining_get() is clamped at 0 in the case of
overdue timers and the API description is adjusted to reflect this.
Fixes: #13353
Signed-off-by: Charles E. Youse <charles.youse@intel.com>
The SOC code can set whether it's known that the CPU
is immune, don't default to turning this off.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Retpolines were never completely implemented, even on x86.
Move this particular Kconfig to only concern itself with
the assembly code, and don't default it on ever since we
prefer SSBD instead.
We can restore the common kernel-wide CONFIG_RETPOLINE once
we have an end-to-end implementation.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
- Remove redundant dependencies on the PWM symbol (which show up as
PWM && PWM in the documentation). The 'source's in
drivers/pwm/Kconfig are already within an 'if PWM' block.
- Turn some repeated 'depends on FOO' into 'if FOO' blocks.
- Turn some 'if FOO's that surround a single symbol into
'depends on FOO'.
'if FOO' is equivalent to adding a 'depends on FOO' to each symbol
within the 'if'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The feature that used this symbol was removed in 18b07e09e0.
This is just a cleanup commit that removes the unused symbol.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This test was written to wait on a fifo with a timeout, return, and
check the timing between the start and end using k_cycle_get_32() to
see that it didn't run long. But timeouts expire on tick boundaries,
and so if tick expires between the start of the test and the entry to
k_fifo_get(), the timeout will take one full tick longer than expected
due to aliasing.
As it happened this passed everywhere except nRF (whose cycle timer is
32 kHz and thus more susceptible to coarser aliasing like this), and
even there it passed for a while until the spinlock validation layer
went in and added just enough time to the userspace code paths
(i.e. the code between the start time fetch and the point where the
fifo blocks takes longer) to open the window and push us over the
limit.
The workaround here is just to add a k_sleep(1) call, which is
guaranteed to block and wake up synchronously at the next tick.
Fixes#13289
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
nRF52810 Flash and SRAM sizes do not have power-of-two values.
This commit reduces the amount of MPU regions reserved at boot
time to enforce basic permissions in Flash and SRAM memory. It
does this by selecting the next power-of-two size for the Flash
and SRAM regions, respectively. In this way we can cover the
entire Flash and SRAM space each with a single MPU region, thus,
save two MPU regions to be used by the kernel/application.
Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
These options were removed from kconfig in previous patch. So rename
the leftovers as shared_irq driver options are defined in DTS now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
These options were removed from kconfig in previous patch. So rename
the leftovers as shared_irq driver options are defined in DTS now.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
These options were removed from kconfig in previous patch. So rename
the leftovers as shared_irq driver options are defined in DTS now.
Fix#13746
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Some old peer central controllers respond with Unknown
Response PDU to our local Slave Initiated Feature Request
after the peer initiated the Encryption Setup Procedure.
The peer has voilated the Bluetooth Specification by sending
the Unknown Response during the Encryption Setup Procedure,
but as a workaround to IOP with such controller our local
implementation is updated to not disconnect the connection
but accept the voilating Unknown Response PDU.
Relates to #12362.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Following changes done:
* While looking through generated net_buf HTML documentation
I noticed that some of the macros were not documented.
* Removed extern variable declarations from generated
documentation (because those variables were not documented).
* Replaced "/** @brief xxx" by "/**\n * @brief xxx" as
checkpatch complained about them (@brief being in the same
line as the start of the block comment).
* Went through all the block comments and made them look similar
and removed extra space character.
* Removed duplicate lines from function documentations. So
if the @brief text is the same as the detailed one, then the
generated output was looking funny.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>