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: Alexander Graf
Subject: Re: [Qemu-devel] [PATCH] Add multi-boot kernel loading support
Date: Tue, 3 Feb 2009 09:25:03 +0100


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.

Alex



reply via email to

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