From nobody Sun Feb 8 14:35:28 2026 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+62956+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+62956+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1595309448; cv=none; d=zohomail.com; s=zohoarc; b=FK4BTYoOuRPR/m0hUPLyspCcjlOBg0pQyxfu2RPHa1DTGHJcjhxw7LhSGKzAPCExgO39dCIv3vAfDdoVFoWyzzSUf7OPaU5g6smArpYfeS+HkOSaMSYVZ8PK+vyU06gyqM1Ea2Y83RHxDvfIlZ5DBGMgi0aX7RLEdbPIh0go+Cw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1595309448; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=TgRniq6UVFCTsW7NDQuSMDvclds1+LfNtL8NSHQqQtA=; b=WjWzW2YmmQE3zPfhH0iiLRg3ya/5Z1t44dvuptlXFU8GIHXOo405GyM2+hpaVOonmSVfKqWg0KjS3gqaQ5oQ4nMiWs3iykuPxMS54sAK6bdxi4i3Z/A36w3CLgl5qS98sB6AlS79l5QALLLzgk3eqVZ+8/QGWEbpSZGKehBkLi4= 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+62956+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 1595309448980800.9132886891969; Mon, 20 Jul 2020 22:30:48 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id I3h7YY1788612xv8vlvRABEn; Mon, 20 Jul 2020 22:30:48 -0700 X-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 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 X-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" X-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-devel] [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> In-Reply-To: References: MIME-Version: 1.0 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,ianx.kuo@intel.com X-Gm-Message-State: ut8bP1OI6RC0FDABOSE3Dx5qx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1595309448; bh=dYCtfxlHOsIQ/wPD3tdrhuyHigw903gQiOrEsuTpvcM=; h=Cc:Date:From:Reply-To:Subject:To; b=Mw74YmIxgtELkm1iOfyjtZNpb1JQHQNxk0rPfae/Sv2S+IfDAEr2RwSAxfMoXYTnoIf vaY3qNNc16yCnX46a4FlB+01opyYK+Z4nrG9ruz0v80dMbr3QcSzbbQajOqbKPSXH4qmg vH83lm3K8jBjDT2NCGDlrnnPMLvkVL+Y4AE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 # 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/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 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 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 # Component information file for the Platform Init Pre-Memory PEI module. # -# 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 # @@ -28,6 +28,7 @@ TestPointCheckLib TimerLib SetCacheMtrrLib + ReportCpuHobLib =20 [Packages] MinPlatformPkg/MinPlatformPkg.dec --=20 2.26.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 (#62956): https://edk2.groups.io/g/devel/message/62956 Mute This Topic: https://groups.io/mt/75698482/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-