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.web12.5247.1581391633142753395 for ; Mon, 10 Feb 2020 19:27:13 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: zhichao.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Feb 2020 19:27:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,427,1574150400"; d="scan'208";a="226369680" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga008.jf.intel.com with ESMTP; 10 Feb 2020 19:27:11 -0800 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 10 Feb 2020 19:27:11 -0800 Received: from shsmsx603.ccr.corp.intel.com (10.109.6.143) by SHSMSX601.ccr.corp.intel.com (10.109.6.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 11 Feb 2020 11:27:09 +0800 Received: from shsmsx603.ccr.corp.intel.com ([10.109.6.143]) by SHSMSX603.ccr.corp.intel.com ([10.109.6.143]) with mapi id 15.01.1713.004; Tue, 11 Feb 2020 11:27:09 +0800 From: "Gao, Zhichao" To: Krzysztof Koch , "devel@edk2.groups.io" CC: "Ni, Ray" , "Matteo.Carlini@arm.com" , "Sami.Mujawar@arm.com" , "nd@arm.com" Subject: Re: [PATCH v1 1/1] ShellPkg: acpiview: Remove duplicate ACPI structure size definitions Thread-Topic: [PATCH v1 1/1] ShellPkg: acpiview: Remove duplicate ACPI structure size definitions Thread-Index: AQHV12J7vpDlC7P4bEK6OapnGhRqJ6gVTXcw Date: Tue, 11 Feb 2020 03:27:09 +0000 Message-ID: <00057f649a1a4ee4a675ad326dc453c2@intel.com> References: <20200130114255.57188-1-krzysztof.koch@arm.com> In-Reply-To: <20200130114255.57188-1-krzysztof.koch@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTNlMTEwZWQtNTRmZS00NzE1LThkZTYtNWYxNTNjZGZiNGI5IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiUTZwMm5kd0I5eXlUTzFRNTJ6K0FXUERDV1lQNzRFa0k2anc0MTJZQTNuTzJ0Z2NMTUdCMUJXSlBkM0Q0c2tpWCJ9 dlp-reaction: no-action dlp-version: 11.2.0.6 x-originating-ip: [10.239.127.36] MIME-Version: 1.0 Return-Path: zhichao.gao@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: Krzysztof Koch > Sent: Thursday, January 30, 2020 7:43 PM > To: devel@edk2.groups.io > Cc: Ni, Ray ; Gao, Zhichao ; > Matteo.Carlini@arm.com; Sami.Mujawar@arm.com; nd@arm.com > Subject: [PATCH v1 1/1] ShellPkg: acpiview: Remove duplicate ACPI structu= re > size definitions >=20 > Remove duplicate Generic Address Structure (GAS) and ACPI table header si= ze > definitions. Replace any dependencies with the definitions from Acpi63.h. >=20 > AcpiParser.h redefines the size of Generic Address Structure (GAS) and th= e ACPI > table header. The motivation is to 'minimise any reference to the EDK2 AC= PI > headers in an attempt to provide cross checking'. While the redefined val= ues are > unlikely to change, redefinition causes unnecessary maintenance overhead = for > acpiview. >=20 > In addition to this, EDK2 ACPI headers are referenced throughout the enti= re > project, so the assumption should be that the definitions in these header= files > are correct. >=20 > Signed-off-by: Krzysztof Koch > --- >=20 > Changes can be seen at: > https://github.com/tianocore/edk2/compare/master...KrzysztofKoch1:remove_ > dup_defs_acpiview_v1?expand=3D1 >=20 > Notes: > v1: > - Remove duplicate definitions [Krzysztof] >=20 > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 8 +++---- > ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 22 +---------= ------ > ---- > 2 files changed, 5 insertions(+), 25 deletions(-) >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > index > 2b2ecb93cef9ee28b752e7bf2d920b059dbf7d6b..ed8767da64280d0b02fe42b7d > 2120690d5573bba 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c > @@ -1,7 +1,7 @@ > /** @file > ACPI parser >=20 > - Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent **/ >=20 > @@ -666,7 +666,7 @@ DumpGas ( > IN UINT8* Ptr > ) > { > - DumpGasStruct (Ptr, 2, GAS_LENGTH); > + DumpGasStruct (Ptr, 2, sizeof > + (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)); > } >=20 > /** > @@ -687,7 +687,7 @@ DumpAcpiHeader ( > 0, > "ACPI Table Header", > Ptr, > - ACPI_DESCRIPTION_HEADER_LENGTH, > + sizeof (EFI_ACPI_DESCRIPTION_HEADER), > PARSER_PARAMS (AcpiHeaderParser) > ); > } > @@ -721,7 +721,7 @@ ParseAcpiHeader ( > 0, > NULL, > Ptr, > - ACPI_DESCRIPTION_HEADER_LENGTH, > + sizeof (EFI_ACPI_DESCRIPTION_HEADER), > PARSER_PARAMS (AcpiHeaderParser) > ); >=20 > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > index > 6deee3542e09bc18b03fdd18dece5b6f9725839c..f81ccac7e118378aa185db4b6 > 25e5bcd75f78347 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h > @@ -1,7 +1,7 @@ > /** @file > Header file for ACPI parser >=20 > - Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. > + Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. > SPDX-License-Identifier: BSD-2-Clause-Patent **/ >=20 > @@ -396,26 +396,6 @@ ParseAcpi ( > { L"Creator Revision", 4, 32, L"0x%X", NULL, \ > (VOID**)&(Info)->CreatorRevision, NULL, NULL } >=20 > -/** > - Length of the ACPI GAS structure. > - > - NOTE: This might normally be defined as > - sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE). > - However, we deliberately minimise any reference to the EDK2 ACPI > - headers in an attempt to provide cross checking. > -**/ > -#define GAS_LENGTH 12 > - > -/** > - Length of the ACPI Header structure. > - > - NOTE: This might normally be defined as > - sizeof (EFI_ACPI_DESCRIPTION_HEADER). > - However, we deliberately minimise any reference to the EDK2 ACPI > - headers in an attempt to provide cross checking. > -**/ > -#define ACPI_DESCRIPTION_HEADER_LENGTH 36 > - > /** > This function indents and traces the GAS structure as described by the > GasParser. >=20 > -- > 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' >=20