1 /* 2 * Copyright 2020 Broadcom 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 11 #define PCIE_OB_HIGHMEM_ADDR DT_REG_ADDR_BY_NAME(DT_NODELABEL(pcie0_ep), \ 12 map_highmem) 13 #define PCIE_OB_HIGHMEM_SIZE DT_REG_SIZE_BY_NAME(DT_NODELABEL(pcie0_ep), \ 14 map_highmem) 15 16 static const struct arm_mmu_region mmu_regions[] = { 17 18 MMU_REGION_FLAT_ENTRY("DEVICE_REGION", 19 0x40000000, MB(512), 20 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_SECURE), 21 22 MMU_REGION_FLAT_ENTRY("PCIE_HIGH_OBMEM", 23 PCIE_OB_HIGHMEM_ADDR, PCIE_OB_HIGHMEM_SIZE, 24 MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_SECURE), 25 26 MMU_REGION_FLAT_ENTRY("DRAM0_S0", 27 0x60000000, MB(512), 28 MT_NORMAL | MT_P_RW_U_NA | MT_SECURE), 29 }; 30 31 const struct arm_mmu_config mmu_config = { 32 .num_regions = ARRAY_SIZE(mmu_regions), 33 .mmu_regions = mmu_regions, 34 }; 35