[Etherboot-developers] Relocation successs...
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Eric W B. <ebi...@ln...> - 2002-07-21 09:05:39
|
I am probably certifiable at this point but I have a working relocatable etherboot. Including the framework for 16bit calls. But the 16bit code isn't done. The fun part is putting etherboot in an endless loop booting itself :) What I have for 16bit code, is a 16bit that you pass a stack below 1M and it will pop all of it's arguments of the registers, and the address of the function to jmp to off of the stack. Leaving just a prepopulated return address, and whatever arguments came with the stack. I aimed at a single general purpose function because I felt that writing multiple stub functions, and handling everything else would start getting quite complicated, and push the amount of memory we need below 1MB. Currently below 1MB I need about 400 bytes + 1k or so for a stack. I'm a little frustrated because it feels like whenever I try something to make the code smaller the size actually grows a little. Everything except the decompressor code anyway :) The practical growth is only a couple of hundred bytes... With respect to decompressor code. There should be enough space in the low 640K to hold both the compressed, and the uncompressed etherboot so I don't need an inplace decompressor. I plan on placing the decompressor at 0x10000 and etherboot at something like 0x24000, when using relocation. Relocating polling drivers isn't to much of a hassle. It is just a matter of placing calls to virt_to_bus in all of the appropriate places. For the few drivers we have that used memory mapped io devices we will need calls to ioremap as well. And sorting that out will be a little interesting. I'm to tired to safely commit anything tonight, but sometime in the next couple of days, I will commit my work to date. Eric |