Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 May 2012 10:36:44 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-hackers@freebsd.org
Cc:        Eric McCorkle <eric@shadowsun.net>
Subject:   Re: GSoC Project: EFI on amd64/i386
Message-ID:  <201205171036.45009.jhb@freebsd.org>
In-Reply-To: <4FB3AAA6.3090708@shadowsun.net>
References:  <4FA95960.7090908@shadowsun.net> <201205151144.38123.jhb@freebsd.org> <4FB3AAA6.3090708@shadowsun.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, May 16, 2012 9:24:54 am Eric McCorkle wrote:
> On 05/15/12 11:44, John Baldwin wrote:
> > The i386 kernel assumes it starts out with a flat 32-bit mode with
> > the kernel loaded into a contiguous memory region at a fixed
> > physical address.  If we need a relocatable kernel (as Marcel
> > hinted at I think), then that adds a fair bit of complication.
> >
> > The amd64 kernel assumes it starts in long mode (the bootinfo64.c
> > bits in the loader setup initial page tables, etc.).  I think the
> > amd64 kernel also has to be loaded into contiguous memory at a
> > fixed physical address currently.
> >
> 
> Seems like an initial workaround could be to allocate a space big
> enough for all the necessary ELF segments, and split it up ourselves.
> 
> Do the kernel and modules actually do anything that depends on being
> in a contiguous space in some way (ie some relocation trick)?  Because
> it seems like it shouldn't really matter otherwise.

They are statically linked at a fixed address.  Modules can be wherever,
but the kernel has to be at the physical address it is linked for (unless
you make the kernel relocatable).

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205171036.45009.jhb>