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

Holger Schurig h.schurig at mn-logistik.de
Fri Aug 15 18:38:42 CEST 2003


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





More information about the U-Boot mailing list