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

2011-11-02 Thread Vinay Hegde


> Let me try with 2011.09. However, to understand this malloc issue
> further, do you have any comments on what could be wrong and any tests
> for me to try out to debug further?

|It's an out of tree port, isn't it?  So how could I comment on it?
|I don't know what you did...

Yes, its a custom port. However, the common code is same. Only board specific 
directories and config files are different. Anyway, it seems that I am on my 
own. Let me try using 2011.09 U-Boot and in parallel debug this issue on 
2011.06 ;-(

Thanks,
Vinay___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-02 Thread Wolfgang Denk
Dear Vinay Hegde,

In message <1320295503.7620.yahoomail...@web137915.mail.in.yahoo.com> you wrote:
> Let me try with 2011.09. However, to understand this malloc issue
> further, do you have any comments on what could be wrong and any tests
> for me to try out to debug further?

It's an out of tree port, isn't it?  So how could I comment on it?
I don't know what you did...

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: w...@denx.de
"He was so narrow minded he could see through  a  keyhole  with  both
eyes ..."
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-02 Thread Vinay Hegde



> 
> 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

|v2011.06 is old.  Please use recent code; recommended top of tree from
|git.

Hi Wolfgang,
Let me try with 2011.09. However, to understand this malloc issue further, do 
you have any comments on what could be wrong and any tests for me to try out to 
debug further?

Thanks,
Vinay___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-02 Thread Wolfgang Denk
Dear Vinay Hegde,

In message <1320222788.66688.yahoomail...@web137907.mail.in.yahoo.com> you 
wrote:
> 
> 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

v2011.06 is old.  Please use recent code; recommended top of tree from
git.

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: w...@denx.de
"I say we take off; nuke the site from orbit. It's the only way to be
sure."  - Corporal Hicks, in "Aliens"
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2011-11-02 Thread Vinay Hegde
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: 4000
Reserving 584k for U-Boot at: 3ff6
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: 3ff6
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:  LR: 3FF62534 REGS: 3fe5dda0 TRAP: 0d00 DAR: 5686C777
MSR: 00021200 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00

GPR00: DEADBEEF 3FE5DE90 0200 0007 FFFC13D7 3FE5DED0 00010BB0 
GPR08: FFFC5FA0 DEADBEEF 8AA7FA50 E8AA7FA5  9CF3AEF1 EB4F9BBD 3FFE
GPR16: FBFEBFBF B6AF6EF6 5D76FA3D 67FF26BF    FFFC13D0
GPR24: 3FE5DED0 3FE6 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
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot