From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.6373.1587116070631382848 for ; Fri, 17 Apr 2020 02:34:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=czWhakLt; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: chasel.chiu@intel.com) IronPort-SDR: HueW9mj80SeApCYa83aUyTEkURnZJDaFlJiMS/VQTNTLH7V7boAlyOqS/wFD1q6rAQaKM7Vgk8 ui2aoD9DSPdg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Apr 2020 02:34:29 -0700 IronPort-SDR: Xjmsfe3yr7tAejgXQCY7rPSRimRPUKsrcREaC2AoN00rlOiXWMTP6PlgtppalhZSTyxeUhJYLF LJRdHDR5789A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,394,1580803200"; d="scan'208";a="428173350" Received: from orsmsx106.amr.corp.intel.com ([10.22.225.133]) by orsmga005.jf.intel.com with ESMTP; 17 Apr 2020 02:34:28 -0700 Received: from orsmsx159.amr.corp.intel.com (10.22.240.24) by ORSMSX106.amr.corp.intel.com (10.22.225.133) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Apr 2020 02:34:28 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX159.amr.corp.intel.com (10.22.240.24) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Apr 2020 02:34:28 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.171) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Fri, 17 Apr 2020 02:34:28 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J3USiPiyMqNmNiKEmdqXIbixNpVJ2taZCdCUDdNsnv/aMUrYyuE1M7ZnEl7iXhQa0Vh+vVyOlJ0d8xxxJExv+AunjAPYGEhwIOZKIsBOxZzhp24VH43u/+fAWDIkJ8izuHQXg4zhKWvbH/XyCkDZ3vxWKtSYbJsEbqf8d5/rT8DsSvmGtS5MOwO6lV8YvdKaUUT0FSabvz4e2lKkoi6imlok+zkNiScImQpiHaF/gBKgDkxXkWK4sipgbgexxrybhfVQcMqHAIe3nDuGnu+aKBsChTDw5LT7IM4IgjPupH27gV8QCqWMQ0y5IL3JC/7rgMnh5QX/LGMDAYVBcSJ5UQ== 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=k2p2epwqiwJQnCdxk4NS5YnhfpNWx2FUT5un/gSq37Y=; b=CuI6WtdXTmqQEwFNkmlf6Zo0nCfdQNUw+f/wIH6n33dmVmSzACYImTmps/c7S5zP7mPIhVG70MMluZYO2vua9sB96Nx/dSGAoadtiLLTW18QrpwiWWK2aO/b1GrRE0nKDb6JF6uKZ/EqwxjKRA8Ak0/E8JdLMFDrd2Sy1CIZjh/Cq2hw8fMWGW4vvqTPn3KzLuqQaEP6TZ15n8AokQZJGHMkvnvGZQbI6RYIhC2ytBxHeJRI2rjPFpwzTgzgzYcyP33l1Ea3Brff260TEm0ecrUin9F9nWZ0blKWaKaDTxBbEGJmZkAHL/yujCvXjOve3sXODh7NQQlfez7CUqHPeg== 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=k2p2epwqiwJQnCdxk4NS5YnhfpNWx2FUT5un/gSq37Y=; b=czWhakLtUntoUCdbs3+OV1eJgmYjqNhfFPR0rRzrsycCd2Yr8CjzZs5oTU4hVFa8vrwbmesYcrO8VW2e46G1P886Q1kxW2a+uoh4tBbtGm+cTFwBkXdwzKImTc/NITApKZ8civl8NL2DpKm3C9Obks5UdIqN9PIcwn3p4tF1MT0= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB3232.namprd11.prod.outlook.com (2603:10b6:805:be::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2921.27; Fri, 17 Apr 2020 09:34:26 +0000 Received: from SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584]) by SN6PR11MB2814.namprd11.prod.outlook.com ([fe80::152f:df2:6370:1584%4]) with mapi id 15.20.2900.028; Fri, 17 Apr 2020 09:34:25 +0000 From: "Chiu, Chasel" To: "Chaganty, Rangasai V" , "Kumar, Chandana C" , "devel@edk2.groups.io" CC: "Desimone, Nathaniel L" Subject: Re: [edk2-platforms: PATCH] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Thread-Topic: [edk2-platforms: PATCH] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Thread-Index: AQHWEwBJwDiP+vrhQ0+fHd2ZbHRctah8+X+AgAAXLJA= Date: Fri, 17 Apr 2020 09:34:25 +0000 Message-ID: References: <20200415083103.24752-1-chandana.c.kumar@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=chasel.chiu@intel.com; x-originating-ip: [134.134.136.203] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4d3c855c-5998-4278-6226-08d7e2b28501 x-ms-traffictypediagnostic: SN6PR11MB3232: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-forefront-prvs: 0376ECF4DD x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2814.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(10019020)(136003)(39860400002)(396003)(366004)(346002)(376002)(4326008)(64756008)(478600001)(66946007)(26005)(5660300002)(66556008)(316002)(7696005)(8936002)(8676002)(52536014)(186003)(66476007)(107886003)(33656002)(6506007)(53546011)(66446008)(76116006)(55016002)(966005)(2906002)(86362001)(9686003)(110136005)(81156014)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: oYv969RAoQpCNl400bhoLdWjJ8jZMYrkgsYKmQJd6BTCLBlENrK1D3Oo9WW58bSa/wpPC+jJbS85kT9IH7uKjw0olvZAlNQmtZc/QDjXTbpa520nk5uBGutZryisQCwtEcg0GN4AdC6oVwssWcvJ2n/5h6gUqs6hQWl8PifywNQfxMPTgWUhEjK0I279RLGFs1EQ6FCxj8Tgh/l8Q7lalhqbMXWT0lnbE02e38milaA1/mNDgvmF8FvIz6zRvWYszRThnQ7SpcXDCG/T5SkctYfX0N33W406yiqnsP6+0AGviA8CW+m8XIyiGpksEvzIjuhh46u/7iBRM8/DsmxCojao2jT3yJLEOezPMnALSFvYmrkQiXsGSf1y/LS4VQUMgckQGjVSjBNStQ0nFfi9++cBVq2xRUgNIn0WcL8+sYkQh6ytJAO38Rr2BGBM5N5UpLHDqYrTiadmEZBJfLQ0jzOZZGqPTNK6rEKIp4T8yH2vPRbSc2SviiUSjQQv/zgrhTPYAlBRt0j6H34xVlLvaw== x-ms-exchange-antispam-messagedata: aRfT5STXyIOZhEUz0NHKAXUBj71CbPD1xugfM6XO+7FfUUWZRWRGilbcNbzBkR62JkHEP2ynQkgoxR4n88Hc7sjQmdzVMHFEClsIMwbv3ReJZIyogyI5IHg0dhx3agAQ4qMF2ZSK+GjbwfP11s/qPQ== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4d3c855c-5998-4278-6226-08d7e2b28501 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Apr 2020 09:34:25.8531 (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: Cp+2tZKHB44Iebv5zO13RGQaeOXOJQcTuXdwIEp9/4oqAYnR7CBHWqy9+bl7Oxu9fWae7gmdhLMMeshubqShcQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3232 Return-Path: chasel.chiu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed: 944af47a8c83115dcd5dae581e5c3770a12a2ed2 Thanks, Chasel > -----Original Message----- > From: Chaganty, Rangasai V > Sent: Friday, April 17, 2020 4:11 PM > To: Kumar, Chandana C ; > devel@edk2.groups.io > Cc: Chiu, Chasel ; Desimone, Nathaniel L > > Subject: RE: [edk2-platforms: PATCH] MinPlatformPkg/PlatformInitPei: Crea= te > Library Instance of ReportCpuHobLib. >=20 > Reviewed-by: Sai Chaganty >=20 > -----Original Message----- > From: Kumar, Chandana C > Sent: Wednesday, April 15, 2020 1:31 AM > To: devel@edk2.groups.io > Cc: Chaganty, Rangasai V ; Chiu, Chasel > ; Desimone, Nathaniel L > > Subject: [edk2-platforms: PATCH] MinPlatformPkg/PlatformInitPei: Create > Library Instance of ReportCpuHobLib. >=20 > Create an Library instance of ReportCpuHobLib from PlatformInitPei driver= . > PA bits reported can be overriden using Library instance in Platform. >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2674 >=20 > Signed-off-by: Chandana Kumar > Cc: Sai Chaganty > Cc: Chasel Chiu > Cc: Nate DeSimone > --- > Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h > | 23 +++++++++++++++++++++++ > Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > | 4 +++- > Platform/Intel/MinPlatformPkg/MinPlatformPkg.dsc > | 3 ++- >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Repo > rtCpuHobLib.c | 32 ++++++++++++++++++++++++++++++++ >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Repo > rtCpuHobLib.inf | 27 +++++++++++++++++++++++++++ >=20 > Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPr= e > Mem.c | 25 ++----------------------- > 6 files changed, 89 insertions(+), 25 deletions(-) >=20 > diff --git > a/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h > b/Platform/Intel/MinPlatformPkg/Include/Library/ReportCpuHobLib.h > new file mode 100644 > index 0000000000..79e5d4efb2 > --- /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/Intel/MinPlatformPkg/MinPlatformPkg.dec > index 7f74ac9380..71776dfe80 100644 > --- a/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > +++ b/Platform/Intel/MinPlatformPkg/MinPlatformPkg.dec > @@ -68,7 +68,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/MinPlatformPkg.dsc > b/Platform/Intel/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 @@ > # >=20 > FspWrapperPlatformLib|MinPlatformPkg/FspWrapper/Library/PeiFspWrappe > rPlatformLib/PeiFspWrapperPlatformLib.inf >=20 > ReportFvLib|MinPlatformPkg/PlatformInit/Library/PeiReportFvLib/PeiReport > FvLib.inf > + > + > ReportCpuHobLib|MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/R > e > + portCpuHobLib.inf >=20 > TestPointCheckLib|MinPlatformPkg/Test/Library/TestPointCheckLib/PeiTestPo > intCheckLib.inf >=20 > TestPointLib|MinPlatformPkg/Test/Library/TestPointLib/PeiTestPointLib.inf >=20 > SetCacheMtrrLib|MinPlatformPkg/Library/SetCacheMtrrLib/SetCacheMtrrLib > Null.inf > diff --git > a/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re > portCpuHobLib.c > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re > portCpuHobLib.c > new file mode 100644 > index 0000000000..aa2565343c > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib > +++ /ReportCpuHobLib.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/ReportCpuHobLib/Re > portCpuHobLib.inf > b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib/Re > portCpuHobLib.inf > new file mode 100644 > index 0000000000..ae6ec901a1 > --- /dev/null > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/Library/ReportCpuHobLib > +++ /ReportCpuHobLib.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/PlatformInit= Pr > eMem.c > b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInit= Pr > eMem.c > index efdeb6a91c..48cbe0dfbe 100644 > --- > a/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInit= Pr > eMem.c > +++ b/Platform/Intel/MinPlatformPkg/PlatformInit/PlatformInitPei/Platfor > +++ mInitPreMem.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 #includ= e > > +#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 > -- > 2.16.2.windows.1