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
45 DB 0xb8, 0x30, 0 ; mov ax, 30h as selector
51 mov eax, cr0 ; Get control register 0
53 DB 0x83, 0xe0, 0xfe ; and eax, 0fffffffeh ; Clear PE bit (bit #0)
54 DB 0xf, 0x22, 0xc0 ; mov cr0, eax ; Activate real mode
55 DB 0xea ; jmp far @jmp_addr
58 global ASM_PFX(AsmTransferControl32)
59 ASM_PFX(AsmTransferControl32):
60 jmp ASM_PFX(AsmTransferControl)
63 global ASM_PFX(AsmTransferControl16)
64 ASM_PFX(AsmTransferControl16):
65 ASM_PFX(AsmFixAddress16): DD 0
66 ASM_PFX(AsmJmpAddr32): DD 0