]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Disable interrupt when changing IDTR register.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Feb 2010 07:32:20 +0000 (07:32 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 23 Feb 2010 07:32:20 +0000 (07:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10046 6f19259b-4bc3-4df7-8a09-765794883524

MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
MdePkg/Library/BaseLib/Ia32/WriteIdtr.asm
MdePkg/Library/BaseLib/Ia32/WriteIdtr.c
MdePkg/Library/BaseLib/X64/WriteIdtr.S
MdePkg/Library/BaseLib/X64/WriteIdtr.asm

index 1f4857e0c45f6749cba0c487166150af89a08513..e9fc03bb5e735e6eca38311e89b329985dc856ec 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2008, Intel Corporation\r
+# Copyright (c) 2006 - 2010, Intel Corporation\r
 # All rights reserved. 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
@@ -31,5 +31,8 @@
 ASM_GLOBAL ASM_PFX(InternalX86WriteIdtr)\r
 ASM_PFX(InternalX86WriteIdtr):\r
     movl    4(%esp), %eax\r
+    pushfl\r
+    cli\r
     lidt    (%eax)\r
+    popfl\r
     ret\r
index 65fca407f2ffd2b60758b467c41256350217befb..76c3f13339c96056fb7d35ae808d565a332bc5e5 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006, Intel Corporation\r
+; Copyright (c) 2006 - 2010, Intel Corporation\r
 ; All rights reserved. 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
 ;------------------------------------------------------------------------------\r
 InternalX86WriteIdtr  PROC\r
     mov     eax, [esp + 4]\r
+    pushfd\r
+    cli\r
     lidt    fword ptr [eax]\r
+    popfd\r
     ret\r
 InternalX86WriteIdtr  ENDP\r
 \r
index 33d2b29fe8b43ca5091f17c8a5f1793740f8c161..d58520fb25278d415b7e6fa4e6c73099885cd877 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   AsmWriteIdtr function\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
   All rights reserved. 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
@@ -32,7 +32,10 @@ InternalX86WriteIdtr (
 {\r
   _asm {\r
     mov     eax, Idtr\r
+    pushfd\r
+    cli\r
     lidt    fword ptr [eax]\r
+    popfd\r
   }\r
 }\r
 \r
index 544ef7929cde29e7ea76b22764b619e5f6ab76d8..33365502d524903d621682f0d237d2dacdce23ea 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #\r
-# Copyright (c) 2006 - 2009, Intel Corporation\r
+# Copyright (c) 2006 - 2010, Intel Corporation\r
 # All rights reserved. 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
@@ -31,5 +31,8 @@
 #------------------------------------------------------------------------------\r
 ASM_GLOBAL ASM_PFX(InternalX86WriteIdtr)\r
 ASM_PFX(InternalX86WriteIdtr):\r
+    pushfq\r
+    cli\r
     lidt    (%rcx)\r
+    popfq\r
     ret\r
index 2f6c081ab62b902acac11ee4ecd853ec6a220199..a658fe37281ff77cf7e437ad81afdc0bd82f9167 100644 (file)
@@ -1,6 +1,6 @@
 ;------------------------------------------------------------------------------\r
 ;\r
-; Copyright (c) 2006, Intel Corporation\r
+; Copyright (c) 2006 - 2010, Intel Corporation\r
 ; All rights reserved. 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
 ;   );\r
 ;------------------------------------------------------------------------------\r
 InternalX86WriteIdtr  PROC\r
+    pushfq\r
+    cli\r
     lidt    fword ptr [rcx]\r
+    popfq\r
     ret\r
 InternalX86WriteIdtr  ENDP\r
 \r