3 # Copyright (c) 2013-2015 Intel Corporation.
5 # This program and the accompanying materials
6 # are licensed and made available under the terms and conditions of the BSD License
7 # which accompanies this distribution. The full text of the license may be found at
8 # http://opensource.org/licenses/bsd-license.php
10 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #-----------------------------------------
16 # IN UINT32 S3WakingVector,
17 # IN UINT32 AcpiLowMemoryBase
19 #-----------------------------------------
21 ASM_GLOBAL ASM_PFX(AsmTransferControl)
22 ASM_PFX(AsmTransferControl):
23 # S3WakingVector :DWORD
24 # AcpiLowMemoryBase :DWORD
37 .byte 0xb8,0x30,0 # mov ax, 30h as selector
43 movl %cr0, %eax # Get control register 0
45 .byte 0x83,0xe0,0xfe # and eax, 0fffffffeh ; Clear PE bit (bit #0)
46 .byte 0xf,0x22,0xc0 # mov cr0, eax ; Activate real mode
47 .byte 0xea # jmp far @jmp_addr