eboot launch函数的一个疑问

tianjixian   2008-10-7 10:22 楼主
;------------------------------------------------------------------------------
;
; 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!



程序中,最后跳转到哪里了?

回复评论 (3)

mov    pc, r0                  ; Jump to launch address!
跳向r0寄存器里的地址了啊
点赞  2008-10-7 11:17
怎么看不到回复?
点赞  2008-10-7 13:16
明白了
点赞  2008-10-7 13:22
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复