tech-kern archive

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

Re: Multiboot for amd64?

On Fri, Jan 08, 2010 at 05:54:18PM +0100, Grégoire Sutre wrote:
> Joerg Sonnenberger wrote:
> >At least the legacy branch of grub doesn't spport multiboot for amd64
> >ELF binaries. Which makes it not very attractive to work on.
> I'm not knowledgeable about these issues, but if I understood
> correctly, in GRUB 2, multiboot supports ELF-64 binaries that start
> in i386 mode. Doesn't the NetBSD/amd64 kernel start in i386 mode?

It does, but there's a catch.  I once tried to make this work,
the problem is that our multiboot parser is implemented in C.
If you call it on amd64 at the point where it's called on
i386, you end up calling Long Mode code from Protected Mode,
this ends up giving you a triple fault.

At this point, I care very very little about having our
kernel be multiboot.  NetBSD/i386-current GENERIC can't even
mount root without modules being loaded with the kernel.
I might even go as far as to say 'options MULTIBOOT' should
disappear, but forget I almost said that.

        Jonathan Kollasch

Home | Main Index | Thread Index | Old Index