From d473f0c621513d3f1c42888c113b68f65b7e81cf Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Fri, 4 Mar 2016 01:09:48 +0100 Subject: thunderx: Move mmu table into board file The MMU range table can vary depending on things we may only find out at runtime. While the very simple ThunderX variant does not change, other boards will, so move the definition from a static entry in a header file to the board file. Signed-off-by: Alexander Graf --- board/cavium/thunderx/thunderx.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'board/cavium') diff --git a/board/cavium/thunderx/thunderx.c b/board/cavium/thunderx/thunderx.c index b9267676dc..9131a385fd 100644 --- a/board/cavium/thunderx/thunderx.c +++ b/board/cavium/thunderx/thunderx.c @@ -10,6 +10,7 @@ #include #include +#include #if !CONFIG_IS_ENABLED(OF_CONTROL) #include @@ -42,6 +43,29 @@ U_BOOT_DEVICE(thunderx_serial1) = { DECLARE_GLOBAL_DATA_PTR; +static struct mm_region thunderx_mem_map[] = { + { + .base = 0x000000000000UL, + .size = 0x40000000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_NORMAL) | PTE_BLOCK_NON_SHARE, + }, { + .base = 0x800000000000UL, + .size = 0x40000000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE, + }, { + .base = 0x840000000000UL, + .size = 0x40000000000UL, + .attrs = PTE_BLOCK_MEMTYPE(MT_DEVICE_NGNRNE) | + PTE_BLOCK_NON_SHARE, + }, { + /* List terminator */ + 0, + } +}; + +struct mm_region *mem_map = thunderx_mem_map; + int board_init(void) { return 0; -- cgit v1.2.3