1 /*
2  * Copyright (c) 2023 Enphase Energy
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",
14 			      DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 0),
15 			      DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 0),
16 			      MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
17 
18 	MMU_REGION_FLAT_ENTRY("GIC",
19 			      DT_REG_ADDR_BY_IDX(DT_NODELABEL(gic), 1),
20 			      DT_REG_SIZE_BY_IDX(DT_NODELABEL(gic), 1),
21 			      MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_NS),
22 };
23 
24 const struct arm_mmu_config mmu_config = {
25 	.num_regions = ARRAY_SIZE(mmu_regions),
26 	.mmu_regions = mmu_regions,
27 };
28