summaryrefslogtreecommitdiff
path: root/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm
diff options
context:
space:
mode:
Diffstat (limited to 'MdePkg/Library/BaseLib/Ia32/ReadDr5.asm')
-rw-r--r--MdePkg/Library/BaseLib/Ia32/ReadDr5.asm7
1 files changed, 7 insertions, 0 deletions
diff --git a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm
index bba8b602ba..091792dab9 100644
--- a/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm
+++ b/MdePkg/Library/BaseLib/Ia32/ReadDr5.asm
@@ -33,6 +33,13 @@
; );
;------------------------------------------------------------------------------
AsmReadDr5 PROC
+ ;
+ ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading
+ ; this register will cause a #UD exception.
+ ;
+ ; MS assembler doesn't support this instruction since no one would use it
+ ; under normal circustances. Here opcode is used.
+ ;
DB 0fh, 21h, 0e8h
ret
AsmReadDr5 ENDP