On 2/15/25 04:22, Simon Glass wrote:
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 <s...@chromium.org>

Reviewed-by: Caleb Connolly <caleb.conno...@linaro.org>
---

(no changes since v1)

  arch/arm/lib/cache.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c
index 516754caeaf..bdd0f202bf9 100644
--- a/arch/arm/lib/cache.c
+++ b/arch/arm/lib/cache.c
@@ -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;

--
Caleb (they/them)

Reply via email to