]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/CpuDxe/Ia32/CpuAsm.asm
Skip restoration of DRx registers to support in-circuit emualators or debuggers set...
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / Ia32 / CpuAsm.asm
index f54fb291c09642928e245096e56d7f991bcb7364..68454bdeca1348e1765e68bc7b37068fc15a85b9 100644 (file)
@@ -1,7 +1,7 @@
       TITLE   CpuAsm.asm:\r
 ;------------------------------------------------------------------------------\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
@@ -256,16 +256,8 @@ ErrorCodeAndVectorOnStack:
 ;; UINT32  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
     mov     eax, dr7\r
     push    eax\r
-;; clear Dr7 while executing debugger itself\r
-    xor     eax, eax\r
-    mov     dr7, eax\r
-\r
     mov     eax, dr6\r
     push    eax\r
-;; insure all status bits in dr6 are clear...\r
-    xor     eax, eax\r
-    mov     dr6, eax\r
-\r
     mov     eax, dr3\r
     push    eax\r
     mov     eax, dr2\r
@@ -317,18 +309,9 @@ nullExternalExceptionHandler:
     add     esp, 512\r
 \r
 ;; UINT32  Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;\r
-    pop     eax\r
-    mov     dr0, eax\r
-    pop     eax\r
-    mov     dr1, eax\r
-    pop     eax\r
-    mov     dr2, eax\r
-    pop     eax\r
-    mov     dr3, eax\r
-;; skip restore of dr6.  We cleared dr6 during the context save.\r
-    add     esp, 4\r
-    pop     eax\r
-    mov     dr7, eax\r
+;; Skip restoration of DRx registers to support in-circuit emualators\r
+;; or debuggers set breakpoint in interrupt/exception context\r
+    add     esp, 4 * 6\r
 \r
 ;; UINT32  Cr0, Cr1, Cr2, Cr3, Cr4;\r
     pop     eax\r