Skip to content

Commit 66caf58

Browse files
FRASTMcarlescufi
authored andcommitted
soc: arm: stm32h7x mapping system memory region
System memory declared by the MPU as 'Strongly Ordered' with region attributes which will inhibit the speculative fetch, preventing the Flash RDSERR. Signed-off-by: Francois Ramu <[email protected]>
1 parent e3f5e1f commit 66caf58

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

soc/arm/st_stm32/stm32h7/mpu_regions.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ static const struct arm_mpu_region mpu_regions[] = {
1212
REGION_FLASH_ATTR(REGION_FLASH_SIZE)),
1313
MPU_REGION_ENTRY("SRAM", CONFIG_SRAM_BASE_ADDRESS,
1414
REGION_RAM_ATTR(REGION_SRAM_SIZE)),
15+
/*
16+
* System memory attributes inhibit the speculative fetch,
17+
* preventing the RDSERR Flash error
18+
*/
19+
MPU_REGION_ENTRY("SYSTEM", 0x1FF00000,
20+
{ (STRONGLY_ORDERED_SHAREABLE |
21+
REGION_512K |
22+
MPU_RASR_XN_Msk | P_RW_U_NA_Msk) }),
23+
1524
#if DT_NODE_HAS_STATUS(DT_NODELABEL(mac), okay)
1625
#if DT_NODE_HAS_STATUS(DT_NODELABEL(sram3), okay)
1726
MPU_REGION_ENTRY("SRAM3_ETH_BUF",

0 commit comments

Comments
 (0)