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