1 /* 2 * Arm SCP/MCP Software 3 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved. 4 * 5 * SPDX-License-Identifier: BSD-3-Clause 6 */ 7 8 #include "mcp_sgi575_mmap_mcp.h" 9 10 #include <mod_armv7m_mpu.h> 11 12 #include <fwk_macros.h> 13 #include <fwk_module.h> 14 15 #include <fmw_cmsis.h> 16 17 static const ARM_MPU_Region_t regions[] = { 18 { 19 /* 0x0000_0000 - 0xFFFF_FFFF */ 20 .RBAR = ARM_MPU_RBAR(0, MCP_ROM_BASE), 21 .RASR = ARM_MPU_RASR( 22 1, 23 ARM_MPU_AP_PRIV, 24 0, 25 1, 26 0, 27 1, 28 0, 29 ARM_MPU_REGION_SIZE_4GB), 30 }, 31 { 32 /* 0x0080_0000 - 0x0083_FFFF */ 33 .RBAR = ARM_MPU_RBAR(1, MCP_RAM0_BASE), 34 .RASR = ARM_MPU_RASR( 35 0, 36 ARM_MPU_AP_PRO, 37 0, 38 0, 39 1, 40 0, 41 0, 42 ARM_MPU_REGION_SIZE_256KB), 43 }, 44 { 45 /* 0x2000_0000 - 0x2003_FFFF */ 46 .RBAR = ARM_MPU_RBAR(2, MCP_RAM1_BASE), 47 .RASR = ARM_MPU_RASR( 48 1, 49 ARM_MPU_AP_PRIV, 50 0, 51 0, 52 1, 53 1, 54 0, 55 ARM_MPU_REGION_SIZE_256KB), 56 }, 57 }; 58 59 const struct fwk_module_config config_armv7m_mpu = { 60 .data = &((struct mod_armv7m_mpu_config){ 61 .region_count = FWK_ARRAY_SIZE(regions), 62 .regions = regions, 63 }), 64 }; 65