1 /* 2 * Copyright 2019 Broadcom 3 * The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries. 4 * 5 * SPDX-License-Identifier: Apache-2.0 6 */ 7 #include <zephyr/arch/arm64/arm_mmu.h> 8 #include <zephyr/devicetree.h> 9 #include <zephyr/sys/util.h> 10 11 static const struct arm_mmu_region mmu_regions[] = { 12 13 MMU_REGION_FLAT_ENTRY("GIC", 14 DT_REG_ADDR_BY_IDX(DT_INST(0, arm_gic), 0), 15 DT_REG_SIZE_BY_IDX(DT_INST(0, arm_gic), 0), 16 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE), 17 18 MMU_REGION_FLAT_ENTRY("GIC", 19 DT_REG_ADDR_BY_IDX(DT_INST(0, arm_gic), 1), 20 DT_REG_SIZE_BY_IDX(DT_INST(0, arm_gic), 1), 21 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE), 22 }; 23 24 const struct arm_mmu_config mmu_config = { 25 .num_regions = ARRAY_SIZE(mmu_regions), 26 .mmu_regions = mmu_regions, 27 }; 28