svn commit: r287934 - head/sys/boot/efi/loader

Marcel Moolenaar marcel at xcllnt.net
Thu Sep 24 16:34:56 UTC 2015


> 
> The other approach I suggested earlier is to make the kernel relocatable
> (and allow the module metadata to be anywhere and live in a chain instead
> of an array) so that we can just load things wherever and leave them there
> without having to relocate.

For ia64 I linked the kernel against a virtual address. The loader
could simply allocate EFI memory as needed, and not worry about
its location. It would map that into what I called the “pre-boot
virtual address space”. When booting the kernel, the loader only
had to pass the physical address and size of the page table (the
virtual address was fixed).

With a variable size the loader would start off with a single 4KB
page table and it would grow it as needed to some arbitrary max.
The page size for the pre-boot virtual address space was 64KB (to
match the maximum alignment of segments that the toolchain allowed).

With more than 700MB of pre-boot virtual address space, one could
preload and entire installation CD if willing to wait for it being
loaded. No need to set memory aside and hope things fit...

As a nice plus: linking against a virtual address allows copying
the kernel text across the memory domains and always have it run
locally to CPUs in NUMA configurations.

--
Marcel Moolenaar
marcel at xcllnt.net

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20150924/b4e56839/attachment.bin>


More information about the svn-src-head mailing list