TianoCore EDK2
master
Loading...
Searching...
No Matches
ReadMsr64.c
Go to the documentation of this file.
1
9
#include <
Library/RegisterFilterLib.h
>
10
25
UINT64
26
AsmReadMsr64Internal
(
27
IN
UINT32 Index
28
)
29
{
30
_asm {
31
mov ecx, Index
32
rdmsr
33
}
34
}
35
50
UINT64
51
EFIAPI
52
AsmReadMsr64
(
53
IN
UINT32 Index
54
)
55
{
56
UINT64 Value;
57
BOOLEAN Flag;
58
59
Flag =
FilterBeforeMsrRead
(Index, &Value);
60
if
(Flag) {
61
Value =
AsmReadMsr64Internal
(Index);
62
}
63
64
FilterAfterMsrRead
(Index, &Value);
65
66
return
Value;
67
}
AsmReadMsr64Internal
UINT64 AsmReadMsr64Internal(IN UINT32 Index)
Definition:
ReadMsr64.c:26
AsmReadMsr64
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
Definition:
ReadMsr64.c:52
IN
#define IN
Definition:
Base.h:279
RegisterFilterLib.h
FilterBeforeMsrRead
BOOLEAN EFIAPI FilterBeforeMsrRead(IN UINT32 Index, IN OUT UINT64 *Value)
Definition:
RegisterFilterLibNull.c:207
FilterAfterMsrRead
VOID EFIAPI FilterAfterMsrRead(IN UINT32 Index, IN UINT64 *Value)
Definition:
RegisterFilterLibNull.c:224
MdePkg
Library
BaseLib
Ia32
ReadMsr64.c
Generated on Fri Nov 15 2024 18:01:17 for TianoCore EDK2 by
1.9.6