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