3 * Kamil Lulko, <kamil.lulko@gmail.com>
5 * SPDX-License-Identifier: GPL-2.0+
10 #include <asm/armv7m_mpu.h>
11 #include <asm/arch/stm32.h>
18 int arch_cpu_init(void)
22 struct mpu_region_config stm32_region_config[] = {
23 { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW,
24 O_I_WB_RD_WR_ALLOC, REGION_4GB },
26 { 0x00000000, REGION_1, XN_DIS, PRIV_RW_USR_RW,
27 STRONG_ORDER, REGION_512MB },
29 { 0x40000000, REGION_2, XN_EN, PRIV_RW_USR_RW,
30 DEVICE_NON_SHARED, REGION_512MB },
32 { 0xA0000000, REGION_3, XN_EN, PRIV_RW_USR_RW,
33 DEVICE_NON_SHARED, REGION_512MB },
35 { 0xE0000000, REGION_4, XN_EN, PRIV_RW_USR_RW,
36 STRONG_ORDER, REGION_512MB },
40 for (i = 0; i < ARRAY_SIZE(stm32_region_config); i++)
41 mpu_config(&stm32_region_config[i]);