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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[email protected]"

Reply via email to