diff --git a/ports/alif/mpu.c b/ports/alif/mpu.c index 60753674ae..9a051794de 100644 --- a/ports/alif/mpu.c +++ b/ports/alif/mpu.c @@ -54,6 +54,10 @@ static const ARM_MPU_Region_t mpu_table[] __STARTUP_RO_DATA_ATTRIBUTE = { .RBAR = ARM_MPU_RBAR(0xA0000000, ARM_MPU_SH_NON, 1, 1, 0), .RLAR = ARM_MPU_RLAR(0xBFFFFFFF, MP_MPU_ATTR_NORMAL_NON_CACHEABLE) }, + [MP_MPU_REGION_OSPI1_XIP] = { /* OSPI1 XIP flash - 512MB : RO-1, NP-1, XN-0 */ + .RBAR = ARM_MPU_RBAR(0xC0000000, ARM_MPU_SH_NON, 1, 1, 0), + .RLAR = ARM_MPU_RLAR(0xDFFFFFFF, MP_MPU_ATTR_NORMAL_NON_CACHEABLE) + }, }; void MPU_Load_Regions(void) { diff --git a/ports/alif/mpu.h b/ports/alif/mpu.h index 1d3602941e..f4df496683 100644 --- a/ports/alif/mpu.h +++ b/ports/alif/mpu.h @@ -38,6 +38,7 @@ #define MP_MPU_REGION_MRAM (3) #define MP_MPU_REGION_OSPI_REGISTERS (4) #define MP_MPU_REGION_OSPI0_XIP (5) -#define MP_MPU_REGION_OPENAMP (6) +#define MP_MPU_REGION_OSPI1_XIP (6) +#define MP_MPU_REGION_OPENAMP (7) void mpu_config_mram(bool read_only);