From 7d3a7c22a63b212e4a7a5db81937564aa8dac6a0 Mon Sep 17 00:00:00 2001 From: "Song, BinX" Date: Mon, 11 Dec 2017 16:16:54 +0800 Subject: UefiCpuPkg: Singularize function name Change GetSupportPcds and GetConfigurationPcds to be singular Cc: Eric Dong Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bell Song Reviewed-by: Eric Dong Reviewed-by: Laszlo Ersek --- .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++----------- .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h | 8 ++-- 2 files changed, 28 insertions(+), 28 deletions(-) (limited to 'UefiCpuPkg') diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c index b8f76f1..d72ffec 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c @@ -56,7 +56,7 @@ SetSettingPcd ( @return The pointer to CPU feature bits mask buffer. **/ UINT8 * -GetSupportPcds ( +GetSupportPcd ( VOID ) { @@ -77,7 +77,7 @@ GetSupportPcds ( @return The pointer to CPU feature bits mask buffer. **/ UINT8 * -GetConfigurationPcds ( +GetConfigurationPcd ( VOID ) { @@ -180,8 +180,8 @@ CpuInitDataInitialize ( // // Get support and configuration PCDs // - CpuFeaturesData->SupportPcds = GetSupportPcds (); - CpuFeaturesData->ConfigurationPcds = GetConfigurationPcds (); + CpuFeaturesData->SupportPcd = GetSupportPcd (); + CpuFeaturesData->ConfigurationPcd = GetConfigurationPcd (); } /** @@ -321,7 +321,7 @@ CollectProcessorData ( Entry = GetFirstNode (&CpuFeaturesData->FeatureList); while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) { CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeaturesData->SupportPcds, CpuFeature->FeatureMask)) { + if (IsBitMaskMatch (CpuFeaturesData->SupportPcd, CpuFeature->FeatureMask)) { if (CpuFeature->SupportFunc == NULL) { // // If SupportFunc is NULL, then the feature is supported. @@ -444,29 +444,29 @@ AnalysisProcessorFeatures ( CPU_FEATURES_DATA *CpuFeaturesData; CpuFeaturesData = GetCpuFeaturesData (); - CpuFeaturesData->CapabilityPcds = AllocatePool (CpuFeaturesData->BitMaskSize); - ASSERT (CpuFeaturesData->CapabilityPcds != NULL); - SetMem (CpuFeaturesData->CapabilityPcds, CpuFeaturesData->BitMaskSize, 0xFF); + CpuFeaturesData->CapabilityPcd = AllocatePool (CpuFeaturesData->BitMaskSize); + ASSERT (CpuFeaturesData->CapabilityPcd != NULL); + SetMem (CpuFeaturesData->CapabilityPcd, CpuFeaturesData->BitMaskSize, 0xFF); for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) { CpuInitOrder = &CpuFeaturesData->InitOrder[ProcessorNumber]; // // Calculate the last capability on all processors // - SupportedMaskAnd (CpuFeaturesData->CapabilityPcds, CpuInitOrder->FeaturesSupportedMask); + SupportedMaskAnd (CpuFeaturesData->CapabilityPcd, CpuInitOrder->FeaturesSupportedMask); } // // Calculate the last setting // - CpuFeaturesData->SettingPcds = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcds); - ASSERT (CpuFeaturesData->SettingPcds != NULL); - SupportedMaskAnd (CpuFeaturesData->SettingPcds, CpuFeaturesData->ConfigurationPcds); + CpuFeaturesData->SettingPcd = AllocateCopyPool (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcd); + ASSERT (CpuFeaturesData->SettingPcd != NULL); + SupportedMaskAnd (CpuFeaturesData->SettingPcd, CpuFeaturesData->ConfigurationPcd); // // Save PCDs and display CPU PCDs // - SetCapabilityPcd (CpuFeaturesData->CapabilityPcds); - SetSettingPcd (CpuFeaturesData->SettingPcds); + SetCapabilityPcd (CpuFeaturesData->CapabilityPcd); + SetSettingPcd (CpuFeaturesData->SettingPcd); // // Dump the last CPU feature list @@ -476,8 +476,8 @@ AnalysisProcessorFeatures ( Entry = GetFirstNode (&CpuFeaturesData->FeatureList); while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) { CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) { - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcds)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->SettingPcd)) { DEBUG ((DEBUG_INFO, "[Enable ] ")); } else { DEBUG ((DEBUG_INFO, "[Disable ] ")); @@ -489,13 +489,13 @@ AnalysisProcessorFeatures ( Entry = Entry->ForwardLink; } DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSupport:\n")); - DumpCpuFeatureMask (CpuFeaturesData->SupportPcds); + DumpCpuFeatureMask (CpuFeaturesData->SupportPcd); DEBUG ((DEBUG_INFO, "PcdCpuFeaturesUserConfiguration:\n")); - DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcds); + DumpCpuFeatureMask (CpuFeaturesData->ConfigurationPcd); DEBUG ((DEBUG_INFO, "PcdCpuFeaturesCapability:\n")); - DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcds); + DumpCpuFeatureMask (CpuFeaturesData->CapabilityPcd); DEBUG ((DEBUG_INFO, "PcdCpuFeaturesSetting:\n")); - DumpCpuFeatureMask (CpuFeaturesData->SettingPcds); + DumpCpuFeatureMask (CpuFeaturesData->SettingPcd); ); for (ProcessorNumber = 0; ProcessorNumber < NumberOfCpus; ProcessorNumber++) { @@ -506,7 +506,7 @@ AnalysisProcessorFeatures ( // Insert each feature into processor's order list // CpuFeature = CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcds)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->CapabilityPcd)) { CpuFeatureInOrder = AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY), CpuFeature); ASSERT (CpuFeatureInOrder != NULL); InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link); @@ -520,13 +520,13 @@ AnalysisProcessorFeatures ( Entry = GetFirstNode (&CpuInitOrder->OrderList); while (!IsNull (&CpuInitOrder->OrderList, Entry)) { CpuFeatureInOrder = CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcds)) { + if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData->SettingPcd)) { Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, TRUE); if (EFI_ERROR (Status)) { // // Clean the CpuFeatureInOrder->FeatureMask in setting PCD. // - SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureInOrder->FeatureMask); + SupportedMaskCleanBit (CpuFeaturesData->SettingPcd, CpuFeatureInOrder->FeatureMask); if (CpuFeatureInOrder->FeatureName != NULL) { DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name = %a.\n", CpuFeatureInOrder->FeatureName)); } else { @@ -553,7 +553,7 @@ AnalysisProcessorFeatures ( // again during initialize the features. // DEBUG ((DEBUG_INFO, "Dump final value for PcdCpuFeaturesSetting:\n")); - DumpCpuFeatureMask (CpuFeaturesData->SettingPcds); + DumpCpuFeatureMask (CpuFeaturesData->SettingPcd); // // Dump the RegisterTable diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h index 7731f88..69b4121 100644 --- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h +++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h @@ -59,10 +59,10 @@ typedef struct { LIST_ENTRY FeatureList; CPU_FEATURES_INIT_ORDER *InitOrder; - UINT8 *SupportPcds; - UINT8 *CapabilityPcds; - UINT8 *ConfigurationPcds; - UINT8 *SettingPcds; + UINT8 *SupportPcd; + UINT8 *CapabilityPcd; + UINT8 *ConfigurationPcd; + UINT8 *SettingPcd; CPU_REGISTER_TABLE *RegisterTable; CPU_REGISTER_TABLE *PreSmmRegisterTable; -- cgit v1.1