I have just successfully created a version of elfboot.c that allows you to load an image over linuxBIOS is running in ram. Executables trying to load ontop of linuxBIOS has been one of the biggest problems with the elfboot stuff. So it should be much more user friendly now.
I move linuxBIOS out of the way to the very top of memory at the last possible instant. So this should not have much of an impact on anything else. Tommorrow my aim is to clean up and check this code in. And of course a more detailed description. /* 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. * */
