On Tue, Jun 09, 2026 at 01:44:25PM +0100, Peter Maydell wrote:
> On Tue, 9 Jun 2026 at 13:00, Gerd Hoffmann <[email protected]> wrote:
> >
> >   Hi,
> >
> > > > > #  - specify a firmware and pass a hint to the kernel to boot
> > > > > #  - direct kernel image boot
> > > >
> > > > That is a technical detail which doesn't make much of a difference
> > > > from the end user perspective.  And often people talk about "direct
> > > > kernel boot" without drawing a line between these two cases, because the
> > > > user-visible behavior is pretty much identical:  You pass a kernel to
> > > > qemu via '-kernel', and it gets booted ...
> > >
> > > As an end user I find them majorly different -- I usually
> > > don't want the firmware, because it takes forever to boot
> > > if you do that.
> >
> > Not sure what exactly you are doing, but for me edk2 is done in less
> > than a second (unless I turn on firmware debug logging), and that on
> > a rpi4 host which isn't exactly fast hardware.  I wouldn't call that
> > "forever".
> 
> If you're running TCG emulation then booting EDK2 is definitely not
> that fast, and I think a lot of use of QEMU for aarch64 targets is TCG,
> not KVM.

On my x86 workstation edk2 boot time on tcg is not very different from
the rpi4 with kvm, also less than one second (until it complains that
the kernel isn't arm ;).

The rpi4 with tcg takes quite some time indeed, but edk2 isn't
exceptionally slow.  Booting until the kernel panics because there is no
root filesystem takes ~30 seconds, and those are roughly 50% / 50%
splitted between firmware and kernel.  A good chunk of the firmware time
is probably the zboot efi stub for kernel self-decompression (would have
to instrument the firmware for more details on that).

Comparing that to direct boot without firmware does not work for me:

  unable to handle EFI zboot image with "zstd" compression
  qemu-system-aarch64: could not load kernel 
'/boot/vmlinuz-7.0.11-200.fc44.aarch64'

Anyway, I'll go over the comments and try to make the docs patch more
clear for people with less UEFI background.  Update should come later
this week.

take care,
  Gerd


Reply via email to