diff options
author | Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> | 2019-01-08 21:47:26 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2019-02-14 14:31:09 +0100 |
commit | 4244f2b7e86f8e81833ad18c4c80035073098120 (patch) | |
tree | 373590146262d2d119284bd0c21e9ffa0635d37a /arch/arm/mach-versal/cpu.c | |
parent | 6c8788f22801d79deb011e0f4dbd19db881fe8b8 (diff) |
arm64: versal: Add new Kconfig SYS_MEM_RSVD_FOR_MMU
This patch adds new config option which is used for
reserving a specific memory for MMU Table and in this
case we are using TCM for that purpose.
Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm/mach-versal/cpu.c')
-rw-r--r-- | arch/arm/mach-versal/cpu.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c index 1fd3c246c1..70c1908ec4 100644 --- a/arch/arm/mach-versal/cpu.c +++ b/arch/arm/mach-versal/cpu.c @@ -7,6 +7,10 @@ #include <common.h> #include <asm/armv8/mmu.h> #include <asm/io.h> +#include <asm/arch/hardware.h> +#include <asm/arch/sys_proto.h> + +DECLARE_GLOBAL_DATA_PTR; static struct mm_region versal_mem_map[] = { { @@ -68,6 +72,17 @@ u64 get_page_table_size(void) return 0x14000; } +#if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) +int reserve_mmu(void) +{ + tcm_init(TCM_LOCK); + gd->arch.tlb_size = PGTABLE_SIZE; + gd->arch.tlb_addr = VERSAL_TCM_BASE_ADDR; + + return 0; +} +#endif + #if defined(CONFIG_OF_BOARD) void *board_fdt_blob_setup(void) { |