1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2016 - 2018 Xilinx, Inc.
8 #include <asm/armv8/mmu.h>
11 static struct mm_region versal_mem_map[] = {
16 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
22 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
24 PTE_BLOCK_PXN | PTE_BLOCK_UXN
29 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
31 PTE_BLOCK_PXN | PTE_BLOCK_UXN
36 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
39 .virt = 0x400000000UL,
40 .phys = 0x400000000UL,
41 .size = 0x200000000UL,
42 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
44 PTE_BLOCK_PXN | PTE_BLOCK_UXN
46 .virt = 0x600000000UL,
47 .phys = 0x600000000UL,
48 .size = 0x800000000UL,
49 .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) |
52 .virt = 0xe00000000UL,
53 .phys = 0xe00000000UL,
54 .size = 0xf200000000UL,
55 .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) |
57 PTE_BLOCK_PXN | PTE_BLOCK_UXN
64 struct mm_region *mem_map = versal_mem_map;
66 u64 get_page_table_size(void)
71 #if defined(CONFIG_OF_BOARD)
72 void *board_fdt_blob_setup(void)
74 static void *fw_dtb = (void *)CONFIG_VERSAL_OF_BOARD_DTB_ADDR;
76 if (fdt_magic(fw_dtb) != FDT_MAGIC) {
77 printf("DTB is not passed via %llx\n", (u64)fw_dtb);