> > 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 mar...@xcllnt.net
signature.asc
Description: Message signed with OpenPGP using GPGMail