TianoCore EDK2 master
Loading...
Searching...
No Matches
Eist.c
Go to the documentation of this file.
1
9#include "CpuCommonFeatures.h"
10
27BOOLEAN
28EFIAPI
30 IN UINTN ProcessorNumber,
32 IN VOID *ConfigData OPTIONAL
33 )
34{
35 return (CpuInfo->CpuIdVersionInfoEcx.Bits.EIST == 1);
36}
37
57RETURN_STATUS
58EFIAPI
60 IN UINTN ProcessorNumber,
62 IN VOID *ConfigData OPTIONAL,
63 IN BOOLEAN State
64 )
65{
66 //
67 // The scope of the MSR_IA32_MISC_ENABLE is core for below processor type, only program
68 // MSR_IA32_MISC_ENABLE for thread 0 in each core.
69 //
70 if (IS_ATOM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
71 IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
72 IS_CORE2_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel))
73 {
74 if (CpuInfo->ProcessorInfo.Location.Thread != 0) {
75 return RETURN_SUCCESS;
76 }
77 }
78
80 ProcessorNumber,
81 Msr,
84 Bits.EIST,
85 (State) ? 1 : 0
86 );
87 return RETURN_SUCCESS;
88}
UINT64 UINTN
#define IS_ATOM_PROCESSOR(DisplayFamily, DisplayModel)
Definition: AtomMsr.h:32
#define IS_CORE2_PROCESSOR(DisplayFamily, DisplayModel)
Definition: Core2Msr.h:32
#define IS_CORE_PROCESSOR(DisplayFamily, DisplayModel)
Definition: CoreMsr.h:32
BOOLEAN EFIAPI EistSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
Definition: Eist.c:29
RETURN_STATUS EFIAPI EistInitialize(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State)
Definition: Eist.c:59
#define RETURN_SUCCESS
Definition: Base.h:1066
#define IN
Definition: Base.h:279
#define MSR_IA32_MISC_ENABLE
#define CPU_REGISTER_TABLE_WRITE_FIELD(ProcessorNumber, RegisterType, Index, Type, Field, Value)