225a4af94f Remove files from tests folder
58d2c8fa82 Merge remote-tracking branch 'origin/release_internal' into release_external
921b4b3273 Wi-SUN FAN 1.1 dynamic MDR data request enabler
b8722e81b1 Corrected BR removing of waiting list entry when supplicant is in key storage
0d54d7ab39 Adjust trace levels (#2692)
681d9eae8d Added reset for pan id and version to BR network start
30d4fb2ed9 Renaming and cleaning ws bootstrap (#2688)
e0da19dbf0 Add Wi-SUN host configuration (#2690)
50ecc3d0f0 Refactoring Wi-SUN stack (#2686)
9d2386d484 Renamed operation mode to operating mode.
2f755bcfdb RF config resolver and some refactoring (#2683)
86c6d19e06 Fixed WS IE PCAP read operation wrong length usage.
cd3a4c2a62 Config: Remove additional HAVE_WS_ROUTER (#2684)
cdd7f2d868 Added API for configure supported Phy capability.
a00a3c0a02 Wi-SUN FAN 1.1 PCAP IE update
2d063d3b4a Moved State machine and timer functions to own files
edb8bec609 Corrected system time check function return values
85358a635b Moved Wi-SUN Bootstrap Event handling to separate device handlers
61cbdde485 MAC to support mode switch on single channel (#2678)
1006d29e4d Added storing of PAN ID to NVM in BBR
7bf0028c66 Corrected system time jump detection on BR startup
e60974d815 Split Wi-SUN bootstrap to device types
a3f341266e MAC data req: API to support mode switch (#2674)
cad5122a90 Removed automatic network size configuration (#2673)
35d313224a MAC: Callback set to resolve PHY mode ID (#2672)
0c5faca469 Added support for large system time changes (e.g. due to NTP) (#2670)
c94b306431 LFN version and LGTK Hash IE advertisment and learn
8e075119f6 Use FAN version constant instead of pure number
a5566b22b2 Channel Plan 2 validation and FAN 1.0 reject
42dba4151e Wi-Sun IE FAN 1.1 update
1d56070c24 EU channel plan ids (FAN 1.1) supported (#2668)
fc4f41fb30 Add test API empty function
37efc7ec25 Add version 1.1 basic support
e1558fbb1a Implemented mode switch PHR build and parse (#2665)
cbd8a15d31 Corrected frame counter storing threshold check
37f7ae95eb Time configuration distribution using DHCPv6 vendor data
7415bc724b Added checks for Border Router frame counter space exhaustion (#2660)
f1a65ecbe8 Mode switch PHY API (#2663)
e54231b5d4 Do not check buffer age when virtual RF driver used (#2662)
cc8c7bd38f arm_network_certificate_chain_set() returns -2 when PANA is disabled
319dd91bce Fix dubious semicolon in #define
2ff51abeca Remove extra '\n' in traces
19376c8837 Simplify array indexes
c808661836 Fix ASAN warnings about overflows in bit shifts
f998008f60 Fix use-after-free in mac_helper_coordinator_address_set()
4d04541d70 Wi-SUN header and Paylod IE element lenght future proof update.
935898badf Medium network PAN_TIMEOUT changed to 30 minutes
1af7cfeb24 Updated nanostack to be compatible with mbed TLS 3.0 (#2657)
29744e0e46 If Router Solicitation creation fails no longer tries to retry the RS right away (#2655)
2b889e92b0 Added automatic test procedure triggering during bootstrap
ed9eb0503f GTKs are removed only when fresh GTK hash is received
81ecdc24f8 Added empty function for test procedure trigger
14439b4aa9 Added support for triggering test procedures
b8a67a9e36 Update CHANGELOG.md for Nanostack 14.0.0 (#2649)
git-subtree-dir: connectivity/nanostack/sal-stack-nanostack
git-subtree-split: 225a4af94f3faf5ca3726e86bc96cdda4c99a469
1. In TF-M, fix NSPE interrupt-disabled NSC call broken. Check:
https://developer.trustedfirmware.org/T966
2. In TF-M, enable mcuboot log enabled forcibly. This is to help check firmware update process.
3. Update readme and script
In the QSPIFBlockDevice component we checked if BUILD_TESTING was
enabled before adding the QSPIFBlockDevice/UNITTESTS subdirectory. In
the parent blockdevice/CMakeLists.txt we added the QSPIFBlockDevice
subdirectory to the build under two separate conditions:
* when "QSPIF" is present in MBED_TARGET_LABELS
* when building only unit tests
This wasn't quite enough, as when we build greentea tests for some
targets QSPIF is enabled in MBED_TARGET_LABELS, causing the
QSPIFBlockDevice subdirectory and its unit tests to be added when
building greentea tests. This caused a test failure on targets which
enable QSPIF:
```
The following tests FAILED:
40 - qspif-unittest_NOT_BUILT (Not Run)
```
To fix this we need to specifically check that we're not building
greentea tests before adding the QSPIFBlockDevice/UNITTESTS directory to
the project.
Part of this issue is our reliance on MBED_TARGET_LABELS to pull
features in to the build. We should refactor our usage of
MBED_TARGET_LABELS and use CMake target dependencies where possible.
Then we wouldn't need to add subdirectories under various, often
conflicting, scenarios. Instead the targets would always be available
and we would just choose which ones to actually build in different cases
using CMake target linking.
Import the latest partition headers from upstream. We no longer need to
patch the headers to define the BL2 macro as we now define it in the
scatter files for the MUSCA targets.
We worked around an issue with mbed-cli1 not recognising the BL2 macro
from targets.json by adding patched versions of region_defs.h and
flash_layout.h for ARM_MUSCA targets. In the patched headers we defined
the BL2 macro to ensure it can be picked up by the ARM scatter files
that include the headers.
The current solution is not robust, because it means that the
aforementioned headers easily become out of date. A workaround of
defining the macros in the scatter files which need them was suggested
in https://github.com/ARMmbed/mbed-os/issues/14762
This commit applies the suggested changes to the ARM_MUSCA scatter
files.
PSA_ALG_AEAD_WITH_TAG_LENGTH has been replaced with
PSA_ALG_AEAD_WITH_SHORTENED_TAG upstream. We could just update
psa_util.h to use the new macro, but we still have some targets that
only support older versions of PSA, so we reinstate the removed macro.
We have added definitions that are needed by Mbed TLS's PSK key exchange
but missing from TF-M's PSA to `mbedtls_svc_key_id.h`. To pick up those
definitions, TF-M's `psa/crypto_values.h' needs to include
`mbedtls_svc_key_id.h`.
Include mbedtls_ecc_group_to_psa.h from crypto_extra.h so that clients
of PSA within Mbed OS do not need to behave differently depending on
which PSA implementation they are using.
This solution is not ideal as it makes it more difficult to update the
TF-M-provided psa/crypto_extra.h. We'll have to see what other options
we have for including additional headers based on the Mbed OS
configuration.
The directory structure upstream has changed. Now ARM_MUSCA board
support has been moved under an "arm" subdirectory. Update targets.json
with the new locations.
tfm_ns_interface.c is intended to be overriden by clients to support
different targets. We copy this file from upstream into the mbed-os
platform library. We also have a specific "strong" overridden version
for the NU_M2354 target, which is located in its target library.
Previously the implementations in the platform library were decorated
with __attribute__(weak), and we provided a strong definition for the
NU_M2354 target. This worked fine because of weak linking, the linker
will pick the first "strong" definition and use that, avoiding any ODR
violations. However, upstream have removed __attribute__(weak) from the
function definitions, which caused multiply defined symbol errors when
trying to build the NU_M2354 target.
To work around the above issue, we remove the common definition in the
platform library; instead we copy the file to the Musca B1 and Musca S1
target libaries. This means the appropriate tfm_ns_interface.c is only
included in the build when compiling for the specific target which uses
it.
The "Callback_big" greentea test has six test cases that require
a minimum above 36kb ROM to build all test cases. LPC1114 target
has only 32KB ROM memory, so the limit 6th test case to include
or exclude based on the target minimum ROM size.
Note:
In LPC1114 target, callback_big test has ROM overflow build issue
for both Mbed CLI1 and CLI2.
Mbed CLI 2 generates TARGET_ARM_FM macro as a string in mbed_config.cmake
under the MBED_TARGET_DEFINITIONS list. Fix the "if defined" check for
TARGET_ARM_FM by searching for the TARGET_ARM_FM string in the
MBED_TARGET_DEFINITIONS list. This allows us to skip or include the test from CMake.
QSPIF was disabled on CYW9P62S1_43012EVB_01 because its S25FS512S
flash chip has multiple configurations but our SFDP parser did not
support this scenario. Now having added support for this, we can
enable QSPIF (the component label for QSPIFBlockDevice) and QSPI
(the label for Quad-SPI communication).
A Sector Map Parameter Table contains a sequence of the following
descriptors:
* (Optional) configuration detection command descriptors, one for
each command to run to determine the current configuration. This
exists only if the flash layout is configurable.
* Sector map descriptors, one for each possible configuration. On
a flash device with a non-configurable layout, there is only one
such descriptor.
Previously we only supported the non-configurable case with a single
descriptor. This commit adds support for multiple configurations.
Add a test case to verify that the quirk on `CR1NV` and `CR3NV`
registers get applied by `QSPIFBlockDevice` when the flash device
is S25FS512S.
`QSPIFBlockDevice` depends on the SFDP functions and the `QSPI` class,
but we can't use gMock on them because:
* SFDP functions are global functions, whereas gMock only supports
mocking class member functions.
* A mocked class is injected into the test subject, but passing a
preexisting `QSPI` instance into `QSPIFBlockDevice` is not possible
(unless we resort to pointers). For details, see comments in
test_QSPIFBlockDevice.cpp.
So fakes of the `QSPI` class and any SFDP functions involved are
defined in test_QSPIFBlockDevice.cpp.
The entire flash chip S25FS512S consists of uniform 256KB sectors.
Additionally, it has three configurations:
* 0x01: Eight 4KB sectors (32KB in total) overlaying the start of
the first 256KB sector
* 0x03: Eight 4KB sectors (32KB in total) overlaying the end of the
last 256KB sector
* 0x05: No overlaying sectors
The active configuration is determined from bit fields of two
registers, CR1NV and CR3NV.
Mbed OS does not currently support partially overlaying sectors,
meaning that with eight 4KB sectors overlay a 256KB sectors, the
remaining 224KB (== 256KB - 8 * 4KB) of the big sector can't be
correctly handled. Supporting such scenario would involve a large
amount of rewriting in Mbed OS's BlockDevice, SFDP and their tests,
and may increase the code size.
So, this commit applies a quirk to always report configuration 0x05
(no overlaying sectors). Even if 0x01 or 0x03 is the real configuration,
they are compatible with the 0x05 configuration because 256KB sectors
exist in all cases.
Note: This quirk does *not* change actual configurations on hardware,
because registers CR1NV and CR3NV are one-time configurable (OTP) -
each bit field has a factory value of 0 and can be changed to 1 by the
user but not back to 0. So QSPIFBlockDevice avoids changing them.
Cypress S25FS512S's SFDP table suggests that bit-1 of the register
CR3NV on 25FS512S should equal 1. But it is a known issue that the
value is actually 0 on hardware. So if we query the value of CR3NV
during configuration detection, we can't find a configuration that
matches the SFDP data. This issue has been discussed in the Linux MTD
(Memory Technology Devices) mailing list:
https://linux-mtd.infradead.narkive.com/ylHK6CyT/spi-nor-fs512s-incorrect-cr3nv-1-value
This commit adds a quirk to report bit-1 of CR3NV as 1.
Note: In Mbed OS, vendor-specific quirks can only be handled in block
devices. The SFDP functions assume data from hardware to be correct.
So this quirk is in the block device.
In Mbed OS, each library has an `include/<library>/` subdirectory
containing headers. The recommended way to include a header is
`#include "<library>/<header>.h"` to avoid potential conflicts with
any external modules that have same names of headers.
This is not enforced yet, and both include/ and include/<component>/
are in a library's include paths, to avoid breaking preexisting
Mbed projects that don't follow the recommendation. But code within
Mbed OS should follow it at least.
This allows the entire QSPI class to be mocked/faked for unit testing
purpose, without dependencies from the real implementation such as
`qspi_free()` from the HAL.
The second byte of the sector map descriptor is the configuration ID.
On a device with non-configurable layout, the only available map
descriptor's configuration ID must be 0x00 as required by the
JESD216D standard. This value is important, because we will check
each descriptor's configuration ID when we support multiple
configurations.
Note: The test data is fake - when we modified real data of a
configurable device to become non-configurable for test purpose, we
forgot to change this field.