From: Wolfgang Denk Date: Thu, 28 Apr 2011 15:46:07 +0200 Subject: [U-Boot] [PATCH] README.arm-relocation: get relocated address in gdb In-Reply-To: <1303996341-6582-1-git-send-email-bengardiner@nanometrics.ca> References: <1303996341-6582-1-git-send-email-bengardiner@nanometrics.ca> Message-ID: <20110428134607.3F96BD52709@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Ben Gardiner, In message <1303996341-6582-1-git-send-email-bengardiner@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? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If the hours are long enough and the pay is short enough, someone will say it's women's work.