1 /*
2  * Copyright (c) 2021 The Chromium OS Authors
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #include <zephyr/arch/arm/cortex_m/arm_mpu_mem_cfg.h>
8 
9 static const struct arm_mpu_region mpu_regions[] = {
10 	MPU_REGION_ENTRY("FLASH_0_0",
11 			 CONFIG_FLASH_BASE_ADDRESS & -KB(256),
12 			 REGION_FLASH_ATTR(REGION_256K)),
13 #if CONFIG_FLASH_SIZE > 256
14 	MPU_REGION_ENTRY("FLASH_0_1",
15 			 (CONFIG_FLASH_BASE_ADDRESS + KB(256)) & -KB(256),
16 			 REGION_FLASH_ATTR(REGION_256K)),
17 #endif
18 	MPU_REGION_ENTRY("SRAM_0",
19 			 CONFIG_SRAM_BASE_ADDRESS,
20 			 REGION_RAM_ATTR(REGION_SRAM_SIZE)),
21 };
22 
23 const struct arm_mpu_config mpu_config = {
24 	.num_regions = ARRAY_SIZE(mpu_regions),
25 	.mpu_regions = mpu_regions,
26 };
27