1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
9 #include <asm/armv7m_mpu.h>
11 int arch_cpu_init(void)
15 struct mpu_region_config stm32_region_config[] = {
17 * Make SDRAM area cacheable & executable.
19 #if defined(CONFIG_STM32F4)
20 { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
21 O_I_WB_RD_WR_ALLOC, REGION_16MB },
24 #if defined(CONFIG_STM32F7)
25 { 0xC0000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
26 O_I_WB_RD_WR_ALLOC, REGION_16MB },
29 #if defined(CONFIG_STM32H7)
30 { 0xD0000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
31 O_I_WB_RD_WR_ALLOC, REGION_32MB },
36 for (i = 0; i < ARRAY_SIZE(stm32_region_config); i++)
37 mpu_config(&stm32_region_config[i]);