[U-Boot] A bl command question about smdk2410 in u-boot-2010.06
Paul Hsu
pochun.hsu at gmail.com
Wed Aug 11 04:18:20 CEST 2010
Hi Jianchun,
The result of objdump is based on the ELF format.
It knows that the piece of code should be put to address 0x33f80000 to run,
although the code is running at address 0x0 after power-on.
And bl instruction is a jump instruction according to an offset of PC.
That't why you see the following code
33f80060: eb0000e6 bl 33f80400 <__coloured_LED_init>
When boot-up , this instruction is executing in NOR flash.
After sdram initialization, and code re-location, sdram contains the real code.
BR,
Paul
..........
33f80050 <start_code>:
33f80050: e10f0000 mrs r0, CPSR
33f80054: e3c0001f bic r0, r0, #31 ; 0x1f
33f80058: e38000d3 orr r0, r0, #211 ; 0xd3
33f8005c: e129f000 msr CPSR_fc, r0
33f80060: eb0000e6 bl 33f80400 <__coloured_LED_init>
33f80064: eb0000e6 bl 33f80404 <__red_LED_on>
33f80068: e3a00453 mov r0, #1392508928 ; 0x53000000
33f8006c: e3a01000 mov r1, #0 ; 0x0
33f80070: e5801000 str r1, [r0]
33f80074: e3e01000 mvn r1, #0 ; 0x0
33f80078: e59f0360 ldr r0, [pc, #864] ; 33f803e0 <fiq+0x60>
33f8007c: e5801000 str r1, [r0]
33f80080: e59f135c ldr r1, [pc, #860] ; 33f803e4 <fiq+0x64>
33f80084: e59f035c ldr r0, [pc, #860] ; 33f803e8 <fiq+0x68>
33f80088: e5801000 str r1, [r0]
33f8008c: e59f0358 ldr r0, [pc, #856] ; 33f803ec <fiq+0x6c>
33f80090: e3a01003 mov r1, #3 ; 0x3
33f80094: e5801000 str r1, [r0]
33f80098: eb000019 bl 33f80104 <cpu_init_crit>
33f8009c <relocate>:
33f8009c: e24f00a4 sub r0, pc, #164 ; 0xa4
33f800a0: e51f1068 ldr r1, [pc, #-104] ; 33f80040 <_TEXT_BASE>
.............
33f80400 <__coloured_LED_init>:
33f80400: e1a0f00e mov pc, lr
33f80404 <__red_LED_on>:
33f80404: e1a0f00e mov pc, lr
33f80408 <__red_LED_off>:
33f80408: e1a0f00e mov pc, lr
33f8040c <__green_LED_on>:
33f8040c: e1a0f00e mov pc, lr
33f80410 <__green_LED_off>:
33f80410: e1a0f00e mov pc, lr
33f80414 <__yellow_LED_on>:
33f80414: e1a0f00e mov pc, lr
33f80418 <__yellow_LED_off>:
33f80418: e1a0f00e mov pc, lr
33f8041c <__blue_LED_on>:
33f8041c: e1a0f00e mov pc, lr
33f80420 <__blue_LED_off>:
33f80420: e1a0f00e mov pc, lr
--
Paul Hsu
pochun.hsu at gmail.com
More information about the U-Boot
mailing list