Re: Exception after resume from suspend to ram



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
.



Relevant Pages

  • Re: stack and a heap
    ... >> They are both memory which is used to store objects. ... The stack is also used to ... > can end up on the heap as part of other objects. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: where? heap or stack?
    ... > Memory Area Characteristics and Object Lifetimes ... but free storage is always implemented on the program stack ... > Free Store The free store is one of the two dynamic memory ... Free storage is exactly what is meant by the free storage. ...
    (comp.lang.cpp)
  • Re: TomsFastMath speeds
    ... >> realize that it doesn't have enough registers and spill them all onto the ... >> stack.) ... The stack IS in memory. ... I don't have space to store all ...
    (sci.crypt)
  • Re: Huge arrays
    ... Yes - you store the array in a file. ... > in total more that 2GB in memory? ... and the stack). ...
    (borland.public.delphi.language.basm)
  • Re: Exchange 2003 Private Store Corruption
    ... Once you've pulled the faulty RAM, create the new mailbox store and move ... then you can start working on the problem mailboxes. ... have DIMM's installed in pairs in this server? ... Online Diagnostic Utility says "Correctable Memory Threshold Exceeded" ...
    (microsoft.public.exchange.admin)