2 ; This is the assembly code for transferring to control to OS S3 waking vector
5 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
7 ; This program and the accompanying materials
8 ; are licensed and made available under the terms and conditions of the BSD License
9 ; which accompanies this distribution. The full text of the license may be found at
10 ; http://opensource.org/licenses/bsd-license.php
12 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
18 global ASM_PFX(AsmFixAddress16)
19 global ASM_PFX(AsmJmpAddr32)
21 ;-----------------------------------------
24 ; IN UINT32 S3WakingVector,
25 ; IN UINT32 AcpiLowMemoryBase
27 ;-----------------------------------------
29 global ASM_PFX(AsmTransferControl)
30 ASM_PFX(AsmTransferControl):
31 ; S3WakingVector :DWORD
32 ; AcpiLowMemoryBase :DWORD
42 mov [@jmp_addr + 1], ebx
53 mov eax, cr0 ; Get control register 0
54 and eax, 0x0fffffffe ; Clear PE bit (bit #0)
55 mov cr0, eax ; Activate real mode
59 global ASM_PFX(AsmTransferControl32)
60 ASM_PFX(AsmTransferControl32):
61 jmp ASM_PFX(AsmTransferControl)
64 global ASM_PFX(AsmTransferControl16)
65 ASM_PFX(AsmTransferControl16):
66 ASM_PFX(AsmFixAddress16): DD 0
67 ASM_PFX(AsmJmpAddr32): DD 0