]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg: Singularize function name
authorSong, BinX <binx.song@intel.com>
Mon, 11 Dec 2017 08:16:54 +0000 (16:16 +0800)
committerEric Dong <eric.dong@intel.com>
Fri, 15 Dec 2017 05:08:25 +0000 (13:08 +0800)
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>
UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
UefiCpuPkg/Library/RegisterCpuFeaturesLib/RegisterCpuFeatures.h

index b8f76f1ce6fe46878b10d4f220b832fe82c02bce..d72ffecf73da1a44199243a4b283c063df3d909b 100644 (file)
@@ -56,7 +56,7 @@ SetSettingPcd (
   @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
-GetSupportPcds (\r
+GetSupportPcd (\r
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
@@ -77,7 +77,7 @@ GetSupportPcds (
   @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
+GetConfigurationPcd (\r
   VOID\r
   )\r
 {\r
   VOID\r
   )\r
 {\r
@@ -180,8 +180,8 @@ CpuInitDataInitialize (
   //\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
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
@@ -321,7 +321,7 @@ CollectProcessorData (
   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
@@ -444,29 +444,29 @@ AnalysisProcessorFeatures (
   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
@@ -476,8 +476,8 @@ AnalysisProcessorFeatures (
     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
@@ -489,13 +489,13 @@ AnalysisProcessorFeatures (
       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
@@ -506,7 +506,7 @@ AnalysisProcessorFeatures (
       // 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
@@ -520,13 +520,13 @@ AnalysisProcessorFeatures (
     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
@@ -553,7 +553,7 @@ AnalysisProcessorFeatures (
     // 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
index 7731f885b362d3501e78fde07707a8f2cb265ae4..69b412172a44014de9f66e56fbedd1b178ed05c7 100644 (file)
@@ -59,10 +59,10 @@ typedef struct {
   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