]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/Ia32/CpuAsm.S
Skip restoration of DRx registers to support in-circuit emualators or debuggers set...
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / Ia32 / CpuAsm.S
index 04896578f7e4027f4ce180e75495e9a59068af9b..d3e1dee624096da54bfbc3c4c950830cfe12b1ee 100644 (file)
@@ -1,6 +1,6 @@
 #------------------------------------------------------------------------------\r
 #*\r
-#*   Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+#*   Copyright (c) 2006 - 2010, 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
@@ -258,16 +258,8 @@ ErrorCodeAndVectorOnStack:
 #; UINT32  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
     movl    %dr7, %eax\r
     pushl   %eax\r
-#; clear Dr7 while executing debugger itself\r
-    xorl    %eax, %eax\r
-    movl    %eax, %dr7\r
-\r
     movl    %dr6, %eax\r
     pushl   %eax\r
-#; insure all status bits in dr6 are clear...\r
-    xorl    %eax, %eax\r
-    movl    %eax, %dr6\r
-\r
     movl    %dr3, %eax\r
     pushl   %eax\r
     movl    %dr2, %eax\r
@@ -319,18 +311,9 @@ nullExternalExceptionHandler:
     addl    $512, %esp\r
 \r
 #; UINT32  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
-    popl    %eax\r
-    movl    %eax, %dr0\r
-    popl    %eax\r
-    movl    %eax, %dr1\r
-    popl    %eax\r
-    movl    %eax, %dr2\r
-    popl    %eax\r
-    movl    %eax, %dr3\r
-#; skip restore of dr6.  We cleared dr6 during the context save.\r
-    addl    $4, %esp\r
-    popl    %eax\r
-    movl    %eax, %dr7\r
+#; Skip restoration of DRx registers to support in-circuit emualators\r
+#; or debuggers set breakpoint in interrupt/exception context\r
+    addl    $24, %esp\r
 \r
 #; UINT32  Cr0, Cr1, Cr2, Cr3, Cr4;\r
     popl    %eax\r