Skip to content

Commit 03b7026

Browse files
Dat-NguyenDuycarlescufi
authored andcommitted
include: arm: mpu: add missing RAM NOCACHE region define for armv8-r
Add missing define for a non-cacheable RAM region for MPU on armv8-r aarch32 Signed-off-by: Dat Nguyen Duy <[email protected]>
1 parent af9f526 commit 03b7026

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

include/zephyr/arch/arm/mpu/arm_mpu_v8.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,14 @@
220220
.mair_idx = MPU_MAIR_INDEX_SRAM, \
221221
.r_limit = limit - 1, /* Region Limit */ \
222222
}
223-
223+
#define REGION_RAM_NOCACHE_ATTR(limit) \
224+
{ \
225+
.rbar = NOT_EXEC | \
226+
P_RW_U_NA_Msk | NON_SHAREABLE_Msk, /* AP, XN, SH */ \
227+
/* Cache-ability */ \
228+
.mair_idx = MPU_MAIR_INDEX_SRAM_NOCACHE, \
229+
.r_limit = limit - 1, /* Region Limit */ \
230+
}
224231
#if defined(CONFIG_MPU_ALLOW_FLASH_WRITE)
225232
/* Note that the access permissions allow for un-privileged writes, contrary
226233
* to ARMv7-M where un-privileged code has Read-Only permissions.

0 commit comments

Comments
 (0)