Re: Exception after resume from suspend to ram
- From: Jiun <jiunning@xxxxxxxxx>
- Date: Mon, 10 Dec 2007 18:10:45 -0800 (PST)
Dear Geoff,
- I have done checksum that memory is same.
- I am sure that bootload does not use memory during wakeup.
- Other... I put my detail step at below (refer from CE6):
suspend FUNCTION
stmdb sp!, {r0-r12, lr}
; Store CPSR, sp and (if not SYS mode) SPSR in memory
; Enter SYS mode and save r8-r12 + lr (r14) onto stack, Store sp
(no SPSR)
; FIQ (r8-r12, r14, SPSR on stack; store SP)
; IRQ (r14, SPSR on stack; store SP)
; ABT (r14, SPSR on stack; store SP)
; UND (r14, SPSR on stack; store SP)
; SVC (r14, SPSR on stack; store SP)
; store wakeup function in scratch register;
; store p15, c1, c0, 0
; store p15, c2, c0, 0
; store p15, c3, c0, 0
; store p15, c13, c0, 0
; Do memory checksum
;==============================================
; clean data cache and invalidate WB
88
mrc p15, 0, r15, c7, c14, 3 ; test,clean,invalidate
bne %B88
mov r3, #0
mcr p15, 0, r3, c7, c10, 4 ; drain the write buffer
mcr p15, 0, r3, c7, c5, 0 ; invalidate I cach
mcr p15, 0, r3, c8, c5, 0 ; flush instruction TLB
;
;==============================================
; Do memory suspend
; Force ARM to idle mode
mov r3, #0
b EnterSuspend
ALIGN 32
EnterSuspend
mcr p15, 0, r3, c7, c0, 4 ; Force ARM to idle mode
nop
nop
nop
nop
ENDFUNC
;**************************************************
wakeup FUNCTION
mov r3, #(F_BIT :OR: I_BIT :OR: MODE_SVC)
msr cpsr_c, r3
; Do memory checksum
;restore p15, c3, c0, 0
;restore p15, c2, c0, 0
;flush I+D TLB by p15, c8, c7, 0
;restore p15, c1, c0, 0
;restore p15, c13, c0, 0
; Enter SYS mode and restore r8-r12 + lr (r14) from stack
; FIQ (r8-r12, r14, SPSR on stack; store SP)
; IRQ (r14, SPSR on stack; stored SP)
; ABT (r14, SPSR on stack; stored SP)
; UND (r14, SPSR on stack; stored SP)
; Enter SVC mode and restore only its saved sp.
; Load CPSR, sp and (if not SYS mode) SPSR
ldmia sp!, {r0-r12,lr}
mov pc, lr
ENDFUNC
.
- References:
- Exception after resume from suspend to ram
- From: Jiun
- Re: Exception after resume from suspend to ram
- From: Silver
- Exception after resume from suspend to ram
- Prev by Date: Re: Video over IP calling
- Next by Date: Re: About WinCE startup question
- Previous by thread: Re: Exception after resume from suspend to ram
- Next by thread: Both PlatformBuilder 4.2.net and 5.0 can install in XP(SP2) together ?
- Index(es):
Relevant Pages
|