[U-Boot] malloc issue while migrating from 2010.03 to 2011.06 U-boot

Vinay Hegde vimch at yahoo.com
Wed Nov 2 09:33:08 CET 2011


Hi All,

I am trying to port one existing platform (which uses 2010.03 U-Boot) to 2011.06 U-Boot. I have an issue while env_relocate. The malloc fails in himport_r function. I tried multiple things and quite not sure whats going on. From the boot log (till env_relocate) things seem to be fine. I have also tried changing the CONFIG_SYS_MALLOC_LEN to (1024 * 1024), that did not make any difference to the issue. Here is the log:

>>>>
U-Boot 2011.06 (Nov 02 2011 - 13:42:27)

CPU:   8548, Version: 2.1, (0x80310021)
Core:  E500, Version: 2.2, (0x80210022)
Clock Configuration:
       CPU0:1500 MHz,
       CCB:500  MHz,
       DDR:250  MHz (500 MT/s data rate), LBC:31.250 MHz
L1:    D-cache 32 kB enabled
       I-cache 32 kB enabled
Board: E45-40F 10.12
I2C:   ready
DRAM:  Initializing Configuring DDR for 500 MT/s data rate
DDR: 1 GiB
Top of RAM usable for U-Boot at: 40000000
Reserving 584k for U-Boot at: 3ff60000
Reserving 1032k for malloc() at: 3fe5e000
Reserving 80 Bytes for Board Info at: 3fe5dfb0
Reserving 124 Bytes for Global Data at: 3fe5df34
Stack Pointer at: 3fe5df18
New Stack Pointer is: 3fe5df18
Now running in RAM - U-Boot at: 3ff60000
Flash: 8 MiB
L2:    512 KB enabled
himport_r: can't malloc 8188 bytes
ERROR: Cannot import environment: errno = 12

at env_common.c:238/env_import()
*** Warning - import failed, using default environment

himport_r: can't malloc 223 bytes
ERROR: Environment import failed: errno = 12

at env_common.c:196/set_default_env()

Bad trap at PC: 3ff62584, SR: 21200, vector=d00        -----> this trap is when trying to access bd->bi_enetaddr. If malloc is fixes, i guess this will go away
NIP: 3FF62584 XER: 00000000 LR: 3FF62534 REGS: 3fe5dda0 TRAP: 0d00 DAR: 5686C777
MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: DEADBEEF 3FE5DE90 00000200 00000007 FFFC13D7 3FE5DED0 00010BB0 00000000
GPR08: FFFC5FA0 DEADBEEF 8AA7FA50 E8AA7FA5 00000000 9CF3AEF1 EB4F9BBD 3FFE0000
GPR16: FBFEBFBF B6AF6EF6 5D76FA3D 67FF26BF 00000000 00000000 00000000 FFFC13D0
GPR24: 3FE5DED0 3FE60000 09FCC0B6 09FCC0B6 3FE5DFD8 3FE5DF34 00010BB0 77D90888
Call backtrace:
3FF84C5C 3FF7EF28 3FF6A560 3FF68F6C 3FF616A0
Exception in kernel pc 3ff62584 signal 0
<<<<

It seems DRAM is initialized properly as I dont see any randomness and all the relocate addresses are fine. All TLBs and LAW mappings are fine.
It seems few others also hit this issue, but I dont know how it was resolved. Can someone give pointers?

Thanks
Vinay


More information about the U-Boot mailing list