]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clear the direction flag in interrupt/exception handlers' assembly entry code before...
authorrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 May 2011 06:10:42 +0000 (06:10 +0000)
committerrsun3 <rsun3@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 16 May 2011 06:10:42 +0000 (06:10 +0000)
Signed-off-by: rsun3
Reviewed-by: jyao1
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11664 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/DebugSupportDxe/Ia32/AsmFuncs.asm
MdeModulePkg/Universal/DebugSupportDxe/X64/AsmFuncs.asm
UefiCpuPkg/CpuDxe/Ia32/CpuAsm.asm
UefiCpuPkg/CpuDxe/X64/CpuAsm.asm

index 80ee1824d6f7edac634b37a86009ba56680b369d..32cbc3165413ff86414f676cda2eabbbd94222da 100644 (file)
@@ -1,7 +1,7 @@
 ;/** @file\r
 ;  Low leve IA32 specific debug support functions.\r
 ;\r
-;  Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\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
@@ -363,6 +363,9 @@ CommonIdtEntry::
                 ; They MUST be.  If they are not, a GP fault will occur.\r
                 FXSTOR_EDI\r
 \r
+;; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
+                cld\r
+\r
 ;; UINT32  ExceptionData;\r
                 mov     eax, ExceptData\r
                 push    eax\r
index b9c32dd2778da36b9476e2b4c08965f95bc172e7..bce49ef76208638a75f00645e295e1c8150e90b1 100644 (file)
@@ -1,7 +1,7 @@
 ;/** @file\r
 ;  Low level x64 routines used by the debug support driver.\r
 ;\r
-;  Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+;  Copyright (c) 2007 - 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
@@ -393,6 +393,9 @@ ExtraPushDone:
                 ; They MUST be.  If they are not, a GP fault will occur.\r
                 FXSTOR_RDI\r
 \r
+;; UEFI calling convention for x64 requires that Direction flag in EFLAGs is clear\r
+                cld\r
+\r
 ;; UINT64  ExceptionData;\r
                 mov     rax, ExceptData\r
                 push    rax\r
index 68454bdeca1348e1765e68bc7b37068fc15a85b9..a279e6ab5ada4c80674071ffbb1f66bf3f21a555 100644 (file)
@@ -1,7 +1,7 @@
       TITLE   CpuAsm.asm:\r
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\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
@@ -272,6 +272,9 @@ ErrorCodeAndVectorOnStack:
     mov     edi, esp\r
     db      0fh, 0aeh, 07h ;fxsave [edi]\r
 \r
+;; UEFI calling convention for IA32 requires that Direction flag in EFLAGs is clear\r
+    cld\r
+\r
 ;; UINT32  ExceptionData;\r
     push    dword ptr [ebp + 2 * 4]\r
 \r
index 79edb7b83e829422f4de838d5ece02e8aa4445f0..68fcd3f404657451a50caf5e0d5c99963a3e2867 100644 (file)
@@ -1,7 +1,7 @@
       TITLE   CpuAsm.asm: \r
 ;------------------------------------------------------------------------------\r
 ;*\r
-;*   Copyright (c) 2008 - 2010, Intel Corporation. All rights reserved.<BR>\r
+;*   Copyright (c) 2008 - 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
@@ -223,6 +223,9 @@ NoErrorCode:
     mov rdi, rsp\r
     db 0fh, 0aeh, 07h ;fxsave [rdi]\r
 \r
+;; UEFI calling convention for x64 requires that Direction flag in EFLAGs is clear\r
+    cld\r
+\r
 ;; UINT32  ExceptionData;\r
     push    qword ptr [rbp + 16]\r
 \r