From nobody Wed May 1 19:19:51 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+57348+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57348+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1586875749; cv=none; d=zohomail.com; s=zohoarc; b=TQVnvF0Lb5UWQzDlOEGHJYJJVhRP0UXGqVuU3UDHtN730kdQ3NEx7FEh+KPVkfhWpt5GVLlJjK7wgB/gsdJzbZrBgVTerpizkYtSlPDB0CCnu/751HZ9oEIb+/RoZDwojnEuIwjgTvxcUTRv+TND7zrDn6t8fYBSMErC0x8DSDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586875749; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=ehv1pr0pa9tbuibIYxGR0SyomIuUVAV+lU/QMfZHp+s=; b=MxS6Pjr04sY942eDc0bxtiwsDGbksv+wxEYelTJ7OnkkRoQ0F5sRnBEm54KDASkA5skrbbTCNAnJoV8v3ejgb1Aq6kHrO+rbdZ86TGF23etyJ594gwWFF/mjcptwVbDgF/4ql38Vt41PaaGvlwCF2wMPO2PCpZZCv2+9hPIxpfQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+57348+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1586875749425381.8890009532985; Tue, 14 Apr 2020 07:49:09 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id JXLmYY1788612xiOhpwBrgzJ; Tue, 14 Apr 2020 07:49:09 -0700 X-Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.12636.1586875748417462506 for ; Tue, 14 Apr 2020 07:49:08 -0700 IronPort-SDR: +VMyrreWGl1w5eVYpn5GjmnuFLBCp3Q7BsHS6/pn5aphTfN1ZpO0fhJYIjiKJnFBfpBj0ykbNh GEzcH/KTXiTQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Apr 2020 07:49:07 -0700 IronPort-SDR: NUDlPhhO5Z+iuma89k7Sa10TWUg9dBJq559r3X8Co4Bzw8APfRaKCxmcd/BcwgPEVDtPZ/WLxa PmJXVOvuqQVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,382,1580803200"; d="scan'208";a="256531568" X-Received: from cckumar-desk1.gar.corp.intel.com ([10.66.179.82]) by orsmga006.jf.intel.com with ESMTP; 14 Apr 2020 07:49:05 -0700 From: "Kumar, Chandana C" To: devel@edk2.groups.io Cc: Sai Chaganty , Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [Patch V2] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Date: Tue, 14 Apr 2020 20:19:04 +0530 Message-Id: <20200414144904.45356-1-chandana.c.kumar@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,chandana.c.kumar@intel.com X-Gm-Message-State: 77DhTjaNMXcAYt7zpRexDqxkx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1586875749; bh=bU58DSOkOxyH7vwQL7xqGGkE6b/nvh9hw6rvt46SiGI=; h=Cc:Date:From:Reply-To:Subject:To; b=oCTypR4KTuUL9g5y5OAU7hPNJgQ9tNtkQxdGFzFdRwnYSZgbEhLM/TqXN+nDuwYd/zq vCxyhz8083FJLJpqNuVY1fJct06p2GQUL9wF7NCpcYIF0g+XCF86vqFhQxPcWTqYWPtTE T7NDggzobwckq3NOMtzZtFReibMePtBWSU0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Create an Library instance of ReportCpuHobLib from PlatformInitPei driver, so that from platform side reporting Physical address bits can be overriden. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 Signed-off-by: Chandana Kumar Cc: Sai Chaganty Cc: Chasel Chiu Cc: Nate DeSimone --- 0001-MinPlatformPkg-PlatformInitPei-Create-an-Library-Ins.patch = | 167 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= ++++++++++++++++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h = | 23 +++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 3 ++- Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportC= puHobLib.c | 32 ++++++++++++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportC= puHobLib.inf | 27 +++++++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPre= Mem.c | 25 ++----------------------- 6 files changed, 253 insertions(+), 24 deletions(-) diff --git a/0001-MinPlatformPkg-PlatformInitPei-Create-an-Library-Ins.patc= h b/0001-MinPlatformPkg-PlatformInitPei-Create-an-Library-Ins.patch new file mode 100644 index 0000000000..6df277b8e7 --- /dev/null +++ b/0001-MinPlatformPkg-PlatformInitPei-Create-an-Library-Ins.patch @@ -0,0 +1,167 @@ +From 987a6ff35c4e415593e0441d86b6dab6cc5d4f5d Mon Sep 17 00:00:00 2001 +From: Chandana Kumar +Date: Tue, 14 Apr 2020 16:57:23 +0530 +Subject: [Patch V1] MinPlatformPkg/PlatformInitPei: Create Library Instanc= e of ReportCpuHobLib. + +REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 + +Create an Library instance of ReportCpuHobLib from PlatformInitPei driver,=20 +so that from platform side reporting Physical address bits can be override= n. + +Signed-off-by: Chandana Kumar +Cc: Sai Chaganty +Cc: Chasel Chiu +Cc: Nate DeSimone +--- + Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc = | 3 ++- + Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Report= CpuHobLib.c | 32 ++++++++++++++++++++++++++++++++ + Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Report= CpuHobLib.inf | 27 +++++++++++++++++++++++++++ + Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr= eMem.c | 25 ++----------------------- + 4 files changed, 63 insertions(+), 24 deletions(-) + +diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/I= ntel/MinPlatformPkg/MinPlatformPkg.dsc +index 13a0fda272..b62351dac6 100644 +--- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc ++++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +@@ -1,7 +1,7 @@ + ## @file + # Platform description. + # +-# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
++# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
+ # + # SPDX-License-Identifier: BSD-2-Clause-Patent + # +@@ -92,6 +92,7 @@ + # + FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPl= atformLib/PeiFspWrapperPlatformLib.inf + ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiRepor= tFvLib.inf ++ ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Rep= ortCpuHobLib.inf + TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTest= PointCheckLib.inf + TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.i= nf + SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibN= ull.inf +diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuH= obLib/ReportCpuHobLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Librar= y/ReportCpuHobLib/ReportCpuHobLib.c +new file mode 100644 +index 0000000000..b20b8c61a9 +--- /dev/null ++++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R= eportCpuHobLib.c +@@ -0,0 +1,32 @@ ++/** @file ++ Source code file for Report CPU HOB library. ++ ++Copyright (c) 2020, Intel Corporation. All rights reserved.
++SPDX-License-Identifier: BSD-2-Clause-Patent ++ ++**/ ++ ++#include ++#include ++ ++VOID ++ReportCpuHob ( ++ VOID ++ ) ++{ ++ UINT8 PhysicalAddressBits; ++ UINT32 RegEax; ++ ++ AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); ++ if (RegEax >=3D 0x80000008) { ++ AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); ++ PhysicalAddressBits =3D (UINT8) RegEax; ++ } else { ++ PhysicalAddressBits =3D 36; ++ } ++ ++ /// ++ /// Create a CPU hand-off information ++ /// ++ BuildCpuHob (PhysicalAddressBits, 16); ++} +\ No newline at end of file +diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuH= obLib/ReportCpuHobLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Libr= ary/ReportCpuHobLib/ReportCpuHobLib.inf +new file mode 100644 +index 0000000000..ae6ec901a1 +--- /dev/null ++++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R= eportCpuHobLib.inf +@@ -0,0 +1,27 @@ ++### @file ++# Component information file for the Report CPU HOB library. ++# ++# Copyright (c) 2020, Intel Corporation. All rights reserved.
++# ++# SPDX-License-Identifier: BSD-2-Clause-Patent ++# ++### ++ ++[Defines] ++ INF_VERSION =3D 0x00010005 ++ BASE_NAME =3D ReportCpuHobLib ++ FILE_GUID =3D F19AA754-CE24-448D-B755-1F939B00C25D ++ VERSION_STRING =3D 1.0 ++ MODULE_TYPE =3D BASE ++ LIBRARY_CLASS =3D ReportCpuHobLib ++ ++[LibraryClasses] ++ BaseLib ++ HobLib ++ ++[Packages] ++ MdePkg/MdePkg.dec ++ MinPlatformPkg/MinPlatformPkg.dec ++ ++[Sources] ++ PeiReportFvLib.c +diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Pl= atformInitPreMem.c b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformIni= tPei/PlatformInitPreMem.c +index efdeb6a91c..48cbe0dfbe 100644 +--- a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformI= nitPreMem.c ++++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformI= nitPreMem.c +@@ -1,7 +1,7 @@ + /** @file + Source code file for Platform Init Pre-Memory PEI module +=20 +-Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
++Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent +=20 + **/ +@@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent + #include + #include + #include ++#include + #include + #include + #include +@@ -355,28 +356,6 @@ Done: + return EFI_SUCCESS; + } +=20 +-VOID +-ReportCpuHob ( +- VOID +- ) +-{ +- UINT8 PhysicalAddressBits; +- UINT32 RegEax; +- +- AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); +- if (RegEax >=3D 0x80000008) { +- AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); +- PhysicalAddressBits =3D (UINT8) RegEax; +- } else { +- PhysicalAddressBits =3D 36; +- } +- +- /// +- /// Create a CPU hand-off information +- /// +- BuildCpuHob (PhysicalAddressBits, 16); +-} +- + /** + Install Firmware Volume Hob's once there is main memory +=20 +--=20 +2.16.2.windows.1 + diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.= h b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h new file mode 100644 index 0000000000..1b023007ca --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h @@ -0,0 +1,23 @@ +/** @file + + Report CPU HOB library + + This library report the CPU HOB with Physical Address bits. + +Copyright (c) 2020, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#ifndef _REPORT_CPU_HOB_LIB_H_ +#define _REPORT_CPU_HOB_LIB_H_ + +#include +#include + +VOID +ReportCpuHob ( + VOID + ) + +#endif \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dsc index 13a0fda272..b62351dac6 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc @@ -1,7 +1,7 @@ ## @file # Platform description. # -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -92,6 +92,7 @@ # FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrapperPla= tformLib/PeiFspWrapperPlatformLib.inf ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReport= FvLib.inf + ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Repo= rtCpuHobLib.inf TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestP= ointCheckLib.inf TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLibNu= ll.inf diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHo= bLib/ReportCpuHobLib.c b/Platform/Intel/MinPlatformPkg/PlatformInit/Library= /ReportCpuHobLib/ReportCpuHobLib.c new file mode 100644 index 0000000000..b20b8c61a9 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re= portCpuHobLib.c @@ -0,0 +1,32 @@ +/** @file + Source code file for Report CPU HOB library. + +Copyright (c) 2020, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ + +#include +#include + +VOID +ReportCpuHob ( + VOID + ) +{ + UINT8 PhysicalAddressBits; + UINT32 RegEax; + + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); + if (RegEax >=3D 0x80000008) { + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); + PhysicalAddressBits =3D (UINT8) RegEax; + } else { + PhysicalAddressBits =3D 36; + } + + /// + /// Create a CPU hand-off information + /// + BuildCpuHob (PhysicalAddressBits, 16); +} \ No newline at end of file diff --git a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHo= bLib/ReportCpuHobLib.inf b/Platform/Intel/MinPlatformPkg/PlatformInit/Libra= ry/ReportCpuHobLib/ReportCpuHobLib.inf new file mode 100644 index 0000000000..ae6ec901a1 --- /dev/null +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re= portCpuHobLib.inf @@ -0,0 +1,27 @@ +### @file +# Component information file for the Report CPU HOB library. +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
+# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +### + +[Defines] + INF_VERSION =3D 0x00010005 + BASE_NAME =3D ReportCpuHobLib + FILE_GUID =3D F19AA754-CE24-448D-B755-1F939B00C25D + VERSION_STRING =3D 1.0 + MODULE_TYPE =3D BASE + LIBRARY_CLASS =3D ReportCpuHobLib + +[LibraryClasses] + BaseLib + HobLib + +[Packages] + MdePkg/MdePkg.dec + MinPlatformPkg/MinPlatformPkg.dec + +[Sources] + PeiReportFvLib.c 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 Source code file for Platform Init Pre-Memory PEI module =20 -Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent =20 **/ @@ -26,6 +26,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent #include #include #include +#include #include #include #include @@ -355,28 +356,6 @@ Done: return EFI_SUCCESS; } =20 -VOID -ReportCpuHob ( - VOID - ) -{ - UINT8 PhysicalAddressBits; - UINT32 RegEax; - - AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); - if (RegEax >=3D 0x80000008) { - AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); - PhysicalAddressBits =3D (UINT8) RegEax; - } else { - PhysicalAddressBits =3D 36; - } - - /// - /// Create a CPU hand-off information - /// - BuildCpuHob (PhysicalAddressBits, 16); -} - /** Install Firmware Volume Hob's once there is main memory =20 --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#57348): https://edk2.groups.io/g/devel/message/57348 Mute This Topic: https://groups.io/mt/73011588/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-