qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4] Add multiboot support (x86) v2


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 0/4] Add multiboot support (x86) v2
Date: Thu, 18 Jun 2009 14:29:51 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

François Revol schrieb:
>> François Revol schrieb:
>>>> Why would an OS want to parse multiboot structures but not 
>>>> implement
>>>> proper multiboot support? I mean, this really isn't anything
>>>> complicated. When you have enabled it to understand multiboot 
>>>> structures
>>>> you are only missing a handful of bytes for the multiboot header.
>>>>
>>>> What is it that you need to do differently for Haiku?
>>> Because Haiku has its own second stage loader, which requires the 
>>> BIOS 
>>> to locate the kernel and module in a BFS partition which grub 
>>> doesn't 
>>> implement btw.
>> That makes sense on real hardware, of course. But for -kernel you 
>> don't
>> need a file system to read the kernel from.
> 
> Except that wouldn't be the actual kernel passed but the 2nd stage.
> And having to pass the kernel in a tgz outside the BFS image makes it 
> more complex to set up.

As Alex said, you don't need the tgz. Multiboot supports passing modules
to the kernel (or 2nd stage loader), i.e. files that are loaded into
memory by the bootloader (qemu in this case).

>>> It also handles PM switching by itself.
>>> Haiku might also use the BIOS for other stuff, like VESA mode 
>>> switching, so I'd need to make sure all calls aren't strictly 
>>> required.
>> In theory you could switch back to Real Mode when starting through
>> multiboot and then continue as with a normal boot. Admittedly, 
>> doesn't
>> sound exactly nice, but should be doable...
> 
> The loader can likey detect it anyway. If multiboot is used it should't 
> need to call the BIOS to read the kernel anyway. It's just a different 
> code path. 

Detecting shouldn't be problem, you have the multiboot magic in eax. I
thought you would need the BIOS anyway (e.g. for VESA, as you mentioned
yourself). If you don't or you can use VM86 instead, it's going to be
much simpler, of course.

Kevin




reply via email to

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