[U-Boot] Please help debugging continuous loop
Rogan Dawes
rogan at dawes.za.net
Thu May 5 21:58:34 CEST 2011
Hi folks,
I was fortunate enough to resuscitate my DNS323 (Feroceon board) after
flashing a dodgy image to it.
Now I am trying to get it working in RAM first, before writing it to flash.
I have configured CONFIG_SYS_TEXT_BASE to be 0x3000000, I then use
OpenOCD to load the u-boot.bin file to that location, and start it using
"resume 0x3000000".
Unfortunately, it seems to get into an endless loop:
> halt
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x030123a4
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> arm disassemble 0x030123a4
0x030123a4 0xe3130020 TST r3, #0x20
> step
target state: halted
target halted in ARM state due to single-step, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x030123a8
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> arm disassemble 0x030123a8
0x030123a8 0x0afffffc BEQ 0x030123a0
> step
target state: halted
target halted in ARM state due to single-step, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x030123a0
MMU: disabled, D-Cache: disabled, I-Cache: disabled
> arm disassemble 0x030123a0
0x030123a0 0xe5d03014 LDRB r3, [r0, #0x14]
> resume
> halt
target state: halted
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x600000d3 pc: 0x030123a4
MMU: disabled, D-Cache: disabled, I-Cache: disabled
>
It is apparently waiting for something to be equal to 0x20 before
continuing.
How can I determine which u-boot code this is, and what it is waiting for?
I have tried connecting with gdb, but I can only step for a short
distance before it gives problems setting the breakpoint:
0x03000000 in ?? ()
(arm-gdb)stepi
Program received signal SIGINT, Interrupt.
0x03000054 in ?? ()
(arm-gdb)stepi
Program received signal SIGINT, Interrupt.
0x03000058 in ?? ()
(arm-gdb)symbol-file u-boot-standalone-0x3000000
Reading symbols from
/home/rogan/openocd/u-boot-standalone-0x3000000...BFD:
/home/rogan/openocd/u-boot-standalone-0x3000000: invalid string offset
37 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 1 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 94 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 20 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 82 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 67 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 32 >= 0 for section `'
BFD: /home/rogan/openocd/u-boot-standalone-0x3000000: invalid string
offset 53 >= 0 for section `'
done.
(arm-gdb)stepi
Program received signal SIGINT, Interrupt.
reset () at start.S:167
167 orr r0,r0,#0xd3
Current language: auto; currently asm
(arm-gdb)stepi
Program received signal SIGINT, Interrupt.
reset () at start.S:168
168 msr cpsr,r0
(arm-gdb)
Program received signal SIGINT, Interrupt.
reset () at start.S:175
175 bl cpu_init_crit
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:323
323 mov r0, #0
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:324
324 mcr p15, 0, r0, c7, c7, 0 /* flush v3/v4 cache */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:325
325 mcr p15, 0, r0, c8, c7, 0 /* flush v4 TLB */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:330
330 mrc p15, 0, r0, c1, c0, 0
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:331
331 bic r0, r0, #0x00002300 /* clear bits 13, 9:8 (--V- --RS) */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:332
332 bic r0, r0, #0x00000087 /* clear bits 7, 2:0 (B--- -CAM) */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:333
333 orr r0, r0, #0x00000002 /* set bit 2 (A) Align */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:334
334 orr r0, r0, #0x00001000 /* set bit 12 (I) I-Cache */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:335
335 mcr p15, 0, r0, c1, c0, 0
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:340
340 mov ip, lr /* perserve link reg across call */
(arm-gdb)
Program received signal SIGINT, Interrupt.
cpu_init_crit () at start.S:341
341 bl lowlevel_init /* go setup pll,mux,memory */
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:90
90 ldr r4, =ORION5X_REGS_PHY_BASE
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:94
94 ldr r3, =0xD0000000
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:95
95 add r3, r3, #0x20000
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:96
96 str r4, [r3, #0x80]
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:99
99 add r3, r4, #0x01000
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:102
102 ldr r6, =0x00000001
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:103
103 str r6, [r3, #0x480]
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:106
106 add r3, r4, #0x31000
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:109
109 ldr r6, =0x00000030
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:110
110 str r6, [r3, #0xd00]
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:113
113 add r3, r4, #0x01000
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:116
116 mov r6, #0
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:117
117 str r6, [r3, #0x504]
(arm-gdb)
Program received signal SIGINT, Interrupt.
lowlevel_init () at lowlevel_init.S:118
118 str r6, [r3, #0x50C]
(arm-gdb)
lowlevel_init () at lowlevel_init.S:118
118 str r6, [r3, #0x50C]
Could not insert single-step breakpoint at 0x30004c0
(arm-gdb)
And it will not get past line 118, unfortunately.
Does anyone have a suggestion for what else I can try?
Thanks!
Rogan
More information about the U-Boot
mailing list