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.web12.9402.1592875596607372088 for ; Mon, 22 Jun 2020 18:26:36 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=Ltqi0Jbh; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: zhichao.gao@intel.com) IronPort-SDR: WDvwvx0zPssj+iOoLzqAuUC4qfIHszyB14xFvDWIsnO8G2lxX8TMjlU3LRjNJj1nKvCpNvPHV9 0iM3pfRrPfqw== X-IronPort-AV: E=McAfee;i="6000,8403,9660"; a="209113163" X-IronPort-AV: E=Sophos;i="5.75,268,1589266800"; d="scan'208";a="209113163" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jun 2020 18:26:35 -0700 IronPort-SDR: Qy87TLt65dJ3akwPloXff/wdu+06kXAorQLtTwyPAbK95eFIGAbnENy0NTt+nJoibeXBl49FFM oUrHNUa31Ung== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,268,1589266800"; d="scan'208";a="478680895" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga005.fm.intel.com with ESMTP; 22 Jun 2020 18:26:34 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 18:26:34 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 22 Jun 2020 18:26:33 -0700 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 22 Jun 2020 18:26:33 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 22 Jun 2020 18:26:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mtenkk7ZWYtcaHCEi/efbD7nWgVkmZsGuau0nlVqS5Jzfjq5OiXT4tNvd0TN3odcP8tz/0piPxeMvAwT4+I8uZlj0R7eob/nTfDwlssyuIiVSH+l1PSdr9uiCBlwhyO4UP6J86Mam9xLnau+aJqfTn/kbhhKprZhpxx/YLfIRMBelhBQhv6FDfPJcl7DBKOUC2AVEanU1cyyFdAHT1BR/1l71LlueCIz1khwJWwvx1PED5TU/00GEEyKYyA973Zd2mi1u5KxIpLN+DfPE2LdiRPUv5odBPUHCTPDzZmdFEZ1BzBb9rH+d5Yn51lzonb1odM9im10Myg7/YZlPAQqew== 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=pdy4LtbWV9d/r2U3uxmNuCf9AS8oresf0f421jH7IgE=; b=P/8MKP/9bHKxhmaT6aK4W1mDYlEiUa9BaUjy+MwbZSm7C7mTovIteos+mApNSe/xu8nbt8gKp72T6WoRKo8TRwWOcgaasWbqSnTDkxhhY2KnHGTMhp5u8YugyPyh/Ggox4T6w9Qof4AxnlTzl6L6qHBDvdwjcgLLoCvBD4HXceMlbRM+grVPS2OL3Ry1HM02qk4a6KWcmLwCVsOj0M+YAfUWTVulLZJUGuiGz/R3Zkj0J7lIvODVidZvxVc6nmP9QdN7m/fdFokeEzdtrPPlGKqLl7b9/srN1iOxxLrdnZ78v/VREKhndnJV0qL4GdPkCgsj8jRh4byjqcJx7xPLSw== 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=pdy4LtbWV9d/r2U3uxmNuCf9AS8oresf0f421jH7IgE=; b=Ltqi0Jbhois3QKl23r98hiVjGjYHxWndqJoDqvt0fLYCsKoGlzcypdgaQZquWsKJ8kgUi4DSsNTL5ca9Lz/hbEdmJa6/K+hvb8JPn+HReAhznuQYYo66u6zuwNzcGBviSdIaN4wWpOUwFU6EPq1RbaA/tZDHcKVCdsBAxeprgmc= Received: from DM6PR11MB4425.namprd11.prod.outlook.com (2603:10b6:5:1d9::31) by DM5PR11MB1594.namprd11.prod.outlook.com (2603:10b6:4:5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22; Tue, 23 Jun 2020 01:26:29 +0000 Received: from DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::ad34:e1fc:2e7b:d124]) by DM6PR11MB4425.namprd11.prod.outlook.com ([fe80::ad34:e1fc:2e7b:d124%3]) with mapi id 15.20.3109.027; Tue, 23 Jun 2020 01:26:29 +0000 From: "Gao, Zhichao" To: "devel@edk2.groups.io" , "Tomas.Pilar@arm.com" CC: "nd@arm.com" , "Ni, Ray" Subject: Re: [edk2-devel] [PATCH v3 6/7] ShellPkg: Add AcpiViewCommandLib Thread-Topic: [edk2-devel] [PATCH v3 6/7] ShellPkg: Add AcpiViewCommandLib Thread-Index: AQHWQx3zyzutivaFp0eDuo6BnKZUg6jldD7g Date: Tue, 23 Jun 2020 01:26:29 +0000 Message-ID: References: <20200615140351.1725-1-Tomas.Pilar@arm.com> <20200615140351.1725-7-Tomas.Pilar@arm.com> In-Reply-To: <20200615140351.1725-7-Tomas.Pilar@arm.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: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.45] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: bca130c4-f1a1-47fa-03de-08d817147496 x-ms-traffictypediagnostic: DM5PR11MB1594: 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:9508; x-forefront-prvs: 04433051BF x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: U9Wg2Z4ySHfZIiwyZlox3IckQqEAlX0tHqujSxe+FLJroXbcxrWh3uskGt6OrD/oq0zQgCZ7qPOq1SYEz1fOJshUR+Xs51uMRIKM7VViFJW4ojZRj8M8Y/f2qAIhIqndn5em09uHnuG1xh2L4MNkpabxcrsmJldU5MVnZRmmQ6fc8yIjXO9ucgpJI9M8/3n12avgjnXJoNCPSufg384o87s/wsgtA+kZmncM0GCxgXjMF0eRiTnL7/0qpXfylfGwYCgjKV8nle8jDh23iI0SAJYDNLi55NpBwlj/CSf9S0N3xrqwUrjlH9FZch/d/rjRuTSV17W4zdq30Pi2S4SaunJxKELOywOh/ljEeUG3dDjT9qeMYwCnYBdV3Oii1LK+Moua3UMzI9mT3ihe2EDWWg== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR11MB4425.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(396003)(136003)(376002)(39860400002)(346002)(366004)(52536014)(53546011)(6506007)(186003)(83380400001)(86362001)(5660300002)(26005)(966005)(19627235002)(76116006)(66946007)(110136005)(478600001)(2906002)(66476007)(66556008)(64756008)(66446008)(33656002)(7696005)(55016002)(4326008)(71200400001)(316002)(8936002)(9686003)(8676002)(54906003)(107886003);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: rboQ9Wcf5frjQItx3rG7/KQWC/u8MiuRWcYBEL3C5I6G+HU0pVE/DCCYz74mE/idoj1H6M9IJbSGee2MEIZRRJHDR1OImcbNzFnmwipXNoL/trCnr2KRAylr+eyiBSivuMlfbbDO7S0qdd9i/eM1dy8pNSt+47EkTctqSmYpCtRMd4hHdfFxFGUBEm4vXbv52oDdR8Fj+tp6D8mzjUleM2COsU4VJlwmsK606iALVQXAB0uvg8CcLulRfhDkE4AeOQFReWWLru0PxvKHkMW2+DVgkfv8NrtPo7HdM+Bfwa5b6TAFc0gQSJQKwQwP9rm2ACf+dP5rxWjObRdFTLfwwrGPOKPQNVU2/ei8nyNSZ0Ips9MVKXlk0pGeA4/F2l9Kng1Rf3wM9jL2Rflzvb+WmfA5Y25Uv3SqXvG+DZl+EUOfYqtfNAcIz2ZE7HnzmQ+E3jP8LIk4pToUPfuxvKIfDXZW3YqpUeAVXmNUtugzoo00StSF3yRFE6bXqypBE6RJ MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: bca130c4-f1a1-47fa-03de-08d817147496 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2020 01:26:29.3749 (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: GY4EsAQU+feQWttsr5r7UNaaxdBq0vWBaLgpOXJuIGxbTVzFuLoWDm+eh8fopD7ZDDffy5PSp11rFc6zs+OTHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1594 Return-Path: zhichao.gao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Zhichao Gao Thanks, Zhichao > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Tomas Pil= ar > (tpilar) > Sent: Monday, June 15, 2020 10:04 PM > To: devel@edk2.groups.io > Cc: nd@arm.com; Ni, Ray ; Gao, Zhichao > > Subject: [edk2-devel] [PATCH v3 6/7] ShellPkg: Add AcpiViewCommandLib >=20 > The UefiShellAcpiViewCommandLib is converted from NULL library to a name= d > library so that it may be used in modules other than shell. > The library interface exposes the main method for to AcpiView functional= ity as > well as a helper method to dump a buffer to a file. >=20 > The Shell module is still built by pulling UefiShellAcpiViewCommandLib a= s a NULL > library to preserve the modularity of shell builds. >=20 > Cc: Ray Ni > Cc: Zhichao Gao > Signed-off-by: Tomas Pilar > --- > .../Library/AcpiViewCommandLib.h} | 15 ++++++++------- > .../UefiShellAcpiViewCommandLib/AcpiView.c | 2 +- > .../UefiShellAcpiViewCommandLib.c | 2 +- > .../UefiShellAcpiViewCommandLib.inf | 3 +-- > ShellPkg/ShellPkg.dec | 3 +++ > ShellPkg/ShellPkg.dsc | 3 ++- > 6 files changed, 16 insertions(+), 12 deletions(-) rename > ShellPkg/{Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLi= b. > h =3D> Include/Library/AcpiViewCommandLib.h} (72%) >=20 > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.h b/ShellPkg/Include/Library/AcpiViewCommandLib.h > similarity index 72% > rename from > ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib= . > h > rename to ShellPkg/Include/Library/AcpiViewCommandLib.h > index b1b1ffe63e28..11cf96c6e0d7 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.h > +++ b/ShellPkg/Include/Library/AcpiViewCommandLib.h > @@ -1,12 +1,13 @@ > /** @file > - Header file for 'acpiview' Shell command functions. > + Library providing 'acpiview' functionality to display and validate > + installed ACPI tables. >=20 > Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
> SPDX-License-Identifier: BSD-2-Clause-Patent **/ >=20 > -#ifndef UEFI_SHELL_ACPIVIEW_COMMAND_LIB_H_ > -#define UEFI_SHELL_ACPIVIEW_COMMAND_LIB_H_ > +#ifndef ACPI_VIEW_COMMAND_LIB_H_ > +#define ACPI_VIEW_COMMAND_LIB_H_ >=20 > /** > Dump a buffer to a file. Print error message if a file cannot be crea= ted. > @@ -26,14 +27,14 @@ ShellDumpBufferToFile ( > ); >=20 > /** > - Function for 'acpiview' command. > + Display and validate ACPI tables. >=20 > @param[in] ImageHandle Handle to the Image (NULL if internal). > @param[in] SystemTable Pointer to the System Table (NULL if internal= ). >=20 > - @retval SHELL_INVALID_PARAMETER The command line invocation could not > be parsed > - @retval SHELL_NOT_FOUND The command failed > - @retval SHELL_SUCCESS The command was successful > + @retval SHELL_INVALID_PARAMETER The command line invocation could not > be parsed. > + @retval SHELL_NOT_FOUND The command failed. > + @retval SHELL_SUCCESS The command was successful. > **/ > SHELL_STATUS > EFIAPI > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > index 1b6721e6734f..5a46d896c52b 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c > @@ -17,11 +17,11 @@ > #include > #include > #include > +#include > #include "AcpiParser.h" > #include "AcpiTableParser.h" > #include "AcpiView.h" > #include "AcpiViewConfig.h" > -#include "UefiShellAcpiViewCommandLib.h" >=20 > #if defined(MDE_CPU_ARM) || defined (MDE_CPU_AARCH64) #include > "Arm/SbbrValidator.h" > diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.c > index e6a65d5bc5f7..d2f26ff89f12 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComm > +++ andLib.c > @@ -16,13 +16,13 @@ > #include > #include > #include > +#include > #include >=20 > #include "AcpiParser.h" > #include "AcpiTableParser.h" > #include "AcpiView.h" > #include "AcpiViewConfig.h" > -#include "UefiShellAcpiViewCommandLib.h" >=20 > CONST CHAR16 gShellAcpiViewFileName[] =3D L"ShellCommand"; > EFI_HII_HANDLE gShellAcpiViewHiiHandle =3D NULL; diff --git > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.inf > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.inf > index 92de2391b09f..91459f9ec632 100644 > --- > a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandL= i > b.inf > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComm > +++ andLib.inf > @@ -14,7 +14,7 @@ [Defines] > FILE_GUID =3D FB5B305E-84F5-461F-940D-82D345757A= FA > MODULE_TYPE =3D UEFI_APPLICATION > VERSION_STRING =3D 1.0 > - LIBRARY_CLASS =3D NULL|UEFI_APPLICATION UEFI_DRIVER > + LIBRARY_CLASS =3D AcpiViewCommandLib|UEFI_APPLICATIO= N > UEFI_DRIVER > CONSTRUCTOR =3D UefiShellAcpiViewCommandLibConstru= ctor > DESTRUCTOR =3D UefiShellAcpiViewCommandLibDestruc= tor >=20 > @@ -46,7 +46,6 @@ [Sources.common] > Parsers/Ssdt/SsdtParser.c > Parsers/Xsdt/XsdtParser.c > UefiShellAcpiViewCommandLib.c > - UefiShellAcpiViewCommandLib.h > UefiShellAcpiViewCommandLib.uni >=20 > [Sources.ARM, Sources.AARCH64] > diff --git a/ShellPkg/ShellPkg.dec b/ShellPkg/ShellPkg.dec index > c17e358d15ed..d0843d338126 100644 > --- a/ShellPkg/ShellPkg.dec > +++ b/ShellPkg/ShellPkg.dec > @@ -34,6 +34,9 @@ [LibraryClasses] > ## @libraryclass provides BCFG command > BcfgCommandLib|Include/Library/BcfgCommandLib.h >=20 > + ## @libraryclass provides the AcpiView command > + AcpiViewCommandLib|Include/Library/AcpiViewCommandLib.h > + > [Guids] > gEfiShellEnvironment2ExtGuid =3D {0xd2c18636, 0x40e5, 0x4eb5, {0xa= 3, 0x1b, > 0x36, 0x69, 0x5f, 0xd4, 0x2c, 0x87}} > gEfiShellPkgTokenSpaceGuid =3D {0x171e9188, 0x31d3, 0x40f5, {0xb= 1, 0x0c, > 0x53, 0x9b, 0x2d, 0xb9, 0x40, 0xcd}} > diff --git a/ShellPkg/ShellPkg.dsc b/ShellPkg/ShellPkg.dsc index > b7ee856b3a16..5d2d96ab071c 100644 > --- a/ShellPkg/ShellPkg.dsc > +++ b/ShellPkg/ShellPkg.dsc > @@ -2,7 +2,7 @@ > # Shell Package > # > # Copyright (c) 2007 - 2019, Intel Corporation. All rights reserved. -# > Copyright (c) 2018, Arm Limited. All rights reserved.
> +# Copyright (c) 2018 - 2020, Arm Limited. All rights reserved.
> # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All ri= ghts > reserved.
# > # SPDX-License-Identifier: BSD-2-Clause-Patent > @@ -50,6 +50,7 @@ [LibraryClasses.common] >=20 >=20 > PeCoffGetEntryPointLib|MdePkg/Library/BasePeCoffGetEntryPointLib/BasePeC= o > ffGetEntryPointLib.inf >=20 > BcfgCommandLib|ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCom > mandLib.inf > + > + AcpiViewCommandLib|ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiSh > + ellAcpiViewCommandLib.inf > IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf >=20 >=20 > UefiBootManagerLib|MdeModulePkg/Library/UefiBootManagerLib/UefiBootMa > nagerLib.inf > -- > 2.24.1.windows.2 >=20 >=20 >=20 >=20