3 # Copyright (c) 2013-2015 Intel Corporation.
5 # SPDX-License-Identifier: BSD-2-Clause-Patent
7 #-----------------------------------------
10 # IN UINT32 S3WakingVector,
11 # IN UINT32 AcpiLowMemoryBase
13 #-----------------------------------------
15 ASM_GLOBAL ASM_PFX(AsmTransferControl)
16 ASM_PFX(AsmTransferControl):
17 # S3WakingVector :DWORD
18 # AcpiLowMemoryBase :DWORD
31 .byte 0xb8,0x30,0 # mov ax, 30h as selector
37 movl %cr0, %eax # Get control register 0
39 .byte 0x83,0xe0,0xfe # and eax, 0fffffffeh ; Clear PE bit (bit #0)
40 .byte 0xf,0x22,0xc0 # mov cr0, eax ; Activate real mode
41 .byte 0xea # jmp far @jmp_addr