* Jordan Crouse jordan.crouse@amd.com [071006 00:28]:
This week I've been working with LinuxBIOSv3 to try to get over the XIP initram problem. For those that tuning in late, here's the recap:
There are some symbols that we use that we want to define once, and use in different segments (such as printk). This is very easy to do for segments that are loaded and run at a particular location in memory, by passing in the symbol list from stage0 to LD through the -R command line option, from which LD figures the right relative offsets.
The problem is, this is only easy if you know where your code is executing, and pass the appropriate fu into LD. For most systems, we need to run at least the initram segment in place on the ROM which are not always located at a known location - there can be multiple initram blocks, and LAR can put them anywhere it wishes. Needless to say, this breaks things badly when we try to call functions in the bootblock with a relative offset that walks into the weeds.
I tried playing with the same thing and I came up with the following hack (attachment) .. The big issue is it doesnt work like that yet. The idea is to take the decision of the jump address from the compiler+linker because we already know it.
Can something like this work a all?