[U-Boot-Users] u-boot hangs on boot time

tony hangtoo at 163.com
Wed Jul 19 08:22:34 CEST 2006


Hi all,
    my u-boot-1.1.1 hangs while booting, as follow is the message got from the serial:
-----------------------------------------------------------------------------------
U-Boot code: 33F80000 -> 33FA19F8  BSS: -> 33FA5B8C
IRQ Stack: 33fc6b88
FIQ Stack: 33fc7b88
RAM Configuration:
Bank #0: 30000000 64 MB
Flash:  1 MB
NAND:64 MB
Video Format : PAL
In:    serial
Out:   serial
Err:   serial
------------------------------------------------
after some tests by tracing the sequences of the funtions, I found that the u-boot hangs while comming  to this funtion:
device_register (&dev),which is a subfuntion  of drv_system_init (); -------in u-boot-1.1.1/common/devices.c

and I look into device_register(&dev):
int device_register (device_t * dev)
{
 ListInsertItem (devlist, dev, LIST_END);
 return 0;
}
as follow are two invoid funtions copy from the devices.c.
int ListInsertItem (list_t list, void *ptrToItem, int itemPosition)
{
 return ListInsertItems (list, ptrToItem, itemPosition, 1);
}
int ListInsertItems (list_t list, void *ptrToItems, int firstItemPosition,
       int numItemsToInsert)
{
 int numItems = (*list)->numItems;

 if (firstItemPosition == numItems + 1)
  firstItemPosition = LIST_END;
 else if (firstItemPosition > numItems)
  return 0;

 if ((*list)->numItems >= (*list)->listSize) {
  if (!ExpandListSpace (list, -numItemsToInsert))
   return 0;
 }

 if (firstItemPosition == LIST_START) {
  if (numItems == 0) {
   /* special case for empty list */
   firstItemPosition = LIST_END;
  } else {
   firstItemPosition = 1;
  }
 }

 if (firstItemPosition == LIST_END) { /* add at the end of the list */
  if (ptrToItems)
   memcpy (ITEMPTR (list, numItems), ptrToItems,
     (*list)->itemSize * numItemsToInsert);
  else
   memset (ITEMPTR (list, numItems), 0,
     (*list)->itemSize * numItemsToInsert);

  (*list)->numItems += numItemsToInsert;
 } else {     /* move part of list up to make room for new item */
  memmove (ITEMPTR (list, firstItemPosition - 1 + numItemsToInsert),
    ITEMPTR (list, firstItemPosition - 1),
    (numItems + 1 - firstItemPosition) * (*list)->itemSize);

  if (ptrToItems)
   memmove (ITEMPTR (list, firstItemPosition - 1), ptrToItems,
      (*list)->itemSize * numItemsToInsert);
  else
   memset (ITEMPTR (list, firstItemPosition - 1), 0,
     (*list)->itemSize * numItemsToInsert);

  (*list)->numItems += numItemsToInsert;
 }
 return 1;
}

I am so dizzy about what's going on there. the u-boot has been using for months....so I don't think it's the problem of the u-boot.maybe it's about the problem of the hardware, to cause the u-boot hangs???

any help is appreciated.thank you.

tony. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20060719/4b89b8f1/attachment.htm 


More information about the U-Boot mailing list