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.
19 EXTERNDEF AsmFixAddress16:DWORD
20 EXTERNDEF AsmJmpAddr32:DWORD
22 AsmTransferControl PROC
23 ; rcx S3WakingVector :DWORD
24 ; rdx AcpiLowMemoryBase :DWORD
35 DB 0b8h, 30h, 0 ; mov ax, 30h as selector
44 and eax, ((NOT 080000001h) AND 0ffffffffh)
53 DB 0eah ; jmp far @jmp_addr
55 AsmTransferControl ENDP
57 AsmTransferControl32 PROC
58 ; S3WakingVector :DWORD
59 ; AcpiLowMemoryBase :DWORD
62 DB 8dh, 05h ; lea eax, AsmTransferControl16
67 AsmTransferControl32 ENDP
69 AsmTransferControl16 PROC
70 DB 0b8h, 30h, 0 ; mov ax, 30h as selector
76 mov rax, cr0 ; Get control register 0
78 DB 83h, 0e0h, 0feh ; and eax, 0fffffffeh ; Clear PE bit (bit #0)
79 DB 0fh, 22h, 0c0h ; mov cr0, eax ; Activate real mode
80 DB 0eah ; jmp far AsmJmpAddr32
82 AsmTransferControl16 ENDP