From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.2150.1588226668307418559 for ; Wed, 29 Apr 2020 23:04:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=PUCIoQ3R; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: rangasai.v.chaganty@intel.com) IronPort-SDR: NsMh5jJQh//aL+ewJwwY2451GCnLDSH+8EpC9GnKKItDTwmmNcA1+42I5rOmUhiYTgGLXpUVmX ytZlUkAL7q7w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Apr 2020 23:04:27 -0700 IronPort-SDR: QMTyL0jb/o8F0rSJxtsAdvqNN8dcdOcM8T+SW3S8H0aRthE51ghB8sYVFIa59+H9k8DLc2hTTf vzF5zaU6nF5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,334,1583222400"; d="scan'208";a="282745072" Received: from orsmsx108.amr.corp.intel.com ([10.22.240.6]) by fmsmga004.fm.intel.com with ESMTP; 29 Apr 2020 23:04:24 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX108.amr.corp.intel.com (10.22.240.6) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 23:04:24 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 29 Apr 2020 23:04:24 -0700 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 29 Apr 2020 23:04:24 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.56) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 29 Apr 2020 23:04:24 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BFH3Qb5/21USf6H8vZJcoBwXDVlSQ2tUp0OuyKyEAzf4izSWQ2Apn2iY+N1oAgMRl3yRCaZzddLWDNyzbO7qffhaVuAOB6PMZ2NrLnA1RptwkYFew54J5U+aWs/gtrzRVr+Zn6iDirlnYW0mKQg1tSZzQpNSZV21VU4xPNTBd6CFu6ovaaTw9o2fzekRthS4kAfmoIypfHCwNRhWNBsCJpJisarYCJ73yUylsQGICxEB2YnNmaoYZ4wJQZELTQiH56n2R8AiYi4YY3I+LgSUGA6Xk2k422YWA55ovV8gOFFWVueVNX6BrxnPjW90AwJt1MZhaiih1x1q50jWu3OcNw== 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=QvGtuJKi+3DYiRlQ4syYG3FYfnPu34ohwtSb0IMTc90=; b=hQ9o0Np1SdTXjXd0sZmeCqMfVb/bn85y8pgpbP1cqdG2cprDeyWsbnGKZwNcC87DWO09Rcfx5dGWmnV8biEVMgawZDZgRD+5Ar1Phh+fig1YZMq5nDboWfKgm/bS2pALjhqXyrOR/QLrsAedirNG8Lg4kqCAdNgCrSjFIrjRYOG6G4fRRr0s8FcUMQrtxhYe0mtTt7TBZgSDGomz1Aa256meXWGyruZj0iwhuATM/s5WP4hrILxyvh+pJPgk+Ueb9xBgFSQ9VqPGHYFy/GsQCM4BaAtJrHjmoKa03Y+3aQ89EYzKw/+0GKKkLgvNMPlorX21bUVfOipQ8YoeIWiMPQ== 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=QvGtuJKi+3DYiRlQ4syYG3FYfnPu34ohwtSb0IMTc90=; b=PUCIoQ3RKAMxGnWxryGjXKB5XAu3c/LRKWq3VTL1cQf848DEbg7GRKzfL0j3KHgs35XeUOBMd87VkWN1wfqG6/MgKpRmP6t9UZ+Gzo5SsS1reSS96tvpLyJbW8f4MLEpQuMKiuyb3gNaFZAnlKe+Xx1ZRMoCSMWGQOCxnRLy8Qw= Received: from CY4PR11MB1878.namprd11.prod.outlook.com (2603:10b6:903:11f::12) by CY4PR11MB0070.namprd11.prod.outlook.com (2603:10b6:910:78::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.19; Thu, 30 Apr 2020 06:04:20 +0000 Received: from CY4PR11MB1878.namprd11.prod.outlook.com ([fe80::29da:d951:99c3:a94e]) by CY4PR11MB1878.namprd11.prod.outlook.com ([fe80::29da:d951:99c3:a94e%11]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 06:04:20 +0000 From: "Chaganty, Rangasai V" To: "Kumar, Chandana C" , "devel@edk2.groups.io" CC: "Chiu, Chasel" , "Desimone, Nathaniel L" Subject: Re: [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Thread-Topic: [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei: Create Library Instance of ReportCpuHobLib. Thread-Index: AQHWHrOj5jmVy5fFXEWcAGoYiuTuhqiRLOxg Date: Thu, 30 Apr 2020 06:04:20 +0000 Message-ID: References: <20200430055206.75880-1-chandana.c.kumar@intel.com> In-Reply-To: <20200430055206.75880-1-chandana.c.kumar@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.2.0.6 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: [192.55.52.222] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 66764301-6ac5-476f-fcf3-08d7eccc5301 x-ms-traffictypediagnostic: CY4PR11MB0070: 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: 0389EDA07F x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: WwlTEE4J7oQ6falvuOJ2m1Xfq0PA3DJOsUtIYhHcr9l2SrarB8MCySk5Etd0a55G0rJ7kPpm3Z1q5NCPffrPGMbEalp+bj7h4or4xqxGkTKj2llfDr+Zmil8JhJLUVoKTGGy6ETihdEUo8ZFbh/3wyjo9A++h1i5wZzOIR8npKqBSvZf7G8wptcjyW5Ried0uUSK0zgcby/CcSJn5tgfkmjkteu/xGYqvBJFWtKDRowEYZnbFv8fJ9w0LkZJ0j0h31gjjahE+ixHrK+J+6IHkortGvTkHX97P8iCuGTrQMGMRncNl607sE1abQsaQ4smk81WNCRSejIVAKQBHRrcRQdC33lNcEoPzSFWIAdeknsI6Sv/GmgmxdwPTQP7nrazoqCPclsk1RSdiGD2uUt8mtNeJGrtxNzEHEwoEoNx/5yisMjrhx2lyQ18y7Fw7PPYp/abvuGRXgZ3GQXeidbCZkrREmAn/sHp0f6ljKca6pi6Ntgd8Dgof2wL21DOILykbsqNfaSk7MdO/8BYHa985A== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR11MB1878.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(396003)(376002)(366004)(39860400002)(136003)(346002)(54906003)(86362001)(966005)(110136005)(107886003)(186003)(26005)(66446008)(64756008)(52536014)(9686003)(55016002)(66946007)(76116006)(71200400001)(66476007)(66556008)(7696005)(33656002)(4326008)(5660300002)(6506007)(316002)(2906002)(53546011)(8936002)(478600001)(8676002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: wF8coTEEWi4ndOZGhZlVY3cXkUHuNCFo9by0sP/tzDUCEdu5dj87q1MYUWohDYOvnR7Us5i9+EyDEm8JNNwUrRGREs4gUqwOowth7Q127twqH69pvTkE2+X7moNUIHXNgkeIpltE60HHHvXY/awas0EmnMh8hFPo2bHVKlAAoLi+ycrZkPWRn3Gf8q1WmYq9+mWT6bmqQcYa39CuCse86niNbvQS8BBFGTlEOrDccepIA17C4rUNlmqRzd3C97VL5UdGL9zRDzy22glTSQU/stTFWPryVe/MlaZTaaZdMQf2HbgDagZN2xwUSc/fC7RDm98sHyKBFOwP6NHktD7/mboZdk7AZ17gOhBKlBml6kMY6i+YFJQDB3q63gXbBxazghkn2Ne161AYac0vKkbiI1NKaXAPWPsbY85Z/s+fUe0glma9gdJ7STfMK6B0jBDrqbMr3lMY4sO2obd+dZ6KVLvn/qubO9TIUgntOnW/QdFIZAYL6m4gJ3Q6JcCC7MRIaUfIk0/vlehkrGbeRJhj//08cAedm5SFoDaBqwX4ySgzoLKK7Y1nNtMpMv4MJi6GR7f0t41jzfn4B1LZQQWZBD9RIdtpY/pIWJegH+NaA+jFolBB4EcpdcdAERtjXK6VUtRBonn5yRl2zgMbPHdzFu9gbO3sFeE2Vj/1IQH4Bw+RomI5Ig44fAXEAJZq1sL7vj8x5Y3B6I0X94PeVLszOeyDhSGF82AOO/s8ibZaaSQ0IqvKHJWKsFpUb7K/wEZlQLcUlbW0xakNzKn8qbVirn32b/u/VftIhzITSXYmvCw= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 66764301-6ac5-476f-fcf3-08d7eccc5301 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2020 06:04:20.5427 (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: piwOvHiaKERPSrJ8Fhkl7OR9uKQdeLIVbE7nEqHj5Iqt89S+KEn5hEtg2Q1Vpe+eaCoOJ0UHlUufmesj+GY+U4WKdEawwR1yYTiMYHUMUN4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB0070 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 -----Original Message----- From: Kumar, Chandana C =20 Sent: Wednesday, April 29, 2020 10:52 PM To: devel@edk2.groups.io Cc: Chaganty, Rangasai V ; Chiu, Chasel ; Desimone, Nathaniel L Subject: [edk2-platforms: PATCH V1] MinPlatformPkg/PlatformInitPei: Create = Library Instance of ReportCpuHobLib. 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 --- 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 inf= rastructure. # -# Copyright (c) 2017 - 2019, Intel Corporation. All rights reserved.
+# Copyright (c) 2017 - 2020, Intel Corporation. All rights=20 +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 +++ /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=20 + 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 +++ /ReportCpuHobLib.inf @@ -0,0 +1,27 @@ +### @file +# Component information file for the Report CPU HOB library. +# +# Copyright (c) 2020, Intel Corporation. All rights reserved.
# #=20 +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 -- 2.16.2.windows.1