[U-Boot-Users] Malloc Problems

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

Please fix your mailer setup, you're postring with an incorrect From: address:
repl: bad addresses: M.Awater marco.awater@acq.nl -- no at-sign after local-part (<)
[The ``M.Awater'' string must be quoted.]
In message loom.20060912T160047-53@post.gmane.org you wrote:
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_
Where can this be seen in your debug output?
table area). I'm assuming this can't possibly be correct, but am unable to locate the exact cause.
Memory problems in general?
CPU: MPC5200 v1.2 at 396 MHz Bus 132 MHz, IPB 66 MHz, PCI 33 MHz Board: Motorola MPC5200
Is this indeed a Motorola MPC5200 board???
I2C: 85 kHz, ready DRAM: 128 MB Top of RAM usable for U-Boot at: 08000000 Reserving 503k for U-Boot at: 07f82000
Why is your U-Boot image so big???
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 cannot see any errors in this output???
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?
What do you expect shall the relocation code do?
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.
When or where does the problem happen, and what is it exactly?
Best regards,
Wolfgang Denk

Hi,
Thanks for your response. I posted through the Gmane site before, I hope that the mailer setup problem is now fixed. The problem appears to have been caused by an incorrect global variable setup on my part. It was very hard to track down, but it appears to be fixed now.
Thanks again,
Marco
participants (3)
-
M. Awater
-
Marco Awater
-
Wolfgang Denk