]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/WriteDr5.nasm
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteDr5.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 ; WriteDr5.Asm
9 ;
10 ; Abstract:
11 ;
12 ; AsmWriteDr5 function
13 ;
14 ; Notes:
15 ;
16 ;------------------------------------------------------------------------------
17
18 SECTION .text
19
20 ;------------------------------------------------------------------------------
21 ; UINTN
22 ; EFIAPI
23 ; AsmWriteDr5 (
24 ; IN UINTN Value
25 ; );
26 ;------------------------------------------------------------------------------
27 global ASM_PFX(AsmWriteDr5)
28 ASM_PFX(AsmWriteDr5):
29 mov eax, [esp + 4]
30 ;
31 ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, writing to
32 ; this register will cause a #UD exception.
33 ;
34 ; MS assembler doesn't support this instruction since no one would use it
35 ; under normal circustances. Here opcode is used.
36 ;
37 DB 0xf, 0x23, 0xe8
38 ret
39