Hello!
I'm using an old version of U-Boot (U-Boot-2013.01.01-amsdk-06.00.00) with an AM332 processor. Also, my board boots from a NAND device.
To reduce the boot time in our board, I'm trying to skip the relocation U-Boot does once it starts running from DRAM.
The reason is: U-Boot takes 86 ms to relocate itself. As the whole U-Boot takes 921 ms to start the Kernel (I'm not counting the SPL load time), the relocation represents 9.3% of the time...
As U-Boot is already running in the RAM I thought this relocation is not necessary in my board, but removing it seems to bring a lot of issues...
The document README.arm-relocation says that one can skip this relocation if the CONFIG_SYS_TEXT_BASE is the relocation address calculated in board_init_f (not with this works, though). After I compiled U-Boot with this change, the relocation did skip, but I incur in a data abort interruption. I'm pasting the console output below:
U-Boot SPL 2013.01.01 (Mar 19 2015 - 16:00:23)
U-Boot 2013.01.01 (Mar 19 2015 - 16:00:23)
DRAM: 64 MiB
NAND: nand: error: Unable to find NAND settings in GPMC Configuration - quitting
4194303 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
Using UCC3's environment
data abort
MAYBE you should read doc/README.arm-unaligned-accesses
pc : [<83f98fc8>] lr : [<83f7a6ac>]
sp : 83e6de98 ip : 00000000 fp : 83e6df2c
r10: 00000000 r9 : 83fa93e4 r8 : 83e6df60
r7 : 83f72f38 r6 : 83fad440 r5 : 83e6e000 r4 : 7c08d0c8
r3 : 00000000 r2 : 7c08d0c8 r1 : 00000000 r0 : 07de0f38
Flags: nzCv IRQs off FIQs on Mode SVC_32
Resetting CPU ...
resetting ...
And these messages repeats in a loop. I looked up the file README.arm-unaligned-accesses and with objdump I found that memset is causing the problem:
80128fbc: ea000001 b 80128fc8 <memset+0x38>
This instruction is also inside memset function... Maybe the root problem is the fact the NAND chip is not being recognized anymore, but I'm still debugging the whole thing.
Anyway, as my board boots perfectly fine if I keep CONFIG_SYS_TEXT_BASE intact, could anyone share some thoughts on what I need to do in order to successfully skip the relocation in arch/arm/cpu/armv7/start.S?
Thanks
DAVI