From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: eric.dong@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Mon, 15 Jul 2019 00:01:03 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jul 2019 00:01:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,493,1557212400"; d="scan'208";a="318596602" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.133]) by orsmga004.jf.intel.com with ESMTP; 15 Jul 2019 00:01:01 -0700 From: "Dong, Eric" To: devel@edk2.groups.io Cc: Ray Ni , Laszlo Ersek , Chandana Kumar , Star Zeng Subject: [Patch v2 0/2] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiServices table. Date: Mon, 15 Jul 2019 15:00:54 +0800 Message-Id: <20190715070056.25916-1-eric.dong@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit V2 Changes: 1. Revert IsBitMaskMatchCheck change which is not correct. 2. refine some variable name. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1972 AP calls CollectProcessorData() to collect processor info. CollectProcessorData function finally calls PcdGetSize function to get DynamicPCD PcdCpuFeaturesSetting value. PcdGetSize will use gBS which caused ASSERT. This patch serial fixes the issue and enhances the related code to avoid later report this issue again. Cc: Ray Ni Cc: Laszlo Ersek Cc: Chandana Kumar Cc: Star Zeng Eric Dong (2): UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls PeiServices table. UefiCpuPkg/Library/RegisterCpuFeaturesLib: avoid use dynamic PCD. .../CpuFeaturesInitialize.c | 77 +++++++++---------- .../RegisterCpuFeatures.h | 10 ++- .../RegisterCpuFeaturesLib.c | 74 +++++++++--------- 3 files changed, 84 insertions(+), 77 deletions(-) -- 2.21.0.windows.1