Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions arch/arm/core/mpu/arm_mpu_regions.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2017 Linaro Limited.
* Copyright 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -10,8 +11,18 @@
#include <zephyr/arch/arm/cortex_m/arm_mpu_mem_cfg.h>

static const struct arm_mpu_region mpu_regions[] = {

#if defined(CONFIG_CPU_CORTEX_M7) && defined(CONFIG_CPU_HAS_ARM_MPU) && \
defined(CONFIG_CPU_HAS_DCACHE)
/* Erratum 1013783-B (SDEN-1068427): use first region to prevent speculative access
* in entire memory space
*/
MPU_REGION_ENTRY("BACKGROUND",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: "UNMAPPED" would be a better name

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn’t get to address this due to the timezone difference, already merged :)

0,
{REGION_4G | MPU_RASR_XN_Msk | P_NA_U_NA_Msk}),
#endif

#ifdef CONFIG_XIP
/* Region 0 */
MPU_REGION_ENTRY("FLASH_0",
CONFIG_FLASH_BASE_ADDRESS,
#if defined(CONFIG_ARMV8_M_BASELINE) || defined(CONFIG_ARMV8_M_MAINLINE)
Expand All @@ -22,7 +33,6 @@ static const struct arm_mpu_region mpu_regions[] = {
#endif
#endif

/* Region 1 */
MPU_REGION_ENTRY("SRAM_0",
CONFIG_SRAM_BASE_ADDRESS,
#if defined(CONFIG_ARMV8_M_BASELINE) || defined(CONFIG_ARMV8_M_MAINLINE)
Expand Down
9 changes: 8 additions & 1 deletion soc/nxp/s32/s32k3/mpu_regions.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2023 NXP
* Copyright 2023, 2025 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
Expand All @@ -14,6 +14,13 @@ extern char _rom_attr[];

static struct arm_mpu_region mpu_regions[] = {

/* ERR011573: use first region to prevent speculative access in entire memory space */
{
.name = "BACKGROUND",
.base = 0,
.attr = {REGION_4G | MPU_RASR_XN_Msk | P_NA_U_NA_Msk},
},

/* Keep before CODE region so it can be overlapped by SRAM CODE in non-XIP systems */
{
.name = "SRAM",
Expand Down
Loading