On Mon, Feb 03, 2025 at 10:42:09AM -0700, 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> > --- > > 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
Since Marek just did a bunch of work around "use U-Boot for all ELs" I wonder if there's something cleaner / different we should be doing here? -- Tom
signature.asc
Description: PGP signature