32 lines
895 B
C
32 lines
895 B
C
/*
|
|
* Copyright 2020 EPAM Systems
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
#include <devicetree.h>
|
|
#include <sys/util.h>
|
|
#include <arch/arm/aarch64/arm_mmu.h>
|
|
|
|
static const struct arm_mmu_region mmu_regions[] = {
|
|
|
|
MMU_REGION_FLAT_ENTRY("GIC",
|
|
DT_REG_ADDR_BY_IDX(DT_INST(0, arm_gic), 0),
|
|
DT_REG_SIZE_BY_IDX(DT_INST(0, arm_gic), 0),
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_RW | MT_NS),
|
|
|
|
MMU_REGION_FLAT_ENTRY("GIC",
|
|
DT_REG_ADDR_BY_IDX(DT_INST(0, arm_gic), 1),
|
|
DT_REG_SIZE_BY_IDX(DT_INST(0, arm_gic), 1),
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_RW | MT_NS),
|
|
|
|
MMU_REGION_FLAT_ENTRY("UART",
|
|
DT_REG_ADDR(DT_INST(0, arm_sbsa_uart)),
|
|
DT_REG_SIZE(DT_INST(0, arm_sbsa_uart)),
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_RW | MT_NS),
|
|
};
|
|
|
|
const struct arm_mmu_config mmu_config = {
|
|
.num_regions = ARRAY_SIZE(mmu_regions),
|
|
.mmu_regions = mmu_regions,
|
|
};
|