Skip to content

Commit

Permalink
[nrf noup] soc: arm: nordic: Add Flash/RAM region size for nRF53/91
Browse files Browse the repository at this point in the history
fixup! [nrf noup] soc: arm: nRF91: Add SPU Flash/RAM alignment

The nRF54L15 doesn't use the SPU for setting the security attributes
for flash/RAM regions. In order to avoid having multiple Kconfigs
with similar meaning I renamed the alignment Kconfig option to something
more generic in order to use the same symbol for all the TrustZone enabled
devices.

Ref: NCSDK-25023

Signed-off-by: Georgios Vasilakis <[email protected]>
  • Loading branch information
Vge0rge authored and rlubos committed Jul 11, 2024
1 parent 00266aa commit fb9682f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 16 deletions.
22 changes: 14 additions & 8 deletions soc/nordic/nrf53/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -127,25 +127,31 @@ config NRF_SPU_FLASH_REGION_SIZE
help
FLASH region size for the NRF_SPU peripheral

config NRF_SPU_FLASH_REGION_ALIGNMENT
config NRF_TRUSTZONE_FLASH_REGION_SIZE
hex
default 0x4000
default NRF_SPU_FLASH_REGION_SIZE
help
FLASH regions must be aligned to this value due to SPU HW
limitations.
Define the flash region size from a TrustZone perspective.
This is used when we set the security attributes(S/NSC/NS) of a region
in TrustZone enabled devices.
In practice this option defines the granularity of the security attributes,
i.e. the smallest region that can be set to secure or non-secure.

config NRF_SPU_RAM_REGION_SIZE
hex
default 0x2000
help
RAM region size for the NRF_SPU peripheral

config NRF_SPU_RAM_REGION_ALIGNMENT
config NRF_TRUSTZONE_RAM_REGION_SIZE
hex
default 0x2000
default NRF_SPU_RAM_REGION_SIZE
help
RAM regions must be aligned to this value due to SPU HW
limitations.
Define the RAM region size from a TrustZone perspective.
This is used when we set the security attributes(S/NSC/NS) of a region
in TrustZone enabled devices.
In practice this option defines the granularity of the security attributes,
i.e. the smallest region that can be set to secure or non-secure.

config SOC_NRF_GPIO_FORWARDER_FOR_NRF5340
bool
Expand Down
22 changes: 14 additions & 8 deletions soc/nordic/nrf91/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ config NRF_SPU_FLASH_REGION_SIZE
help
FLASH region size for the NRF_SPU peripheral

config NRF_SPU_FLASH_REGION_ALIGNMENT
config NRF_TRUSTZONE_FLASH_REGION_SIZE
hex
default 0x8000
default NRF_SPU_FLASH_REGION_SIZE
help
FLASH regions must be aligned to this value due to SPU HW
limitations.
Define the flash region size from a TrustZone perspective.
This is used when we set the security attributes(S/NSC/NS) of a region
in TrustZone enabled devices.
In practice this option defines the granularity of the security attributes,
i.e. the smallest region that can be set to secure or non-secure.

config NRF_SPU_RAM_REGION_SIZE
hex
Expand All @@ -41,11 +44,14 @@ config NRF_ENABLE_ICACHE
bool "Instruction cache (I-Cache)"
default y

config NRF_SPU_RAM_REGION_ALIGNMENT
config NRF_TRUSTZONE_RAM_REGION_SIZE
hex
default 0x2000
default NRF_SPU_RAM_REGION_SIZE
help
RAM regions must be aligned to this value due to SPU HW
limitations.
Define the RAM region size from a TrustZone perspective.
This is used when we set the security attributes(S/NSC/NS) of a region
in TrustZone enabled devices.
In practice this option defines the granularity of the security attributes,
i.e. the smallest region that can be set to secure or non-secure.

endif # SOC_SERIES_NRF91X

0 comments on commit fb9682f

Please sign in to comment.