]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | AsmWriteDr2 function\r | |
3 | \r | |
bb817c56 | 4 | Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r |
9344f092 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
e1f414b6 | 6 | \r |
7 | **/\r | |
8 | \r | |
42eedea9 | 9 | /**\r |
10 | Writes a value to Debug Register 2 (DR2).\r | |
11 | \r | |
12 | Writes and returns a new value to DR2. This function is only available on\r | |
030cd1a2 | 13 | IA-32 and x64. This writes a 32-bit value on IA-32 and a 64-bit value on x64.\r |
42eedea9 | 14 | \r |
44b013bd | 15 | @param Value The value to write to Dr2.\r |
42eedea9 | 16 | \r |
17 | @return The value written to Debug Register 2 (DR2).\r | |
18 | \r | |
19 | **/\r | |
e1f414b6 | 20 | UINTN\r |
21 | EFIAPI\r | |
22 | AsmWriteDr2 (\r | |
23 | IN UINTN Value\r | |
24 | )\r | |
25 | {\r | |
26 | _asm {\r | |
27 | mov eax, Value\r | |
28 | mov dr2, eax\r | |
29 | }\r | |
30 | }\r | |
31 | \r |