On Tue, 26 Oct 2004 Stephen.Kimball@bench.com wrote:
Can someone tell me what the starting sequence is with LinuxBIOS?
Reset jumps to crt0.s. crt0.s calls auto.E. auto.E is built using romcc, so source-level debugging is not possible.
ah well :-)
The statement locations can be found using the Lxxxx labels in linuxbios.map.
Then
hardwaremain is called. Hardwaremain is the first C function called.
yep.
Crt0 and auto run out of FLASH. Hardwaremain is the first function called after LinuxBIOS is copied to RAM.
sounds good so far.
ron
It seems that LinuxBIOS copies itself to _RAMBASE, which is 0x4000. Then it branches to 0x4000 into _start, which sets up the stack and calls hardwaremain. The address of hardwaremain from linuxbios_c.o is wrong. The address is not the Flash address and it's not the RAM address. Can someone explain how linuxbios_c.o is linked with RAM addresses?
Steve
On Thu, 2004-10-28 at 16:03, Stephen.Kimball@bench.com wrote:
It seems that LinuxBIOS copies itself to _RAMBASE, which is 0x4000. Then it branches to 0x4000 into _start, which sets up the stack and calls hardwaremain. The address of hardwaremain from linuxbios_c.o is wrong. The address is not the Flash address and it's not the RAM address. Can someone explain how linuxbios_c.o is linked with RAM addresses?
What do you mean ? In the S2885 I built, the _RAMBASE is 0x4000 and hardwaremain is 0x5fe0 as you can get from the linuxbios_c.map. They are both in RAM. If you use "objdump -drS linuxbios_c.o" you will find the hardwaremain is at offset 0x1fe0 from the _RAMBASSE.
BTW, if you specify the -g option for gcc, you can use the -S option in objdump to see the source code with the disassebmly (-d).
Ollie
Steve _______________________________________________ Linuxbios mailing list Linuxbios@clustermatic.org http://www.clustermatic.org/mailman/listinfo/linuxbios
On Thu, 28 Oct 2004, Li-Ta Lo wrote:
BTW, if you specify the -g option for gcc, you can use the -S option in objdump to see the source code with the disassebmly (-d).
BTW, this is a very usefull tip. I had been using it lately all the time to trace ooops in kernel.
objdump -S -C ./vmadump.ko |less