[U-Boot] Hanging in kmalloc of nand_scan_tail() function

J.Hwan.Kim frog1120 at gmail.com
Fri Sep 18 06:17:48 CEST 2009


Hi, everyone

I'm using U-boot 2009-03.
U-boot hangs in nand_init() function.
I found the routine kmalloc in nand_scan_tail() cause U-boot reset.


int nand_scan_tail(struct mtd_info *mtd)
{
    int i;
    struct nand_chip *chip = mtd->priv;

    if (!(chip->options & NAND_OWN_BUFFERS)) {
        chip->buffers = kmalloc(sizeof(*chip->buffers), GFP_KERNEL);   
    }

    if (!chip->buffers)
        return -ENOMEM;
              ........


U-boot displays message as follows :

NAND:  data abort
pc : [<31f902b4>]\0x09   lr : [<31fa084c>]
sp : 31f5bee0  ip : 00000076\0x09 fp : 00000000
r10: 00001188  r9 : 00020000\0x09 r8 : 31f5bfdc
r7 : 00000001  r6 : 00000000\0x09 r5 : 31fa42b8  r4 : 31fa4364
r3 : 31fa052c  r2 : 00000064\0x09 r1 : 00000063  r0 : ffffffff
Flags: NzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...


Where the malloc function is defined?
Why the kmalloc() hangs the u-boot?
Is there any configuation definition needed?

Thanks in advance.

Regards,
J.Hwan Kim




More information about the U-Boot mailing list