]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/WriteMsr64.c
4 Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #include <Library/RegisterFilterLib.h>
12 Writes a 64-bit value to a Machine Specific Register(MSR), and returns the
15 Writes the 64-bit value specified by Value to the MSR specified by Index. The
16 64-bit value written to the MSR is returned. No parameter checking is
17 performed on Index or Value, and some of these may cause CPU exceptions. The
18 caller must either guarantee that Index and Value are valid, or the caller
19 must establish proper exception handlers. This function is only available on
22 @param Index The 32-bit MSR index to write.
23 @param Value The 64-bit value to write to the MSR.
37 Flag
= FilterBeforeMsrWrite (Index
, &Value
);
40 mov edx
, dword ptr
[Value
+ 4]
41 mov eax
, dword ptr
[Value
+ 0]
47 FilterAfterMsrWrite (Index
, &Value
);