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