dwPhysLaunchAddr = (DWORD)OALVAtoP((void*dwImageStart/*dwLaunchAddr*/);
Launch(dwPhysLaunchAddr);
SpinForever();
LEAF_ENTRY Launch
ldr r2, = PhysicalStart
ldr r3, = (VIR_RAM_START - PHY_RAM_START)
sub r2, r2, r3
mrc p15, 0, r1, c1, c0, 0
bic r1, r1, #0x0001 ; Disable MMU
mcr p15, 0, r1, c1, c0, 0
mov pc, r2 ; Jump to PStart
nop
nop
; MMU & caches now disabled.
PhysicalStart
mov r2, #0
mcr p15, 0, r2, c8, c7, 0 ; Flush the TLB
; Display 0x06 on LED
ldr r2, =LED_ADDRESS
mov r1, #0x06
str r1, [r2]
mov pc, r0 ; Jump to program we are launching.
|