[SeaBIOS] [Qemu-devel] SeaBIOS booting time optimization

Gerd Hoffmann kraxel at redhat.com
Thu Nov 22 12:51:35 CET 2018


On Thu, Nov 22, 2018 at 12:08:55PM +0100, Stefano Garzarella wrote:
> Hi,
> I continued to investigate how to reduce the boot time with SeaBIOS
> and QEMU when it used with linuxboot_dma.bin (-kernel parameter).
> I reached ~12ms with a SeaBIOS configuration (attached) where I
> disabled debug output, all Hardware support (except SMM & MTRRs) and I
> applied a small patch to disable VGA setup and console (attached).

Is there any difference to "qemu -vga none" ?

> Samuel, I put also the total time to userspace (linux_start_user)
> adding a probe in the kernel_init() and when I disabled the VGA in the
> SeaBIOS I noticed also a speed up in the kernel boot phase.

Might come from linux 16bit boot code scanning vgabios for available
video modes (for vga=<mode> cmdline arg).

> Another approach that I tried, obtaining similar results, is to
> recognize the linuxboot_dma.bin at runtime, then skip
> device_hardware_setup(), enable_vga_console(), and vgarom_setup().

Hmm, tricky.

linuxboot_dma.bin just registers a boot entry, so with "qemu -kernel
-boot menu=on" you can still get a boot menu, and the direkt kernel boot
is one menu item there.  So you can't know for sure whenever a direct
kernel boot will happen or not.

So, I think at minimum we should make this depend on both linuxboot_dma
and boot menu disabled.

cheers,
  Gerd




More information about the SeaBIOS mailing list