Change GetSupportPcds and GetConfigurationPcds to be singular
Cc: Eric Dong <eric.dong@intel.com>
Cc: Laszlo Ersek <lersek@redhat.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Bell Song <binx.song@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
@return The pointer to CPU feature bits mask buffer.\r
**/\r
UINT8 *\r
@return The pointer to CPU feature bits mask buffer.\r
**/\r
UINT8 *\r
@return The pointer to CPU feature bits mask buffer.\r
**/\r
UINT8 *\r
@return The pointer to CPU feature bits mask buffer.\r
**/\r
UINT8 *\r
-GetConfigurationPcds (\r
//\r
// Get support and configuration PCDs\r
//\r
//\r
// Get support and configuration PCDs\r
//\r
- CpuFeaturesData->SupportPcds = GetSupportPcds ();\r
- CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds ();\r
+ CpuFeaturesData->SupportPcd = GetSupportPcd ();\r
+ CpuFeaturesData->ConfigurationPcd = GetConfigurationPcd ();\r
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);\r
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);\r
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
- if (IsBitMaskMatch (CpuFeaturesData->SupportPcds, CpuFeature->FeatureMask)) {\r
+ if (IsBitMaskMatch (CpuFeaturesData->SupportPcd, CpuFeature->FeatureMask)) {\r
if (CpuFeature->SupportFunc == NULL) {\r
//\r
// If SupportFunc is NULL, then the feature is supported.\r
if (CpuFeature->SupportFunc == NULL) {\r
//\r
// If SupportFunc is NULL, then the feature is supported.\r
CPU_FEATURES_DATA *CpuFeaturesData;\r
\r
CpuFeaturesData = GetCpuFeaturesData ();\r
CPU_FEATURES_DATA *CpuFeaturesData;\r
\r
CpuFeaturesData = GetCpuFeaturesData ();\r
- CpuFeaturesData->CapabilityPcds = AllocatePool (CpuFeaturesData->BitMaskSize);\r
- ASSERT (CpuFeaturesData->CapabilityPcds != NULL);\r
- SetMem (CpuFeaturesData->CapabilityPcds, CpuFeaturesData->BitMaskSize, 0xFF);\r
+ CpuFeaturesData->CapabilityPcd = AllocatePool (CpuFeaturesData->BitMaskSize);\r
+ ASSERT (CpuFeaturesData->CapabilityPcd != NULL);\r
+ SetMem (CpuFeaturesData->CapabilityPcd, CpuFeaturesData->BitMaskSize, 0xFF);\r
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {\r
CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber];\r
//\r
// Calculate the last capability on all processors\r
//\r
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {\r
CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber];\r
//\r
// Calculate the last capability on all processors\r
//\r
- SupportedMaskAnd (CpuFeaturesData->CapabilityPcds, CpuInitOrder->FeaturesSupportedMask);\r
+ SupportedMaskAnd (CpuFeaturesData->CapabilityPcd, CpuInitOrder->FeaturesSupportedMask);\r
}\r
//\r
// Calculate the last setting\r
//\r
\r
}\r
//\r
// Calculate the last setting\r
//\r
\r
- CpuFeaturesData->SettingPcds = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcds);\r
- ASSERT (CpuFeaturesData->SettingPcds != NULL);\r
- SupportedMaskAnd (CpuFeaturesData->SettingPcds, CpuFeaturesData->ConfigurationPcds);\r
+ CpuFeaturesData->SettingPcd = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcd);\r
+ ASSERT (CpuFeaturesData->SettingPcd != NULL);\r
+ SupportedMaskAnd (CpuFeaturesData->SettingPcd, CpuFeaturesData->ConfigurationPcd);\r
\r
//\r
// Save PCDs and display CPU PCDs\r
//\r
\r
//\r
// Save PCDs and display CPU PCDs\r
//\r
- SetCapabilityPcd (CpuFeaturesData->CapabilityPcds);\r
- SetSettingPcd (CpuFeaturesData->SettingPcds);\r
+ SetCapabilityPcd (CpuFeaturesData->CapabilityPcd);\r
+ SetSettingPcd (CpuFeaturesData->SettingPcd);\r
\r
//\r
// Dump the last CPU feature list\r
\r
//\r
// Dump the last CPU feature list\r
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);\r
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
Entry = GetFirstNode (&CpuFeaturesData->FeatureList);\r
while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) {\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
- if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {\r
- if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcds)) {\r
+ if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {\r
+ if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcd)) {\r
DEBUG ((DEBUG_INFO, "[Enable ] "));\r
} else {\r
DEBUG ((DEBUG_INFO, "[Disable ] "));\r
DEBUG ((DEBUG_INFO, "[Enable ] "));\r
} else {\r
DEBUG ((DEBUG_INFO, "[Disable ] "));\r
Entry = Entry->ForwardLink;\r
}\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n"));\r
Entry = Entry->ForwardLink;\r
}\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n"));\r
- DumpCpuFeatureMask (CpuFeaturesData->SupportPcds);\r
+ DumpCpuFeatureMask (CpuFeaturesData->SupportPcd);\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n"));\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n"));\r
- DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcds);\r
+ DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcd);\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n"));\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n"));\r
- DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcds);\r
+ DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcd);\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n"));\r
DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n"));\r
- DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);\r
+ DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);\r
);\r
\r
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {\r
);\r
\r
for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) {\r
// Insert each feature into processor's order list\r
//\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
// Insert each feature into processor's order list\r
//\r
CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
- if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) {\r
+ if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) {\r
CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature);\r
ASSERT (CpuFeatureInOrder != NULL);\r
InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link);\r
CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature);\r
ASSERT (CpuFeatureInOrder != NULL);\r
InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link);\r
Entry = GetFirstNode (&CpuInitOrder->OrderList);\r
while (!IsNull (&CpuInitOrder->OrderList, Entry)) {\r
CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
Entry = GetFirstNode (&CpuInitOrder->OrderList);\r
while (!IsNull (&CpuInitOrder->OrderList, Entry)) {\r
CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry);\r
- if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcds)) {\r
+ if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcd)) {\r
Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE);\r
if (EFI_ERROR (Status)) {\r
//\r
// Clean the CpuFeatureInOrder->FeatureMask in setting PCD.\r
//\r
Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE);\r
if (EFI_ERROR (Status)) {\r
//\r
// Clean the CpuFeatureInOrder->FeatureMask in setting PCD.\r
//\r
- SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureInOrder->FeatureMask);\r
+ SupportedMaskCleanBit (CpuFeaturesData->SettingPcd, CpuFeatureInOrder->FeatureMask);\r
if (CpuFeatureInOrder->FeatureName != NULL) {\r
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));\r
} else {\r
if (CpuFeatureInOrder->FeatureName != NULL) {\r
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName));\r
} else {\r
// again during initialize the features.\r
//\r
DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n"));\r
// again during initialize the features.\r
//\r
DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n"));\r
- DumpCpuFeatureMask (CpuFeaturesData->SettingPcds);\r
+ DumpCpuFeatureMask (CpuFeaturesData->SettingPcd);\r
\r
//\r
// Dump the RegisterTable\r
\r
//\r
// Dump the RegisterTable\r
LIST_ENTRY FeatureList;\r
\r
CPU_FEATURES_INIT_ORDER *InitOrder;\r
LIST_ENTRY FeatureList;\r
\r
CPU_FEATURES_INIT_ORDER *InitOrder;\r
- UINT8 *SupportPcds;\r
- UINT8 *CapabilityPcds;\r
- UINT8 *ConfigurationPcds;\r
- UINT8 *SettingPcds;\r
+ UINT8 *SupportPcd;\r
+ UINT8 *CapabilityPcd;\r
+ UINT8 *ConfigurationPcd;\r
+ UINT8 *SettingPcd;\r
\r
CPU_REGISTER_TABLE *RegisterTable;\r
CPU_REGISTER_TABLE *PreSmmRegisterTable;\r
\r
CPU_REGISTER_TABLE *RegisterTable;\r
CPU_REGISTER_TABLE *PreSmmRegisterTable;\r