]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/Ia32/ReadMsr64.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 Returns a 64-bit Machine Specific Register(MSR).
14 Reads and returns the 64-bit MSR specified by Index. No parameter checking is
15 performed on Index, and some Index values may cause CPU exceptions. The
16 caller must either guarantee that Index is valid, or the caller must set up
17 exception handlers to catch the exceptions. This function is only available
20 @param Index The 32-bit MSR index to read.
22 @return The value of the MSR identified by Index.
26 AsmReadMsr64Internal (
37 Returns a 64-bit Machine Specific Register(MSR).
39 Reads and returns the 64-bit MSR specified by Index. No parameter checking is
40 performed on Index, and some Index values may cause CPU exceptions. The
41 caller must either guarantee that Index is valid, or the caller must set up
42 exception handlers to catch the exceptions. This function is only available
45 @param Index The 32-bit MSR index to read.
47 @return The value of the MSR identified by Index.
59 Flag
= FilterBeforeMsrRead (Index
, &Value
);
61 Value
= AsmReadMsr64Internal (Index
);
64 FilterAfterMsrRead (Index
, &Value
);