On Fri, Nov 23, 2018 at 4:54 PM Kevin O'Connor <ke...@koconnor.net> wrote: > > On Fri, Nov 23, 2018 at 12:18:13PM +0100, Stefano Garzarella wrote: > > On Fri, Nov 23, 2018 at 7:21 AM Gerd Hoffmann <kra...@redhat.com> wrote: > > > On Thu, Nov 22, 2018 at 04:13:38PM +0100, Stefano Garzarella wrote: > > > > On Thu, Nov 22, 2018 at 12:51 PM Gerd Hoffmann <kra...@redhat.com> > > > > wrote: > > > > > 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" ? > > > > > > > > Using both (qemu -vga none, and my patch) we are around 10.8 ms. > > > > Note: using only the patch, Linux is still able to initialize and use > > > > the VGA. > > > > > > But do you want linux use the vga console if you care about boot times? > > > I'd expect virtio-console would be fastest in that case. > > > > I agree with you, but if we will implement a QEMU fastboot feature in > > SeaBIOS, we are sure that it works with Linux kernel if someone uses > > "qemu -kernel" and wants also use a VGA. > > It should be possible to use "-device VGA,romfile=" to enable VGA > without an optionrom. > > > > > - QEMU -vga none + SeaBIOS config (CONFIG_DEBUG_LEVEL=0, disable all > > > > HW support except > > > > SMM & MTRRs) + Stephen's TPM patch > > > > qemu_init_end: 43.675803 > > > > fw_start: 43.865178 (+0.189375) > > > > fw_do_boot: 58.093161 (+14.227983) > > > > linux_start_boot: 59.490308 (+1.397147) > > > > linux_start_user: 556.782354 (+497.292046) > > > > > > > > - QEMU -vga none + SeaBIOS config (CONFIG_DEBUG_LEVEL=0, disable all > > > > HW support except > > > > SMM & MTRRs, CONFIG_DISABLE_VGA=y) + Stephen's TPM patch > > > > qemu_init_end: 42.387412 > > > > fw_start: 42.579257 (+0.191845) > > > > fw_do_boot: 53.381517 (+10.802260) > > > > linux_start_boot: 54.848643 (+1.467126) > > > > linux_start_user: 498.517050 (+443.668407) > > > > > > Interesting that CONFIG_DISABLE_VGA=y makes a noticable difference even > > > without vga hardware being preset. And not only in seabios but also for > > > the linux kernel. > > > > > > Do you know why? > > > > In SeaBIOS I think the reasons are: > > - vgarom_setup() scan all PCI devices to find a VGA > > - enable_vga_console() invokes an int10 without check if there is a > > VGA (maybe here we can add a check) > > Where is CONFIG_DISABLE_VGA set - it's not a standard SeaBIOS config > option?
Yes, it is not standard. I posted a small patch in this thread (https://mail.coreboot.org/pipermail/seabios/2018-November/012592.html) to explain my experiments. CONFIG_DISABLE_VGA=y simply skips the vgarom_setup() and enable_vga_console(). > > In my experience, the only meaningful delays are the result of > accessing hardware. Neither of the above two items would result in > additional hardware accesses, so I don't think they would be the cause > of an additional delay. Thanks, I'll investigate better the delays. Cheers, Stefano > > -Kevin -- Stefano Garzarella Red Hat _______________________________________________ SeaBIOS mailing list SeaBIOS@seabios.org https://mail.coreboot.org/mailman/listinfo/seabios