[U-Boot-Users] Malloc Problems

M. Awater marco.awater at acq.nl
Tue Sep 12 16:20:21 CEST 2006


Hi,

I'm porting u-boot to an board quite similar to the lite5200 (the " IceCube",
which I used as a basis for my board). I am, however, running into some problems
with the malloc call. It returns an address which is inside the memory area
which contains the relocated code (to be more accurate, it is inside the av_
table area). I'm assuming this can't possibly be correct, but am unable to
locate the exact cause.
Below is u-boot's debug output:
*****
U-Boot 1.1.4 (Sep 12 2006 - 15:48:46)                 
                                                      
CPU:   MPC5200 v1.2 at 396 MHz                        
       Bus 132 MHz, IPB 66 MHz, PCI 33 MHz            
Board: Motorola MPC5200                       
I2C:   85 kHz, ready                                  
DRAM:  128 MB                                         
Top of RAM usable for U-Boot at: 08000000             
Reserving 503k for U-Boot at: 07f82000                
Reserving 192k for malloc() at: 07f52000              
Reserving 68 Bytes for Board Info at: 07f51fbc        
Reserving 56 Bytes for Global Data at: 07f51f84       
Stack Pointer at: 07f51f68                            
New Stack Pointer is: 07f51f68                        
Now running in RAM - U-Boot at: 07f82000              
****

I'm also a bit in the dark as to the malloc_bin_reloc() call. It makes the
pointers in the original av_ table point to the same table entries, in the
relocated code's av_ table. Is this the correct behavior?

I'd be grateful if you could point me in the right direction on this one. if
there are any questions or missing information, please ask away.

Marco Awater





More information about the U-Boot mailing list