From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web11.4489.1595043843351704494 for ; Fri, 17 Jul 2020 20:44:03 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ianx.kuo@intel.com) IronPort-SDR: f0Ef4I5lTj2pdGTefz5iXToSm0yZtXCNAw16CmTtmg9a7uENc80vehNsPnVmGkHyr8Uo6vjQLA SmTC1T1385Kw== X-IronPort-AV: E=McAfee;i="6000,8403,9685"; a="211253820" X-IronPort-AV: E=Sophos;i="5.75,365,1589266800"; d="scan'208";a="211253820" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2020 20:44:02 -0700 IronPort-SDR: V1AndryBKtLnUNWl3douAOWBVWcpO1nUlKkBf7sr9g9bdL3s95MHqlEQbG/IbTyrEsRMKxj59I LWFS17dGM8/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,365,1589266800"; d="scan'208";a="318968393" Received: from nkobayas-mobl.gar.corp.intel.com (HELO ikuox-MOBL1.gar.corp.intel.com) ([10.252.190.252]) by fmsmga002.fm.intel.com with ESMTP; 17 Jul 2020 20:44:01 -0700 From: IanX Kuo To: devel@edk2.groups.io Cc: IanX Kuo Subject: [PATCH v3 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib. Date: Sat, 18 Jul 2020 11:43:59 +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 an Library instance of ReportCpuHobLib from PlatformInitPei driver. PA bits reported can be overriden using Library instance in Platform. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30 Signed-off-by: IanX Kuo --- .../Intel/MinPlatformPkg/MinPlatformPkg.dsc | 3 ++- .../PlatformInitPei/PlatformInitPreMem.c | 25 ++----------------- .../PlatformInitPei/PlatformInitPreMem.inf | 3 ++- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index 13a0fda2..b62351da 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -1,7 +1,7 @@ ## @file=0D # Platform description.=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 @@ -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 efdeb6a9..48cbe0df 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 7ee18eb6..8e828ff2 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.26.2.windows.1