TianoCore EDK2 master
Loading...
Searching...
No Matches
C1e.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 IS_NEHALEM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel);
36}
37
55RETURN_STATUS
56EFIAPI
58 IN UINTN ProcessorNumber,
60 IN VOID *ConfigData OPTIONAL,
61 IN BOOLEAN State
62 )
63{
64 //
65 // The scope of C1EEnable bit in the MSR_NEHALEM_POWER_CTL is Package, only program
66 // MSR_NEHALEM_POWER_CTL once for each package.
67 //
68 if ((CpuInfo->First.Thread == 0) || (CpuInfo->First.Core == 0)) {
69 return RETURN_SUCCESS;
70 }
71
73 ProcessorNumber,
74 Msr,
77 Bits.C1EEnable,
78 (State) ? 1 : 0
79 );
80 return RETURN_SUCCESS;
81}
UINT64 UINTN
BOOLEAN EFIAPI C1eSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
Definition: C1e.c:29
RETURN_STATUS EFIAPI C1eInitialize(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State)
Definition: C1e.c:57
#define RETURN_SUCCESS
Definition: Base.h:1066
#define IN
Definition: Base.h:279
#define IS_NEHALEM_PROCESSOR(DisplayFamily, DisplayModel)
Definition: NehalemMsr.h:32
#define MSR_NEHALEM_POWER_CTL
Definition: NehalemMsr.h:917
#define CPU_REGISTER_TABLE_WRITE_FIELD(ProcessorNumber, RegisterType, Index, Type, Field, Value)