Skip to content

Commit

Permalink
[nrf noup] boards: Fix MPC configuration for nRF54L15
Browse files Browse the repository at this point in the history
fixup! [nrf noup] boards: add nrf54l15/nrf54l15/cpuapp/ns as board variant

The nRF54L15 is using the SAU and the MPC to configure the security
attributes for TrustZone. The SPU is only used for the configuration
of the peripherals. This sets the Kconfig configurations for TrustZone
which use the correct region size(based on the MPC) for nRF54L15.

Ref: NCSDK-25023

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge authored and rlubos committed Jul 11, 2024
1 parent fb9682f commit e16bd76
Showing 1 changed file with 17 additions and 30 deletions.
47 changes: 17 additions & 30 deletions boards/nordic/nrf54l15pdk/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,30 @@ endif # BOARD_NRF54L15PDK_NRF54L15_CPUAPP

if BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS

# TODO: Remove the options bellow when (NCSDK-25023) is done
config NRF_SPU_FLASH_REGION_SIZE
config NRF_MPC_REGION_SIZE
hex
default 0x4000
# This option does not apply to 54, but we pretend the HW has this limitation
# for now for easier porting. NCSDK-25023
help
FLASH region size for the NRF_SPU peripheral. For nrf54 the
region size is configurable per-region so this option does
not apply.

config NRF_SPU_FLASH_REGION_ALIGNMENT
hex
default 0x4000
# This option does not apply to 54, but we pretend the HW has this limitation
# for now for easier porting. NCSDK-25023
default 0x1000
help
FLASH region size for the NRF_SPU peripheral. For nrf54 the
region size is configurable per-region so this option does
not apply.
Region size for the Memory Protection Controller (MPC) in bytes.

config NRF_SPU_RAM_REGION_SIZE
config NRF_TRUSTZONE_FLASH_REGION_SIZE
hex
default 0x2000
# This HW limitation does not apply to 54, but we pretend
# it does for now for easier porting. NCSDK-25023
default NRF_MPC_REGION_SIZE
help
RAM region size for the NRF_SPU peripheral. For nrf54 the
region size is configurable per-region so this option does
not apply.

This defines the flash region size from the TRUSTZONE perspective.
It is used when configuring the TRUSTZONE and when setting alignments
requirements for the partitions.
This abstraction allows us to configure TRUSTZONE without depending
on peripheral specific symbols.

config NRF_SPU_RAM_REGION_ALIGNMENT
config NRF_TRUSTZONE_RAM_REGION_SIZE
hex
default 0x1000
default NRF_MPC_REGION_SIZE
help
RAM regions must be aligned to this value due to SPU HW
limitations.
This defines the RAM region size from the TRUSTZONE perspective.
It is used when configuring the TRUSTZONE and when setting alignments
requirements for the partitions.
This abstraction allows us to configure TRUSTZONE without depending
on peripheral specific symbols.

endif #BOARD_NRF54L15PDK_NRF54L15_CPUAPP_NS

0 comments on commit e16bd76

Please sign in to comment.