From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LUGfO-0007pq-Ll for qemu-devel@nongnu.org; Tue, 03 Feb 2009 03:29:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LUGfN-0007ob-7J for qemu-devel@nongnu.org; Tue, 03 Feb 2009 03:29:58 -0500 Received: from [199.232.76.173] (port=56083 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LUGfM-0007oQ-RS for qemu-devel@nongnu.org; Tue, 03 Feb 2009 03:29:56 -0500 Received: from mx20.gnu.org ([199.232.41.8]:21094) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LUGfM-0007aF-Du for qemu-devel@nongnu.org; Tue, 03 Feb 2009 03:29:56 -0500 Received: from mr01.hansenet.de ([213.191.74.10]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LUGfL-0003dh-6a for qemu-devel@nongnu.org; Tue, 03 Feb 2009 03:29:55 -0500 Message-ID: <49880077.6000006@exactcode.de> Date: Tue, 03 Feb 2009 09:29:43 +0100 From: Rene Rebe MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add multi-boot kernel loading support References: <49873680.2040603@exactcode.de> <498776EC.1050208@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: Quoted-Printable Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: qemu-devel@nongnu.org Alexander Graf wrote: >=20 > On 02.02.2009, at 23:42, Anthony Liguori wrote: >=20 >> Rene Rebe wrote: >>> Hi all, >>> >>> Alexander Graf implemented multi-boot kernel loading during >>> his work to run Darwin inside Qemu/KVM. As the boot loader >>> expects to load the kernel in an EFI environment a custom >>> booter is used to load the kernel using a legacy BIOS. >>> >>> This is a port of the patch to the new extload / INT 19 >>> machinery (including minor cleanups). >>> >>> Signed-off-by: Ren=E9 Rebe >>> >>> Index: elf_ops.h >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- elf_ops.h (revision 6501) >>> +++ elf_ops.h (working copy) >>> @@ -195,6 +195,10 @@ >>> } >>> >>> if (ELF_MACHINE !=3D ehdr.e_machine) >>> +#if (ELF_MACHINE =3D=3D EM_X86_64) && !defined(CONFIG_USER_ONLY) >>> + /* x86_64 systems can run i386 code as well */ >>> + if(ehdr.e_machine !=3D EM_386) >>> +#endif >>> goto fail; >>> >>> if (pentry) >> >> Seems like an unrelated fix. >=20 > Actually it's not. If you want to load a 32-bit elf (multiboot)=20 > executable on an x86_64 system, you need this patch. Thanks, I was just about to re-reply to the other mail with this question lost while answering. --=20 Ren=E9 Rebe - ExactCODE GmbH - Europe, Germany, Berlin http://exactcode.de | http://t2-project.org | http://rene.rebe.name