From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1v0-0008SW-BR for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zj1uw-0003CN-4E for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:18:50 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57165) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zj1uv-0003C1-Ux for qemu-devel@nongnu.org; Mon, 05 Oct 2015 05:18:46 -0400 Message-ID: <1444036721.14636.27.camel@redhat.com> From: Gerd Hoffmann Date: Mon, 05 Oct 2015 11:18:41 +0200 In-Reply-To: <20151002133801.GA16190@morn.lan> References: <1443701677-13629-1-git-send-email-markmb@redhat.com> <1443701819-13855-1-git-send-email-markmb@redhat.com> <1443701819-13855-7-git-send-email-markmb@redhat.com> <560D5057.6010308@redhat.com> <20151001160242.GA7766@morn.lan> <1443773786.14636.12.camel@redhat.com> <20151002133801.GA16190@morn.lan> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 6/7] Make the kernel image in the fw_cfg DMA interface bootable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin O'Connor Cc: Drew , Stefan Hajnoczi , "Gabriel L. Somlo" , qemu-devel@nongnu.org, Marc =?ISO-8859-1?Q?Mar=ED?= , Laszlo Ersek On Fr, 2015-10-02 at 09:38 -0400, Kevin O'Connor wrote: > On Fri, Oct 02, 2015 at 10:16:26AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > That's fine with me. Marc - I think qemu_vmlinux_setup() in SeaBIOS > > > with the following would work: > > > > > > void qemu_vmlinux_setup(void) > > > { > > > u32 kernel_size; > > > qemu_cfg_read_entry(&kernel_size, QEMU_CFG_KERNEL_SIZE, sizeof(kernel_size)); > > > if (kernel_size) > > > boot_add_qemu_vmlinux("QEMU Kernel image", 0); > > > } > > > > It isn't that simple. We also have support for multiboot kernels (using > > multiboot.bin option rom). So when doing this you need to be prepared > > to find a multiboot kernel in fw_cfg. > > Is there some way to detect if it's a multiboot kernel? Yes. There is a header with magic + checksum in the first 8k, see hw/i386/multiboot.c (in qemu). Or check the option rom name in the bootorder file, it's multiboot instead of linuxboot. > If so, > seabios can just fall back to using multiboot.bin. Or add multiboot support to seabios. cheers, Gerd