]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.S
A complement fix for revision 11664 to update GCC assembly files : clear the directio...
[mirror_edk2.git] / MdeModulePkg / Universal / DebugSupportDxe / Ia32 / AsmFuncs.S
index 03fc6c98baa680fc8dbe061817591a12f4f4ffbf..fd1a96b76ff4855f0ed24298242c812ed7ced041 100644 (file)
@@ -1,8 +1,8 @@
 #/**@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
@@ -34,7 +34,7 @@ ASM_PFX(OrigVector):     .long   0x66666666 # ?
 #\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
@@ -57,7 +57,7 @@ ASM_PFX(FxStorSupport):
 # 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
@@ -71,13 +71,13 @@ ASM_PFX(Vect2Desc):
         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
@@ -86,7 +86,7 @@ ASM_PFX(InterruptEntryStubEnd):
 # 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
@@ -276,6 +276,9 @@ ASM_PFX(CommonIdtEntry):
         # 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