]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/Ia32/WriteDr5.asm
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / Ia32 / WriteDr5.asm
CommitLineData
3eb9473e 1; Copyright (c) 2004, Intel Corporation \r
2; All rights reserved. This program and the accompanying materials \r
3; are licensed and made available under the terms and conditions of the BSD License \r
4; which accompanies this distribution. The full text of the license may be found at \r
5; http://opensource.org/licenses/bsd-license.php \r
6; \r
7; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
8; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
9;\r
10; Module Name:\r
11;\r
12; WriteDr5.Asm\r
13;\r
14; Abstract:\r
15;\r
16; AsmWriteDr5 function\r
17;\r
18; Notes:\r
19;\r
20;------------------------------------------------------------------------------\r
21\r
22 .586p\r
23 .model flat,C\r
24 .code\r
25\r
26;------------------------------------------------------------------------------\r
27; UINTN\r
28; EFIAPI\r
29; AsmWriteDr5 (\r
30; IN UINTN Value\r
31; );\r
32;------------------------------------------------------------------------------\r
33AsmWriteDr5 PROC\r
34 mov eax, [esp + 4]\r
35 ;\r
36 ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, writing to\r
37 ; this register will cause a #UD exception.\r
38 ;\r
39 ; MS assembler doesn't support this instruction since no one would use it\r
40 ; under normal circustances. Here opcode is used.\r
41 ;\r
42 DB 0fh, 23h, 0e8h\r
43 ret\r
44AsmWriteDr5 ENDP\r
45\r
46 END\r