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