TianoCore EDK2 master
Loading...
Searching...
No Matches
FastStrings.c
Go to the documentation of this file.
1
9#include "CpuCommonFeatures.h"
10
28RETURN_STATUS
29EFIAPI
31 IN UINTN ProcessorNumber,
33 IN VOID *ConfigData OPTIONAL,
34 IN BOOLEAN State
35 )
36{
37 //
38 // The scope of FastStrings bit in the MSR_IA32_MISC_ENABLE is core for below processor type, only program
39 // MSR_IA32_MISC_ENABLE for thread 0 in each core.
40 //
41 if (IS_SILVERMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
42 IS_GOLDMONT_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel) ||
43 IS_PENTIUM_4_PROCESSOR (CpuInfo->DisplayFamily, CpuInfo->DisplayModel))
44 {
45 if (CpuInfo->ProcessorInfo.Location.Thread != 0) {
46 return RETURN_SUCCESS;
47 }
48 }
49
51 ProcessorNumber,
52 Msr,
55 Bits.FastStrings,
56 (State) ? 1 : 0
57 );
58 return RETURN_SUCCESS;
59}
UINT64 UINTN
RETURN_STATUS EFIAPI FastStringsInitialize(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State)
Definition: FastStrings.c:30
#define IS_GOLDMONT_PROCESSOR(DisplayFamily, DisplayModel)
Definition: GoldmontMsr.h:32
#define RETURN_SUCCESS
Definition: Base.h:1066
#define IN
Definition: Base.h:279
#define MSR_IA32_MISC_ENABLE
#define IS_PENTIUM_4_PROCESSOR(DisplayFamily, DisplayModel)
Definition: Pentium4Msr.h:32
#define CPU_REGISTER_TABLE_WRITE_FIELD(ProcessorNumber, RegisterType, Index, Type, Field, Value)
#define IS_SILVERMONT_PROCESSOR(DisplayFamily, DisplayModel)
Definition: SilvermontMsr.h:32