From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E95302214E338 for ; Mon, 11 Dec 2017 08:28:43 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4869E642; Mon, 11 Dec 2017 16:33:21 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-121-17.rdu2.redhat.com [10.10.121.17]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4562E17563; Mon, 11 Dec 2017 16:33:20 +0000 (UTC) To: "Song, BinX" , "edk2-devel@lists.01.org" Cc: "Dong, Eric" References: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CCA@shsmsx102.ccr.corp.intel.com> From: Laszlo Ersek Message-ID: Date: Mon, 11 Dec 2017 17:33:19 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CCA@shsmsx102.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Mon, 11 Dec 2017 16:33:21 +0000 (UTC) Subject: Re: [PATCH] UefiCpuPkg: Singularize function name X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Dec 2017 16:28:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 12/11/17 09:16, Song, BinX wrote: > 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 > --- > .../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