From nobody Sat May 4 01:54:03 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+58392+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+58392+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1588225950; cv=none; d=zohomail.com; s=zohoarc; b=BkZENbtvzR5i80YMQ2PKXx80U7kTg2KG+BNU8ylfoSt9Qft37Dzf410cOR2BYDnwzvTNI9iDNt22J3t+83PTPo65ev7HWZRW449t8N1pOJIK4GK4esX1GLEdvwzkj5YYulpgym0Ug7mvrY8BIyZfHftDVucGiR8HfI2jJ1zIpe0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1588225950; h=Cc:Date:From:List-Id:List-Unsubscribe:Message-ID:Reply-To:Sender:Subject:To; bh=AtAFoUGx3bjIXW3kyddd1c2qxcpA+ELI0Q7duCx80IM=; b=PKkRdeg8Eln5IrQWR8zliG/zrioqez2bzxObeCSsQCpb0+uP5CkbiDg63pfC02wJdPplKTxMTgxx7R+Dh+hzwfGASKoEo637CIrETV6YaeSpNPM87V/P9JDAxmTpee1RHa370dr6B6jnOxIBn4ZSkKpo4lb6ClMe1uKGNgEcHNM= 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+58392+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 1588225950008527.7483442201449; Wed, 29 Apr 2020 22:52:30 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id V305YY1788612xWYD6VjtpyV; Wed, 29 Apr 2020 22:52:29 -0700 X-Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web12.2024.1588225949103278403 for ; Wed, 29 Apr 2020 22:52:29 -0700 IronPort-SDR: kF3RmT7rVSNhuvof6dAreTye6Fc13OmiDyc4n1Ov9BQDP3eao6PKHcl4K2pRhgxJKwhzrH8Epx /uYSz/IAcP9A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 22:52:28 -0700 IronPort-SDR: HaFocx/i30pXdpzFrcZLIBJbsNFUHItWdKQxSGlc8cDS4P4/KJLjCfnekNU7mwTR5m4BGueYf4 pMwdjqVsl5PA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,334,1583222400"; d="scan'208";a="459446890" X-Received: from cckumar-desk1.gar.corp.intel.com ([10.66.179.82]) by fmsmga005.fm.intel.com with ESMTP; 29 Apr 2020 22:52:26 -0700 From: "Kumar, Chandana C" To: devel@edk2.groups.io Cc: Sai Chaganty , Chasel Chiu , Nate DeSimone Subject: [edk2-devel] [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Date: Thu, 30 Apr 2020 11:22:06 +0530 Message-Id: <20200430055206.75880-1-chandana.c.kumar@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: <27952.devel.edk2.groups.io> 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: zoWY42feuWzXVjPq2OYVlEvxx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1588225949; bh=Bn/uHr/3jFPgGTrtfLbJcj0v96qSZvlh63bw69nBuW0=; h=Cc:Date:From:Reply-To:Subject:To; b=TJazP8Hal4HSMYMulP9C6anHiPOuRpcN2/wRYleQ4TFCoAAVMdEcjAEiEayj4rxxPpB ku1O4/yRJkXhogrNlTaQX/hChz0nAaF0BZkdMPwgNKAuO4d6Xi8MMDMsilQPOTwymc95Z BtmCIcXA33JmDCHkzDlD9ByBD3T0zexzobY= 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. PA bits reported can be overriden using Library instance in Platform. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 Signed-off-by: Chandana Kumar Cc: Sai Chaganty Cc: Chasel Chiu Cc: Nate DeSimone Reviewed-by: Sai Chaganty --- Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h = | 23 +++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec = | 6 ++++-- Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportC= puHobLib.c | 32 ++++++++++++++++++++++++++++++++ Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/ReportC= puHobLib.inf | 27 +++++++++++++++++++++++++++ 4 files changed, 86 insertions(+), 2 deletions(-) diff --git a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.= h b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h new file mode 100644 index 0000000000..337e17f154 --- /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 diff --git a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec b/Platform/In= tel/MinPlatformPkg/MinPlatformPkg.dec index 5bec4eee3a..7ef189dac8 100644 --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec @@ -6,7 +6,7 @@ # INF files to generate AutoGen.c and AutoGen.h files # for the build infrastructure. # -# 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 # @@ -73,7 +73,9 @@ TestPointLib|Include/Library/TestPointLib.h TestPointCheckLib|Include/Library/TestPointCheckLib.h =20 -SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h + SetCacheMtrrLib|Include/Library/SetCacheMtrrLib.h + + ReportCpuHobLib|Include/Library/ReportCpuHobLib.h =20 [PcdsFixedAtBuild, PcdsPatchableInModule] =20 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..aa2565343c --- /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); +} 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..a1830d4320 --- /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] + ReportCpuHobLib.c --=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 (#58392): https://edk2.groups.io/g/devel/message/58392 Mute This Topic: https://groups.io/mt/73370148/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-