[U-Boot] [PATCH] README.arm-relocation: get relocated address in gdb
Ben Gardiner
bengardiner at nanometrics.ca
Thu Apr 28 16:38:24 CEST 2011
On Thu, Apr 28, 2011 at 9:46 AM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Ben Gardiner,
>
> In message <1303996341-6582-1-git-send-email-bengardiner at nanometrics.ca> you wrote:
>> When your emulator is connected at reset (or is used to load u-boot)
>> it is possible to get the relocation address from the parameter
>> passed to relocate_code() instead of building with -DDEBUG and
>> extracting from the console messages.
>
> Hm... Maybe we should try and unify code a bit better.
>
> On PowerPC, relocaddr (the start address of the U-Boot image in RAM)
> is part of the global data structure, and simply gets printed with the
> "bdinfo" command:
>
> => bdinfo
> memstart = 0x00000000
> memsize = 0x20000000
> flashstart = 0xFC000000
> flashsize = 0x04000000
> flashoffset = 0x00000000
> sramstart = 0x00000000
> sramsize = 0x00000000
> bootflags = 0xFFFE72CC
> intfreq = 1066.667 MHz
> busfreq = 266.667 MHz
> ethaddr = 00:10:ec:01:08:84
> eth1addr = 00:10:ec:81:08:84
> IP addr = 192.168.100.6
> baudrate = 115200 bps
> ===> relocaddr = 0x1FF50000
>
> Why not simply follow this example?
Good question, I don't see any reason why someone could not simply
follow that example. bdinfo also prints the relocaddr on ARM:
DA850-evm > bdinfo
arch_number = 0x0000086D
boot_params = 0xC0000100
DRAM bank = 0x00000000
-> start = 0xC0000000
-> size = 0x08000000
ethaddr = 00:08:EE:03:D6:D2
ip_addr = 192.168.1.3
baudrate = 115200 bps
TLB addr = 0xC7FF0000
==> relocaddr = 0xC7F53000
reloc off = 0x06ED3000
irq_sp = 0xC7E22F70
sp start = 0xC7E22F68
FB base = 0x00000000
I'm not proposing that others do not get the relocaddr by other means.
My intention was only to share the current recipe I am using to debug
after relocation.
Best Regards,
Ben Gardiner
---
Nanometrics Inc.
http://www.nanometrics.ca
More information about the U-Boot
mailing list