]>
Commit | Line | Data |
---|---|---|
cb1ff380 JJ |
1 | ;------------------------------------------------------------------------------\r |
2 | ;\r | |
d3febfd9 | 3 | ; Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 4 | ; SPDX-License-Identifier: BSD-2-Clause-Patent\r |
cb1ff380 JJ |
5 | ;\r |
6 | ; Module Name:\r | |
7 | ;\r | |
8 | ; ReadDr5.Asm\r | |
9 | ;\r | |
10 | ; Abstract:\r | |
11 | ;\r | |
12 | ; AsmReadDr5 function\r | |
13 | ;\r | |
14 | ; Notes:\r | |
15 | ;\r | |
16 | ;------------------------------------------------------------------------------\r | |
17 | \r | |
18 | SECTION .text\r | |
19 | \r | |
20 | ;------------------------------------------------------------------------------\r | |
21 | ; UINTN\r | |
22 | ; EFIAPI\r | |
23 | ; AsmReadDr5 (\r | |
24 | ; VOID\r | |
25 | ; );\r | |
26 | ;------------------------------------------------------------------------------\r | |
27 | global ASM_PFX(AsmReadDr5)\r | |
28 | ASM_PFX(AsmReadDr5):\r | |
29 | ;\r | |
30 | ; DR5 is alias to DR7 only if DE (in CR4) is cleared. Otherwise, reading\r | |
31 | ; this register will cause a #UD exception.\r | |
32 | ;\r | |
33 | ; MS assembler doesn't support this instruction since no one would use it\r | |
d3febfd9 | 34 | ; under normal circustances.\r |
cb1ff380 | 35 | ;\r |
d3febfd9 | 36 | mov eax, dr5\r |
cb1ff380 JJ |
37 | ret\r |
38 | \r |