From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web12.13076.1595309448144146397 for ; Mon, 20 Jul 2020 22:30:48 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: ianx.kuo@intel.com) IronPort-SDR: diWT+ZiECxrmPMBw9iK14/+wwnXfCvxys780kYNYeT4rloe1juBT3SC9kIeMYrqZqMXY61lBf8 ZoLDfcsIf3Og== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="214729720" X-IronPort-AV: E=Sophos;i="5.75,377,1589266800"; d="scan'208";a="214729720" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 22:30:47 -0700 IronPort-SDR: A38++d6bBeUffJfrNgqbgfTWgeebqS7gY3AcIj0fdQXu5js3buq1Tpqi8tvX9O3luU734s9WVe mq4YeFl4ZvaA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,377,1589266800"; d="scan'208";a="301497649" Received: from ikuox-mobl1.gar.corp.intel.com ([10.5.244.14]) by orsmga002.jf.intel.com with ESMTP; 20 Jul 2020 22:30:45 -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 v7 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib. Date: Tue, 21 Jul 2020 13:30:43 +0800 Message-Id: <5eca72d86fb0d2a2f2242ef8d082febda563e4e6.1595309109.git.ianx.kuo@intel.com> 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 Change-Id: I1c14aece3b229c194960e91dc9505dd8120bbe30 Signed-off-by: IanX Kuo Cc: Sai Chaganty Cc: Chasel Chiu --- .../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