Commit Graph

30257 Commits (7a862d2059049c1ae277ddb450b74ecd3eabe552)

Author SHA1 Message Date
Roman Okhrimenko 7a862d2059 Update psoc6pdl to 1.6.0.4266-rc3 2020-06-19 16:16:55 +03:00
Roman Okhrimenko bcc8c2cdae Rename 064B0S2 linker scripts names per common pattern 2020-06-19 16:16:54 +03:00
Roman Okhrimenko 2a313c3ed7 Update prebuild Secure CM0p hex file from multi image case with 064B0S2 to 1.2.0.210 2020-06-19 16:16:54 +03:00
Roman Okhrimenko 4043deee7e Update linker scripts with templates from psoc6pdl 1.6.0.4172 for IAR and ARM for 064B0S2, add cm4_dual versions 2020-06-19 16:16:54 +03:00
Roman Okhrimenko fc42c74e7b Rework find_policy() in post build script to enable default locations 2020-06-19 16:16:54 +03:00
Roman Okhrimenko 66f6e2a199 Update asset psoc6cm0p build 1.2.0.210 RC1 2020-06-19 16:16:54 +03:00
Roman Okhrimenko f99a1c49b9 Update GeneratedSource and system files for B0S2 using psoc6pdl 1.6.0.4172 RC2 2020-06-19 16:16:54 +03:00
Roman Okhrimenko aa3c81e749 Update psoc6pdl to .1.6.0.4172 RC2 2020-06-19 16:16:54 +03:00
Roman Okhrimenko 9be0baf406 Remove ES10 targets from flash_config header in tests, remove mbed_app.json 2020-06-19 16:16:54 +03:00
Roman Okhrimenko 797bf090b9 Delete policies and linker files for multi image for B0S2 2020-06-19 16:16:53 +03:00
Roman Okhrimenko edcda5192a Delete ES10 related sb-tools folder from TARGET_PSOC6, post build now use cysecuretools 2020-06-19 16:16:47 +03:00
Roman Okhrimenko f689c05db7 Modify post build scripts to support only cysecuretools signing 2020-06-19 16:16:47 +03:00
Roman Okhrimenko b59a80d6ca Add 064B0S2 target to targets.json 2020-06-19 16:16:47 +03:00
Roman Okhrimenko 773a4becf1 Delete ES10 targets from targets.json 2020-06-19 16:16:47 +03:00
Roman Okhrimenko c97f140590 Delete ES10 target source CY8CKIT_064S2_4343W 2020-06-19 16:16:00 +03:00
Roman Okhrimenko 07bf595dce Delete ES10 target source CYESKIT_064B0S2_4343W 2020-06-19 16:15:45 +03:00
Roman Okhrimenko 64a3d26493 Delete ES10 target source CY8CPROTO_064_SB 2020-06-19 16:15:34 +03:00
Roman Okhrimenko 571e097d9f Add secure cm0 psoc6cm0p hex prebuild 1.2.0.174 file to 064B0S2 BSP 2020-06-19 16:13:59 +03:00
Roman Okhrimenko bdac29e93e Add 064B0S2 target BSP files using psoc6pdl 1.6.0.3875 2020-06-19 16:13:59 +03:00
Roman Okhrimenko 683e3631da Update psoc6cm0p to 1.2.0.174 2020-06-19 16:13:59 +03:00
Roman Okhrimenko 4700a726f8 Update psoc6pdl to 1.6.0.3875 2020-06-19 16:13:59 +03:00
Martin Kojtal 3d031cebe4
Merge pull request #13158 from toyowata/fix_wio_emw3166
[WIFI] Add NSAPI_PRESENT macro in the WicedInterface
2020-06-19 12:52:42 +02:00
Martin Kojtal 15b7fe404e
Merge pull request #13142 from rajkan01/fix_emac_chrono_warning
EMAC: Fix Chrono compliation warnings
2020-06-19 10:06:58 +02:00
Martin Kojtal 6646e8e79e
Merge pull request #13128 from farrenv/add-EP-ATLAS
Add support for Embedded Planet target Atlas
2020-06-19 09:09:35 +02:00
toyowata 7ad0174815 [WIFI: WicedInterface] Add NSAPI_PRESENT macro 2020-06-19 14:28:45 +09:00
Martin Kojtal 32a032bbf0
Merge pull request #13149 from kivaisan/cellular_alt1250_save_rat
Cellular: ALT1250: Store RAT to permament memory
2020-06-18 22:24:24 +02:00
Martin Kojtal 802c89707e
Merge pull request #12905 from kjbracey-arm/timer_tweaks
Timer: minor revisions
2020-06-18 22:23:56 +02:00
Martin Kojtal 920133e8ed
Merge pull request #13118 from evedon/ed-full-profile
Replaced rtos profile with full profile
2020-06-18 22:19:59 +02:00
Martin Kojtal 3e42991289
Merge pull request #13046 from hugueskamba/hk_use_chrono
Use std::chrono based functions
2020-06-18 22:16:00 +02:00
Hugues Kamba 2b934a228f Fix tests-netsocket-udp
Use std::chrono literals and variables where it makes sense
2020-06-18 18:10:10 +01:00
Martin Kojtal 51446de9dc
Merge pull request #13144 from rajkan01/fix_esp_driver_compilation_warnings
Fix esp8266 driver compilation warning
2020-06-18 16:13:26 +02:00
Vance Farren 70b0acaa33 clean up dead code 2020-06-18 08:56:40 -04:00
Martin Kojtal 847807e608
Merge pull request #12955 from Patater/replace-mbed-psa-with-tfm
Replace Mbed PSA with TF-M PSA
2020-06-18 14:39:50 +02:00
Rajkumar Kanagaraj 31bc95a742 Fix astyle format issue 2020-06-18 12:40:44 +01:00
Rajkumar Kanagaraj 28e44ac6f8 Fix compilation warnings by using the Chrono based time argument in EventQueue call_every() API call. 2020-06-18 12:30:11 +01:00
Jaeden Amero 4961d4a52d psa: Configure Mbed TLS to use PSA as needed
Configure Mbed TLS to automatically enable PSA as needed. When Mbed OS
is configured to use PSA, configure Mbed TLS to use PSA. This prevents
leaking of the "how to make Mbed TLS use PSA" knowledge up into
targets.json, and thus makes porting simpler. There is now one place
where "how to make TLS use PSA" exists rather than repeated throughout
targets.json for each target that can't inherit from PSA_Target.
2020-06-18 12:18:12 +01:00
Jaeden Amero b38c5ed8e3 examples: Add PSA example to list of examples 2020-06-18 12:16:30 +01:00
Devaraj Ranganna cd88e724f7 psa: Add a script to validate PSA targets
Add a script to parse `targets.json` to identify PSA targets and ensure
mandatory parameters are configured correctly for all PSA targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:29 +01:00
Devaraj Ranganna c9c593f7ca tools: Remove obsolete API
The API is_PSA_non_secure_target() uses obsolete labels to detect if a
target is PSA non-secure target and is not needed anymore.

Mbed OS depends on TF-M for PSA SPM and services. TF-M is built using
it's own build system. Therefore, we don't need to differentiate secure
and non-secure targets anymore in Mbed OS as all PSA targets in Mbed OS
are non-secure targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:28 +01:00
Devaraj Ranganna 939ed6940c tools: Improve PSA target identification logic
Current logic `is_TFM_target` relies on the availability of attribute
`tfm_target_name` to identify PSA targets. The API `is_TFM_target` is
used in pytest to validate PSA target configuration which again checks
the availability of `tfm_target_name`. If a target doesn't contain the
attribute `tfm_target_name` then this check will fail instead of
catching it. Therefore, we now check for `TFM` config option in `labels`
attribute.

The API `is_TFM_target()` returns true for Mbed OS PSA targets which are
supported by TF-M also.

Add a new API `is_PSA_target()` which returns true for all Mbed OS PSA
targets.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:26 +01:00
Jaeden Amero 0961f312c6 Make PSA util compatible with Mbed Crypto 3.0.1
Mbed Crypto 3.0.1 ships with TF-M. To make Mbed TLS 2.22.0 compatible
with Mbed Crypto 3.0.1, changes are needed in psa_util.h (which
abstracts some portions of the PSA Crypto API for use with TLS) to deal
with new ECC curve define changes.

Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:25 +01:00
Jaeden Amero 908c33bac7 psa: Add stubbed PSA client implementation
Add a stubbed PSA Client API implementation for application
compatibility. The interface is non-functional, but provides sane error
codes.
2020-06-18 12:16:23 +01:00
Devaraj Ranganna abccf97ebf psa: Import latest image signing scripts from TF-M
Import the latest image signing scripts from TF-M version
TF-Mv1.0-85-g3b7cc95a042c.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:22 +01:00
Devaraj Ranganna 76e911c5ef psa: Replace Mbed PSA with TF-M
Add TF-M to Mbed OS, replacing the previous PSA implementation for
TF-M-capable targets. This commit adds files imported from TF-M, without
modification. The version of TF-M imported can be found in
`features/FEATURE_PSA/TARGET_TFM/VERSION.txt`.

These changes switch to TF-M as the sole PSA implementation for v8-M and
dual core targets, with TF-M running on the secure side and Mbed OS
running on the non-secure side. Single core v7-M targets will continue
to have PSA implemented via PSA emulation, implemented by Mbed OS.

Move or remove many PSA-implementing files, as PSA will be provided by
TF-M on non-single-v7-M targets. Delete any files that are not relevant
for PSA emulation mode.
 - Remove imported TF-M SPM
 - Remove Mbed SPM and tests
 - Remove Mbed-implemented PSA services and tests
 - Remove PSA_SRV_IMPL, PSA_SRV_IPC, PSA_SRV_EMUL and NSPE.
 - Replace PSA_SRV_EMUL and PSA_SRV_IMPL with MBED_PSA_SRV
 - Remove any files autogenerated by
   "tools/psa/generate_partition_code.py", which no longer exists.

Add new feature `PSA` to support PSA in Mbed OS.

Move the Mbed OS implementation of PSA services for v7-M targets (which
employ PSA emulation, and don't yet use TF-M) to
features/FEATURE_PSA/TARGET_MBED_PSA_SRV. Update the `requires`
attribute in TESTS/configs/baremetal.json to avoid breaking baremetal
testing builds.

Update .astyleignore to match new directory structure

Update Mbed TLS importer to place files into FEATURE_PSA

Create the following generic PSA targets:

* `PSA_Target` (Root level PSA generic target)
* `PSA_V7_M` (Single v7-M PSA generic target)
* `PSA_DUAL_CORE` (Dual-core PSA generic target)
* `PSA_V8_M` (v8-M PSA generic target)

Flatten MUSCA_NS and private MUSCA targets into public MUSCA targets.

Move mcuboot.bin to flat location (removing prebuilt folder)

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
Signed-off-by: Jaeden Amero <jaeden.amero@arm.com>
2020-06-18 12:16:20 +01:00
Devaraj Ranganna 01dd997d55 target: Include missing `cmsis_nvic.h`
The header `cmsis_nvic.h` defines vector start address in RAM
`NVIC_RAM_VECTOR_ADDRESS` which is used in
`mbed_boot.c:mbed_cpy_nvic()`. But `mbed_boot.c` only includes
`cmsis.h`. Due to this `mbed_cpy_nvic` becomes an empty function and the
vectors don't get relocated to RAM. This causes BusFault error when Mbed
OS tries to update any of the IRQ handlers.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:19 +01:00
Devaraj Ranganna db67302850 target: Add BL2 macro to MUSCA B target config
BL2 macro is used in `region_defs.h` to define the `BL2_HEADER_SIZE`.
Without BL2 macro, `BL2_HEADER_SIZE` is set to 0. This leads to
incorrect start address (Reset_Handler of Mbed OS) derived by TF-M based
on `region_defs.h` and BL2 macro.

BL2 macro is set for MUSCA B in TF-M.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:17 +01:00
Devaraj Ranganna e2af612a99 tools: Musca B1 signing strategy
Currently, the final binary (TF-M + Mbed OS) is signed after
concatenating TF-M and Mbed OS binaries. But TF-M signs the images
separately and then concatenates them. Update the Musca B1 signing
strategy to match TF-M.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2020-06-18 12:16:16 +01:00
Jaeden Amero dc22d89c7f musca_b1: Remove device-specific virtual NVIC
Use instead the general TF-M v8-M virtual NVIC which will be added in
the commit that replaces Mbed PSA with TF-M PSA:
features/FEATURE_PSA/TARGET_TFM/TARGET_TFM_V8M/src/cmsis_nvic_virtual.c
2020-06-18 12:16:14 +01:00
Vikas Katariya 8252f3ee6e psa: Add TF-M utility scripts to python path
When python3 is enforced to build the ARM_MUSCA_A1 or ARM_MUSCA_B1
targets, it is unable to find binary utility tool scripts which are
imported from TF-M.

The reason to use the python3 environment is as follows: Mbed OS + TFM
contained a faulty boot record TLV, which failed the attestation test
(TF-M regression). The data in the boot record TLV will be included in
the generated attestation token as 1 item in the SW_COMPONENTS claim.

This data (in the boot record TLV) is pre-encoded in CBOR format at
build time and appended to the image during the image signing process
(done by the imgtool Python3 script).

Signed-off-by: Vikas Katariya <vikas.katariya@arm.com>
2020-06-18 12:16:13 +01:00
Jaeden Amero f4b676b4ee psa: Fix style in psa_hrng.c 2020-06-18 12:16:12 +01:00