]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseLib/Ia32/ReadDr4.asm
1. Added comments to ASM files
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadDr4.asm
index 01724555d2724ae625594c8e33591c5524a0f364..606f26fe2abb59bb3e2e0c784ab92b15fb822ccb 100644 (file)
@@ -22,7 +22,7 @@
 ;------------------------------------------------------------------------------\r
 \r
     .586p\r
-    .model  flat\r
+    .model  flat,C\r
     .code\r
 \r
 ;------------------------------------------------------------------------------\r
 ;   VOID\r
 ;   );\r
 ;------------------------------------------------------------------------------\r
-_AsmReadDr4 PROC\r
+AsmReadDr4  PROC\r
+    ;\r
+    ; DR4 is alias to DR6 only if DE (in CR4) is cleared. Otherwise, reading\r
+    ; this register will cause a #UD exception.\r
+    ;\r
+    ; MS assembler doesn't support this instruction since no one would use it\r
+    ; under normal circustances. Here opcode is used.\r
+    ;\r
     DB      0fh, 21h, 0e0h\r
     ret\r
-_AsmReadDr4 ENDP\r
+AsmReadDr4  ENDP\r
 \r
     END\r