]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/WriteIdtr.S
Disable interrupt when changing IDTR register.
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteIdtr.S
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