From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web09.4204.1619426391922877050 for ; Mon, 26 Apr 2021 01:39:52 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=gD1jr+Z/; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: ray.ni@intel.com) IronPort-SDR: ppw2aIkXunVWQoiAnjoCZm4vIzEqwu2lKJZWo40Ram7oj1o6YwA7saxrcrz+niTrEkhmFDzY38 g/+Km3TxRxyw== X-IronPort-AV: E=McAfee;i="6200,9189,9965"; a="195854420" X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="195854420" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2021 01:39:50 -0700 IronPort-SDR: 3KzBRjHuxibgKNx/L5niZ95oO7SOeIix4itvh0/wAOrg42ggII9W2BCSo5xONv+KMkOChX9Ly2 xkFKy6faFX/w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,252,1613462400"; d="scan'208";a="424849300" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga007.jf.intel.com with ESMTP; 26 Apr 2021 01:39:49 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Mon, 26 Apr 2021 01:39:49 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Mon, 26 Apr 2021 01:39:49 -0700 Received: from NAM04-SN1-obe.outbound.protection.outlook.com (104.47.44.54) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Mon, 26 Apr 2021 01:39:49 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=koWHmxORtvxXucIzbRrqjbFkIl1sPCTiMxxsSeJFN61RpHPGakc117OyJbW4U1FYWZfnJDA+zef9mxinQt+5JLxXUVROThP+7V+WdjikXGrn8kNHsOzsUmXQBc2rnmlI2wrJt0s7kDJMAnp+Klxk0idwz13xQahFwW2weFSCpDclwRznGQpGt44Kyp9+8H8oSDLW51JchPyJrAHuF1JyWlW3UsLP+axgu58j0SjArX4NQI9AGY8SfCx50SNplngPAXWO9GbLTzOHeQCw9jGBj0qSMKSm5X27voMcefvtIpC9hjUCakPAcFG2JKEWH098mCe8nZ7o1OZQBBO5f12fIw== 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=xVFJoNMq/cYcnUKnbJu9V0qomrpLIrn74IRcuTnTX1k=; b=lKekYx5UmqM7fFmlkfyScjItw7VdY2g/FXcEHaZBnSVJb40JnoU5195N9YPh7V3hItGNtW4GxWya2n0Cuu//AcQNBfY+rpq+BYC+UiCx0FRBb8bcd4Kr6BlIAs+6MgFOVrK/+rBDCo5DKnXKh0NoT2t5mnY5TiYTqTduswx1Y/TDizEZWsNbPfl0n26AifOHOaIlW+53bRlwvmYNdypjhufQmyYJEnBjXi/5DRC+Ic9/e+Ixuw2k6sWWYtAOkzbF5QwPKXeYbA8XqpGgVkndyL4bGrqGlTeAV99LVDLjEGe2Fddt2jO0B8HxfXQLxczKua09Osoi1SCESThj7B6uwg== 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=xVFJoNMq/cYcnUKnbJu9V0qomrpLIrn74IRcuTnTX1k=; b=gD1jr+Z/bXqN6sWL8Trl0h+OlfZt4HRSQYfu2Hd0nyzTltws+PdTwvOJ+g3zzjUOY6pxl7jeean+zcr3wtany6Yd+tfWbi9jkhFxacQlRgxYDMdPuLiwVzrW8iqoLICYCkBH34TCeHU2fZSZjJvyk4vpiwvNrvsTO6qsebLnzxc= Received: from CO1PR11MB4930.namprd11.prod.outlook.com (2603:10b6:303:9b::11) by MW3PR11MB4587.namprd11.prod.outlook.com (2603:10b6:303:58::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20; Mon, 26 Apr 2021 08:39:48 +0000 Received: from CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::59d6:8b94:55bf:36e7]) by CO1PR11MB4930.namprd11.prod.outlook.com ([fe80::59d6:8b94:55bf:36e7%5]) with mapi id 15.20.4065.027; Mon, 26 Apr 2021 08:39:48 +0000 From: "Ni, Ray" To: "Chuang, SofiaX" , "devel@edk2.groups.io" CC: "Chaganty, Rangasai V" Subject: Re: [PATCH 1/7] IntelSiliconPkg/ReportCpuHobLib: Add ReportCpuHobLib Thread-Topic: [PATCH 1/7] IntelSiliconPkg/ReportCpuHobLib: Add ReportCpuHobLib Thread-Index: AQHXNPia562Scgin+km9tBkx6jwU1qrGhJ/w Date: Mon, 26 Apr 2021 08:39:48 +0000 Message-ID: References: <857a091f9b1354841746b143869b1f17cccbcaa0.1618821680.git.sofiax.chuang@intel.com> In-Reply-To: <857a091f9b1354841746b143869b1f17cccbcaa0.1618821680.git.sofiax.chuang@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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.198.147.194] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 32b21ff6-1d67-4591-04f2-08d9088ed9cd x-ms-traffictypediagnostic: MW3PR11MB4587: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0/VYmMWbOBPdIowwLmvIR4KyVcTP8jA64zLDggkliwg/7eGYqon0WuYDlwTNogFlOTWH2GM8q+ncXbD9ORI6HSk2nF2tqHEAiQCra42I/Ae7stn4wgOuQtgQyr7Xd8CWSpMCG0yxIzZ+qqhTdR+okl6Lf8SXx/76poURgU5ovlCe2PHvRXB5PE3ieo3ZgDdZP24pyVNW5WMdlCGhVas1Ase6yOFG9oKtdTggCo+dE8sXSt9xGb85ftyJ6dTwZnYxYXp9gTri64hNSkfWIBJtGYHOFEQYR5af3+RAoWg0N34m0QRXlyCwXE2rMzIP8qN2x6QyOpjnH75DU6Q3IfQ6elpOlf+LvPHWdeZ3D6zWgDwmHylb3L/G9SRyWLo0rkIfq8gRZe623ikd+WY7/M/lkmb5F9OGhb6Wk1YOMSbwpzq86lQEUHRkH48o71wBDW9b8z8nQ2Uy6FD2nw2M19kAaFM7nXNZRTAVTzbTorShY1nCYhsrv5vmL16srkik/KzrYgKBQICPd15Y+DxQQFI7HGHyROS1cppJrvY9gutrMB6WSXAhbs7GEYyNdDOxHZikqKdyf82qnBFgdLss/zaMjO/kzXyFXpmT8xDqYW2qvyo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR11MB4930.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(396003)(346002)(376002)(366004)(136003)(39860400002)(71200400001)(110136005)(33656002)(76116006)(66446008)(64756008)(66556008)(66946007)(478600001)(66476007)(86362001)(52536014)(316002)(5660300002)(83380400001)(8936002)(53546011)(2906002)(4326008)(107886003)(9686003)(7696005)(8676002)(55016002)(26005)(186003)(6506007)(122000001)(38100700002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?4zpjcXsjJXtt7hrxkhfa5cK6THu2SLwj0M9asbxWTtc80EpolV6If5HB907m?= =?us-ascii?Q?harTG/09aWnwjY0gNCBvOMT0lJq/p8EQ9GlkBPPgu/Q4eLqI9fyGK8mGCC40?= =?us-ascii?Q?KVdxGIzlKDpQVKHrTlWAN43XjRvsFd0FpaUzgLKQPyKByHDMXNM9FeBz1nCf?= =?us-ascii?Q?bnWt8svBxSWU1vhZ+tqWRVqPOnWfi0oQjywgl1gcBjvJa/9f8IxYNAwByHg1?= =?us-ascii?Q?doYFRSo1cdJiWnHzMsFUG1OJyCscaqZaum4faWdg6oVrB6wC34ICmtfosrz7?= =?us-ascii?Q?NwG7hGOrWvhl7Dhs4Ely6eov+Pg4gwf0A4t4HMdaEvjdWxtH2yt+rcb5L/2f?= =?us-ascii?Q?bwkUXqmApXm8GPjWJmPzyXmUZ/kHZH6fRAvJXF6n/SDM+xL7nZlwiSXH+kz5?= =?us-ascii?Q?y1vici6p0VPVqqFvK0pANQT952MPjX77JQrzwEE0QeiRSMZjs9Wk84lPrmel?= =?us-ascii?Q?d77imwoqD/8hdc5mdMeI8SNeJvty2mEZxhpPF/rEv6zIqa8xe79FiZxgfW0l?= =?us-ascii?Q?T4k4ofaBuFGnEuMsIo4JXPzJpioIvVOgQPpraXxbOhnsww7hVilvtrrCt6NO?= =?us-ascii?Q?Mmj5EkSnDHFP8golM3ISqre4l1oe1qjpjyYSPgukYMdqkYsOepefPbiCGuZp?= =?us-ascii?Q?saKiLx0PCnRDYTgeBjnzkDncvqPdjjDQNSRlI4V08cXn1hBGXu2NestMllBO?= =?us-ascii?Q?uFEPyznGvDKztu6pw8AC4BY6zQ1EnXG4iUmqmOXmIp/+97wOvzItrgkbbdxN?= =?us-ascii?Q?VfqMKEA9iyJ8ev+n4Kv3GfT9xcey9tjJv4QOb28JVtocIUWG5goxTzOxCvyL?= =?us-ascii?Q?YYA8XRZ+w995Ojj7EMwUpH8oVCwOAMTurb6GXIEAu0bQzuccNRKkhUQzem8g?= =?us-ascii?Q?GS8QlCn66+aN11ODvCOYp9rcaCeOYhnBOJhusTQZ+kmV9Yjk9JVQHvR/B4yD?= =?us-ascii?Q?bEYGbeEh5Ic5EnSM7QiWDOHarjzbseh7TsHh9qOSd0bC3uop0mGVgVicl6tJ?= =?us-ascii?Q?N3ciy4PB7huqj1lpyflgvlLooY/MWAdrgrUwuxfs+ESqD7447Onaxa5FF5/U?= =?us-ascii?Q?ToO2MJuMaaYHEwH05KY1BO2bP8RP4+yLBMrUNuJhBndWcaCiwaP2mzH6ojx/?= =?us-ascii?Q?VHRSqcGdEgsJjKCPZ5ktR3xhzsrSoWQF1KFZ3UBiJcSB+1gA7/VlOAhRU8hV?= =?us-ascii?Q?lUNL86N43MikLP1bN+kFD9Efo7LVG6DL5h0PN3GH0IHI20inNYR0xpJGhp5+?= =?us-ascii?Q?JwPrBpGLYYrcnTZA34i5V7FVxDYE3mdPIrZOgIheGECFZ0h62R93fXHUvhvW?= =?us-ascii?Q?D1fKYO1cS3r4YI3Brut+n5oa?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR11MB4930.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 32b21ff6-1d67-4591-04f2-08d9088ed9cd X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Apr 2021 08:39:48.0463 (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: 5yjua/iOMJ/uzzsrioH/x2MkFDeimZFh9WrsiF3Vbay1d53YYSA+3tm4M86mZCNQEW8l1twXSF0u+y7KY7TQ3Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR11MB4587 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sofia, Several comments: 1. Please don't use hardcode value 0x80000000. Use the macro in MdePkg/.../= Cpuid.h 2. Please don't use hardcode value 0x80000008. Use the macro and data struc= ture in MdePkg/.../Cpuid.h 3. Please add "EFIAPI" +VOID +ReportCpuHob ( + VOID + ); 4. Can you please try to remove the IntelSiliconPkg.dec from below? +[Packages] + MdePkg/MdePkg.dec + IntelSiliconPkg/IntelSiliconPkg.dec > -----Original Message----- > From: Chuang, SofiaX > Sent: Monday, April 19, 2021 4:44 PM > To: devel@edk2.groups.io > Cc: Chuang, SofiaX ; Ni, Ray ; > Chaganty, Rangasai V > Subject: [PATCH 1/7] IntelSiliconPkg/ReportCpuHobLib: Add > ReportCpuHobLib >=20 > From: SofiaX Chuang >=20 > Add ReportCpuHobLib >=20 > Signed-off-by: SofiaX Chuang > Cc: Ray Ni > Cc: Rangasai V Chaganty > --- > .../Include/Library/ReportCpuHobLib.h | 23 +++++++++++++ > .../Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 6 +++- > .../Library/ReportCpuHobLib/ReportCpuHobLib.c | 33 > +++++++++++++++++++ > .../ReportCpuHobLib/ReportCpuHobLib.inf | 27 +++++++++++++++ > 4 files changed, 88 insertions(+), 1 deletion(-) > create mode 100644 > Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h > create mode 100644 > Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c > create mode 100644 > Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.inf >=20 > diff --git a/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLi= b.h > b/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h > new file mode 100644 > index 0000000000..9ca18146ed > --- /dev/null > +++ b/Silicon/Intel/IntelSiliconPkg/Include/Library/ReportCpuHobLib.h > @@ -0,0 +1,23 @@ > +/** @file >=20 > + >=20 > + Report CPU HOB library >=20 > + >=20 > + This library report the CPU HOB with Physical Address bits. >=20 > + >=20 > +Copyright (c) 2021, Intel Corporation. All rights reserved.
>=20 > +SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#ifndef _REPORT_CPU_HOB_LIB_H_ >=20 > +#define _REPORT_CPU_HOB_LIB_H_ >=20 > + >=20 > +#include >=20 > +#include >=20 > + >=20 > +VOID >=20 > +ReportCpuHob ( >=20 > + VOID >=20 > + ); >=20 > + >=20 > +#endif >=20 > diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec > 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 @@ > # >=20 > # This package provides common open source Intel silicon modules. >=20 > # >=20 > -# Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.
>=20 > +# Copyright (c) 2016 - 2021, Intel Corporation. All rights reserved.
>=20 > # SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > # >=20 > ## >=20 > @@ -42,6 +42,10 @@ > # >=20 > AslUpdateLib|Include/Library/AslUpdateLib.h >=20 >=20 >=20 > + ## @libraryclass Provides services to report CPU hob >=20 > + # >=20 > + ReportCpuHobLib|Include/Library/ReportCpuHobLib.h >=20 > + >=20 > [Guids] >=20 > ## GUID for Package token space >=20 > # {A9F8D54E-1107-4F0A-ADD0-4587E7A4A735} >=20 > diff --git > a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c > b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c > new file mode 100644 > index 0000000000..1a3d60366d > --- /dev/null > +++ > b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.c > @@ -0,0 +1,33 @@ > +/** @file >=20 > + Source code file for Report CPU HOB library. >=20 > + >=20 > +Copyright (c) 2021, Intel Corporation. All rights reserved.
>=20 > +SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > + >=20 > +**/ >=20 > + >=20 > +#include >=20 > +#include >=20 > +#include >=20 > + >=20 > +VOID >=20 > +ReportCpuHob ( >=20 > + VOID >=20 > + ) >=20 > +{ >=20 > + UINT8 PhysicalAddressBits; >=20 > + UINT32 RegEax; >=20 > + >=20 > + AsmCpuid (0x80000000, &RegEax, NULL, NULL, NULL); >=20 > + if (RegEax >=3D 0x80000008) { >=20 > + AsmCpuid (0x80000008, &RegEax, NULL, NULL, NULL); >=20 > + PhysicalAddressBits =3D (UINT8) RegEax; >=20 > + } else { >=20 > + PhysicalAddressBits =3D 36; >=20 > + } >=20 > + >=20 > + /// >=20 > + /// Create a CPU hand-off information >=20 > + /// >=20 > + BuildCpuHob (PhysicalAddressBits, 16); >=20 > +} >=20 > diff --git > a/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i= n > f > b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i= n > f > new file mode 100644 > index 0000000000..ae7871ad4e > --- /dev/null > +++ > b/Silicon/Intel/IntelSiliconPkg/Library/ReportCpuHobLib/ReportCpuHobLib.i= n > f > @@ -0,0 +1,27 @@ > +### @file >=20 > +# Component information file for the Report CPU HOB library. >=20 > +# >=20 > +# Copyright (c) 2021, Intel Corporation. All rights reserved.
>=20 > +# >=20 > +# SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > +# >=20 > +### >=20 > + >=20 > +[Defines] >=20 > + INF_VERSION =3D 0x00010005 >=20 > + BASE_NAME =3D ReportCpuHobLib >=20 > + FILE_GUID =3D 0A1C9D6B-44BE-4FD7-A4A2-D0E68D43684= 8 >=20 > + VERSION_STRING =3D 1.0 >=20 > + MODULE_TYPE =3D PEIM >=20 > + LIBRARY_CLASS =3D ReportCpuHobLib >=20 > + >=20 > +[LibraryClasses] >=20 > + BaseLib >=20 > + HobLib >=20 > + >=20 > +[Packages] >=20 > + MdePkg/MdePkg.dec >=20 > + IntelSiliconPkg/IntelSiliconPkg.dec >=20 > + >=20 > +[Sources] >=20 > + ReportCpuHobLib.c >=20 > -- > 2.27.0