📄 xllp_pm_sleepcontexta.s
字号:
;
; Copyright (c) Microsoft Corporation. All rights reserved.
;
;
; Use of this sample source code is subject to the terms of the Microsoft
; license agreement under which you licensed this sample source code. If
; you did not accept the terms of the license agreement, you are not
; authorized to use this sample source code. For the terms of the license,
; please see the license agreement between you and Microsoft or, if applicable,
; see the LICENSE.RTF on your install media or the root of your tools installation.
; THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
;
;TEST_STUB_PWR_OFF EQU 1
;******************************************************************************
;
; COPYRIGHT (C) 2002 Intel Corporation.
;
; This software as well as the software described in it is furnished under
; license and may only be used or copied in accordance with the terms of the
; license. The information in this file is furnished for informational use
; only, is subject to change without notice, and should not be construed as
; a commitment by Intel Corporation. Intel Corporation assumes no
; responsibility or liability for any errors or inaccuracies that may appear
; in this document or any software that may be provided in association with
; this document.
;
; Except as permitted by such license, no part of this document may be
; reproduced, stored in a retrieval system, or transmitted in any form or by
; any means without the express written consent of Intel Corporation.
;
; FILENAME: xllp_Pm_SleepContextA.s
;
; PURPOSE: Provides assembly level code to support context saving,
; processor sleep and context restoration after sleep
; for the Bulverde/Mainstone processor/platform.
;
;
; LAST MODIFIED: 8/27/02
;******************************************************************************
;
; The functions in this source code are called via a branch with link instruction.
;
; NOTES:
;
; These functions assume that the MMU is enabled, except for any which receive all addresses
; as parameters.
;
INCLUDE xlli_Bulverde_defs.inc ; Bulverde specific include file
INCLUDE xllp_Pm_SleepContext.inc ; Definitions for this file
;
AREA |.text|, CODE, READONLY, ALIGN=5 ; Align =5 required for "ALIGN 32" to work
;
; Functions made public by this file:
;
EXPORT XllpPmEnterSleep
EXPORT XllpPmChecksumSleepDataVi
EXPORT XllpPmRestoreAfterSleep ; Not called by name elsewhere.
;
; External functions required for this file:
;
IMPORT XllpPmSleepCLevelProcessing
IMPORT XllpPmWakeCLevelProcessing
;**************************************************************************************************
;
; XllpPmChecksumSleepDataVi
;
; Does not assume a stack or MMU enable/disable state.
;
; Inputs:
; R0: Base address of area to checksum
; R1: Number of 4-byte words in area
; Assumes return address in link register
;
; Returns:
; R0: Checksum
;
; Uses: R0, R1, R2, R3
;
XllpPmChecksumSleepDataVi FUNCTION
; do Checksum on the buffer
ldr r2, =(0x5A72) ; Pick a non-zero seed.
XllpPmCheckSumSleepDataVi_Lab1
ldr r3, [r0], #4 ; get value and increment pointer
add r2, r2, r3
mov r2, r2, ROR #31 ; Rotate left by one bit position
subs r1, r1, #1 ; Count down for entire buffer size
bne XllpPmCheckSumSleepDataVi_Lab1
mov r0, r2
IF :DEF: Interworking
IF Interworking :LOR: Thumbing
bx lr
ELSE
mov pc, lr ; return
ENDIF ; ELSE of IF Interworking :LOR: Thumbing
ELSE ; IF :DEF: Interworking
mov pc, lr ; return
ENDIF ; ELSE of IF :DEF: Interworking
ENDFUNC
;; End of XllpPmChecksumSleepDataVi()
;**************************************************************************************************
;******************************************************************************
;
;
; ********************
; * *
; * XllpPmEnterSleep *
; * *
; ********************
;
;
; NOTES: Written for the Bulverde Processor on the Mainstone Development Platform.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; XllpPmEnterSleep() is an assembly-coded function that:
;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -