LinuxBIOS debugging with an emulator
Li-Ta Lo
ollie at lanl.gov
Fri Oct 29 16:44:00 CEST 2004
On Fri, 2004-10-29 at 15:57, Stephen.Kimball at bench.com wrote:
> > On Thu, 2004-10-28 at 16:03, Stephen.Kimball at 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
>
> In the amd/serenade I built, the _RAMBASE is 0x4000 and hardwaremain is
> at 0x60B8 from the linuxbios_c.map. Hardwaremain is at 0x20B8 in the
> objdump.
> That all make sense. But if I step through the execution of _start from
> 0x4000 to the call to hardwaremain. I see it branch to 0x5F70 and the
> instructions at 0x5F70 match the hardwaremain in objdump. So I think
> it's really at 0x5F70 not 0x60B8. It's only off by 0x148 bytes.
>
> I bet your hardwaremain isn't at 0x5FE0.
>
Sorry I have no idea about this. The HDT we have can only trace the
ROMCC part.
Ollie
> Steve
>
More information about the coreboot
mailing list