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 <morello_mcp_mmap.h> 9 #include <morello_mcp_system_mmap.h> 10 11 #include <mod_armv7m_mpu.h> 12 13 #include <fwk_macros.h> 14 #include <fwk_module.h> 15 16 static const ARM_MPU_Region_t regions[3] = { 17 { 18 /* 0x0000_0000 - 0xFFFF_FFFF */ 19 .RBAR = ARM_MPU_RBAR(0, 0x00000000), 20 .RASR = ARM_MPU_RASR( 21 1, 22 ARM_MPU_AP_PRIV, 23 0, 24 1, 25 0, 26 1, 27 0, 28 ARM_MPU_REGION_SIZE_4GB), 29 }, 30 { 31 /* 0x0080_0000 - 0x0087_FFFF */ 32 .RBAR = ARM_MPU_RBAR(1, MCP_RAM0_BASE), 33 .RASR = ARM_MPU_RASR( 34 0, 35 ARM_MPU_AP_PRO, 36 0, 37 0, 38 1, 39 0, 40 0, 41 ARM_MPU_REGION_SIZE_512KB), 42 }, 43 { 44 /* 0x2000_0000 - 0x2003_FFFF */ 45 .RBAR = ARM_MPU_RBAR(2, MCP_RAM1_BASE), 46 .RASR = ARM_MPU_RASR( 47 1, 48 ARM_MPU_AP_PRIV, 49 0, 50 0, 51 1, 52 1, 53 0, 54 ARM_MPU_REGION_SIZE_256KB), 55 }, 56 }; 57 58 const struct fwk_module_config config_armv7m_mpu = { 59 .data = &((struct mod_armv7m_mpu_config){ 60 .region_count = FWK_ARRAY_SIZE(regions), 61 .regions = regions, 62 }), 63 }; 64