[Etherboot-developers] [RFC] Loading Arbitrary images.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-01-15 09:37:14
|
Recently I attacked and solved the problem in linuxBIOS where we were having problems loading ELF executables that wanted to live on top of our linuxBIOS code. Etherboot by default conflicts much less, but it still has this problem to some degree. Would there be interest in implementing this for etherboot? The idea is to move the bootloader to the top of memory at the last possible moment. This would allow things like booting etherboot from etherboot. I could implement this but it would take me a while to ascertain what memory areas etherboot really uses and how they all of that interact. Anyway a description of my algorithm in linuxBIOS is below. Eric /* The problem: * Static executables all want to share the same addresses * in memory because only a few addresses are reliably present on * a machine, and implementing general relocation is hard. * * The solution: * - Allocate a buffer twice the size of the linuxBIOS image. * - Anything that would overwrite linuxBIOS copy into the lower half of * the buffer. * - After loading an ELF image copy linuxBIOS to the upper half of the * buffer. * - Then jump to the loaded image. * * Benefits: * - Nearly arbitrary standalone executables can be loaded. * - LinuxBIOS is preserved, so it can be returned to. * - The implementation is still relatively simple, * and much simpler then the general case implemented in kexec. * */ |