1 /* 2 * Copyright 2024 NXP 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 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", DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 0), 14 DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 0), 15 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS), 16 17 MMU_REGION_FLAT_ENTRY("GIC", DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 1), 18 DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 1), 19 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS), 20 21 MMU_REGION_DT_COMPAT_FOREACH_FLAT_ENTRY(nxp_mbox_imx_mu, 22 (MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS)) 23 24 MMU_REGION_DT_COMPAT_FOREACH_FLAT_ENTRY(nxp_lpuart, 25 (MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS)) 26 27 }; 28 29 const struct arm_mmu_config mmu_config = { 30 .num_regions = ARRAY_SIZE(mmu_regions), 31 .mmu_regions = mmu_regions, 32 }; 33