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)