]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/WriteDr1.c
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Library / BaseLib / Ia32 / WriteDr1.c
1 /** @file
2 AsmWriteDr1 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 1 (DR1).
11
12 Writes and returns a new value to DR1. 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 Dr1.
16
17 @return The value written to Debug Register 1 (DR1).
18
19 **/
20 UINTN
21 EFIAPI
22 AsmWriteDr1 (
23 IN UINTN Value
24 )
25 {
26 _asm {
27 mov eax, Value
28 mov dr1, eax
29 }
30 }
31