soc: nxp: s32k3: configure missing mpu regions

This fixes a regression introduced in c31640239c where all regions
except Flash and RAM where left unmapped. Before introducing region
0 that prevents speculative access to the entire memory space, we
were relying on the architectural background map to access them.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
This commit is contained in:
Manuel Argüelles 2025-05-30 19:50:19 +07:00 committed by Anas Nashif
commit 6681f8d342
2 changed files with 22 additions and 2 deletions

View file

@ -12,11 +12,16 @@
extern char _rom_attr[];
#endif
#define REGION_PERIPHERAL_BASE_ADDRESS 0x40000000
#define REGION_PERIPHERAL_SIZE REGION_512M
#define REGION_PPB_BASE_ADDRESS 0xE0000000
#define REGION_PPB_SIZE REGION_1M
static struct arm_mpu_region mpu_regions[] = {
/* ERR011573: use first region to prevent speculative access in entire memory space */
{
.name = "BACKGROUND",
.name = "UNMAPPED",
.base = 0,
.attr = {REGION_4G | MPU_RASR_XN_Msk | P_NA_U_NA_Msk},
},
@ -42,6 +47,18 @@ static struct arm_mpu_region mpu_regions[] = {
.attr = {(uint32_t)_rom_attr},
},
#endif
{
.name = "PERIPHERALS",
.base = REGION_PERIPHERAL_BASE_ADDRESS,
.attr = REGION_IO_ATTR(REGION_PERIPHERAL_SIZE),
},
{
.name = "PPB",
.base = REGION_PPB_BASE_ADDRESS,
.attr = REGION_PPB_ATTR(REGION_PPB_SIZE),
},
};
const struct arm_mpu_config mpu_config = {