[edk2] [PATCH] UefiCpuPkg: Singularize function name

Song, BinX posted 1 patch 7 years ago
Failed in applying to current master (apply log)
.../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++-----------
.../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  8 ++--
2 files changed, 28 insertions(+), 28 deletions(-)
[edk2] [PATCH] UefiCpuPkg: Singularize function name
Posted by Song, BinX 7 years ago
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>
---
 .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++-----------
 .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  8 ++--
 2 files changed, 28 insertions(+), 28 deletions(-)

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;
-- 
2.10.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] UefiCpuPkg: Singularize function name
Posted by Laszlo Ersek 7 years ago
On 12/11/17 09:16, Song, BinX wrote:
> 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>
> ---
>  .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++-----------
>  .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  8 ++--
>  2 files changed, 28 insertions(+), 28 deletions(-)
> 
> 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;
> 

Reviewed-by: Laszlo Ersek <lersek@redhat.com>
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH] UefiCpuPkg: Singularize function name
Posted by Dong, Eric 7 years ago
Reviewed-by: Eric Dong <eric.dong@intel.com>

-----Original Message-----
From: Song, BinX 
Sent: Monday, December 11, 2017 4:17 PM
To: edk2-devel@lists.01.org
Cc: Dong, Eric; lersek@redhat.com
Subject: [PATCH] UefiCpuPkg: Singularize function name

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>
---
 .../RegisterCpuFeaturesLib/CpuFeaturesInitialize.c | 48 +++++++++++-----------
 .../RegisterCpuFeaturesLib/RegisterCpuFeatures.h   |  8 ++--
 2 files changed, 28 insertions(+), 28 deletions(-)

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;
--
2.10.2.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel