qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Support for multiboot images in elf64 (EM_X86_64) forma


From: Kevin Wolf
Subject: Re: [Qemu-devel] Support for multiboot images in elf64 (EM_X86_64) format
Date: Wed, 08 Feb 2012 12:30:05 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0

Am 08.02.2012 10:53, schrieb Goswin von Brederlow:
> Stefan Hajnoczi <address@hidden> writes:
> 
>> On Sat, Feb 4, 2012 at 5:38 PM, Goswin von Brederlow <address@hidden> wrote:
>>> Description: Allow 64bit elf binaries in multiboot format
>>>  This patch allows 64bit elf files with multiboot header to be loaded.
>>>  The entry point will still be called in 32bit mode and the kernel
>>>  must switch to 64bit mode on its own. The image and all modules must
>>>  also be located in the lower 2GB of ram. All the restrictions of a
>>>  32bit image still apply.
>>> Author: Goswin von Brederlow <address@hidden>
>>> Last-Updated: 2011-04-08
>>> ---
>>
>> The multiboot specification is 32-bit only.  This patch enables a
>> non-standard 64-bit version of multiboot.  Have you checked whether
>> GRUB or other multiboot loaders have equivalent functionality?  Have
>> you contacted the multiboot specification authors?
> 
> Not really. The multiboot specification allow for different executable
> formats as long as the multiboot header is correct. For example you can
> have an a.out multiboot image. The entry vector specified in the
> multiboot header is still called in 32bit mode, as per specs. All that
> changes is that the kvm allows another executable format for loading the
> image.
> 
> Actually per mutliboot specs the elf64 image should already be loaded as
> plain image (which means not neccessarily reloacted to the right
> address) just like a.out would but kvm doesn't support that.
> 
> I don't think other loaders support elf64 (yet) unless they support
> plain images. Frankly I never tried booting a toy kernel on real
> hardware so there never was the need.

If you want to use it this way, you need to use the a.out kludge, i.e.
the multiboot header must have set bit 16 of the flag and the address
fields must be present in the multiboot header. In this case, the code
path that you're patching isn't even run.

Kevin



reply via email to

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