TianoCore EDK2
master
Loading...
Searching...
No Matches
SmmCpuPlatformHookLibQemu.c
Go to the documentation of this file.
1
9
#include <
Library/BaseLib.h
>
// AsmReadMsr64()
10
#include <
PiSmm.h
>
11
#include <
Register/Intel/ArchitecturalMsr.h
>
// MSR_IA32_APIC_BASE_REGISTER
12
13
#include <
Library/SmmCpuPlatformHookLib.h
>
14
27
BOOLEAN
28
EFIAPI
29
PlatformValidSmi
(
30
VOID
31
)
32
{
33
return
TRUE
;
34
}
35
46
BOOLEAN
47
EFIAPI
48
ClearTopLevelSmiStatus
(
49
VOID
50
)
51
{
52
return
TRUE
;
53
}
54
75
EFI_STATUS
76
EFIAPI
77
PlatformSmmBspElection
(
78
OUT
BOOLEAN *IsBsp
79
)
80
{
81
MSR_IA32_APIC_BASE_REGISTER
ApicBaseMsr;
82
83
ApicBaseMsr.
Uint64
=
AsmReadMsr64
(
MSR_IA32_APIC_BASE
);
84
*IsBsp = (BOOLEAN)(ApicBaseMsr.
Bits
.
BSP
== 1);
85
return
EFI_SUCCESS
;
86
}
87
105
EFI_STATUS
106
EFIAPI
107
GetPlatformPageTableAttribute
(
108
IN
UINT64 Address,
109
IN
OUT
SMM_PAGE_SIZE_TYPE
*PageSize,
110
IN
OUT
UINTN
*NumOfPages,
111
IN
OUT
UINTN
*PageAttribute
112
)
113
{
114
return
EFI_UNSUPPORTED;
115
}
116
126
EFI_STATUS
127
EFIAPI
128
SmmCpuPlatformHookBeforeMmiHandler
(
129
VOID
130
)
131
{
132
return
EFI_UNSUPPORTED;
133
}
UINTN
UINT64 UINTN
Definition:
ProcessorBind.h:112
BaseLib.h
AsmReadMsr64
UINT64 EFIAPI AsmReadMsr64(IN UINT32 Index)
Definition:
GccInlinePriv.c:60
TRUE
#define TRUE
Definition:
Base.h:301
IN
#define IN
Definition:
Base.h:279
OUT
#define OUT
Definition:
Base.h:284
ArchitecturalMsr.h
MSR_IA32_APIC_BASE
#define MSR_IA32_APIC_BASE
Definition:
ArchitecturalMsr.h:167
PiSmm.h
SmmCpuPlatformHookLib.h
SMM_PAGE_SIZE_TYPE
SMM_PAGE_SIZE_TYPE
Definition:
SmmCpuPlatformHookLib.h:15
PlatformSmmBspElection
EFI_STATUS EFIAPI PlatformSmmBspElection(OUT BOOLEAN *IsBsp)
Definition:
SmmCpuPlatformHookLibQemu.c:77
PlatformValidSmi
BOOLEAN EFIAPI PlatformValidSmi(VOID)
Definition:
SmmCpuPlatformHookLibQemu.c:29
GetPlatformPageTableAttribute
EFI_STATUS EFIAPI GetPlatformPageTableAttribute(IN UINT64 Address, IN OUT SMM_PAGE_SIZE_TYPE *PageSize, IN OUT UINTN *NumOfPages, IN OUT UINTN *PageAttribute)
Definition:
SmmCpuPlatformHookLibQemu.c:107
ClearTopLevelSmiStatus
BOOLEAN EFIAPI ClearTopLevelSmiStatus(VOID)
Definition:
SmmCpuPlatformHookLibQemu.c:48
SmmCpuPlatformHookBeforeMmiHandler
EFI_STATUS EFIAPI SmmCpuPlatformHookBeforeMmiHandler(VOID)
Definition:
SmmCpuPlatformHookLibQemu.c:128
EFI_STATUS
RETURN_STATUS EFI_STATUS
Definition:
UefiBaseType.h:29
EFI_SUCCESS
#define EFI_SUCCESS
Definition:
UefiBaseType.h:112
MSR_IA32_APIC_BASE_REGISTER
Definition:
ArchitecturalMsr.h:172
MSR_IA32_APIC_BASE_REGISTER::BSP
UINT32 BSP
Definition:
ArchitecturalMsr.h:181
MSR_IA32_APIC_BASE_REGISTER::Bits
struct MSR_IA32_APIC_BASE_REGISTER::@627 Bits
MSR_IA32_APIC_BASE_REGISTER::Uint64
UINT64 Uint64
Definition:
ArchitecturalMsr.h:204
OvmfPkg
Library
SmmCpuPlatformHookLibQemu
SmmCpuPlatformHookLibQemu.c
Generated on Fri Nov 15 2024 18:01:21 for TianoCore EDK2 by
1.9.6