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 ; SPDX-License-Identifier: BSD-2-Clause-Patent
12 global ASM_PFX(AsmFixAddress16)
13 global ASM_PFX(AsmJmpAddr32)
15 ;-----------------------------------------
18 ; IN UINT32 S3WakingVector,
19 ; IN UINT32 AcpiLowMemoryBase
21 ;-----------------------------------------
23 global ASM_PFX(AsmTransferControl)
24 ASM_PFX(AsmTransferControl):
25 ; S3WakingVector :DWORD
26 ; AcpiLowMemoryBase :DWORD
36 mov [@jmp_addr + 1], ebx
47 mov eax, cr0 ; Get control register 0
48 and eax, 0x0fffffffe ; Clear PE bit (bit #0)
49 mov cr0, eax ; Activate real mode
53 global ASM_PFX(AsmTransferControl32)
54 ASM_PFX(AsmTransferControl32):
55 jmp ASM_PFX(AsmTransferControl)
58 global ASM_PFX(AsmTransferControl16)
59 ASM_PFX(AsmTransferControl16):
60 ASM_PFX(AsmFixAddress16): DD 0
61 ASM_PFX(AsmJmpAddr32): DD 0