当前位置: 技术问答>linux和unix
boot loader 的一段代码,如下 jump to ram 是怎么保证的呢?
来源: 互联网 发布时间:2016-05-17
本文导语: ARM boot loader 的一段代码,如下 jump to ram 是怎么保证的呢? =on_the_ram 是开始的那个‘steppingstone’缓存区 还是 SDRAM 的地址? 请教大家,谢谢 bl copy_myself @ jump to ram //here******************** ...
ARM boot loader 的一段代码,如下 jump to ram 是怎么保证的呢?
=on_the_ram 是开始的那个‘steppingstone’缓存区 还是 SDRAM 的地址? 请教大家,谢谢
bl copy_myself
@ jump to ram //here********************
ldr r1, =on_the_ram
add pc, r1, #0
nop
nop
1: b 1b @ infinite loop
on_the_ram:
@ get read to call C functions
ldr sp, DW_STACK_START @ setup stack pointer
mov fp, #0 @ no previous frame, so fp=0
mov a2, #0 @ set argv to NULL
bl main @ call main
=on_the_ram 是开始的那个‘steppingstone’缓存区 还是 SDRAM 的地址? 请教大家,谢谢
bl copy_myself
@ jump to ram //here********************
ldr r1, =on_the_ram
add pc, r1, #0
nop
nop
1: b 1b @ infinite loop
on_the_ram:
@ get read to call C functions
ldr sp, DW_STACK_START @ setup stack pointer
mov fp, #0 @ no previous frame, so fp=0
mov a2, #0 @ set argv to NULL
bl main @ call main
|
on_the_ram:
@ get read to call C functions
ldr sp, DW_STACK_START @ setup stack pointer
mov fp, #0 @ no previous frame, so fp=0
mov a2, #0 @ set argv to NULL
bl main @ call main
这块代码在跳转之前已经被前面的代码复制到RAM中了
ldr r1, =on_the_ram 取on_the_ram标号的地址
add pc, r1, #0 赋给PC
@ get read to call C functions
ldr sp, DW_STACK_START @ setup stack pointer
mov fp, #0 @ no previous frame, so fp=0
mov a2, #0 @ set argv to NULL
bl main @ call main
这块代码在跳转之前已经被前面的代码复制到RAM中了
ldr r1, =on_the_ram 取on_the_ram标号的地址
add pc, r1, #0 赋给PC