efi: arm: Avoid allocating page tables when running under EFI
The previous bootloader has already set up the page tables, so don't try to do it again. This fixes a crash in QEMU when booting from EDK2 Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <config.h>
|
||||
#include <cpu_func.h>
|
||||
#include <init.h>
|
||||
#include <log.h>
|
||||
#include <malloc.h>
|
||||
#include <asm/cache.h>
|
||||
@@ -138,6 +139,8 @@ int arch_reserve_mmu(void)
|
||||
|
||||
__weak int arm_reserve_mmu(void)
|
||||
{
|
||||
if (!ll_boot_init())
|
||||
return 0;
|
||||
#if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF))
|
||||
/* reserve TLB table */
|
||||
gd->arch.tlb_size = PGTABLE_SIZE;
|
||||
|
||||
Reference in New Issue
Block a user