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.web12.1653.1620787093031762199 for ; Tue, 11 May 2021 19:38:13 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=mq2q9bZp; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: rangasai.v.chaganty@intel.com) IronPort-SDR: L5+iTKIjFb165PVYmgR53sVrXUesi6jhFb9vuOydMEy78KWA9xmkQUoFfPXLnBKm849j+PbxMS P5y7LQAEsJzw== X-IronPort-AV: E=McAfee;i="6200,9189,9981"; a="220568938" X-IronPort-AV: E=Sophos;i="5.82,292,1613462400"; d="scan'208";a="220568938" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2021 19:38:09 -0700 IronPort-SDR: lXRLAW+MUybM4itLQ5qT9/s7r4ggb13smIQ9jIGHEraeV22Ac26to0jjzQPpLyx3IamT0Ipi3k 6BylZqXGkC5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,292,1613462400"; d="scan'208";a="436975637" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga008.jf.intel.com with ESMTP; 11 May 2021 19:38:09 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Tue, 11 May 2021 19:38:08 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Tue, 11 May 2021 19:38:08 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.106) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Tue, 11 May 2021 19:38:08 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FEmrYsK5JCG18r6yt8yETQLq6TW3kXLjnP1UJatMZZEJp16DSFbTIODxb623kMUB/HUNxGuCukUfe10JxymaRFkOnLfkvUPbbV/ERrHku/lDlIZWAlcZeUIIkI+GFnDxWa6JOtYAU20ZpuONNLfCxFCBuJMRJeAmpKQnrtE4Q5C7uruF4nyUrYGSeCR+TliwUd0Barx58ETdPIipAISWdQaeuX1geIieQ1Sgcq8fbFwBuBxt2CSEPbDfPs3g+kdCcowe7AMd8dku5Q6F55hDatAd+tl0VQjtuxBbZbjtsHbzV/ZhBdRFNU3rQbtSdcl4hCNL3bofq1DNzhP24EM2Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ykqFH36w9YGQ4szaWpU0xUSNFGi1BuGdWoiR83uNH3U=; b=Yz1cYsqA5T2Jlsx9eByzRUb/G92QZPSBrra0Zf5gDZdhu/NQ9Ss+vRUfqHE0taYpL0POuQeef5PNT0JrUTWDe0YD8Etd6vpNW5F5URHcVdMMYU9hlqcKLItKMuJv7z6PPqVmB0IJiXFadmKCz9mn36x1C1MC7bT4iW9wegXsnUYPzKgM3AJl3t7BC2R5+fOMNx/EIfPR/dOEbnBj3CJ6ApNtlZKMmPhtI2P7pXBjUrv3bqZeiG3L9ImejbS0H1PyP0uhdk6SZx9LggX/Q07DWXh1SNwGeTtcVb7wJLKLWNpO6x4CrQ6iCrA012Pksa10LGIBXsNdcTkjdArmc4HqSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ykqFH36w9YGQ4szaWpU0xUSNFGi1BuGdWoiR83uNH3U=; b=mq2q9bZpSEs+vpGzYMa71vuwPAV0u9iBRVWmDBns8+5FyzHIYiEyK8/xqIGpXIcDYUHgss/8l37vPB3EwSupDdlkls3qdPxoOGBYB3yBPms79TzdFNIdnbcj+0rKKsVmRDUqBb908pUhhbTC+aamG3MapWyxd+QerfTvcsFr58I= Received: from MW3PR11MB4602.namprd11.prod.outlook.com (2603:10b6:303:52::19) by MWHPR11MB1951.namprd11.prod.outlook.com (2603:10b6:300:10c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.24; Wed, 12 May 2021 02:38:06 +0000 Received: from MW3PR11MB4602.namprd11.prod.outlook.com ([fe80::40c1:c320:948a:609e]) by MW3PR11MB4602.namprd11.prod.outlook.com ([fe80::40c1:c320:948a:609e%9]) with mapi id 15.20.4129.025; Wed, 12 May 2021 02:38:06 +0000 From: "Chaganty, Rangasai V" To: "Chuang, SofiaX" , "devel@edk2.groups.io" CC: "Ni, Ray" Subject: Re: [edk2-devel][PATCH v5 1/7] IntelSiliconPkg/ReportCpuHobLib: Add ReportCpuHobLib Thread-Topic: [edk2-devel][PATCH v5 1/7] IntelSiliconPkg/ReportCpuHobLib: Add ReportCpuHobLib Thread-Index: AQHXRjWnrg2aMsakNkmZIUHEo+Imb6rfIzEA Date: Wed, 12 May 2021 02:38:06 +0000 Message-ID: References: <78432ebda1f57efffe258a6d2999188a83664673.1620675658.git.sofiax.chuang@intel.com> In-Reply-To: <78432ebda1f57efffe258a6d2999188a83664673.1620675658.git.sofiax.chuang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [50.45.159.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 2c291fb0-9fc9-4874-c968-08d914eef95a x-ms-traffictypediagnostic: MWHPR11MB1951: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lnfQYXPhJXpkBQL5SFwNOCTJIuo3l+gAvImmpjXCDsrfKjcQu3BtIpAjQguTrBxbciMX3kCkI0sXakbLjym/FNYnqBJHf3LitbhCPhiFsTHc2M3ti/PmsHVCb8CaTV2A0pSU4gxiuGs3y8JwE8KSgJy5MlrCq6m2Cfa1sMrkrF3vGqV+wJOuBSU9+WtQKuR7R5uFlK/I54ULcqodYBrswlxCrHg7+Wy6D75vM9q1H0h3/W3xNPoRK6rPBH/5MITyIAUe8hvEVe9C/KrK+F0qXGex5V8jkgulDPANoW2322sHRWvLwPI8earbEejOuAp65nuzRimwwAZDicX8rNV6KMOnmO1QkwzM7T4KSHxzPs0BURqTk5rFs4VJA+nQqNVt3r3t/ZEQeTNAPXt1iW0+M94nIkTY0HimQI+7KHY9vrigmI5HEv55sZE1QP7V0iBirwT7ptYsceSkd3xJ252krkKniyzn5E6nnnAmOS6NwziX41WoodYnmHzo+fiGIw2RjfqB2PVxUYE4Vxwvqa/5cYzIuCkQZLfq6EpLhj26NsBU/6PFOIWPNCyWEwu7cwxytRCZgqcKLVL+k/EB4nxOqkJWGp5HwPbzNwTui9EdtfnYn+bD3a+X2EOLxUzeq30wilxuDEjXPWpy4S58Ij6uhLwxo+6JGFzJFkS+0Uk24NopuxwJ9iNzATlpQJcDl4mI x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW3PR11MB4602.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(136003)(376002)(39860400002)(346002)(366004)(5660300002)(38100700002)(186003)(4326008)(122000001)(66946007)(66476007)(64756008)(107886003)(66556008)(66446008)(966005)(26005)(76116006)(55016002)(9686003)(316002)(8676002)(2906002)(52536014)(71200400001)(86362001)(53546011)(110136005)(33656002)(6506007)(478600001)(83380400001)(8936002)(7696005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?ZARqs+nmOMP3lP99CHNZFR5khKVfKrS3BbxMPLgJmiEcn1R5h+qoFzp5FjQJ?= =?us-ascii?Q?ETUJHA099n0juvElFlevy3Ekkc+vaIoJZrIuiGpul9pTjO3zHO8hyl28PiQw?= =?us-ascii?Q?bO4iY6PGU1H3oykOmPIpBuBWJFeAxJ4GcN40NZ9Yyj8NHkIqEJJz5yf0GEpA?= =?us-ascii?Q?N6PED+Qk5WHlctjS1rMEHw2fwmhfVqjm9755U8lneUXfMoGsy5DRHv9XjZPh?= =?us-ascii?Q?8MTmnzw1fHYh0Q4clQ/yAhf4OFmPGcjK+fzCS5i+PAaOG8IOdqFA4zor5sNJ?= =?us-ascii?Q?sNqrnOIbe/RipJg4SMinFScvPzWv4rNMycmsP2h5oG3tcq7Q32+Qny+XXvRG?= =?us-ascii?Q?joIjtASKAs+e6BQAbBitDU874xs6kIvmxpWVdv5euuSTbIC+77ZWQG8zgT3b?= =?us-ascii?Q?Ic9Z+UQ2mcLEUoOMM9muYNx6zV3oHxg4gr4U34DOEwe1XSKjdAG2eChNKJna?= =?us-ascii?Q?VUG95xQbdI324+UrxmNkWA91B+MLQxkpbKNyu5oRjdD7upUIwlWDCeqO9a+2?= =?us-ascii?Q?bgA7qgtv2mcb5NZyE5CzThmhSJ2AaEQuvByPyN8fZlGQf3yoLpO4BZWwHxqC?= =?us-ascii?Q?Sm4+4Pv99lNqZOfshsHKbTCn1ZIs3KHs9Ifbqk9QdobabiZIm6tKyoKpjOIB?= =?us-ascii?Q?+qSUZAPR0Ds32usMabqGYXQoj8NmZXh+xKLmDyJ15IPX7iewDE+ZGskExWPR?= =?us-ascii?Q?WUf3sudYeWeEbCKjLcbru8XsTCAqTNKaEf1KKdE2eP1sik5iyJlFN5VMspiv?= =?us-ascii?Q?kRSNWfwwVcoihoryVTeYbzSrsJtr9e40odDO0PPg7YJJ+PVdhZmDH+z6eZRc?= =?us-ascii?Q?s21IzjSv474tHWpBGt+eCUWKPmvlROMw+9afJHWvCgIVqcIi3P7Ir2UvEVil?= =?us-ascii?Q?eKgoJkW8JRD1lRsnP2vOXsSCtgtXGsIc+JnJX61ad+0m06pkLeLfa/tDAEMU?= =?us-ascii?Q?2oQgsfsQtaiTzX6IMNyTRnXOV6lPk55rNUctOzdNARe5JeWskp/fcPnn4JaE?= =?us-ascii?Q?Dvh7u7i8wTBkEhBDImD9cSx3huVO8fVLFXdsaWCotEma16e3nqKRnPcg+Jts?= =?us-ascii?Q?zYOvLtMSwFUo1ZOfle0CJMqVSBNriuT/k3TBgl1imdYfXe4KtNWoJsjHFnq+?= =?us-ascii?Q?Gidu9NkoH5bKYbx6ql/RCifDvyR4d1FRM9dLlbJAtIulJ479mmIzBpVdlJ4p?= =?us-ascii?Q?ZF+OYd/+U9GqjFzyoHYAuqqwS+Jxa9dDNypXrdOWfWpeqUH9+cGfc9LPVx6o?= =?us-ascii?Q?mshkUfvoRwqOm2hx3cPIQiWg1t4X08A5/DTx9EEMgaS71E5NDB3iMAv3KBQJ?= =?us-ascii?Q?ldAZOWII+XwSDTAbfzTAx5Mf?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW3PR11MB4602.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c291fb0-9fc9-4874-c968-08d914eef95a X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2021 02:38:06.6440 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 46g18voxOFSujrcSh+TBHlFE1QzBTJ/ZRT+3pHkHBxS706nUnkECbsvEF2bqtRMMHmsq4C9MtjvL9o90nkf9E7vS5OJLchUw3KbSp/Y0R10= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1951 Return-Path: rangasai.v.chaganty@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Sai Chaganty =20 -----Original Message----- From: Chuang, SofiaX =20 Sent: Monday, May 10, 2021 12:54 PM To: devel@edk2.groups.io Cc: Chuang, SofiaX ; Ni, Ray ; C= haganty, Rangasai V Subject: [edk2-devel][PATCH v5 1/7] IntelSiliconPkg/ReportCpuHobLib: Add Re= portCpuHobLib From: SofiaX Chuang REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3298 Add ReportCpuHobLib Signed-off-by: SofiaX Chuang Cc: Ray Ni Cc: Rangasai V Chaganty --- .../Include/Library/ReportCpuHobLib.h | 27 +++++++++++++ .../Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 6 ++- .../Intel/IntelSil= iconPkg/IntelSiliconPkg.dsc | 1 + .../Library/ReportCpuHobLib/ReportCpuHo= bLib.c | 39 +++++++++++++++++++ .../ReportCpuHobLib/ReportCpuHobLib.inf | 26 +++++++++++++ 5 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 Silic= on/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h create mode 100644 Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/R= eportCpuHobLib.c create mode 100644 Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/R= eportCpuHobLib.inf diff --git a/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.= h b/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h new file mode 100644 index 0000000000..106ab3d436 --- /dev/null +++ b/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h @@ -0,0 +1,27 @@ +/** @file++ Report CPU HOB library++ This library report the CPU HOB=20 +with Physical Address bits.++Copyright (c) 2021, Intel Corporation. All=20 +rights reserved.
+SPDX-License-Identifier:=20 +BSD-2-Clause-Patent++**/++#ifndef _REPORT_CPU_HOB_LIB_H_+#define=20 +_REPORT_CPU_HOB_LIB_H_++#include ++/**+ Build a HOB for=20 +the CPU.+**/+VOID+EFIAPI+ReportCpuHob (+ VOID+ );++#endif+diff --git=20 +a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec=20 +b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec index 4a2cbca5c1..2461ab8e06 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec @@ -3,7 +3,7 @@ # # This package provides common open source Intel silicon modules. #-# Co= pyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
+# Copy= right (c) 2016 - 2021, Intel Corporation. All rights reserved.
# SPDX-L= icense-Identifier: BSD-2-Clause-Patent # ##@@ -42,6 +42,10 @@ # AslUpdateLib|Include/Library/AslUpdateLib.h + ## @libraryclass Prov= ides services to report CPU hob+ #+ ReportCpuHobLib|Include/Library/Repor= tCpuHobLib.h+ [Guids] ## GUID for Package token space # {A9F8D54E-1107-= 4F0A-ADD0-4587E7A4A735}diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSili= conPkg.dsc b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc index 5e0de7e19a..1092371d84 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc @@ -93,6 +93,7 @@ IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/PeiFirmwareBootMediaLib.in= f IntelSiliconPkg/Library/PeiDxeSmmBootMediaLib/DxeSmmFirmwareBootMediaLi= b.inf IntelSiliconPkg/Library/DxeAslUpdateLib/DxeAslUpdateLib.inf+ Intel= SiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.inf [BuildOptions] *_= *_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACESdiff --git a/Silicon/I= ntel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c b/Silicon/In= tel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c new file mode 100644 index 0000000000..3f67b477d2 --- /dev/null +++ b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHob +++ Lib.c @@ -0,0 +1,39 @@ +/** @file+ Source code file for Report CPU HOB library.++Copyright (c) 20= 21, Intel Corporation. All rights reserved.
+SPDX-License-Identifier: BS= D-2-Clause-Patent++**/++#include +#include +#in= clude +#include +++/**+ Build a = HOB for the CPU.+**/+VOID+EFIAPI+ReportCpuHob (+ VOID+ )+{+ UINT8 = PhysicalAddressBits;+ CPUID_VIR_PHY_ADDRESS_SIZE_EAX = AddressSizeEax;++ AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Ui= nt32, NULL, NULL, NULL);+ if (AddressSizeEax.Uint32 >=3D CPUID_VIR_PHY_ADD= RESS_SIZE) {+ AsmCpuid (CPUID_VIR_PHY_ADDRESS_SIZE, &AddressSizeEax.Uint= 32, NULL, NULL, NULL);+ PhysicalAddressBits =3D AddressSizeEax.Bits.Phys= icalAddressBits;+ } else {+ PhysicalAddressBits =3D 36;+ }++ ///+ //= / Create a CPU hand-off information+ ///+ BuildCpuHob (PhysicalAddressBit= s, 16);+}diff --git a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib= /ReportCpuHobLib.inf b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLi= b/ReportCpuHobLib.inf new file mode 100644 index 0000000000..1d2d6b4151 --- /dev/null +++ b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHob +++ Lib.inf @@ -0,0 +1,26 @@ +### @file+# Component information file for the Report CPU HOB library.+#+#= Copyright (c) 2021, Intel Corporation. All rights reserved.
+#+# SPDX-L= icense-Identifier: BSD-2-Clause-Patent+#+###++[Defines]+ INF_VERSION = =3D 0x00010005+ BASE_NAME =3D ReportCpu= HobLib+ FILE_GUID =3D 0A1C9D6B-44BE-4FD7-A4A2-D0E68D4= 36848+ VERSION_STRING =3D 1.0+ MODULE_TYPE = =3D PEIM+ LIBRARY_CLASS =3D ReportCpuHobLib++[Librar= yClasses]+ BaseLib+ HobLib++[Packages]+ MdePkg/MdePkg.dec++[Sources]+ R= eportCpuHobLib.c--=20 2.27.0