;------------------------------------------------------------------------------
;
; Function: void Launch (UINT32 *LaunchAddress)
;
; This function is called by OEMLaunch and disables MMU, invalidates I, D
; cache and TLB. Used only in bootloader.
;
; Parameters:
; LaunchAddress
; [in] Function pointer to transfer execution.
;
; Returns:
; None.
;
;------------------------------------------------------------------------------
LEAF_ENTRY Launch
adr r2, PhysicalStart ; This is virtual address
ldr r3, =(RamVABase)
sub r2, r2, r3 ; Get the offset from eboot ram image
ldr r3, =(RamPABase)
add r2, r2, r3 ; Get PA of PhysicalStart
mov r1, #0
mcr p15, 0, r1, c7, c7, 0 ; Invalidate the I, D cache
mcr p15, 0, r1, c7, c10, 4 ; Drain write buffer
mcr p15, 0, r1, c8, c7, 0 ; Invalidate TLB
mov r1, #0x0078
mcr p15, 0, r1, c1, c0, 0 ; Disable MMU, caches and write buffer
mov pc, r2 ; Jump to PhysicalStart
nop ; These NOPs are used to flush the Pipeline
nop
nop
nop
PhysicalStart
mov r1, #0
mcr p15, 0, r1, c7, c7, 0 ; Invalidate the I, D cache
mcr p15, 0, r1, c7, c10, 4 ; Drain write buffer
mcr p15, 0, r1, c8, c7, 0 ; Invalidate TLB
mov pc, r0 ; Jump to launch address!
程序中,最后跳转到哪里了?
mov pc, r0 ; Jump to launch address!
跳向r0寄存器里的地址了啊