From patchwork Fri Apr 1 11:11:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard W.M. Jones" X-Patchwork-Id: 8722881 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 894DDC0553 for ; Fri, 1 Apr 2016 11:12:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 36342201FA for ; Fri, 1 Apr 2016 11:11:59 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DB6AD2012D for ; Fri, 1 Apr 2016 11:11:57 +0000 (UTC) Received: from localhost ([::1]:43461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alwzd-0003A3-8A for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Apr 2016 07:11:57 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alwzQ-00035N-Or for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:11:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1alwzN-0000aj-GW for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:11:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1alwzN-0000aa-8p for qemu-devel@nongnu.org; Fri, 01 Apr 2016 07:11:41 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F29537304F; Fri, 1 Apr 2016 11:11:40 +0000 (UTC) Received: from localhost (ovpn-204-90.brq.redhat.com [10.40.204.90]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u31BBdwH027367; Fri, 1 Apr 2016 07:11:40 -0400 Date: Fri, 1 Apr 2016 12:11:39 +0100 From: "Richard W.M. Jones" To: Gerd Hoffmann Message-ID: <20160401111139.GK32728@redhat.com> References: <20160331221730.GA5637@redhat.com> <20160331224432.GA4583@morn.lan> <20160401080222.GC32728@redhat.com> <56FE2D42.5020607@redhat.com> <20160401081417.GD32728@redhat.com> <56FE3045.2030003@redhat.com> <20160401084456.GF32728@redhat.com> <1459502310.7011.37.camel@redhat.com> <20160401101733.GI32728@redhat.com> <1459508875.7011.62.camel@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1459508875.7011.62.camel@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 01 Apr 2016 11:11:41 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Cc: marc.mari.barcelo@gmail.com, Paolo Bonzini , Kevin O'Connor , qemu-devel@nongnu.org, Stefan Hajnoczi Subject: Re: [Qemu-devel] Why is SeaBIOS used with -kernel? X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Fri, Apr 01, 2016 at 01:07:55PM +0200, Gerd Hoffmann wrote: > On Fr, 2016-04-01 at 11:17 +0100, Richard W.M. Jones wrote: > > On Fri, Apr 01, 2016 at 11:18:30AM +0200, Gerd Hoffmann wrote: > > > Hi, > > > > > > > I wonder how we can make use of this in qemu and downstream distros? > > > > Can we have a bios-min.bin which is used with -kernel boots? > > > > > > We already build two seabios roms: one full featued and one slightly > > > stripped down to keep it below 128k, for backward compatibility with old > > > machine types. > > > > > > Adding a third config for -kernel boot should be easy. For that use > > > case we can probably also turn on seabios logging to the serial console > > > and drop sgabios. We don't need input (no boot menu) and we also don't > > > need to hook into int10 (no grub/ipxe using that for output). > > > > SeaBIOS logging is slow (or more likely, serial output is slow). > > And sgabios is useful for debugging. > > Ah, I see. debuglevel=1 prints too much and debuglevel=0 has no logging > at all. We'd need seabios log at least the version banner to serial > even with debuglevel=0 to replace sgabios. > > https://www.kraxel.org/cgit/qemu/log/?h=work/stripped-seabios > > Not hooked into -kernel yet, so you have to use "-bios bios-kboot.bin". > > Comments? I think we were working on the same thing ... Attached is my version. Note that you must enable at least CONFIG_MPTABLE else virtio-scsi does not work in the guest. I also enabled ACPI & SMBIOS & PIRTABLE. Rich. diff --git a/Makefile b/Makefile index 1d076a9..c4e939d 100644 --- a/Makefile +++ b/Makefile @@ -389,7 +389,8 @@ common de-ch es fo fr-ca hu ja mk nl-be pt sl tr \ bepo cz ifdef INSTALL_BLOBS -BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \ +BLOBS=bios.bin bios-256k.bin bios-fast.bin \ +sgabios.bin vgabios.bin vgabios-cirrus.bin \ vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \ acpi-dsdt.aml \ ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \ diff --git a/roms/Makefile b/roms/Makefile index 7bd1252..26b0586 100644 --- a/roms/Makefile +++ b/roms/Makefile @@ -61,9 +61,11 @@ default: @echo " slof -- update slof.bin" @echo " u-boot.e500 -- update u-boot.e500" -bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k +bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k \ + build-seabios-config-seabios-fast cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin cp seabios/builds/seabios-256k/bios.bin ../pc-bios/bios-256k.bin + cp seabios/builds/seabios-fast/bios.bin ../pc-bios/bios-fast.bin seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants)) diff --git a/roms/config.seabios-fast b/roms/config.seabios-fast new file mode 100644 index 0000000..98a4c27 --- /dev/null +++ b/roms/config.seabios-fast @@ -0,0 +1,12 @@ +# The most fastest SeaBIOS that can boot Linux using -kernel. +CONFIG_USB=n +CONFIG_DRIVES=n +CONFIG_KEYBOARD=n +CONFIG_MOUSE=n +CONFIG_WRITABLE_UPPERMEMORY=y +CONFIG_TCGBIOS=n +CONFIG_PIRTABLE=y +CONFIG_MPTABLE=y +CONFIG_SMBIOS=y +CONFIG_ACPI=y +CONFIG_DEBUG_LEVEL=0