]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ReadDr5.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / ReadDr5.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
4 ; SPDX-License-Identifier: BSD-2-Clause-Patent
5 ;
6 ; Module Name:
7 ;
8 ; ReadDr5.Asm
9 ;
10 ; Abstract:
11 ;
12 ; AsmReadDr5 function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 SECTION .text
19
20 ;------------------------------------------------------------------------------
21 ; UINTN
22 ; EFIAPI
23 ; AsmReadDr5 (
24 ; VOID
25 ; );
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(AsmReadDr5)
28 ASM_PFX(AsmReadDr5):
29 ;
30 ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading
31 ; this register will cause a #UD exception.
32 ;
33 ; MS assembler doesn't support this instruction since no one would use it
34 ; under normal circustances. Here opcode is used.
35 ;
36 DB 0xf, 0x21, 0xe8
37 ret
38