2021-04-02 11:12:03 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2021 NXP
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
2022-06-01 00:18:46 +08:00
|
|
|
#include <zephyr/arch/arm64/arm_mmu.h>
|
2022-05-06 17:11:04 +08:00
|
|
|
#include <zephyr/devicetree.h>
|
|
|
|
#include <zephyr/sys/util.h>
|
2021-04-02 11:12:03 +08:00
|
|
|
|
|
|
|
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),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),
|
2021-04-02 11:12:03 +08:00
|
|
|
|
|
|
|
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),
|
2022-08-04 21:13:18 +08:00
|
|
|
MT_DEVICE_nGnRnE | MT_P_RW_U_NA | MT_DEFAULT_SECURE_STATE),
|
2021-04-02 11:12:03 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
const struct arm_mmu_config mmu_config = {
|
|
|
|
.num_regions = ARRAY_SIZE(mmu_regions),
|
|
|
|
.mmu_regions = mmu_regions,
|
|
|
|
};
|