From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Permerror (SPF Permanent Error: More than 10 MX records returned) identity=mailfrom; client-ip=192.55.52.88; helo=mga01.intel.com; envelope-from=eric.dong@intel.com; receiver=edk2-devel@lists.01.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) (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 A276B220FB322 for ; Mon, 11 Dec 2017 00:19:50 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2017 00:24:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,391,1508828400"; d="scan'208";a="183168445" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga005.jf.intel.com with ESMTP; 11 Dec 2017 00:24:26 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 00:24:26 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 11 Dec 2017 00:24:25 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.93]) with mapi id 14.03.0319.002; Mon, 11 Dec 2017 16:24:24 +0800 From: "Dong, Eric" To: "Song, BinX" , "edk2-devel@lists.01.org" CC: "lersek@redhat.com" Thread-Topic: [PATCH] UefiCpuPkg: Singularize function name Thread-Index: AdNyWGanPD1XzEXwSZy6jXpjtcQjggAAQR9Q Date: Mon, 11 Dec 2017 08:24:23 +0000 Message-ID: References: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CCA@shsmsx102.ccr.corp.intel.com> In-Reply-To: <559D2DF22BC9A3468B4FA1AA547F0EF1025C1CCA@shsmsx102.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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 08:19:50 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Eric Dong -----Original Message----- From: Song, BinX=20 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 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/CpuFeaturesInitializ= e.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 =3D GetSupportPcds (); - CpuFeaturesData->ConfigurationPcds =3D GetConfigurationPcds (); + CpuFeaturesData->SupportPcd =3D GetSupportPcd (); + CpuFeaturesData->ConfigurationPcd =3D GetConfigurationPcd (); } =20 /** @@ -321,7 +321,7 @@ CollectProcessorData ( Entry =3D GetFirstNode (&CpuFeaturesData->FeatureList); while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) { CpuFeature =3D CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeaturesData->SupportPcds, CpuFeature->FeatureM= ask)) { + if (IsBitMaskMatch (CpuFeaturesData->SupportPcd,=20 + CpuFeature->FeatureMask)) { if (CpuFeature->SupportFunc =3D=3D NULL) { // // If SupportFunc is NULL, then the feature is supported. @@ -444,29 +444,29 @@ AnalysisProcessorFeatures ( CPU_FEATURES_DATA *CpuFeaturesData; =20 CpuFeaturesData =3D GetCpuFeaturesData (); - CpuFeaturesData->CapabilityPcds =3D AllocatePool (CpuFeaturesData->BitMa= skSize); - ASSERT (CpuFeaturesData->CapabilityPcds !=3D NULL); - SetMem (CpuFeaturesData->CapabilityPcds, CpuFeaturesData->BitMaskSize, 0= xFF); + CpuFeaturesData->CapabilityPcd =3D AllocatePool=20 + (CpuFeaturesData->BitMaskSize); ASSERT=20 + (CpuFeaturesData->CapabilityPcd !=3D NULL); SetMem=20 + (CpuFeaturesData->CapabilityPcd, CpuFeaturesData->BitMaskSize, 0xFF); for (ProcessorNumber =3D 0; ProcessorNumber < NumberOfCpus; ProcessorNum= ber++) { CpuInitOrder =3D &CpuFeaturesData->InitOrder[ProcessorNumber]; // // Calculate the last capability on all processors // - SupportedMaskAnd (CpuFeaturesData->CapabilityPcds, CpuInitOrder->Featu= resSupportedMask); + SupportedMaskAnd (CpuFeaturesData->CapabilityPcd,=20 + CpuInitOrder->FeaturesSupportedMask); } // // Calculate the last setting // =20 - CpuFeaturesData->SettingPcds =3D AllocateCopyPool (CpuFeaturesData->BitM= askSize, CpuFeaturesData->CapabilityPcds); - ASSERT (CpuFeaturesData->SettingPcds !=3D NULL); - SupportedMaskAnd (CpuFeaturesData->SettingPcds, CpuFeaturesData->Configu= rationPcds); + CpuFeaturesData->SettingPcd =3D AllocateCopyPool=20 + (CpuFeaturesData->BitMaskSize, CpuFeaturesData->CapabilityPcd); =20 + ASSERT (CpuFeaturesData->SettingPcd !=3D NULL); SupportedMaskAnd=20 + (CpuFeaturesData->SettingPcd, CpuFeaturesData->ConfigurationPcd); =20 // // Save PCDs and display CPU PCDs // - SetCapabilityPcd (CpuFeaturesData->CapabilityPcds); - SetSettingPcd (CpuFeaturesData->SettingPcds); + SetCapabilityPcd (CpuFeaturesData->CapabilityPcd); SetSettingPcd=20 + (CpuFeaturesData->SettingPcd); =20 // // Dump the last CPU feature list @@ -476,8 +476,8 @@ AnalysisProcessorFeatures ( Entry =3D GetFirstNode (&CpuFeaturesData->FeatureList); while (!IsNull (&CpuFeaturesData->FeatureList, Entry)) { CpuFeature =3D CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->Capabi= lityPcds)) { - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->Sett= ingPcds)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->Capabi= lityPcd)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask,=20 + CpuFeaturesData->SettingPcd)) { DEBUG ((DEBUG_INFO, "[Enable ] ")); } else { DEBUG ((DEBUG_INFO, "[Disable ] ")); @@ -489,13 +489,13 @@ Anal= ysisProcessorFeatures ( Entry =3D 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); ); =20 for (ProcessorNumber =3D 0; ProcessorNumber < NumberOfCpus; ProcessorNum= ber++) { @@ -506,7 +506,7 @@ AnalysisProcessorFeatures ( // Insert each feature into processor's order list // CpuFeature =3D CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeature->FeatureMask, CpuFeaturesData->Capabi= lityPcds)) { + if (IsBitMaskMatch (CpuFeature->FeatureMask,=20 + CpuFeaturesData->CapabilityPcd)) { CpuFeatureInOrder =3D AllocateCopyPool (sizeof (CPU_FEATURES_ENTRY= ), CpuFeature); ASSERT (CpuFeatureInOrder !=3D NULL); InsertTailList (&CpuInitOrder->OrderList, &CpuFeatureInOrder->Link= ); @@ -520,13 +520,13 @@ AnalysisProcessorFeatures ( Entry =3D GetFirstNode (&CpuInitOrder->OrderList); while (!IsNull (&CpuInitOrder->OrderList, Entry)) { CpuFeatureInOrder =3D CPU_FEATURE_ENTRY_FROM_LINK (Entry); - if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask, CpuFeaturesData-= >SettingPcds)) { + if (IsBitMaskMatch (CpuFeatureInOrder->FeatureMask,=20 + CpuFeaturesData->SettingPcd)) { Status =3D CpuFeatureInOrder->InitializeFunc (ProcessorNumber, Cpu= Info, CpuFeatureInOrder->ConfigData, TRUE); if (EFI_ERROR (Status)) { // // Clean the CpuFeatureInOrder->FeatureMask in setting PCD. // - SupportedMaskCleanBit (CpuFeaturesData->SettingPcds, CpuFeatureI= nOrder->FeatureMask); + SupportedMaskCleanBit (CpuFeaturesData->SettingPcd,=20 + CpuFeatureInOrder->FeatureMask); if (CpuFeatureInOrder->FeatureName !=3D NULL) { DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature: Name= =3D %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); =20 // // 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; =20 CPU_FEATURES_INIT_ORDER *InitOrder; - UINT8 *SupportPcds; - UINT8 *CapabilityPcds; - UINT8 *ConfigurationPcds; - UINT8 *SettingPcds; + UINT8 *SupportPcd; + UINT8 *CapabilityPcd; + UINT8 *ConfigurationPcd; + UINT8 *SettingPcd; =20 CPU_REGISTER_TABLE *RegisterTable; CPU_REGISTER_TABLE *PreSmmRegisterTable; -- 2.10.2.windows.1