Subject: Re: Multiboot support for review
To: Juan RP <juan@xtrarom.org>
From: Julio M. Merino Vidal <jmmv84@gmail.com>
List: tech-kern
Date: 02/01/2006 17:10:25
El 01/02/2006, a las 3:53, Juan RP escribi=F3:

> On Wed, 1 Feb 2006 02:53:59 +0100
> Juan RP <juan@xtrarom.org> wrote:
>
>> On Tue, 31 Jan 2006 21:19:21 +0100
>> "Julio M. Merino Vidal" <jmmv84@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> after some hacking days, I've finally got some code to make NetBSD
>>> Multiboot-compliant.  We already discussed this here and all I got
>>> was positive feedback:
>>>
>>> 	http://mail-index.netbsd.org/tech-kern/2005/12/28/0008.html
>>>
>>> The patch still needs some cleanup and bug fixing (specially testing
>>> that several things work after the changes) but, while I do those,
>>> I want to ask for feedback because the code won't change that much.
>>> The preliminary patch is at:
>>>
>>> 	ftp://ftp.NetBSD.org/pub/NetBSD/misc/jmmv/multiboot.diff
>>
>> I just tried your patch (thanks for doing it BTW) but didn't work.
>> I've followed the instructions of multiboot(8)'s manpage:
>>
>> * Build kernel with options MULTIBOOT
>> * Apply patch grub-fix-addresses.diff to grub and reinstall it with
>>   "grub-install /dev/wdNd"
>> * Modify /grub/menu.lst with:
>>
>> title NetBSD/Multiboot
>> kernel (hd0,1,a)/netbsd.gz -c console=3Dpc root=3Dwd0a
>>
>> When the ELF image is already loaded the boot process hangs.
>> I tried with both compressed and uncompressed kernel.

This was to a missing $ in front of a constant in the assembler
code.  I'm still wondering WTH did it work in qemu just fine, as
it was accessing a non-existent memory address.

> Another problem: if the kernel was built with options MULTIBOOT,
> chainloader +1 does not get the hardcoded boot device from
> the kernel config, it asks again what's the root dev.

Caused by an incorrect ordering of instructions in multiboot_post_reloc.

I've also added handling for the memory mappings describing reserved
memory areas.

Please try again (the patch in the ftp should now work for you).

Cheers,

--=20
Julio M. Merino Vidal <jmmv84@gmail.com>
The Julipedia - http://julipedia.blogspot.com/