+++ /dev/null
-## @file\r
-#\r
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
-#\r
-# This program and the accompanying materials are\r
-# licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-#\r
-##\r
-\r
-#-----------------------------------------\r
-#VOID\r
-#AsmTransferControl (\r
-# IN UINT32 S3WakingVector,\r
-# IN UINT32 AcpiLowMemoryBase\r
-# );\r
-#-----------------------------------------\r
-\r
-ASM_GLOBAL ASM_PFX(AsmTransferControl)\r
-ASM_PFX(AsmTransferControl):\r
- # S3WakingVector :DWORD\r
- # AcpiLowMemoryBase :DWORD\r
- pushl %ebp\r
- movl %esp,%ebp\r
- leal LABLE, %eax\r
- pushl $0x28 # CS\r
- pushl %eax\r
- movl 8(%ebp),%ecx\r
- shrdl $20,%ecx,%ebx\r
- andl $0xf,%ecx\r
- movw %cx,%bx\r
- movl %ebx, jmp_addr\r
- lret\r
-LABLE: \r
- .byte 0xb8,0x30,0 # mov ax, 30h as selector\r
- movw %ax,%ds\r
- movw %ax,%es\r
- movw %ax,%fs\r
- movw %ax,%gs\r
- movw %ax,%ss\r
- movl %cr0, %eax # Get control register 0 \r
- .byte 0x66\r
- .byte 0x83,0xe0,0xfe # and eax, 0fffffffeh ; Clear PE bit (bit #0)\r
- .byte 0xf,0x22,0xc0 # mov cr0, eax ; Activate real mode\r
- .byte 0xea # jmp far @jmp_addr\r
-jmp_addr: \r
- .long 0\r
-\r
-ASM_GLOBAL ASM_PFX(AsmTransferControl32)\r
-ASM_PFX(AsmTransferControl32):\r
- jmp ASM_PFX(AsmTransferControl)\r
-\r
-# dummy\r
-ASM_GLOBAL ASM_PFX(AsmTransferControl16)\r
-ASM_PFX(AsmTransferControl16):\r
-ASM_GLOBAL ASM_PFX(AsmFixAddress16)\r
-ASM_PFX(AsmFixAddress16):\r
- .long 0\r
-ASM_GLOBAL ASM_PFX(AsmJmpAddr32)\r
-ASM_PFX(AsmJmpAddr32):\r
- .long 0\r
-\r