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:
Simon Glass
2025-02-14 20:22:36 -07:00
parent 571fce8e30
commit 399d95ca99

View File

@@ -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;