[U-Boot] Most ARM CPU's have buggy clear_bss?

Heiko Schocher heiko.schocher at invitel.hu
Thu Oct 28 07:50:56 CEST 2010


Hello Darius,

Darius Augulis wrote:
> On 10/27/2010 06:12 PM, Eric Cooper wrote:
>> On Wed, Oct 27, 2010 at 10:26:06AM +0300, Darius Augulis wrote:
>>> Maybe it could be reason why I'm facing strange problem, when after
>>> relocating uboot with nand_spl no one command is not working.  I
>>> debugged that command table is empty.
>> Maybe this is the same problem I reported here (commands not found):
>> http://lists.denx.de/pipermail/u-boot/2010-October/080198.html
>>
> 
> looks similar, but not exactly the same. Mine output:
> 
> U-Boot 2010.09-00560-g5b4d583-dirty (Oct 27 2010 - 21:00:13) for MINI6410
> 
> U-Boot code: 57E00000 -> 57E2BDE4  BSS: -> 57E31680
> 
> CPU:     S3C6400 at 532MHz
>           Fclk = 532MHz, Hclk = 133MHz, Pclk = 66MHz (SYNC Mode)
> Board:   MINI6410
> monitor len: 00031680
> ramsize: 08000000
> TLB table at: 57ff0000
> Top of RAM usable for U-Boot at: 57ff0000
> Reserving 197k for U-Boot at: 57fbe000
> Reserving 1280k for malloc() at: 57e7e000
> Reserving 24 Bytes for Board Info at: 57e7dfe8
> Reserving 92 Bytes for Global Data at: 57e7df8c
> New Stack Pointer is: 57e7df88
> RAM Configuration:
> Bank #0: 50000000 128 MiB
> relocation Offset is: 001be000
> monitor flash len: 0002BDE4
> Now running in RAM - U-Boot at: 57fbe000
> NAND:  raise: Signal # 8 caught
> raise: Signal # 8 caught
> raise: Signal # 8 caught

This looks suspect to me. Seems to me some early init
(pin setup? clocks?) is not OK. If you have early inits,
you must do that now in board_early_init_f() (and you
have to define CONFIG_BOARD_EARLY_INIT_F to enable this
feature)

> 256 MiB
> Using default environment
> 
> Destroy Hash Table: 57e31568 table = (null)
> Create Hash Table: N=79
> INSERT: table 57e31568, filled 1/79 rv 57e7f42c ==> name="bootargs" 
> value="console=ttySAC,115200"
> INSERT: table 57e31568, filled 2/79 rv 57e7f348 ==> name="bootcmd" 
> value="nand read 0x50018000 0x60000 0x1c0000;bootm 0x50018000"
> INSERT: table 57e31568, filled 3/79 rv 57e7f438 ==> name="bootdelay" 
> value="3"
> INSERT: table 57e31568, filled 4/79 rv 57e7f378 ==> name="baudrate" 
> value="115200"
> INSERT: free(data = 57e7f2a0)
> INSERT: done
> In:    serial
> Out:   serial
> Err:   serial
> Net:   dm9000
> ### main_loop entered: bootdelay=3
> 
> ### main_loop: bootcmd="nand read 0x50018000 0x60000 0x1c0000;bootm 
> 0x50018000"
> Hit any key to stop autoboot:  0
> MINI6410 # help
> Unknown command 'help' - try 'help'
> MINI6410 #
> 
> I'm doing support for new board, so there could be some bugs in its 
> config. But I still thinking that clear_bss code is buggy, because uboot 
> reboots is DEBUG if defined and following simple patch isn't applied:

Maybe you look in the tx25 board port. This board boots also
with nand_spl (but it is arm926ejs based).

Note: CONFIG_SKIP_RELOCATE_UBOOT seems to get obsolete to me.

What worked for me on the tx25 board was, that I set
TEXT_BASE = relocation address, so I got relocation offset = 0
and code don;t gets copied twice, but this addr is not constant
(code size changes, maybe pram features ...) so I dropped this
approach for this board.

bye,
Heiko


More information about the U-Boot mailing list