#------------------------------------------------------------------------------\r
#\r
-# Copyright (c) 2006, Intel Corporation\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+# This program and the accompanying materials\r
# are 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
+# 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
-.globl ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)\r
-.globl ASM_PFX(InternalAsmThunk16)\r
+#include <Library/BaseLib.h>\r
+\r
+ASM_GLOBAL ASM_PFX(m16Start), ASM_PFX(m16Size), ASM_PFX(mThunk16Attr), ASM_PFX(m16Gdt), ASM_PFX(m16GdtrBase), ASM_PFX(mTransition)\r
+ASM_GLOBAL ASM_PFX(InternalAsmThunk16)\r
\r
ASM_PFX(m16Start):\r
\r
call L_Base # push eip\r
L_Base:\r
popw %bp # ebp <- offset L_Base\r
- addr16 pushl 36(%si)\r
- .byte 0x36\r
+ .byte 0x67; # address size override\r
+ push 54(%esp)\r
lea 0xc(%esi), %eax\r
push %eax\r
lret\r
GdtEnd:\r
\r
#\r
-# @param RegSet Pointer to a IA32_DWORD_REGS structure\r
-# @param Transition Pointer to the transition code\r
+# @param RegSet The pointer to a IA32_DWORD_REGS structure\r
+# @param Transition The pointer to the transition code\r
# @return The address of the 16-bit stack after returning from user code\r
#\r
ASM_PFX(InternalAsmThunk16):\r
popfl\r
lidtl 0x24(%esp)\r
lea 0xffffffcc(%ebp), %eax\r
- pop %gs\r
- pop %fs\r
- pop %es\r
- pop %ds\r
- pop %edi\r
- pop %esi\r
- pop %ebx\r
- pop %ebp\r
+ pop %gs\r
+ pop %fs\r
+ pop %es\r
+ pop %ds\r
+ pop %edi\r
+ pop %esi\r
+ pop %ebx\r
+ pop %ebp\r
ret\r
\r
.const:\r
\r
-ASM_PFX(m16Size): .word _InternalAsmThunk16 - ASM_PFX(m16Start)\r
-ASM_PFX(mThunk16Attr): .word _ThunkAttr - ASM_PFX(m16Start)\r
+ASM_PFX(m16Size): .word ASM_PFX(InternalAsmThunk16) - ASM_PFX(m16Start)\r
+ASM_PFX(mThunk16Attr): .word ASM_PFX(ThunkAttr) - ASM_PFX(m16Start)\r
ASM_PFX(m16Gdt): .word _NullSegDesc - ASM_PFX(m16Start)\r
ASM_PFX(m16GdtrBase): .word _16GdtrBase - ASM_PFX(m16Start)\r
ASM_PFX(mTransition): .word _EntryPoint - ASM_PFX(m16Start)\r