On 2/15/25 04:22, Simon Glass wrote:
The previous bootloader has likely done this already, so avoid trying to
do it again. This fixes a crash in QEMU when booting from EDK2

Signed-off-by: Simon Glass <s...@chromium.org>

ll_boot_init is a pretty unintuitive name tbh. skip_lowlevel_init() might be clearer?

off-topic, but how is EBS called?

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

(no changes since v1)

  arch/arm/lib/bootm.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 974cbfe8400..688c2f3f29b 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -16,6 +16,7 @@
  #include <command.h>
  #include <cpu_func.h>
  #include <dm.h>
+#include <init.h>
  #include <log.h>
  #include <asm/global_data.h>
  #include <dm/root.h>
@@ -186,8 +187,10 @@ __weak void setup_board_tags(struct tag **in_params) {}
  #ifdef CONFIG_ARM64
  static void do_nonsec_virt_switch(void)
  {
-       smp_kick_all_cpus();
-       dcache_disable();       /* flush cache before swtiching to EL2 */
+       if (ll_boot_init()) {
+               smp_kick_all_cpus();
+               dcache_disable();       /* flush cache before swtiching to EL2 
*/
+       }
  }
  #endif

--
Caleb (they/them)

Reply via email to