From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web10.9361.1595291800947658308 for ; Mon, 20 Jul 2020 17:36:41 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: ianx.kuo@intel.com) IronPort-SDR: oWAxPe4lpuV2EV9yeh5HDzM1M8MENjOefnDn1RDtLOP8K4p5QpTvrubLnQ0KzcrSnl3Hby9+YE BWPlmPqAvOTw== X-IronPort-AV: E=McAfee;i="6000,8403,9688"; a="168178029" X-IronPort-AV: E=Sophos;i="5.75,375,1589266800"; d="scan'208";a="168178029" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2020 17:36:39 -0700 IronPort-SDR: 9Q3RsR52VO7CE/2W9XI6VAqu9WJbtvnoR9cPWhJVJeLsLYhRlyIPbz3dhrtIy7r1ovt3W7+urN 9LCEow8mE8PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,375,1589266800"; d="scan'208";a="287733544" Received: from unknown (HELO ikuox-MOBL1.gar.corp.intel.com) ([10.5.244.14]) by orsmga006.jf.intel.com with ESMTP; 20 Jul 2020 17:36:37 -0700 From: "IanX Kuo" To: devel@edk2.groups.io Cc: james.lu@intel.com, chandana.c.kumar@intel.com, varalakshmi.a.prabhala@intel.com, IanX Kuo , Sai Chaganty , Chasel Chiu Subject: [edk2-platforms] [PATCH v6 6/6] Platform/Intel/MinPlatformPkg: Add ReportCpuHobLib. Date: Tue, 21 Jul 2020 08:36:35 +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 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