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.web11.10782.1586939801643209576 for ; Wed, 15 Apr 2020 01:36:41 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=j9GrxFSk; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: chasel.chiu@intel.com) IronPort-SDR: 6R9FKGFJ/9GqUjpPM94GAXWqsZ4ur0mL7XjRjXb+Oq0SQnHJdSePW839ElpL2odG27oP1H2jxy oacUktmTCktQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Apr 2020 01:36:41 -0700 IronPort-SDR: 1ogOK58eoTb3X89OLq4J65jL+cYwq4Ki+b99lUaViw9RysYs8Lz8Dw92C8OA1FSROJ3K6HgfWD M6RNUBr9b7Dg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,386,1580803200"; d="scan'208";a="271664950" Received: from orsmsx102.amr.corp.intel.com ([10.22.225.129]) by orsmga002.jf.intel.com with ESMTP; 15 Apr 2020 01:36:41 -0700 Received: from orsmsx161.amr.corp.intel.com (10.22.240.84) by ORSMSX102.amr.corp.intel.com (10.22.225.129) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Apr 2020 01:36:41 -0700 Received: from ORSEDG001.ED.cps.intel.com (10.7.248.4) by ORSMSX161.amr.corp.intel.com (10.22.240.84) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Apr 2020 01:36:41 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Apr 2020 01:36:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VjFhPSAQpZ2VegP23fzBk2d1KeILAv9B/JoLQwIgkuyuVmrO6JeObqI9eo4Jgxg+y0SU3RqJ2+rkWCmTF50pSZJCn6KYfQkvbiiz4XsBsmlQuACwWflM8C+slLaJfwt6uIF1b+k8/+Je7tKAm0gLkUFTAjf67aMuItqB5Hl4/jegYbOPh+3+jNEn3DkTbm7mMgQrS/7GA76Sq8aGq7+cpBSFnPNjNBeORIMyGfBn+R/b0KLi5mv6/dJhswR8ChmXsZ7hCWJAkZZquJmJLXEYnQ1CELi2Aq5KBzZFcfZdoDHzUUB1Z83CsHvbD1brJYbjpoxtNv2tMLfwRfEgvdq3Qg== 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=fmZ27LFvNzMV6mnEhUP4yPvie6x+VEfrx+TFgmgRPMM=; b=KUco4QRkB6C3THLsonSaKJCFWB3RqiMD4OiVJ04fw9vR/LA/f9T6Na4rhPVqbFktKML611SL5dzPCdrEGfubsn3oSUuiWIPBNiXK19c85JQTzwyg4+CktWqTovnHrxDkGrqSiPeU4kv8pnXgxWXfbtczd1htaVmvtBPXhGaYf5ZAZ/B/wwp8EiCG6fD05Vj7WjSjaL/8qIMTSJ4jt5tkkX+vZaNQhUBKNNHWctmL1a/GSTI+pj+iOw+GznHyCilyoCtLx2O1kp5Xp8xHFotZ/WMruUF3r9k3c5kBFvX1P7P0xK0+IjWYM0+B6Cu++KIXOz5ZOojDKpKJhXQ3YGv24g== 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=fmZ27LFvNzMV6mnEhUP4yPvie6x+VEfrx+TFgmgRPMM=; b=j9GrxFSkkIAaFdz0F4VBNYbf+MeYu4ctH34/HNbcmKEl4mFk5eKHAkdKNbOF/yhGhUYSJqHABv8KPCt8e3yJ6xkjj7kTuJFFiTW4UqMXp3JFbGlVvSPdn9jIyAtexrxtVBZ6kg8/ZgtSRA49QGfw3VootHYgfDE/ED1Vt6HFff4= Received: from SN6PR11MB2814.namprd11.prod.outlook.com (2603:10b6:805:55::15) by SN6PR11MB3261.namprd11.prod.outlook.com (2603:10b6:805:c1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Wed, 15 Apr 2020 08:36:37 +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; Wed, 15 Apr 2020 08:36:37 +0000 From: "Chiu, Chasel" To: "Kumar, Chandana C" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" , "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+fHd2ZbHRctah528+w Date: Wed, 15 Apr 2020 08:36:37 +0000 Message-ID: References: <20200415083103.24752-1-chandana.c.kumar@intel.com> In-Reply-To: <20200415083103.24752-1-chandana.c.kumar@intel.com> 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: [192.198.147.211] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 899f9d99-1b6d-4afe-c550-08d7e1181ce6 x-ms-traffictypediagnostic: SN6PR11MB3261: 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:6430; x-forefront-prvs: 0374433C81 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)(346002)(39860400002)(376002)(396003)(366004)(136003)(110136005)(26005)(107886003)(6506007)(54906003)(7696005)(53546011)(33656002)(316002)(55016002)(9686003)(966005)(5660300002)(66946007)(71200400001)(478600001)(8936002)(66556008)(8676002)(2906002)(76116006)(186003)(66476007)(64756008)(66446008)(86362001)(81156014)(4326008)(52536014);DIR:OUT;SFP:1102; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GcR6b0vhjdg2RDWDSOxJi5aSO1fEebFAorkHb48WXTgTkpYYqJN2DQCfFZOOjC17MPRpx9UcttuLPYkvghDUAuIv0kOrA7Wq2zImUjuh2Lid9sfeB01vm2uehNOY0PgT6/J9JBCre9rn0x/4Hq+/Il6hFdEaAB0maE6a1BAzfvLQfWJah+crXVlWNzOqZwTPCljTHl205qxF526rdCoKxsL1A36ABUhtytQFvlLHZkQRmY18JVTY75zx24DLjJI4V+tdojgOpYTP7WCSgjGID27usy3Nwiwjs4B0ttF8d1zkza/qo0UwD+5UjHW6Bo3dxpHDIdkntCa1xSMkXwYBrkEMZArvgPQ4zKAVhN8RvU3d6it3DASYJ+K/ntPMVV4oy7ouK2jBUKUTI7ke5yX7cdFRaCRXN1sCFDLXoBUGQQQ/YB4YXjVKMqSOOyvyXKnsKto3ML6lCQYwYZtQLyBCufW4u5FbS73bUb7lbpT9fyIO3RVHlMnIc4okssvGt1s1DFIq5ZRpXGMp5P1DWRa4Bg== x-ms-exchange-antispam-messagedata: HQSiHFxP+HpiliRB+8Nm8alKZSA5nbhVoHJFYKp/OLrWkyODiFD6BBc+u9QS6+E/LoZJ7fSpH3hUxTDVNeLsVZSUtgW4lqsosLpO+Gsl8RjLSu4Z1AMAhygJNj4Uwz8u4acr3tkZHpZPc+RZG7fGfw== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 899f9d99-1b6d-4afe-c550-08d7e1181ce6 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2020 08:36:37.4956 (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: tIgykh4pWy3ykRM2ZmT/wVma6261wSKnlG7zYwVp17IgCWZCeenemn13KbG/SoUmyD23v4YHG9fKHYSVUBbrzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3261 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 Reviewed-by: Chasel Chiu > -----Original Message----- > From: Kumar, Chandana C > Sent: Wednesday, April 15, 2020 4:31 PM > 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