RE: [U-Boot-Users] what is wrong when calloc return bogus?

The heap area is not being setup properly. It appears that all of the ARM boards cpu.c and start.S were from the same root. In cpu.c _armboot_real_end is set up such that the malloc init in lib_arm/board.c's should work... It appears that the pxa's start.S diverged from the way the other ARMs did the relocation and ended up breaking this aspect of the init.
So, the PXA and could change to be like the other ARM boards or ... I recall that part of a patch to board.c someone posted should result in this working for PXA. Having malloc work is important beyond getting the device_init structure up and running. Either should fairly straight forward to do.
Regards,
Richard W.
-----Original Message----- From: Holger Schurig [mailto:h.schurig@mn-logistik.de] Sent: Friday, August 15, 2003 11:39 AM To: u-boot-users@lists.sourceforge.net Subject: [U-Boot-Users] what is wrong when calloc return bogus?
I recently updated from u-boot 0.3.2 to CVS (0.4.5). Now blob stopped working. I tracked this down from device_init() to ListCreate() or NewHandle().
My debug output is:
U-Boot 0.4.5 (Aug 15 2003 - 18:26:38)
U-Boot code: A3000000 -> A300D4E0 BSS: -> A3024000 DRAM Configuration: Bank #0: a0000000 128 MB Flash: 32 MB 1 2 4 6 7 9 10 d1 d3 l1 n1 n2 memPtr=0badc0e8 n3 hanPtr=0badc108 n4 l2 l3 0badc108
list_t ListCreate (int elementSize) { list_t list; printf("l1\n"); list = (list_t) (NewHandle (sizeof (ListStruct))); /* create empty list */ printf("l2\n"); if (list) { printf("l3 %08x\n", list); (*list)->signature = LIST_SIGNATURE; (*list)->numItems = 0; (*list)->listSize = 0; (*list)->itemSize = elementSize; (*list)->percentIncrease = kDefaultAllocationPercentIncrease; (*list)->minNumItemsIncrease = kDefaultAllocationminNumItemsIncrease; } printf("l4\n");
return list;
}
Target is an Intel PXA255
This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet
_072303_01/01 _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

In message FD2AC9A020DDD51194710008C7089B200BEE22B6@dlee17.itg.ti.com you wrote:
The heap area is not being setup properly. It appears that all of the ARM boards cpu.c and start.S were from the same root. In cpu.c _armboot_real_end is set up such that the malloc init in lib_arm/board.c's should work... It appears that the pxa's start.S diverged from the way the other ARMs did the relocation and ended up breaking this aspect of the init.
So, the PXA and could change to be like the other ARM boards or ... I recall that part of a patch to board.c someone posted should result in this working
If the PXA is broken, then it should be fixed, but NOT by making it like the other ARM boards which are (IMHO) broken by design. [It's just that we didn't have enough free resources (or volunteers???) to fix the ARM memory layout.]
ARM still suffers from the many things ARMBoot did differently.
Best regards,
Wolfgang Denk

On Fri, Aug 15, 2003 at 09:50:56PM +0200, Wolfgang Denk wrote:
If the PXA is broken, then it should be fixed, but NOT by making it like the other ARM boards which are (IMHO) broken by design. [It's just that we didn't have enough free resources (or volunteers???) to fix the ARM memory layout.]
Same problem here - this is on my schedule for quite some time, especially as my PXA implementations already follow the README design (which requires the -ptx patches to make them work, which is bad), but there's absolutely no time for non-payed work at the moment... :-(
Robert

If the PXA is broken, then it should be fixed, but NOT by making it like the other ARM boards which are (IMHO) broken by design.
The PXA is broken, AFAIK. mem_malloc_init() get's called with 0x0badc0de.
And at least one board (wepep250) contains a workaround in board_init():
----------------------------------- /* * Following code is just bug workaround, remove it if not neccessary */
/* cpu/xscale/cpu.c do not set armboot_real_end that is used for malloc pool.*/ if( _armboot_real_end == 0xbadc0de ){ _armboot_real_end = _armboot_end; } -----------------------------------
participants (4)
-
Holger Schurig
-
Robert Schwebel
-
Wolfgang Denk
-
Woodruff, Richard