#/**@file\r
# Low leve IA32 specific debug support functions.\r
#\r
-# Copyright (c) 2006 - 2008, Intel Corporation. <BR>\r
-# All rights reserved. This program and the accompanying materials\r
+# Copyright (c) 2006 - 2011, 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
#\r
#**/\r
\r
-.globl ASM_PFX(OrigVector)\r
-.globl ASM_PFX(InterruptEntryStub)\r
-.globl ASM_PFX(StubSize)\r
-.globl ASM_PFX(CommonIdtEntry)\r
-.globl ASM_PFX(FxStorSupport)\r
+ASM_GLOBAL ASM_PFX(OrigVector)\r
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)\r
+ASM_GLOBAL ASM_PFX(StubSize)\r
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)\r
+ASM_GLOBAL ASM_PFX(FxStorSupport)\r
\r
ASM_PFX(StubSize): .long ASM_PFX(InterruptEntryStubEnd) - ASM_PFX(InterruptEntryStub)\r
ASM_PFX(AppEsp): .long 0x11111111 # ?\r
#\r
# Abstract: Returns TRUE if FxStor instructions are supported\r
#\r
-.globl ASM_PFX(FxStorSupport)\r
+ASM_GLOBAL ASM_PFX(FxStorSupport)\r
ASM_PFX(FxStorSupport):\r
#\r
# cpuid corrupts ebx which must be preserved per the C calling convention\r
# Abstract: Encodes an IDT descriptor with the given physical address\r
#\r
\r
-.globl ASM_PFX(Vect2Desc)\r
+ASM_GLOBAL ASM_PFX(Vect2Desc)\r
ASM_PFX(Vect2Desc):\r
push %ebp\r
mov %esp,%ebp\r
leave\r
ret\r
\r
-.globl ASM_PFX(InterruptEntryStub)\r
+ASM_GLOBAL ASM_PFX(InterruptEntryStub)\r
ASM_PFX(InterruptEntryStub):\r
mov %esp,0x0 # save stack top\r
mov $0x0,%esp # switch to debugger stack\r
push $0x0 # push vector number - will be modified before installed\r
jmp ASM_PFX(CommonIdtEntry) # jump CommonIdtEntry\r
-.globl ASM_PFX(InterruptEntryStubEnd)\r
+ASM_GLOBAL ASM_PFX(InterruptEntryStubEnd)\r
ASM_PFX(InterruptEntryStubEnd):\r
\r
#------------------------------------------------------------------------------\r
# Abstract: This code is not a function, but is the common part for all IDT\r
# vectors.\r
#\r
-.globl ASM_PFX(CommonIdtEntry)\r
+ASM_GLOBAL ASM_PFX(CommonIdtEntry)\r
ASM_PFX(CommonIdtEntry):\r
##\r
## At this point, the stub has saved the current application stack esp into AppEsp\r
# They MUST be. If they are not, a GP fault will occur.\r
fxsave (%edi)\r
\r
+## UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
+ cld\r
+ \r
## UINT32 ExceptionData;\r
mov 0x0,%eax\r
push %eax\r