TianoCore EDK2 master
Loading...
Searching...
No Matches
PendingBreak.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 if (IS_ATOM_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
36 IS_CORE2_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
37 IS_CORE_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
38 IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
39 IS_PENTIUM_M_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel))
40 {
41 return (CpuInfo->CpuIdVersionInfoEdx.Bits.PBE == 1);
42 }
43
44 return FALSE;
45}
46
64RETURN_STATUS
65EFIAPI
67 IN UINTN ProcessorNumber,
69 IN VOID *ConfigData OPTIONAL,
70 IN BOOLEAN State
71 )
72{
73 //
74 // The scope of the MSR_ATOM_IA32_MISC_ENABLE is core for below processor type, only program
75 // MSR_ATOM_IA32_MISC_ENABLE for thread 0 in each core.
76 //
77 // Support function has check the processer type for this feature, no need to check again
78 // here.
79 //
80 if (CpuInfo->ProcessorInfo.Location.Thread != 0) {
81 return RETURN_SUCCESS;
82 }
83
84 //
85 // ATOM, CORE2, CORE, PENTIUM_4 and IS_PENTIUM_M_PROCESSOR have the same MSR index,
86 // Simply use MSR_ATOM_IA32_MISC_ENABLE here
87 //
89 ProcessorNumber,
90 Msr,
93 Bits.FERR,
94 (State) ? 1 : 0
95 );
96 return RETURN_SUCCESS;
97}
UINT64 UINTN
#define IS_ATOM_PROCESSOR(DisplayFamily, DisplayModel)
Definition: AtomMsr.h:32
#define MSR_ATOM_IA32_MISC_ENABLE
Definition: AtomMsr.h:496
#define IS_CORE2_PROCESSOR(DisplayFamily, DisplayModel)
Definition: Core2Msr.h:32
#define IS_CORE_PROCESSOR(DisplayFamily, DisplayModel)
Definition: CoreMsr.h:32
#define RETURN_SUCCESS
Definition: Base.h:1066
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
BOOLEAN EFIAPI PendingBreakSupport(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
Definition: PendingBreak.c:29
RETURN_STATUS EFIAPI PendingBreakInitialize(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State)
Definition: PendingBreak.c:66
#define IS_PENTIUM_4_PROCESSOR(DisplayFamily, DisplayModel)
Definition: Pentium4Msr.h:32
#define IS_PENTIUM_M_PROCESSOR(DisplayFamily, DisplayModel)
Definition: PentiumMMsr.h:32
#define CPU_REGISTER_TABLE_WRITE_FIELD(ProcessorNumber, RegisterType, Index, Type, Field, Value)