Commit Graph

76 Commits (c2a09abee8af43370785550c1f7867e2e51bb4e8)

Author SHA1 Message Date
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
Michael Schwarcz 58af676e9c CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2020-05-11 11:18:02 +01:00
Deepika 856989d5d4 CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2020-05-11 11:18:00 +01:00
Bartek Szatkowski b6313331cd CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2020-05-11 11:17:57 +01:00
Martin Kojtal fb4f9e5b19 [CMSIS_5]: Updated to a65b7c9a3 2020-05-11 11:17:50 +01:00
Michael Schwarcz 80f2475a89 CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2020-05-11 09:47:34 +01:00
Deepika fcaecd57ce CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2020-05-11 09:47:34 +01:00
Bartek Szatkowski 9f1e666732 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2020-05-11 09:47:34 +01:00
Martin Kojtal 48747cdb26 [CMSIS_5]: Updated to b5f0603d6 2020-05-11 09:47:34 +01:00
Martin Kojtal 5a985a7da5 cmsis: remove arm math
Fixes #12054

Not needed file, should be part of DSP. The functionality is part of the library provided
by CMSIS.
2020-01-03 12:25:39 +00:00
Jonatan Antoni 14150bb7c6 Core(A): Fixed __FPU_Enable function not to mess registers. (#589)
- Enhanced function to use only two temporary registers.
- Added used registers to clobber list.

Change-Id: If7c9462ed4424781e40379fbe12a5e4e3257920f
2019-05-21 19:25:58 +09:00
Michael Schwarcz e8f9faee7e CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.

(cherry picked from commit d3f7abdb7c)
2019-04-10 14:42:48 +03:00
Deepika cd54d2e02f CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)

(cherry picked from commit fb354752eb)
2019-04-10 14:42:43 +03:00
Bartek Szatkowski 58d23afd20 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2019-04-10 14:42:35 +03:00
Kevin Bracey 00c9005b4e [CMSIS_5]: Updated to ca812421 2019-04-10 14:41:35 +03:00
Kevin Bracey 07a2ca381b Move fault handlers to platform directory
Having them in cmsis causes grief when attempting to update CMSIS with
the importer script.
2019-04-10 14:36:52 +03:00
Martin Kojtal c08f51aa36 copyright 2019 fix 2019-02-15 13:37:40 +00:00
Martin Kojtal a32a76f014 cmsis conf: change license to apache 2.0 2019-02-14 13:54:31 +00:00
Michael Schwarcz d3f7abdb7c CMSIS/CORTEX-M: Don't build mbed_tz_context.c in TF-M targets
- TF-M v8m secure-side implements their own TZ context APIs so need to avoid building the Mbed implementation.
2019-01-10 18:06:56 +02:00
Martin Kojtal d2e9136ddb
Merge pull request #9167 from TomoYamanaka/hanlder_without_RTOS
Modify IRQ handler processing when unusing RTOS at Cortex-A
2019-01-04 08:42:11 +00:00
Martin Kojtal e245c1ecda
Merge pull request #9150 from kjbracey-arm/armc6_fpu
Check correct ARMC6 predefine for FP codegen
2018-12-20 10:47:32 +00:00
TomoYamanaka 65b4e72928 Modify IRQ handler processing without RTOS at Cortex-A IAR Compiler
In case of unusing RTOS, there is no processing against IRQ handler and it causes a linker error.
Therefore, I added this processing with WEAK attribute. Also I added cmain.S file at cmsis/TARGET_CORTEX_A folder.
2018-12-20 16:24:07 +09:00
Kevin Bracey 91f0be6ac3 Check correct ARMC6 predefine for FP codegen
For ARMC6, CMSIS headers were checking the `__ARM_PCS_VFP`, which
indicates hardfp ABI in use, when they need to check whether FP
code generation is enabled. Change this to `__ARM_FP`, so it
works for platforms using softfp ABI.

Change already present in CMSIS_5 repo, via commit
969822ae162539d50617d1e5a3634ee2fd3b60f6, but redone with local
search-and-replace.
2018-12-19 13:03:11 +02:00
Kevin Bracey f04904c6e8 CM3: Make ACTLR bit definitions conditional
The ACTLR register itself is conditional on chip revision, but its
bit definitions were always defined.

Make the the bit definitions also conditional, so it is possible to
produce portable code that sets DISDEFWBUF if available:

    #ifdef SCnSCB_ACTLR_DISDEFWBUF_Msk
       SCnSCB->ACTLR |= SCnSCB_ACTLR_DISDEFWBUF_Msk;
    #endif

(cherry-picked from CMSIS b2b04dbeece0a046556bfc320bef6b20bef3f16f)
2018-12-13 16:31:53 +02:00
Naveen Kaje 091010e9a2 mbed_fault_handler: fix build warning
Fixes warning

BUILD\NRF52840_DK\GCC_ARM\mbed-os\cmsis\TARGET_CORTEX_M\mbed_fault_handler.o
.\mbed-os\cmsis\TARGET_CORTEX_M\mbed_fault_handler.c
[Warning] mbed_fault_handler.c@149,5: implicit declaration
of function 'memcpy' [-Wimplicit-function-declaration]
2018-12-11 14:59:36 -06:00
Senthil Ramakrishnan a07a373c9f Change the reboot-max value semantics and code style and other fixes 2018-11-16 14:00:00 -06:00
Senthil Ramakrishnan 6181394e37 Error and fault handling changes for crash reporting 2018-11-16 13:59:59 -06:00
Kevin Bracey 82a90721eb Fault handler: fix printf format specifiers 2018-10-31 14:49:21 +02:00
Senthil Ramakrishnan 230ba03582 Space optimization to fault handlers 2018-10-23 13:05:56 -05:00
Senthil Ramakrishnan 797538c854 Moving fault handlers under cmsis 2018-10-23 13:05:56 -05:00
Russ Butler c13c3e30cd Fix the CMSIS macro ARM_MPU_RASR
The update to CMSIS 5.4.0 broke the macro ARM_MPU_RASR. This patch
pulls in the upstream fix from CMSIS:
2ead2adffb (diff-e4bfba5228373d368ac2543d6e5bd4d0)
2018-09-18 17:50:21 -05:00
Russ Butler 308dfe3a53 Fix CMSIS __RESTRICT define for IAR
Revert the define __RESTRICT from "__restrict" to "restrict". This
fixes compilation for IAR.
2018-08-25 20:41:12 -05:00
Deepika fb354752eb CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure

(Cherry picked from d0a43b8af0)
2018-08-25 20:41:10 -05:00
Bartek Szatkowski ace5df9079 CMSIS/RTX: Reintroduce arm_math.h
(cherry picked from commit 6a6e3ac0eb)
2018-08-25 20:41:10 -05:00
Russ Butler 342841aa0f [CMSIS_5]: Updated to 0b521765 2018-08-25 20:41:00 -05:00
Oren Cohen 787317b7eb Remove uVisor from mbed-os 2018-08-22 16:36:59 +03:00
Toyomasa Watarai c37875c690 Add volatile modifier for CP15 accessors
Add volatile modifier to prevent ARM compiler to remove inline function calls for __set_CP and __get_CP.
2018-06-07 16:47:12 +09:00
Cruz Monrreal 1fa333df82
Merge pull request #7032 from TomoYamanaka/feature-rtx_update
Update cmsis/rtx for Cortex-A
2018-06-02 20:52:40 -05:00
ccli8 58608ec589 Fix RTOS-less build failed with cmsis/RTE_Components.h 2018-05-30 15:25:01 +08:00
Vladimir Umek b6c4139328 RTX5: ignoring CPUID field in GIC implementation
updated interrupt handler for GCC and IAR
2018-05-28 13:54:44 +09:00
Bartek Szatkowski 6a6e3ac0eb CMSIS/RTX: Reintroduce arm_math.h 2018-05-14 12:18:21 +01:00
Jaeden Amero cb2b91cac7 CMSIS/RTX: uVisor: Import v0.30.0 2018-05-14 12:18:21 +01:00
Bartek Szatkowski 07aad3c862 CMSIS/RTX: Adapt Mbed OS to CMSIS/RTX device support scheme 2018-05-14 12:18:21 +01:00
Bartek Szatkowski 8afbd66763 [CMSIS_5]: Updated to 49ac527a 2018-05-14 12:18:20 +01:00
ccli8 02730f0d35 Move defines into "cmsis/RTE_Components.h" to make CMSIS files less changed 2018-04-26 11:31:03 +08:00
ccli8 47c3197f13 Support RTOS-less secure image build with Cortex-M23/M33 2018-04-26 09:33:09 +08:00
Deepika d0a43b8af0 CMSIS/RTX: Patch to conditionally compile
tz_context.c should be compiled only for secure world,
definition of API's in tz_context.h should be part of secure
binary/bootloader when building mbed-os as non-secure
2018-04-11 11:41:26 -05:00
Deepika 4043d95396 Trustzone stack requirement for Mbed-OS is 512 bytes
Added config parameter for TZ stack size and update code to add correct header
file.
2018-03-28 11:20:11 -05:00
Deepika ae2e2b942b Add TZ_context function
TZ_context functions are part of secure state binary and are used to handle
secure stack for thread execution.Template implementation from CMSIS is used,
can be enhanced in future.
2018-03-27 10:51:19 -05:00
Jonatan Antoni 063717d90d Core(A): Changed macro __DEPRECATED to CMSIS_DEPRECATED. (Issue #287)
__DEPRECATED conflicts with a predefined macro in GCC C++ mode.
2017-12-21 14:09:25 +09:00