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

Scott Wood scottwood at freescale.com
Fri Nov 12 18:19:09 CET 2010


On Fri, 12 Nov 2010 20:45:18 +0800
terry <gliumailenator at gmail.com> wrote:

> Dear Scott,
> 	I have disassemble the nand_base.o file,because i know the problem
> happened here.

Why not disassemble the whole u-boot?

Then you'll get malloc as well, and the addresses will be closer to
what shows up in the dump.

> Do you think it's useful for your analysis?

Can you disassemble malloc?  That's where it actually crashed.

> 00001a4c <nand_scan_tail>:
>  1749     1a4c:   e92d4070    push    {r4, r5, r6, lr}
>  1750     1a50:   e590509c    ldr r5, [r0, #156]
>  1751     1a54:   e595304c    ldr r3, [r5, #76]
>  1752     1a58:   e3130701    tst r3, #262144 ; 0x40000
>  1753     1a5c:   e1a06000    mov r6, r0
>  1754     1a60:   1a000002    bne 1a70 <nand_scan_tail+0x24>
>  1755     1a64:   e59f04ec    ldr r0, [pc, #1260] ; 1f58 <nand_scan_tail
> +0x50c>
>  1756     1a68:   ebfffffe    bl  0 <malloc>

What's the value at PC+1260?

> by the way,I cann't find the prototype of malloc in the whole project,it
> seems that it is encapsulated in some libs.

It's in common/malloc.c.  There's weird preprocessor renaming going on,
so it's called mALLOc in that file, but it shows up as malloc in the
binary.

-Scott



More information about the U-Boot mailing list