summaryrefslogtreecommitdiff
path: root/arch/arm/mach-histb/sysmap-histb.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-histb/sysmap-histb.c')
-rw-r--r--arch/arm/mach-histb/sysmap-histb.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/mach-histb/sysmap-histb.c b/arch/arm/mach-histb/sysmap-histb.c
new file mode 100644
index 0000000000..83a2bb9417
--- /dev/null
+++ b/arch/arm/mach-histb/sysmap-histb.c
@@ -0,0 +1,31 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Hisilicon HiSTB memory map
+ *
+ * (C) Copyright 2023 Yang Xiwen <forbidden405@outlook.com>
+ */
+
+#include <common.h>
+#include <asm/armv8/mmu.h>
+
+static struct mm_region histb_mem_map[] = {
+ {
+ .virt = 0x0UL, /* DRAM */
+ .phys = 0x0UL,
+ .size = 0x80000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
+ PTE_BLOCK_INNER_SHARE
+ }, {
+ .virt = 0x80000000UL, /* Peripheral block */
+ .phys = 0x80000000UL,
+ .size = 0x80000000UL,
+ .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
+ PTE_BLOCK_NON_SHARE |
+ PTE_BLOCK_PXN | PTE_BLOCK_UXN
+ }, {
+ /* Terminator */
+ 0,
+ }
+};
+
+struct mm_region *mem_map = histb_mem_map;