From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steven Scholz Date: Tue, 23 Nov 2004 17:51:12 +0100 Subject: [U-Boot-Users] CONFIG_BOOTBINFUNC for AT91RM9200 In-Reply-To: <20041123164253.C38A7C1430@atlas.denx.de> References: <20041123164253.C38A7C1430@atlas.denx.de> Message-ID: <41A36A80.2070608@imc-berlin.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Wolfgang Denk wrote: > In message <41A35A7E.1020605@imc-berlin.de> you wrote: > >>is there a standard way in U-Boot to prevent to the startup code from relocating >>into RAM? > > No. U-Boot will always relocate itself to RAM. Well, nearly always - > in any halfway sane implementation. > > >>I know that arm920t figures out the currebt address. compares it to _TEXT_BASE >>and decides wether to relocate or not. >> >>relocate: /* relocate U-Boot to RAM */ >> adr r0, _start /* r0 <- current position of code */ >> ldr r1, _TEXT_BASE /* test if we run from flash or RAM */ >> cmp r0, r1 /* don't reloc during debug */ > > > I wish that code was never written. Why is that so bad? It makes it possible to debug U-Boot with just loading the image into RAM using BDI2000. > All CPUs always relocate the code to RAM. This is the general case. > Anything else is not supported. But how would you debug U-Boot? I though the common way is to disabled relocation and memsetup, load that U-Boot image with an BDI2000 into RAM and execute it - skipping the init code... -- Steven