]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | AsmWriteDr2 function\r | |
3 | \r | |
44b013bd | 4 | Copyright (c) 2006 - 2008, Intel Corporation<BR>\r |
e1f414b6 | 5 | All rights reserved. This program and the accompanying materials\r |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
42eedea9 | 15 | /**\r |
16 | Writes a value to Debug Register 2 (DR2).\r | |
17 | \r | |
18 | Writes and returns a new value to DR2. This function is only available on\r | |
19 | IA-32 and X64. This writes a 32-bit value on IA-32 and a 64-bit value on X64.\r | |
20 | \r | |
44b013bd | 21 | @param Value The value to write to Dr2.\r |
42eedea9 | 22 | \r |
23 | @return The value written to Debug Register 2 (DR2).\r | |
24 | \r | |
25 | **/\r | |
e1f414b6 | 26 | UINTN\r |
27 | EFIAPI\r | |
28 | AsmWriteDr2 (\r | |
29 | IN UINTN Value\r | |
30 | )\r | |
31 | {\r | |
32 | _asm {\r | |
33 | mov eax, Value\r | |
34 | mov dr2, eax\r | |
35 | }\r | |
36 | }\r | |
37 | \r |