From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: eric.dong@intel.com) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by groups.io with SMTP; Thu, 11 Jul 2019 18:53:23 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Jul 2019 18:53:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,480,1557212400"; d="scan'208";a="249985058" Received: from ydong10-win10.ccr.corp.intel.com ([10.239.158.133]) by orsmga001.jf.intel.com with ESMTP; 11 Jul 2019 18:53:20 -0700 From: "Dong, Eric" To: devel@edk2.groups.io Cc: Ray Ni , Laszlo Ersek , Chandana Kumar , Star Zeng Subject: [Patch 0/2] UefiCpuPkg/RegisterCpuFeaturesLib: Avoid AP calls gBS service. Date: Fri, 12 Jul 2019 09:53:06 +0800 Message-Id: <20190712015308.26492-1-eric.dong@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 gBS service. UefiCpuPkg/Library/RegisterCpuFeaturesLib: avoid use dynamic PCD. .../CpuFeaturesInitialize.c | 77 ++++++------- .../RegisterCpuFeatures.h | 10 +- .../RegisterCpuFeaturesLib.c | 109 +++++++----------- 3 files changed, 85 insertions(+), 111 deletions(-) -- 2.21.0.windows.1