Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
539 commits
Select commit Hold shift + click to select a range
3f91235
CC3XX: Compute shared secret following SEC1 paragraph 3.3.1
adeaarm Mar 11, 2024
ff32fe0
CC3XX: Add ECDH entry point for raw key agreement
adeaarm Mar 11, 2024
304d8e4
Config: Correctly set default attestation token profile
hunkob Mar 20, 2024
ea35e9b
platform: nordic_nrf: Make NRFX_ASSERT use SPM_ASSERT
vlilleboe Mar 18, 2024
d316e3b
Platform: RSE: Add simplified startup file for bootloaders
jf549 Mar 7, 2024
8ae8174
Platform: nxp: Workaround CMSISv6 update error
butok Mar 15, 2024
f2a4f91
SPM: Mask NS interrupts in Secure thread mode execution
Sherryzhang2 Sep 12, 2023
2b84e9a
iararm: Move __NO_RETURN macro before function definitions
gergelykarm Mar 25, 2024
76a485e
Platform: Alcor: Add armchina alcor an557 platform port
cpussw01 Mar 15, 2024
0ee4a54
RSE: host_drivers: Fix NI-Tower APU re-configuration issues
arnoldgb-arm Jan 17, 2024
3f80976
RSE: host_drivers: Check region overlap for NI-tower subfeature configs
arnoldgb-arm Jan 18, 2024
8fcdbdc
RSE: host_drivers: Add device config struct to NI-Tower subfeatures
arnoldgb-arm Feb 12, 2024
27501cf
RSE: host_drivers: Allow NI-Tower config init to next available region
arnoldgb-arm Feb 11, 2024
f09930f
RSE: Fremont: Add host_css_memory_map.h
arnoldgb-arm Jan 15, 2024
b36f0c7
RSE: Fremont: Add system control NI-Tower interface ids
arnoldgb-arm Feb 25, 2024
dc0f760
RSE: Fremont: Add rse_main_axis PSAM config
arnoldgb-arm Feb 12, 2024
a6c960f
RSE: Fremont: Add scp_axis PSAM config
arnoldgb-arm Feb 11, 2024
7d42275
RSE: Fremont: Add mcp_axis PSAM config
arnoldgb-arm Feb 11, 2024
8f0fbbb
RSE: Fremont: Add 'host_clus_util_lcp_memory_map.h'
arnoldgb-arm Feb 26, 2024
a14f158
RSE: Fremont: Add rse_scp_axis PSAM config
arnoldgb-arm Feb 6, 2024
1376539
RSE: Fremont: Add mcp_axis APU config
arnoldgb-arm Feb 13, 2024
5589f82
RSE: Fremont: Add rsm_axim APU config
arnoldgb-arm Feb 11, 2024
92663e8
RSE: Fremont: Add rsm_apbm APU config
arnoldgb-arm Feb 11, 2024
3d524b9
RSE: Fremont: Add rse_scp_axim APU config
arnoldgb-arm Feb 11, 2024
7395f04
RSE: Fremont: Add rse_mcp_axim APU config
arnoldgb-arm Feb 11, 2024
7fedd49
RSE: Fremont: Configure System Control NI-Tower under AON
arnoldgb-arm May 16, 2023
c0fdad0
RSE: Increase measureboot shared memory size
joel-goddard-arm Aug 15, 2023
47d70be
RSE: Fremont: Load SCP image
joel-goddard-arm Feb 5, 2024
aca4c0b
RSE: Fremont: Load MCP image
joel-goddard-arm Feb 5, 2024
b549a6d
RSE: Fremont: Add driver for SCP/MCP
joel-goddard-arm Feb 13, 2024
acf6200
RSE: Fremont: Configure SCP and MCP drivers
joel-goddard-arm Feb 13, 2024
2933bb7
RSE: Fremont: Release MCP and SCP CPU from halt
joel-goddard-arm Feb 13, 2024
c12f788
RSE: Fremont: Allow SCP to control SCP ATU
joel-goddard-arm Feb 5, 2024
dacc371
RSE: Remove SAM config from OTP and provisioning
RcColes Mar 15, 2024
34a445f
RSE: Align integrity checked items to 8 bytes
RcColes Mar 15, 2024
8c592fb
RSE: Sanity check that LCM zero counts fit
RcColes Feb 29, 2024
209d61f
RSE: Align manufacturing data to 8 byte boundary
RcColes Feb 29, 2024
ade5657
RSE: Update DMA ICS to use 8-byte ICS words
RcColes Feb 29, 2024
83c4393
RSE: Change bringup helpers order
RcColes Feb 29, 2024
623e18c
RSE: Log provisioning progress
RcColes Mar 4, 2024
fac1e8c
RSE: Make integrity checker accesses privileged
RcColes Mar 5, 2024
9126154
Platform: Add option to get UART init state
RcColes Mar 4, 2024
79357d4
RSE: Fremont: Add app_axis PSAM config
arnoldgb-arm Feb 6, 2024
cf83ee1
RSE: Fremont: Add lcp_axis PSAM config
arnoldgb-arm Feb 12, 2024
dddcc88
RSE: Fremont: Add app_axis APU config
arnoldgb-arm Feb 6, 2024
298956c
RSE: Fremont: Add app_axim APU config
arnoldgb-arm Feb 11, 2024
5059e16
RSE: Fremont: Add lcp_axim APU config
arnoldgb-arm Feb 11, 2024
06ceef8
RSE: Fremont: Add lcp_axis APU config
arnoldgb-arm Feb 11, 2024
11b9009
RSE: Fremont: Configure System Control NI-Tower under SYSTOP
arnoldgb-arm Feb 25, 2024
d72781e
Mailbox: Tweak behaviour of clear_queue_slot_all_replied()
UEWBot Mar 8, 2024
e8e7cfe
RSE: Fremont: Load LCP 0 ramfw image
joel-goddard-arm Dec 6, 2023
5c29c5f
RSE: Fremont: Load LCP 1-N ramfw images
joel-goddard-arm Dec 6, 2023
3e4b6da
Move mailbox NSPE only data to NS side
sd75t3p Dec 11, 2023
cb5e8b1
Improves clarity in build instructions.
mdalzellarm Mar 20, 2024
51de710
SPM: Update thread context before scheduling
matetothpal Mar 21, 2024
1fae9b1
RSE: Add provisioning key derivation script
RcColes Mar 7, 2024
63d5759
CC3XX: Align KDF to include countermeasure
RcColes Mar 7, 2024
a2e39ca
Platform: Add secure provisioning functions to OTP
RcColes Mar 8, 2024
53fa6ad
RSE: Perform early LCS change
RcColes Mar 8, 2024
c12d2f1
RSE: Make RSE_TP_MODE cmake flag set correct mode
RcColes Mar 11, 2024
d7f3f65
RSE: Update DMA ICS
RcColes Mar 25, 2024
27803b5
RSE: Mask DCUs on entrance to SP mode
RcColes Mar 25, 2024
eef4d78
DPE: do not export from a component in the platform
adeaarm Apr 4, 2024
c83c83a
Platform: nxp: fix nxp maintainer github account
butok Apr 4, 2024
931eef8
RSE: Update tf-m-extras version
vijayenthiran-arm Mar 22, 2024
fe68eed
RSE: Prevent writing invalid intermediate DCU
RcColes Apr 4, 2024
1436367
RSE: Remove pre-check on OTP writes
RcColes Apr 4, 2024
8d9cda9
Build: Update SHA for tf-m-extras in RSE build
adeaarm Apr 5, 2024
266e5a5
Build: Update tf-m-extras commit id for RSE
maulik-arm Apr 5, 2024
b445e3c
RSE: Fremont: Configure SCP-RSE MHUs
joel-goddard-arm Feb 6, 2024
4414c79
RSE: Fremont: Wait for SCP signal before LCP load
joel-goddard-arm Feb 6, 2024
0be3eeb
RSE: Fremont: Override LCP image boot measurement
arnoldgb-arm Mar 10, 2023
b11e50e
RSE: Fremont: Move ni-tower lib inits to host_system
arnoldgb-arm Mar 19, 2024
a855486
RSE: Fremont: Add peripheral NI-Tower interface ids
arnoldgb-arm Feb 25, 2024
d79d431
RSE: Fremont: Add ram_axim APU config in Peripheral NI-Tower
arnoldgb-arm Feb 12, 2024
ada447d
RSE: Fremont: Add UART configs to Peripheral NI-Tower
arnoldgb-arm Feb 12, 2024
cce59bf
RSE: Fremont: Add WDOG configs to Peripheral NI-Tower
arnoldgb-arm Feb 12, 2024
d610316
RSE: Fremont: Add eccreg_apbm APU config to Peripheral NI-Tower
arnoldgb-arm Feb 12, 2024
ee282e5
RSE: Fremont: Add gtimer configs to Peripheral NI-Tower
arnoldgb-arm Feb 12, 2024
2ca8c58
RSE: Fremont: Configure Peripheral NI-Tower APU
arnoldgb-arm May 25, 2023
8bd70ba
Build: Bump recommended tf-m-tests version
adeaarm Apr 8, 2024
833b748
Build: Move DMA350 under common Arm drivers
david-hazi-arm Mar 28, 2024
5915caf
Build: Move LCM and KMU drivers to the common Arm drivers directory
david-hazi-arm Mar 28, 2024
ca310f9
Build: Move TGU driver to the common Arm drivers directory
david-hazi-arm Mar 28, 2024
75a980b
Platform: CS1000: Replace OpenAMP with RSE_COMMS
bence-balogh Feb 26, 2024
5fbc39f
platform: nordic_nrf: Ensure debug symbols for SystemInit are added
SebastianBoe Mar 18, 2024
01b48f2
platform: nordic_nrf: Add MDK defines required by tfm_ns
SebastianBoe Mar 18, 2024
2ed1f3f
platform: nordic_nrf: add support for more UARTs
SebastianBoe Mar 18, 2024
c200d0b
platform: nordic_nrf: Support RRAMC
SebastianBoe Mar 18, 2024
10d80a1
platform: Check if ITS_MAX_ASSET_SIZE is big enough for entropy seed.
mswarowsky Mar 5, 2024
5a5c539
Platform: nxp: Fix warning in tfm_hal_isolation.c
butok Apr 4, 2024
88ba73b
Platform: LPCXpresso55s69: Fix NXP MCUx SDK repository address.
butok Apr 4, 2024
143401e
SPM: Manage SPM boundary during psa api execution
chesun01 Nov 15, 2023
9215201
FIH: Fix code using fih_eq()
UEWBot Apr 1, 2024
479bfde
Change fih_validate() to return int
UEWBot Mar 28, 2024
eecbd8f
FIH: Change fih_delay() to return int
UEWBot Mar 28, 2024
98a38d1
Change fih_eq() and fih_not_eq() to macros
UEWBot Apr 1, 2024
7c3b0aa
RSE: Fremont: Load AP BL1 image
joel-goddard-arm Jun 23, 2023
a39e0d1
RSE: Fremont: Signal SCP when images have loaded
joel-goddard-arm Dec 11, 2023
0f03dfa
RSE: Add SMMUv3 host driver
joel-goddard-arm Feb 15, 2024
4014f9b
RSE: Fremont: Configure to SMMU disable GPC and enable access
vijayenthiran-arm Sep 11, 2023
e7e1ca8
RSE: Fremont: Support for RD-Fremont-Cfg1 variant
shriram-k-arm Mar 15, 2023
f1ec5e2
RSE: Fremont: Configure BL2 for multichip
joel-goddard-arm Feb 9, 2024
2cd5ead
RSE: host_drivers: prepare ni-tower to support multichip address maps
arnoldgb-arm Mar 19, 2024
964d65b
RSE: Fremont: Add chip address offset to sysctrl NI-Tower configs
arnoldgb-arm Feb 12, 2024
e5932fd
RSE: Fremont: Add mhu send frame memory region for sysctrl NI-Tower
arnoldgb-arm Feb 12, 2024
b6e9a76
RSE: Fremont: Add sideband MHU devices
joel-goddard-arm Nov 16, 2023
6a5f252
RSE: Fremont: Support for RD-Fremont-Cfg2 variant
joel-goddard-arm Feb 9, 2024
d82aec8
RSE: Fremont: Configure multichip topology
joel-goddard-arm Nov 16, 2023
b702449
RSE: host_drivers: Enforce const correctness on NI-Tower driver
arnoldgb-arm Mar 28, 2024
6521861
RSE: host_drivers: Refactor NI-Tower subfeatures device init
arnoldgb-arm Feb 29, 2024
660294a
RSE: Fremont: Change AP_BL1 region to read-only after image load
arnoldgb-arm Jan 18, 2024
a82dbe1
RSE: host_drivers: Add skip discovery node support for NI-Tower
arnoldgb-arm Nov 9, 2023
3cee415
RSE: Fremont: Add skip_discovery_list attr to ni_tower instances
arnoldgb-arm Nov 9, 2023
272a22e
RSE: Fremont: Prune SYSTOP discovery in AON target configurations
arnoldgb-arm Feb 7, 2024
51218df
PSoC: Fix compilation errors when FIH is enabled.
UEWBot Mar 28, 2024
bd4582c
Docs: Fix broken URLs where possible.
Anton-TF Apr 4, 2024
baf7000
Platform: Add Primecell GPIO (PL061) driver
anubhav-arm Mar 19, 2024
6136768
RSE: add GPIO device config and definitions
anubhav-arm Mar 19, 2024
23e404a
RSE: fix GPIO read in bringup helper
anubhav-arm Apr 3, 2024
1489d06
RSE: Document ROM release
RcColes Apr 9, 2024
027b6ba
build: Fix typo in Armclang toolchain file
bence-balogh Apr 9, 2024
1d87729
Platform: PT_RO_ symbols added to L2/L1 linker files
hunkob Apr 9, 2024
92c35fb
Config: Added CONFIG_TFM_AROT_PRESENT define
hunkob Apr 9, 2024
78cba2a
Platform: Add fatal error handling header
RcColes Mar 4, 2024
8ca156e
RSE: Add custom fatal error permissions
RcColes Mar 20, 2024
afd0b75
RSE: Prevent fatal error logging during TRAM setup
RcColes Mar 19, 2024
8568cbe
RSE: Catch fatal errors in LCM early
RcColes Mar 4, 2024
cc8207a
RSE: Catch fatal errors in IC early
RcColes Mar 4, 2024
6843dbe
RSE: Add KMU fatal error handling
RcColes Mar 7, 2024
4001943
CC3XX: Add fatal error handling
RcColes Mar 7, 2024
1b980e5
build: Add IAR support to Corstone-315
david-hazi-arm Mar 27, 2024
b83f322
platform: ext: nordic_nrf: Fix building issue
Vge0rge Apr 4, 2024
f063c20
platform: Add configurable S data size for CS3xx
david-hazi-arm Apr 3, 2024
0e79003
platform: nordic_nrf: Remove flash driver guard
Vge0rge Apr 10, 2024
efc05d4
RSE: Allow platforms to configure NS data size
RcColes Mar 15, 2024
b112370
RSE: Enable XIP by default on TC
RcColes Mar 13, 2024
6547b2a
RSE: Remove RSE_ENABLE_TRAM option
RcColes Apr 9, 2024
7cd3292
RSE: Set default isolation level to 2
RcColes Apr 10, 2024
e941117
Platform: Corstone1000: Use Mbed TLS default config files on BL1_x
ememarar Apr 10, 2024
8bb9851
Crypto: Align PSA headers entirely to Mbed TLS 3.6.0
adeaarm Jan 16, 2024
ff4029e
CC3XX: In CCM do not print on ccm_finish() exit
adeaarm Apr 11, 2024
b4d1b5f
Test: Bump required version
adeaarm Apr 11, 2024
fa4749b
PS: Print which encryption algorithm is used
adeaarm Apr 11, 2024
41c146d
Crypto: Fix licenses for configs to be consistent
adeaarm Apr 11, 2024
99f6386
GCC: Move crt init r/o data to flash section
sd75t3p Apr 10, 2024
8869844
Build: Bump test revision
adeaarm Apr 11, 2024
9f2ba9d
SPM: Fix FLIH return to Privileged Thread mode
matetothpal Feb 22, 2024
c908ea1
SPM: Set dedicated SPM stack size appropriately
UEWBot Apr 10, 2024
c8f8728
SPM: Use const struct service_t where possible
UEWBot Apr 9, 2024
c900759
Test: Bump required version
adeaarm Apr 11, 2024
acda8bb
Platform: CS1000: Fix printf issue in early init
bence-balogh Apr 12, 2024
e6f5d8c
TFMV-7: SPM: Fix ARoT to PRot data access vulnerability.
Anton-TF Apr 3, 2024
a780d10
Exception: Fix PSPSEL for ARMv8-M exception
sd75t3p Feb 5, 2024
913ca39
RSE: Add release errata
RcColes Apr 12, 2024
da17a7a
Fix: Revert c0d7ef0 commit to fix signature configuration
davidvincze Apr 9, 2024
4697365
Platform: nxp: Fix compilation error in tfm_hal_isolation.c
butok Apr 11, 2024
a77a728
BL2: Print signature scheme on boot
adeaarm Apr 12, 2024
5257040
Platform: nxp: Fix readme to follow new build approach.
butok Apr 12, 2024
b5bcec6
stm : Optimized performance of AES function in aes_alt.c
ahmadstm Dec 1, 2023
e8f42fa
ps: Fix the support for disabling PS_ENCRYPTION
SebastianBoe Mar 18, 2024
078304c
SPM: Increase BASEPRI only if CONFIG_TFM_USE_TRUSTZONE is ON
hunkob Apr 12, 2024
afd24bb
docs: Fix typos etc
nicola-mazzucato-arm Feb 14, 2024
6f1c07d
Platform: Use psa_key_bits_t when dealing with key sizes
adeaarm Apr 13, 2024
6e5fc20
SPM: Remove local context control
Jianliang-Shen Nov 27, 2023
d57e18f
Test: Update tf-m-tests version
Anton-TF Apr 15, 2024
11ada2a
RSE: Update tf-m-extras version
maulik-arm Apr 15, 2024
01a5b93
Revert "RSE: Remove RSE_ENABLE_TRAM option"
RcColes Apr 15, 2024
ac52a5a
SPM: Add missing header include
adeaarm Apr 16, 2024
b0b8fc5
Crypto: comment un-needed items in the client config
adeaarm Apr 16, 2024
233f6a5
Crypto: Enhance definitions of Crypto function IDs
Sep 29, 2023
0ce1126
Platform: Align copy/zero section to 4 bytes
hunkob Apr 16, 2024
c8bf030
Platform: Fix GCC13 warning
hunkob Apr 17, 2024
214fbe4
BL2: Add a thin PSA crypto core
adeaarm Feb 9, 2024
74437e0
RSE: add BL2 RoT public keys to provisioning data
davidvincze Apr 4, 2024
29d96a0
RSE: provision raw keys instead of RFC5480 encoded ones
davidvincze Apr 9, 2024
5171fa5
BL2: add dummy RoT public key provisioning for builtin keys
davidvincze Apr 4, 2024
0accf98
BL2: provision raw keys instead of RFC5480 encoded ones
davidvincze Apr 10, 2024
6445f13
BL2: Increase MAX_BOOT_RECORD_SZ for larger records
davidvincze Apr 15, 2024
db398db
BL2: add builtin key support for thin PSA core
davidvincze Apr 4, 2024
fa6018c
Revert "Platform: Fix GCC13 warning"
adeaarm Apr 17, 2024
a3a0f26
Platform: Fix GCC 12 onwards warning on LOAD segment RWX permissions
hunkob Apr 17, 2024
c98c204
SPM Remove partition's p_interrupts
UEWBot Apr 16, 2024
3a2bd7c
SPM: Make basepri_set_by_ipc_schedule static
UEWBot Apr 16, 2024
9290838
SPM: Set type of partition's p_metadata
UEWBot Apr 16, 2024
80427ea
build: Use cmake for READONLY attribute handling
david-hazi-arm Apr 17, 2024
e68a6b5
SPM: Change type of thread p_context_ctrl
UEWBot Apr 15, 2024
272317e
FIH: Protect tfm_hal_boundary_need_switch()
UEWBot Apr 5, 2024
d825ed4
corstone315: Add the missing mbedtls config files definitions
david-hazi-arm Apr 11, 2024
5575f92
build: Add BL1 compile and linker flags to BL1
david-hazi-arm Apr 15, 2024
6e4f828
iar: Add BL1 and BL2 compile and linker flags for IAR
david-hazi-arm Apr 15, 2024
d3ee2f8
Build: musca_s1: Remove CMSIS_Driver/Include from include path
adeaarm Apr 18, 2024
add545e
docs/design: Add missing sections for Isolation APIs
nicola-mazzucato-arm Feb 19, 2024
c5fbee0
docs/integration: Add missing description of file in list
nicola-mazzucato-arm Mar 8, 2024
684ba26
Crypto: psa_get_key_attributes() must not overwrite the out_vec
adeaarm Apr 19, 2024
a2f4b09
Profiles: fix file permission
adeaarm Apr 19, 2024
9949592
corstone315: Add CMSE flag for bootloaders
david-hazi-arm Apr 15, 2024
bbf29f3
corstone310: Add CMSE flag for bootloader
david-hazi-arm Apr 16, 2024
d3f18d2
corstone300: Add CMSE flag for bootloader
david-hazi-arm Apr 16, 2024
f98fa33
Crypto: Amend prints during init
adeaarm Apr 18, 2024
ad43e7f
mps3: Add missing mbedtls config for the provisioning bundle too
david-hazi-arm Apr 22, 2024
ebbb93e
Build: Take the latest MCUBoot version
Anton-TF Apr 22, 2024
357069e
SPM: Introduce uniform Client ID mapping
Sherryzhang2 Nov 16, 2023
4052b84
SPM: Set p_partition_metadata directly
UEWBot Apr 19, 2024
9cdef4f
SPM: Panic if metadata is broken
UEWBot Apr 19, 2024
92c0a42
Profile: Remove redundant check in profile_medium_arotless
hunkob Apr 19, 2024
cc45a7b
build: Add IAR FPU support
david-hazi-arm Apr 15, 2024
5643f97
SPM: tfm_multi_core: Add missing header inclusion
nicola-mazzucato-arm Apr 23, 2024
3f1a808
SPM: tfm_multi_core: Add missing stdint.h include
adeaarm Apr 23, 2024
face920
SPM: FPU: Use the correct defines to access ICB
adeaarm Apr 24, 2024
ef1ce97
Platform: RSE: Fix NSC config for XIP mode
jf549 Apr 23, 2024
14a153f
Build: Update MCUboot version to v2.1.0-rc1
davidvincze Apr 25, 2024
b6d411c
Platform: CS315: Fix attestation issue
bence-balogh Apr 25, 2024
df8e657
iar: Fix v8.1m arch check
david-hazi-arm Apr 25, 2024
16cd993
gnu: Add value (=1) to the v8.1m arch define
david-hazi-arm Apr 25, 2024
9432f57
SPM: Look for ICB in case it's v8.1-M
adeaarm Apr 25, 2024
7c9031f
Build: Fix compiler warning: variable set but unused
maulik-arm Apr 25, 2024
e0f8b00
Docs: Correct profile medium-ARotless docs
UEWBot Apr 18, 2024
b20a007
Build: Use built-in EC-P256 keys for BL2 signatures
davidvincze Apr 29, 2024
bdbcdb5
Tests: Bump recommended tf-m-tests revision
adeaarm Apr 29, 2024
f8f72f4
docs: Add Long Term Support (LTS) process
Anton-TF Feb 15, 2024
5ee8211
Docs: Update the TF-M Crypto service design doc
adeaarm Apr 22, 2024
2179d20
BL2: Fix the condition for including sha.h
davidvincze May 2, 2024
333a49b
Test: Bump recommended version
adeaarm May 7, 2024
1cb5f7c
Docs: Threat model updates for TF-M v2.1.0
jf549 May 9, 2024
88ae91d
Build: Update MCUboot version to v2.1.0
davidvincze Apr 30, 2024
9a3747b
Docs: Update maintainers file
adeaarm May 7, 2024
0c4c99b
Docs: Release notes for v2.1.0
adeaarm May 7, 2024
1ad4296
Revert "Crypto: psa_get_key_attributes() must not overwrite the out_vec"
tomi-font May 10, 2024
0b4f965
Revert "Crypto: Align PSA headers entirely to Mbed TLS 3.6.0"
tomi-font May 10, 2024
4275690
Revert "Platform: nxp: Add initialization flag to the CMSIS USART dri…
tomi-font May 10, 2024
600baf3
Revert "Crypto: Add FPU flags for p256m"
tomi-font May 10, 2024
7baa344
Revert "trusted-firmware-m: platform: lpcxpresso55s69: Update SDK 2.1…
tomi-font May 10, 2024
1369b2e
Revert "platform: Fix __STRINGIFY redefined warning"
tomi-font May 10, 2024
2e50b7d
Revert "interface: Add workaround for mbedtls using PSA"
tomi-font May 10, 2024
99384b5
Revert "zephyr: module: Add zephyr module file"
tomi-font May 10, 2024
37f0319
Revert "lib: ext: Disable t_cose and qcbor if not required"
tomi-font May 10, 2024
292e1f8
Revert "build: gcc: Force DWARF v4"
tomi-font May 10, 2024
2892a5e
Merge tag 'TF-Mv2.1.0'
tomi-font May 14, 2024
320c1e2
build: gcc: Force DWARF v4
nordicjm Sep 30, 2022
1a0ad06
lib: ext: Disable t_cose and qcbor if not required
microbuilder Feb 9, 2023
7591db4
zephyr: module: Add zephyr module file
joerchan Oct 20, 2021
08ae38f
platform: lpcxpresso55s69: download SDK version MCUX_2.15.000
tomi-font May 14, 2024
9b48360
Revert "platform: nordic_nrf: Move partition folder for nordic boards"
tomi-font May 13, 2024
3980d5e
platform: nordic_nrf: restore TFM_DRIVER_STDIO's default value
tomi-font May 14, 2024
166381c
Platform: Nordic: Do not refer SPM_ASSERT in nrfx_glue.h for DOMAIN_N…
adeaarm May 4, 2024
15e728a
build: Rename RECOMMEND_TFM_TESTS_VERSION to RECOMMENDED_TFM_TESTS_VE…
tomi-font May 15, 2024
dc38db8
build: Allow bypassing the tf-m-tests version checks
tomi-font May 15, 2024
222d12f
SPM: fix compilation warning
tomi-font May 17, 2024
a03e689
platform: nordic_nrf: restore ARM_Flash_Uninitialize()
tomi-font May 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ localrepos.cmake
**/__pycache__
*.pyc

.clang-format
1 change: 1 addition & 0 deletions .gitreview
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
host=review.trustedfirmware.org
port=29418
project=TF-M/trusted-firmware-m
defaultbranch=main
11 changes: 1 addition & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,7 @@
#
#-------------------------------------------------------------------------------

cmake_minimum_required(VERSION 3.15)

# CMake 3.21 and above requests projects to specify cpu/arch compile and link flags explicitly in
# Armclang. Link: https://cmake.org/cmake/help/latest/policy/CMP0123.html
# It is aligned with current Armclang toolchain implementation.
# Explictly set this policy to NEW behavior to eliminate long warnings. It shall be set in root
# CMakeLists.txt otherwise project() will throw out the warnings.
if(POLICY CMP0123)
cmake_policy(SET CMP0123 NEW)
endif()
cmake_minimum_required(VERSION 3.21)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(version)
Expand Down
6 changes: 5 additions & 1 deletion bl1/Kconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2023, Arm Limited. All rights reserved.
# Copyright (c) 2023-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand Down Expand Up @@ -84,6 +84,10 @@ config TFM_BL1_2_IN_OTP
bool "Whether BL1_2 is stored in OTP"
default y

config TFM_BL1_2_IN_FLASH
bool "Whether BL1_2 is stored in FLASH"
default n

config BL1_HEADER_SIZE
hex "BL1 Header size"
default 0x800
Expand Down
12 changes: 11 additions & 1 deletion bl1/bl1_1/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
# Copyright (c) 2021-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand All @@ -26,6 +26,16 @@ target_link_options(bl1_1
$<$<C_COMPILER_ID:IAR>:--map\;${CMAKE_BINARY_DIR}/bin/bl1_1.map>
)

target_compile_options(bl1_1
PUBLIC
${BL1_COMPILER_CP_FLAG}
)

target_link_options(bl1_1
PUBLIC
${BL1_LINKER_CP_OPTION}
)

target_sources(bl1_1
PRIVATE
main.c
Expand Down
3 changes: 3 additions & 0 deletions bl1/bl1_1/bl1_1_shared_symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ tfm_plat_init_nv_counter
tfm_plat_otp_read
tfm_plat_read_nv_counter
tfm_plat_set_nv_counter
__ubsan_*
log_error
log_error_permissions_check
4 changes: 2 additions & 2 deletions bl1/bl1_1/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
# Copyright (c) 2021-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand All @@ -11,7 +11,7 @@ target_sources(bl1_1_lib
INTERFACE
$<$<BOOL:${TFM_BL1_DEFAULT_PROVISIONING}>:${CMAKE_CURRENT_SOURCE_DIR}/provisioning.c>
$<$<BOOL:${TFM_BL1_2_IN_OTP}>:${CMAKE_CURRENT_SOURCE_DIR}/image_otp.c>
$<$<NOT:$<BOOL:${TFM_BL1_2_IN_OTP}>>:${CMAKE_CURRENT_SOURCE_DIR}/image_flash.c>
$<$<BOOL:${TFM_BL1_2_IN_FLASH}>:${CMAKE_CURRENT_SOURCE_DIR}/image_flash.c>
)

target_include_directories(bl1_1_lib
Expand Down
13 changes: 7 additions & 6 deletions bl1/bl1_1/lib/image_flash.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2022, Arm Limited. All rights reserved.
* Copyright (c) 2022-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
Expand All @@ -12,16 +12,17 @@
#include "region_defs.h"
#include "fih.h"

extern ARM_DRIVER_FLASH FLASH_DEV_NAME;
extern ARM_DRIVER_FLASH FLASH_DEV_NAME_BL1;

fih_int bl1_read_bl1_2_image(uint8_t *image)
{
uint32_t flash_offset;
fih_int fih_rc;

fih_rc = fih_int_encode(FLASH_DEV_NAME.ReadData(BL1_2_IMAGE_FLASH_OFFSET,
image,
BL1_2_CODE_SIZE);
fih_rc = fih_int_encode_zero_equality(
fih_not_eq(BL1_2_CODE_SIZE,
(FLASH_DEV_NAME_BL1.ReadData(BL1_2_IMAGE_FLASH_OFFSET,
image,
BL1_2_CODE_SIZE))));

FIH_RET(fih_rc);
}
10 changes: 10 additions & 0 deletions bl1/bl1_1/lib/provisioning.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,20 @@ enum tfm_plat_err_t tfm_plat_provisioning_perform(void)
return TFM_PLAT_ERR_INVALID_INPUT;
}

err = tfm_plat_otp_secure_provisioning_start();
if (err != TFM_PLAT_ERR_SUCCESS) {
return err;
}

err = provision_assembly_and_test();
if (err != TFM_PLAT_ERR_SUCCESS) {
return err;
}

err = tfm_plat_otp_secure_provisioning_finish();
if (err != TFM_PLAT_ERR_SUCCESS) {
return err;
}
}

return TFM_PLAT_ERR_SUCCESS;
Expand Down
35 changes: 23 additions & 12 deletions bl1/bl1_1/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2023, Arm Limited. All rights reserved.
* Copyright (c) 2021-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
Expand All @@ -10,7 +10,9 @@
#include "tfm_plat_provisioning.h"
#include "tfm_plat_otp.h"
#include "boot_hal.h"
#ifdef TFM_MEASURED_BOOT_API
#include "boot_measurement.h"
#endif /* TFM_MEASURED_BOOT_API */
#include "psa/crypto.h"
#include "region_defs.h"
#include "log.h"
Expand Down Expand Up @@ -55,7 +57,7 @@ static void collect_boot_measurement(void)
}
#endif /* TFM_MEASURED_BOOT_API */

static fih_int validate_image_at_addr(uint8_t *image)
fih_int validate_image_at_addr(const uint8_t *image)
{
enum tfm_plat_err_t plat_err;
uint8_t stored_bl1_2_hash[BL1_2_HASH_SIZE];
Expand Down Expand Up @@ -85,7 +87,9 @@ static fih_int validate_image_at_addr(uint8_t *image)

int main(void)
{
int rc;
fih_int fih_rc = FIH_FAILURE;
fih_int recovery_succeeded = FIH_FAILURE;

fih_rc = fih_int_encode_zero_equality(boot_platform_init());
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
Expand Down Expand Up @@ -116,17 +120,24 @@ int main(void)
FIH_PANIC;
}

/* Copy BL1_2 from OTP into SRAM*/
FIH_CALL(bl1_read_bl1_2_image, fih_rc, (uint8_t *)BL1_2_CODE_START);
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
FIH_PANIC;
}
do {
/* Copy BL1_2 from OTP into SRAM*/
FIH_CALL(bl1_read_bl1_2_image, fih_rc, (uint8_t *)BL1_2_CODE_START);
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
FIH_PANIC;
}

FIH_CALL(validate_image_at_addr, fih_rc, (uint8_t *)BL1_2_CODE_START);
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
BL1_LOG("[ERR] BL1_2 image failed to validate\r\n");
FIH_PANIC;
}
FIH_CALL(validate_image_at_addr, fih_rc, (uint8_t *)BL1_2_CODE_START);

if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
BL1_LOG("[ERR] BL1_2 image failed to validate\r\n");

recovery_succeeded = fih_int_encode_zero_equality(boot_initiate_recovery_mode(0));
if (fih_not_eq(recovery_succeeded, FIH_SUCCESS)) {
FIH_PANIC;
}
}
} while (fih_not_eq(fih_rc, FIH_SUCCESS));

fih_rc = fih_int_encode_zero_equality(boot_platform_post_load(0));
if (fih_not_eq(fih_rc, FIH_SUCCESS)) {
Expand Down
39 changes: 34 additions & 5 deletions bl1/bl1_1/shared_lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-------------------------------------------------------------------------------
# Copyright (c) 2021-2023, Arm Limited. All rights reserved.
# Copyright (c) 2021-2024, Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
Expand All @@ -24,7 +24,7 @@ target_link_libraries(bl1_1_shared_lib_interface

target_sources(bl1_1_shared_lib
PRIVATE
$<$<BOOL:${TFM_BL1_SOFTWARE_CRYPTO}>:crypto/crypto_mbedcrypto>
$<$<BOOL:${TFM_BL1_SOFTWARE_CRYPTO}>:crypto/crypto_mbedcrypto.c>
$<$<BOOL:${TFM_BL1_DUMMY_TRNG}>:trng/trng_dummy.c>
./util.c
$<$<BOOL:${TFM_BL1_DEFAULT_OTP}>:./otp/otp_default.c>
Expand All @@ -47,7 +47,8 @@ target_link_libraries(bl1_1_shared_lib
target_compile_options(bl1_1_shared_lib_interface
INTERFACE
#Prevents warnings caused by C99 static assert workaround
-Wno-unused-local-typedefs
$<$<C_COMPILER_ID:GNU>:-Wno-unused-local-typedefs>
$<$<C_COMPILER_ID:ARMClang>:-Wno-unused-local-typedefs>
)

target_compile_definitions(bl1_1_shared_lib_interface
Expand All @@ -58,8 +59,6 @@ target_compile_definitions(bl1_1_shared_lib_interface
)

if(TFM_BL1_SOFTWARE_CRYPTO)
cmake_policy(SET CMP0079 NEW)

set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
set(CMAKE_POLICY_DEFAULT_CMP0048 NEW)
set(ENABLE_TESTING OFF)
Expand Down Expand Up @@ -106,4 +105,34 @@ if(TFM_BL1_SOFTWARE_CRYPTO)
$<$<C_COMPILER_ID:GNU>:-Wno-unused-parameter>
$<$<C_COMPILER_ID:ARMClang>:-Wno-unused-parameter>
)

target_compile_options(bl1_1_crypto_mbedcrypto
PRIVATE
${BL1_COMPILER_CP_FLAG}
)

target_link_options(bl1_1_crypto_mbedcrypto
PUBLIC
${BL1_LINKER_CP_OPTION}
)

target_compile_options(bl1_1_crypto_mbedtls
PRIVATE
${BL1_COMPILER_CP_FLAG}
)

target_link_options(bl1_1_crypto_mbedtls
PUBLIC
${BL1_LINKER_CP_OPTION}
)

target_compile_options(bl1_1_crypto_mbedx509
PRIVATE
${BL1_COMPILER_CP_FLAG}
)

target_link_options(bl1_1_crypto_mbedx509
PUBLIC
${BL1_LINKER_CP_OPTION}
)
endif()
62 changes: 55 additions & 7 deletions bl1/bl1_1/shared_lib/crypto/crypto_mbedcrypto.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021-2022, Arm Limited. All rights reserved.
* Copyright (c) 2021-2024, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
Expand All @@ -10,18 +10,58 @@
#include <string.h>
#include "mbedtls/sha256.h"
#include "mbedtls/aes.h"
#include "mbedtls/hkdf.h"
#include "mbedtls/md.h"
#include "mbedtls/memory_buffer_alloc.h"
#include "otp.h"

static int mbedtls_is_initialised = 0;
static uint8_t mbedtls_memory_buf[256];
static uint8_t mbedtls_memory_buf[512];

static void mbedtls_init(uint8_t mbedtls_memory_buf[], size_t size)
{
mbedtls_memory_buffer_alloc_init(mbedtls_memory_buf,
size);
}

int32_t bl1_derive_key(enum tfm_bl1_key_id_t input_key, const uint8_t *label,
size_t label_length, const uint8_t *context,
size_t context_length, uint8_t *output_key,
size_t output_length)
{
int rc = 0;
uint8_t state[64] = {0};
uint8_t key_buf[32] = {0};
uint32_t state_len = context_length + label_length;
const mbedtls_md_info_t *sha256_info = NULL;

if (state_len > sizeof(state)) {
return -1;
}

memcpy(state, label, label_length);
memcpy(&state[label_length], context, context_length);

if (!mbedtls_is_initialised) {
mbedtls_init(mbedtls_memory_buf, sizeof(mbedtls_memory_buf));
mbedtls_is_initialised = 1;
}

rc = bl1_otp_read_key(input_key, key_buf);
if (rc) {
return rc;
}


sha256_info = mbedtls_md_info_from_type(MBEDTLS_MD_SHA256);

rc = mbedtls_hkdf(sha256_info, NULL, 0, key_buf,
sizeof(key_buf), state, state_len,
output_key, output_length);

return rc;
}

int32_t bl1_sha256_compute(const uint8_t *data,
size_t data_length,
uint8_t *hash)
Expand Down Expand Up @@ -61,6 +101,7 @@ int32_t bl1_sha256_compute(const uint8_t *data,
}

int32_t bl1_aes_256_ctr_decrypt(enum tfm_bl1_key_id_t key_id,
const uint8_t *key_material,
uint8_t *counter,
const uint8_t *ciphertext,
size_t ciphertext_length,
Expand All @@ -71,6 +112,7 @@ int32_t bl1_aes_256_ctr_decrypt(enum tfm_bl1_key_id_t key_id,
uint8_t key_buf[32];
mbedtls_aes_context ctx;
size_t nc_off = 0;
const uint8_t *input_key = key_buf;

if (ciphertext_length == 0) {
return 0;
Expand All @@ -80,18 +122,24 @@ int32_t bl1_aes_256_ctr_decrypt(enum tfm_bl1_key_id_t key_id,
return -2;
}

if (key_material == NULL) {
rc = bl1_otp_read_key(key_id, key_buf);
if (rc) {
return rc;
}
} else {
input_key = key_material;
}


if (!mbedtls_is_initialised) {
mbedtls_init(mbedtls_memory_buf, sizeof(mbedtls_memory_buf));
mbedtls_is_initialised = 1;
}

mbedtls_aes_init(&ctx);
rc = otp_read_key(key_id, key_buf);
if (rc) {
goto out;
}

rc = mbedtls_aes_setkey_enc(&ctx, key_buf, 256);
rc = mbedtls_aes_setkey_enc(&ctx, input_key, 256);
if (rc) {
goto out;
}
Expand Down
Loading