qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Add multi-boot kernel loading support


From: Rene Rebe
Subject: Re: [Qemu-devel] [PATCH] Add multi-boot kernel loading support
Date: Tue, 03 Feb 2009 09:29:43 +0100
User-agent: Thunderbird 2.0.0.14 (X11/20080616)

Alexander Graf wrote:

On 02.02.2009, at 23:42, Anthony Liguori wrote:

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é Rebe <address@hidden>

Index: elf_ops.h
===================================================================
--- elf_ops.h    (revision 6501)
+++ elf_ops.h    (working copy)
@@ -195,6 +195,10 @@
    }

    if (ELF_MACHINE != ehdr.e_machine)
+#if (ELF_MACHINE == EM_X86_64) && !defined(CONFIG_USER_ONLY)
+      /* x86_64 systems can run i386 code as well */
+      if(ehdr.e_machine != EM_386)
+#endif
        goto fail;

    if (pentry)

Seems like an unrelated fix.

Actually it's not. If you want to load a 32-bit elf (multiboot) 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.

--
  René Rebe - ExactCODE GmbH - Europe, Germany, Berlin
  http://exactcode.de | http://t2-project.org | http://rene.rebe.name




reply via email to

[Prev in Thread] Current Thread [Next in Thread]