[LinuxBIOS] Help with relocation of reset vector

Hamish Guthrie hamish at prodigi.ch
Wed Aug 17 20:27:48 CEST 2005


Hi All,

I recently had a disaster in that both my development system and backup 
servers had hard drive crashes within a few hours of each other, and I 
have lost some source, of which I have no other copies (ehem, no 
comments please!!).

For various reasons, I have a bit of real-mode code I execute before I 
vector off to LinuxBIOS. The normal boot vector, therefore executes this 
real-mode code, and once that is done executing, I want a clean 
interface to LinuxBIOS. The way I had implemented this previously was by 
somehow lowering the point at which the LinuxBIOS reset vector was 
created, and then doing a near jump to the LinuxBIOS vector. What I am 
wanting to achieve is the following memory map (considering the top 64k 
of flash only).

0xffff0000	Start of LinuxBIOS ROM space
0xffff7ff0	LinuxBIOS reset vector poing to LB entry point
0xffff8000	Start of realmode code
0xffff????	{jmp to LinuxBIOS reset vector}
0xfffffff0	Realmode vector

Of course, the realmode memory map can be ignored, as I already have the 
realmode code for that, and that on completion vectors to 0xffff7ff0

I want to create a binary, with correct relocation so that the binary 
can be executed in place at 0xffff0000 from a boot vector at 0xffff7ff0 
and still retain it's integrity.

I managed to do this about 3 or 4 months ago, but since then have been 
doing a lot of other stuff and have completely forgotten how I did it, 
and have got out of the 'LinuxBIOS mode' for the time being!. All I 
recall is that I did some trickery by having my own replacements of the 
creation of the LinuxBIOS vectors somewhere in my own tree, and that 
portion of the tree is now gone.

Is there possibly a generic way this can be done so that the placement 
of the vector can be parameterised?

Any help would be greatly appreciated.

TIA

Hamish




More information about the coreboot mailing list