From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web10.14246.1595316644454070687 for ; Tue, 21 Jul 2020 00:30:44 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ianx.kuo@intel.com) IronPort-SDR: 3Q1EGO0U1Os5ti1ctT3zLz+wEGZwG9w5RiXDu0RZHfdmFQp044K60+YKNx9l3dW7CQOhn6LuJF nQ3vVxfee2eg== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="150066628" X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="150066628" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2020 00:30:44 -0700 IronPort-SDR: opZ9TTssKbg0gha8fsPTCVAM/9gYgnPzGz8CHS/JWNV8DA+umFaixcynq2Maj+oR9MIbsyFPOX H1XIa9zOH4+Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,378,1589266800"; d="scan'208";a="362275711" Received: from ikuox-mobl1.gar.corp.intel.com ([10.5.244.14]) by orsmga001.jf.intel.com with ESMTP; 21 Jul 2020 00:30:41 -0700 From: "IanX Kuo" To: devel@edk2.groups.io Cc: james.lu@intel.com, chandana.c.kumar@intel.com, varalakshmi.a.prabhala@intel.com, liming.gao@intel.com, IanX Kuo , Sai Chaganty , Chasel Chiu Subject: [edk2-platforms] [PATCH v8 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib Date: Tue, 21 Jul 2020 15:30:39 +0800 Message-Id: X-Mailer: git-send-email 2.26.2.windows.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Create a Library instance of ReportCpuHobLib from PlatformInitPei driver. PA bits reported can be overridden by Library instance in Platform. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 Signed-off-by: IanX Kuo Cc: Sai Chaganty Cc: Chasel Chiu --- .../Intel/MinPlatformPkg/MinPlatformPkg.dsc | 1 + .../PlatformInitPei/PlatformInitPreMem.c | 25 ++----------------- .../PlatformInitPei/PlatformInitPreMem.inf | 3 ++- 3 files changed, 5 insertions(+), 24 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index 13a0fda272..112ddff7d9 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -92,6 +92,7 @@ #=0D FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPla= tformLib/PeiFspWrapperPlatformLib.inf=0D ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReport= FvLib.inf=0D + ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Repo= rtCpuHobLib.inf=0D TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestP= ointCheckLib.inf=0D TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.in= f=0D SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNu= ll.inf=0D diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Pla= tformInitPreMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInit= Pei/PlatformInitPreMem.c index efdeb6a91c..48cbe0dfbe 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformIn= itPreMem.c +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformIn= itPreMem.c @@ -1,7 +1,7 @@ /** @file=0D Source code file for Platform Init Pre-Memory PEI module=0D =0D -Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
=0D +Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
=0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D **/=0D @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include =0D #include =0D #include =0D +#include =0D #include =0D #include =0D #include =0D @@ -355,28 +356,6 @@ Done: return EFI_SUCCESS;=0D }=0D =0D -VOID=0D -ReportCpuHob (=0D - VOID=0D - )=0D -{=0D - UINT8 PhysicalAddressBits;=0D - UINT32 RegEax;=0D -=0D - AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL);=0D - if (RegEax >=3D 0x80000008) {=0D - AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL);=0D - PhysicalAddressBits =3D (UINT8) RegEax;=0D - } else {=0D - PhysicalAddressBits =3D 36;=0D - }=0D -=0D - ///=0D - /// Create a CPU hand-off information=0D - ///=0D - BuildCpuHob (PhysicalAddressBits, 16);=0D -}=0D -=0D /**=0D Install Firmware Volume Hob's once there is main memory=0D =0D diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Pla= tformInitPreMem.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformIn= itPei/PlatformInitPreMem.inf index 7ee18eb6d5..8e828ff2ac 100644 --- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformIn= itPreMem.inf +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformIn= itPreMem.inf @@ -1,7 +1,7 @@ ### @file=0D # Component information file for the Platform Init Pre-Memory PEI module.= =0D #=0D -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
=0D +# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -28,6 +28,7 @@ TestPointCheckLib=0D TimerLib=0D SetCacheMtrrLib=0D + ReportCpuHobLib=0D =0D [Packages]=0D MinPlatformPkg/MinPlatformPkg.dec=0D --=20 2.27.0.windows.1