qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Remove restriction that prevents bootimg elf64 images
@ 2017-06-07  4:41 Anatol Pomozov
  2017-06-07 17:19 ` Anatol Pomozov
  2017-06-08 20:41 ` Adam Lackorzynski
  0 siblings, 2 replies; 8+ messages in thread
From: Anatol Pomozov @ 2017-06-07  4:41 UTC (permalink / raw)
  To: qemu-devel; +Cc: Anatol Pomozov

It is possible to create a 64 bit elf image that has valid multiboot header.
qemu should be able to boot such images.

Tested with homemade 64bit OS - now it boots fine with 'qemu -kernel'
and as a grub image.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
---
 hw/i386/multiboot.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
index 663f35a658..cf1b4f5fb3 100644
--- a/hw/i386/multiboot.c
+++ b/hw/i386/multiboot.c
@@ -192,11 +192,6 @@ int load_multiboot(FWCfgState *fw_cfg,
         int kernel_size;
         fclose(f);
 
-        if (((struct elf64_hdr*)header)->e_machine == EM_X86_64) {
-            fprintf(stderr, "Cannot load x86-64 image, give a 32bit one.\n");
-            exit(1);
-        }
-
         kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
                                &elf_low, &elf_high, 0, I386_ELF_MACHINE,
                                0, 0);
-- 
2.13.1

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-20 23:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-07  4:41 [Qemu-devel] [PATCH] Remove restriction that prevents bootimg elf64 images Anatol Pomozov
2017-06-07 17:19 ` Anatol Pomozov
2017-06-08 20:41 ` Adam Lackorzynski
2017-06-08 21:07   ` Anatol Pomozov
2017-06-14  0:05     ` Anatol Pomozov
2017-06-19 21:08       ` Adam Lackorzynski
2017-06-21 20:45         ` Anatol Pomozov
2022-12-20 23:45           ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).