20 IN UINT8 *FeatureMask,
27 Data8 = (UINT8 *)FeatureMask;
28 for (Index = 0; Index < BitMaskSize; Index++) {
29 DEBUG ((DEBUG_INFO,
" %02x ", *Data8++));
32 DEBUG ((DEBUG_INFO,
"\n"));
48 if (CpuFeature->FeatureName !=
NULL) {
49 DEBUG ((DEBUG_INFO,
"FeatureName: %a\n", CpuFeature->FeatureName));
51 DEBUG ((DEBUG_INFO,
"FeatureMask = "));
67 IN UINT8 *FeatureMask,
68 IN UINT8 *DependentBitMask
79 Data2 = DependentBitMask;
80 for (Index = 0; Index < CpuFeaturesData->BitMaskSize; Index++) {
81 if (((*(Data1++)) & (*(Data2++))) != 0) {
104 IN BOOLEAN SearchFormer,
105 IN UINT8 *FeatureMask
116 NextEntry = CurrentEntry->BackLink;
117 if (
IsNull (FeatureList, NextEntry)) {
121 NextEntry = NextEntry->BackLink;
122 if (
IsNull (FeatureList, NextEntry)) {
126 NextEntry = CurrentEntry->BackLink->BackLink;
128 NextEntry = CurrentEntry->ForwardLink;
129 if (
IsNull (FeatureList, NextEntry)) {
133 NextEntry = NextEntry->ForwardLink;
134 if (
IsNull (FeatureList, NextEntry)) {
138 NextEntry = CurrentEntry->ForwardLink->ForwardLink;
141 while (!
IsNull (FeatureList, NextEntry)) {
142 CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (NextEntry);
149 NextEntry = NextEntry->BackLink;
151 NextEntry = NextEntry->ForwardLink;
167CPU_FEATURE_DEPENDENCE_TYPE
171 IN UINT8 *NextCpuFeatureMask
183 if (NextCpuFeatureMask ==
NULL) {
188 if ((CpuFeature->PackageBeforeFeatureBitMask !=
NULL) &&
191 return PackageDepType;
194 if ((CpuFeature->CoreBeforeFeatureBitMask !=
NULL) &&
200 if ((CpuFeature->ThreadBeforeFeatureBitMask !=
NULL) &&
203 return ThreadDepType;
209 if ((CpuFeature->PackageAfterFeatureBitMask !=
NULL) &&
212 return PackageDepType;
215 if ((CpuFeature->CoreAfterFeatureBitMask !=
NULL) &&
221 if ((CpuFeature->ThreadAfterFeatureBitMask !=
NULL) &&
224 return ThreadDepType;
239CPU_FEATURE_DEPENDENCE_TYPE
247 if ((CpuFeature->PackageBeforeFeatureBitMask !=
NULL) &&
250 return PackageDepType;
253 if ((CpuFeature->CoreBeforeFeatureBitMask !=
NULL) &&
259 if ((CpuFeature->ThreadBeforeFeatureBitMask !=
NULL) &&
262 return ThreadDepType;
268 if ((CpuFeature->PackageAfterFeatureBitMask !=
NULL) &&
271 return PackageDepType;
274 if ((CpuFeature->CoreAfterFeatureBitMask !=
NULL) &&
280 if ((CpuFeature->ThreadAfterFeatureBitMask !=
NULL) &&
283 return ThreadDepType;
316 CPU_FEATURE_DEPENDENCE_TYPE PreDependType;
317 CPU_FEATURE_DEPENDENCE_TYPE CurrentDependType;
319 PreDependType =
DetectFeatureScope (PreviousFeature, Before, FindFeature->FeatureMask);
320 CurrentDependType =
DetectFeatureScope (CurrentFeature, Before, FindFeature->FeatureMask);
326 if (PreDependType == NoneDepType) {
334 if (PreDependType >= CurrentDependType) {
379 PreviousEntry =
GetNextNode (FeatureList, FindEntry);
382 CurrentFeature = CPU_FEATURE_ENTRY_FROM_LINK (CurrentEntry);
385 if (
IsNull (FeatureList, PreviousEntry)) {
398 PreviousFeature = CPU_FEATURE_ENTRY_FROM_LINK (PreviousEntry);
399 FindFeature = CPU_FEATURE_ENTRY_FROM_LINK (FindEntry);
435 IN UINT8 *FeatureMask
448 while (CheckEntry != CurrentEntry) {
449 CheckFeature = CPU_FEATURE_ENTRY_FROM_LINK (CheckEntry);
456 CheckEntry = CheckEntry->ForwardLink;
475 IN UINT8 *FeatureMask
487 CheckEntry =
GetNextNode (FeatureList, CurrentEntry);
488 while (!
IsNull (FeatureList, CheckEntry)) {
489 CheckFeature = CPU_FEATURE_ENTRY_FROM_LINK (CheckEntry);
496 CheckEntry = CheckEntry->ForwardLink;
521 while (!
IsNull (FeatureList, CurrentEntry)) {
523 CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (CurrentEntry);
524 NextEntry = CurrentEntry->ForwardLink;
525 if (CpuFeature->BeforeAll) {
530 while (CheckEntry != CurrentEntry) {
531 CheckFeature = CPU_FEATURE_ENTRY_FROM_LINK (CheckEntry);
532 if (!CheckFeature->BeforeAll) {
543 CheckEntry = CheckEntry->ForwardLink;
547 CurrentEntry = NextEntry;
552 if (CpuFeature->AfterAll) {
556 CheckEntry =
GetNextNode (FeatureList, CurrentEntry);
557 while (!
IsNull (FeatureList, CheckEntry)) {
558 CheckFeature = CPU_FEATURE_ENTRY_FROM_LINK (CheckEntry);
559 if (!CheckFeature->AfterAll) {
564 TempEntry =
GetNextNode (FeatureList, CurrentEntry);
567 CurrentEntry = TempEntry;
572 CheckEntry = CheckEntry->ForwardLink;
576 CurrentEntry = NextEntry;
581 if (CpuFeature->ThreadBeforeFeatureBitMask !=
NULL) {
582 Swapped =
InsertToBeforeEntry (FeatureList, CurrentEntry, CpuFeature->ThreadBeforeFeatureBitMask);
588 if (CpuFeature->ThreadAfterFeatureBitMask !=
NULL) {
589 Swapped =
InsertToAfterEntry (FeatureList, CurrentEntry, CpuFeature->ThreadAfterFeatureBitMask);
595 if (CpuFeature->CoreBeforeFeatureBitMask !=
NULL) {
596 Swapped =
InsertToBeforeEntry (FeatureList, CurrentEntry, CpuFeature->CoreBeforeFeatureBitMask);
602 if (CpuFeature->CoreAfterFeatureBitMask !=
NULL) {
603 Swapped =
InsertToAfterEntry (FeatureList, CurrentEntry, CpuFeature->CoreAfterFeatureBitMask);
609 if (CpuFeature->PackageBeforeFeatureBitMask !=
NULL) {
610 Swapped =
InsertToBeforeEntry (FeatureList, CurrentEntry, CpuFeature->PackageBeforeFeatureBitMask);
616 if (CpuFeature->PackageAfterFeatureBitMask !=
NULL) {
617 Swapped =
InsertToAfterEntry (FeatureList, CurrentEntry, CpuFeature->PackageAfterFeatureBitMask);
623 CurrentEntry = CurrentEntry->ForwardLink;
649 BOOLEAN FeatureExist;
651 FeatureExist =
FALSE;
652 CpuFeatureEntry =
NULL;
654 while (!
IsNull (&CpuFeaturesData->FeatureList, Entry)) {
655 CpuFeatureEntry = CPU_FEATURE_ENTRY_FROM_LINK (Entry);
656 if (
CompareMem (CpuFeature->FeatureMask, CpuFeatureEntry->FeatureMask, CpuFeaturesData->BitMaskSize) == 0) {
664 Entry = Entry->ForwardLink;
668 DEBUG ((DEBUG_INFO,
"[NEW] "));
670 InsertTailList (&CpuFeaturesData->FeatureList, &CpuFeature->Link);
671 CpuFeaturesData->FeaturesCount++;
673 DEBUG ((DEBUG_INFO,
"[OVERRIDE] "));
675 ASSERT (CpuFeatureEntry !=
NULL);
679 if (CpuFeature->GetConfigDataFunc !=
NULL) {
680 CpuFeatureEntry->GetConfigDataFunc = CpuFeature->GetConfigDataFunc;
683 if (CpuFeature->SupportFunc !=
NULL) {
684 CpuFeatureEntry->SupportFunc = CpuFeature->SupportFunc;
687 if (CpuFeature->InitializeFunc !=
NULL) {
688 CpuFeatureEntry->InitializeFunc = CpuFeature->InitializeFunc;
691 if (CpuFeature->FeatureName !=
NULL) {
692 if (CpuFeatureEntry->FeatureName ==
NULL) {
693 CpuFeatureEntry->FeatureName =
AllocatePool (CPU_FEATURE_NAME_SIZE);
694 ASSERT (CpuFeatureEntry->FeatureName !=
NULL);
697 Status =
AsciiStrCpyS (CpuFeatureEntry->FeatureName, CPU_FEATURE_NAME_SIZE, CpuFeature->FeatureName);
702 if (CpuFeature->ThreadBeforeFeatureBitMask !=
NULL) {
703 if (CpuFeatureEntry->ThreadBeforeFeatureBitMask !=
NULL) {
704 FreePool (CpuFeatureEntry->ThreadBeforeFeatureBitMask);
707 CpuFeatureEntry->ThreadBeforeFeatureBitMask = CpuFeature->ThreadBeforeFeatureBitMask;
710 if (CpuFeature->ThreadAfterFeatureBitMask !=
NULL) {
711 if (CpuFeatureEntry->ThreadAfterFeatureBitMask !=
NULL) {
712 FreePool (CpuFeatureEntry->ThreadAfterFeatureBitMask);
715 CpuFeatureEntry->ThreadAfterFeatureBitMask = CpuFeature->ThreadAfterFeatureBitMask;
718 if (CpuFeature->CoreBeforeFeatureBitMask !=
NULL) {
719 if (CpuFeatureEntry->CoreBeforeFeatureBitMask !=
NULL) {
720 FreePool (CpuFeatureEntry->CoreBeforeFeatureBitMask);
723 CpuFeatureEntry->CoreBeforeFeatureBitMask = CpuFeature->CoreBeforeFeatureBitMask;
726 if (CpuFeature->CoreAfterFeatureBitMask !=
NULL) {
727 if (CpuFeatureEntry->CoreAfterFeatureBitMask !=
NULL) {
728 FreePool (CpuFeatureEntry->CoreAfterFeatureBitMask);
731 CpuFeatureEntry->CoreAfterFeatureBitMask = CpuFeature->CoreAfterFeatureBitMask;
734 if (CpuFeature->PackageBeforeFeatureBitMask !=
NULL) {
735 if (CpuFeatureEntry->PackageBeforeFeatureBitMask !=
NULL) {
736 FreePool (CpuFeatureEntry->PackageBeforeFeatureBitMask);
739 CpuFeatureEntry->PackageBeforeFeatureBitMask = CpuFeature->PackageBeforeFeatureBitMask;
742 if (CpuFeature->PackageAfterFeatureBitMask !=
NULL) {
743 if (CpuFeatureEntry->PackageAfterFeatureBitMask !=
NULL) {
744 FreePool (CpuFeatureEntry->PackageAfterFeatureBitMask);
747 CpuFeatureEntry->PackageAfterFeatureBitMask = CpuFeature->PackageAfterFeatureBitMask;
750 CpuFeatureEntry->BeforeAll = CpuFeature->BeforeAll;
751 CpuFeatureEntry->AfterAll = CpuFeature->AfterAll;
773 IN UINT8 **FeaturesBitMask,
778 UINT8 *CpuFeaturesBitMask;
780 ASSERT (FeaturesBitMask !=
NULL);
781 CpuFeaturesBitMask = *FeaturesBitMask;
782 if (CpuFeaturesBitMask ==
NULL) {
784 ASSERT (CpuFeaturesBitMask !=
NULL);
785 *FeaturesBitMask = CpuFeaturesBitMask;
788 CpuFeaturesBitMask += (Feature / 8);
789 *CpuFeaturesBitMask |= (UINT8)(1 << (Feature % 8));
841 IN CHAR8 *FeatureName OPTIONAL,
853 UINT8 *ThreadBeforeFeatureBitMask;
854 UINT8 *ThreadAfterFeatureBitMask;
855 UINT8 *CoreBeforeFeatureBitMask;
856 UINT8 *CoreAfterFeatureBitMask;
857 UINT8 *PackageBeforeFeatureBitMask;
858 UINT8 *PackageAfterFeatureBitMask;
864 ThreadBeforeFeatureBitMask =
NULL;
865 ThreadAfterFeatureBitMask =
NULL;
866 CoreBeforeFeatureBitMask =
NULL;
867 CoreAfterFeatureBitMask =
NULL;
868 PackageBeforeFeatureBitMask =
NULL;
869 PackageAfterFeatureBitMask =
NULL;
874 if (CpuFeaturesData->FeaturesCount == 0) {
882 CpuFeaturesData->BitMaskSize = (UINT32)
PcdGetSize (PcdCpuFeaturesSetting);
886 Feature =
VA_ARG (Marker, UINT32);
887 while (Feature != CPU_FEATURE_END) {
892 (Feature & (CPU_FEATURE_BEFORE_ALL | CPU_FEATURE_AFTER_ALL))
893 != (CPU_FEATURE_BEFORE_ALL | CPU_FEATURE_AFTER_ALL)
901 (Feature & (CPU_FEATURE_THREAD_BEFORE | CPU_FEATURE_THREAD_AFTER))
902 != (CPU_FEATURE_THREAD_BEFORE | CPU_FEATURE_THREAD_AFTER)
905 (Feature & (CPU_FEATURE_CORE_BEFORE | CPU_FEATURE_CORE_AFTER))
906 != (CPU_FEATURE_CORE_BEFORE | CPU_FEATURE_CORE_AFTER)
909 (Feature & (CPU_FEATURE_PACKAGE_BEFORE | CPU_FEATURE_PACKAGE_AFTER))
910 != (CPU_FEATURE_PACKAGE_BEFORE | CPU_FEATURE_PACKAGE_AFTER)
912 if (Feature < CPU_FEATURE_THREAD_BEFORE) {
913 BeforeAll = ((Feature & CPU_FEATURE_BEFORE_ALL) != 0) ?
TRUE :
FALSE;
914 AfterAll = ((Feature & CPU_FEATURE_AFTER_ALL) != 0) ?
TRUE :
FALSE;
915 Feature &= ~(CPU_FEATURE_BEFORE_ALL | CPU_FEATURE_AFTER_ALL);
916 ASSERT (FeatureMask ==
NULL);
918 }
else if ((Feature & CPU_FEATURE_THREAD_BEFORE) != 0) {
919 SetCpuFeaturesBitMask (&ThreadBeforeFeatureBitMask, Feature & ~CPU_FEATURE_THREAD_BEFORE, CpuFeaturesData->BitMaskSize);
920 }
else if ((Feature & CPU_FEATURE_THREAD_AFTER) != 0) {
921 SetCpuFeaturesBitMask (&ThreadAfterFeatureBitMask, Feature & ~CPU_FEATURE_THREAD_AFTER, CpuFeaturesData->BitMaskSize);
922 }
else if ((Feature & CPU_FEATURE_CORE_BEFORE) != 0) {
923 SetCpuFeaturesBitMask (&CoreBeforeFeatureBitMask, Feature & ~CPU_FEATURE_CORE_BEFORE, CpuFeaturesData->BitMaskSize);
924 }
else if ((Feature & CPU_FEATURE_CORE_AFTER) != 0) {
925 SetCpuFeaturesBitMask (&CoreAfterFeatureBitMask, Feature & ~CPU_FEATURE_CORE_AFTER, CpuFeaturesData->BitMaskSize);
926 }
else if ((Feature & CPU_FEATURE_PACKAGE_BEFORE) != 0) {
927 SetCpuFeaturesBitMask (&PackageBeforeFeatureBitMask, Feature & ~CPU_FEATURE_PACKAGE_BEFORE, CpuFeaturesData->BitMaskSize);
928 }
else if ((Feature & CPU_FEATURE_PACKAGE_AFTER) != 0) {
929 SetCpuFeaturesBitMask (&PackageAfterFeatureBitMask, Feature & ~CPU_FEATURE_PACKAGE_AFTER, CpuFeaturesData->BitMaskSize);
932 Feature =
VA_ARG (Marker, UINT32);
938 ASSERT (CpuFeature !=
NULL);
939 CpuFeature->Signature = CPU_FEATURE_ENTRY_SIGNATURE;
940 CpuFeature->FeatureMask = FeatureMask;
941 CpuFeature->ThreadBeforeFeatureBitMask = ThreadBeforeFeatureBitMask;
942 CpuFeature->ThreadAfterFeatureBitMask = ThreadAfterFeatureBitMask;
943 CpuFeature->CoreBeforeFeatureBitMask = CoreBeforeFeatureBitMask;
944 CpuFeature->CoreAfterFeatureBitMask = CoreAfterFeatureBitMask;
945 CpuFeature->PackageBeforeFeatureBitMask = PackageBeforeFeatureBitMask;
946 CpuFeature->PackageAfterFeatureBitMask = PackageAfterFeatureBitMask;
947 CpuFeature->BeforeAll = BeforeAll;
948 CpuFeature->AfterAll = AfterAll;
949 CpuFeature->GetConfigDataFunc = GetConfigDataFunc;
950 CpuFeature->SupportFunc = SupportFunc;
951 CpuFeature->InitializeFunc = InitializeFunc;
952 if (FeatureName !=
NULL) {
953 CpuFeature->FeatureName =
AllocatePool (CPU_FEATURE_NAME_SIZE);
954 ASSERT (CpuFeature->FeatureName !=
NULL);
955 Status =
AsciiStrCpyS (CpuFeature->FeatureName, CPU_FEATURE_NAME_SIZE, FeatureName);
979 UINTN NumberOfEnabledProcessors;
987 if (AcpiCpuData ==
NULL) {
989 if (AcpiCpuData ==
NULL) {
990 ASSERT (AcpiCpuData !=
NULL);
999 Status =
PcdSet64S (PcdCpuS3DataAddress, (UINT64)(
UINTN)AcpiCpuData);
1003 AcpiCpuData->NumberOfCpus = (UINT32)NumberOfCpus;
1006 if ((AcpiCpuData->CpuFeatureInitData.RegisterTable == 0) ||
1007 (AcpiCpuData->CpuFeatureInitData.PreSmmInitRegisterTable == 0))
1012 NumberOfCpus = AcpiCpuData->NumberOfCpus;
1015 if (RegisterTable ==
NULL) {
1018 ASSERT (RegisterTable !=
NULL);
1022 for (Index = 0; Index < NumberOfCpus; Index++) {
1026 RegisterTable[Index].InitialApicId = (UINT32)ProcessorInfoBuffer.
ProcessorId;
1027 RegisterTable[Index].TableLength = 0;
1028 RegisterTable[Index].AllocatedSize = 0;
1029 RegisterTable[Index].RegisterTableEntry = 0;
1031 RegisterTable[NumberOfCpus + Index].InitialApicId = (UINT32)ProcessorInfoBuffer.
ProcessorId;
1032 RegisterTable[NumberOfCpus + Index].TableLength = 0;
1033 RegisterTable[NumberOfCpus + Index].AllocatedSize = 0;
1034 RegisterTable[NumberOfCpus + Index].RegisterTableEntry = 0;
1037 if (AcpiCpuData->CpuFeatureInitData.RegisterTable == 0) {
1041 if (AcpiCpuData->CpuFeatureInitData.PreSmmInitRegisterTable == 0) {
1063 UsedPages = RegisterTable->AllocatedSize / EFI_PAGE_SIZE;
1065 ASSERT (Address != 0);
1071 if (RegisterTable->AllocatedSize > 0) {
1073 (VOID *)(
UINTN)Address,
1074 (VOID *)(
UINTN)RegisterTable->RegisterTableEntry,
1075 RegisterTable->AllocatedSize
1078 FreePages ((VOID *)(
UINTN)RegisterTable->RegisterTableEntry, UsedPages);
1084 RegisterTable->AllocatedSize += EFI_PAGE_SIZE;
1085 RegisterTable->RegisterTableEntry = Address;
1107 IN BOOLEAN PreSmmFlag,
1109 IN REGISTER_TYPE RegisterType,
1111 IN UINT8 ValidBitStart,
1112 IN UINT8 ValidBitLength,
1114 IN BOOLEAN TestThenWrite
1123 if (CpuFeaturesData->RegisterTable ==
NULL) {
1125 if (AcpiCpuData ==
NULL) {
1126 ASSERT (AcpiCpuData !=
NULL);
1130 ASSERT (AcpiCpuData->CpuFeatureInitData.RegisterTable != 0);
1132 CpuFeaturesData->PreSmmRegisterTable = (
CPU_REGISTER_TABLE *)(
UINTN)AcpiCpuData->CpuFeatureInitData.PreSmmInitRegisterTable;
1136 RegisterTable = &CpuFeaturesData->PreSmmRegisterTable[ProcessorNumber];
1138 RegisterTable = &CpuFeaturesData->RegisterTable[ProcessorNumber];
1149 RegisterTableEntry[RegisterTable->TableLength].RegisterType = RegisterType;
1150 RegisterTableEntry[RegisterTable->TableLength].Index = (UINT32)Index;
1151 RegisterTableEntry[RegisterTable->TableLength].HighIndex = (UINT32)
RShiftU64 (Index, 32);
1152 RegisterTableEntry[RegisterTable->TableLength].ValidBitStart = ValidBitStart;
1153 RegisterTableEntry[RegisterTable->TableLength].ValidBitLength = ValidBitLength;
1154 RegisterTableEntry[RegisterTable->TableLength].Value = Value;
1155 RegisterTableEntry[RegisterTable->TableLength].TestThenWrite = TestThenWrite;
1157 RegisterTable->TableLength++;
1178 IN REGISTER_TYPE RegisterType,
1180 IN UINT64 ValueMask,
1190 Length = End - Start + 1;
1212 IN REGISTER_TYPE RegisterType,
1214 IN UINT64 ValueMask,
1224 Length = End - Start + 1;
1246 IN REGISTER_TYPE RegisterType,
1248 IN UINT64 ValueMask,
1258 Length = End - Start + 1;
1275 IN UINT8 *CpuBitMask,
1280 if ((Feature >> 3) >= CpuBitMaskSize) {
1284 return ((*(CpuBitMask + (Feature >> 3)) & (1 << (Feature & 0x07))) != 0);
1308 (UINT8 *)
PcdGetPtr (PcdCpuFeaturesSupport),
1332 (UINT8 *)
PcdGetPtr (PcdCpuFeaturesSetting),
1354 CpuFeaturesData->BspNumber = ProcessorNumber;
BOOLEAN EFIAPI IsNull(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetPreviousNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI GetNextNode(IN CONST LIST_ENTRY *List, IN CONST LIST_ENTRY *Node)
LIST_ENTRY *EFIAPI InsertHeadList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
LIST_ENTRY *EFIAPI GetFirstNode(IN CONST LIST_ENTRY *List)
LIST_ENTRY *EFIAPI RemoveEntryList(IN CONST LIST_ENTRY *Entry)
UINT64 EFIAPI RShiftU64(IN UINT64 Operand, IN UINTN Count)
LIST_ENTRY *EFIAPI InitializeListHead(IN OUT LIST_ENTRY *ListHead)
INTN EFIAPI LowBitSet64(IN UINT64 Operand)
INTN EFIAPI HighBitSet64(IN UINT64 Operand)
RETURN_STATUS EFIAPI AsciiStrCpyS(OUT CHAR8 *Destination, IN UINTN DestMax, IN CONST CHAR8 *Source)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
CPU_FEATURES_DATA * GetCpuFeaturesData(VOID)
VOID GetNumberOfProcessor(OUT UINTN *NumberOfCpus, OUT UINTN *NumberOfEnabledProcessors)
EFI_STATUS GetProcessorInformation(IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer)
VOID EFIAPI FreePages(IN VOID *Buffer, IN UINTN Pages)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define VA_ARG(Marker, TYPE)
#define VA_START(Marker, Parameter)
#define ASSERT_EFI_ERROR(StatusParameter)
#define DEBUG(Expression)
#define PcdGetSize(TokenName)
#define PcdGet64(TokenName)
#define PcdSet64S(TokenName, Value)
#define PcdGetPtr(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID *EFIAPI AllocatePages(IN UINTN Pages)
VOID EFIAPI SwitchBspAfterFeaturesInitialize(IN UINTN ProcessorNumber)
BOOLEAN IsBitMaskMatchCheck(IN UINT8 *FeatureMask, IN UINT8 *DependentBitMask)
RETURN_STATUS RegisterCpuFeatureWorker(IN CPU_FEATURES_DATA *CpuFeaturesData, IN CPU_FEATURES_ENTRY *CpuFeature)
BOOLEAN InsertToBeforeEntry(IN LIST_ENTRY *FeatureList, IN LIST_ENTRY *CurrentEntry, IN UINT8 *FeatureMask)
STATIC VOID EnlargeRegisterTable(IN OUT CPU_REGISTER_TABLE *RegisterTable)
VOID EFIAPI CpuRegisterTableWrite(IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value)
BOOLEAN EFIAPI IsCpuFeatureInSetting(IN UINT32 Feature)
BOOLEAN InsertToAfterEntry(IN LIST_ENTRY *FeatureList, IN LIST_ENTRY *CurrentEntry, IN UINT8 *FeatureMask)
VOID CpuRegisterTableWriteWorker(IN BOOLEAN PreSmmFlag, IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT8 ValidBitStart, IN UINT8 ValidBitLength, IN UINT64 Value, IN BOOLEAN TestThenWrite)
VOID AdjustEntry(IN LIST_ENTRY *FeatureList, IN OUT LIST_ENTRY *FindEntry, IN OUT LIST_ENTRY *CurrentEntry, IN BOOLEAN Before)
BOOLEAN EFIAPI IsCpuFeatureSupported(IN UINT32 Feature)
VOID DumpCpuFeature(IN CPU_FEATURES_ENTRY *CpuFeature, IN UINT32 BitMaskSize)
VOID DumpCpuFeatureMask(IN UINT8 *FeatureMask, IN UINT32 BitMaskSize)
BOOLEAN AdjustFeaturesDependence(IN OUT CPU_FEATURES_ENTRY *PreviousFeature, IN OUT CPU_FEATURES_ENTRY *CurrentFeature, IN CPU_FEATURES_ENTRY *FindFeature, IN BOOLEAN Before)
VOID EFIAPI PreSmmCpuRegisterTableWrite(IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value)
VOID SetCpuFeaturesBitMask(IN UINT8 **FeaturesBitMask, IN UINT32 Feature, IN UINTN BitMaskSize)
CPU_FEATURE_DEPENDENCE_TYPE DetectNoneNeighborhoodFeatureScope(IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN LIST_ENTRY *FeatureList)
VOID CheckCpuFeaturesDependency(IN LIST_ENTRY *FeatureList)
VOID EFIAPI CpuRegisterTableTestThenWrite(IN UINTN ProcessorNumber, IN REGISTER_TYPE RegisterType, IN UINT64 Index, IN UINT64 ValueMask, IN UINT64 Value)
ACPI_CPU_DATA * GetAcpiCpuData(VOID)
BOOLEAN FindSpecifyFeature(IN LIST_ENTRY *FeatureList, IN LIST_ENTRY *CurrentEntry, IN BOOLEAN SearchFormer, IN UINT8 *FeatureMask)
CPU_FEATURE_DEPENDENCE_TYPE DetectFeatureScope(IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN UINT8 *NextCpuFeatureMask)
BOOLEAN IsCpuFeatureSetInCpuPcd(IN UINT8 *CpuBitMask, IN UINTN CpuBitMaskSize, IN UINT32 Feature)
RETURN_STATUS EFIAPI RegisterCpuFeature(IN CHAR8 *FeatureName OPTIONAL, IN CPU_FEATURE_GET_CONFIG_DATA GetConfigDataFunc OPTIONAL, IN CPU_FEATURE_SUPPORT SupportFunc OPTIONAL, IN CPU_FEATURE_INITIALIZE InitializeFunc OPTIONAL,...)
RETURN_STATUS(EFIAPI * CPU_FEATURE_INITIALIZE)(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL, IN BOOLEAN State)
BOOLEAN(EFIAPI * CPU_FEATURE_SUPPORT)(IN UINTN ProcessorNumber, IN REGISTER_CPU_FEATURE_INFORMATION *CpuInfo, IN VOID *ConfigData OPTIONAL)
VOID *(EFIAPI * CPU_FEATURE_GET_CONFIG_DATA)(IN UINTN NumberOfProcessors)
SPIN_LOCK *EFIAPI InitializeSpinLock(OUT SPIN_LOCK *SpinLock)
UINT64 EFI_PHYSICAL_ADDRESS
#define EFI_SIZE_TO_PAGES(Size)