From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.81]) by mx.groups.io with SMTP id smtpd.web09.6912.1580384597490286896 for ; Thu, 30 Jan 2020 03:43:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=QTJRCDeP; spf=pass (domain: arm.com, ip: 40.107.8.81, mailfrom: krzysztof.koch@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eh1uRdT0r5mByAD8QqyZetR7QCeywhMD+fd3LPpTIWc=; b=QTJRCDePIZVP2YGn9UapTzagQxrDVGeOyEagsKmuzD3Mc1NHDShvnUGFkYWydhBfdQB6I8TzRVG/pCafN5QZtd7Sp5rr8MnSGvyt9sE6i/KivnHCV5Vp5l0KYhDEdg5BnbRxgYBCLqCLBiAortFGoLKCQPsO/hLvkgbipDzPm6E= Received: from VI1PR08CA0105.eurprd08.prod.outlook.com (2603:10a6:800:d3::31) by VI1PR08MB2992.eurprd08.prod.outlook.com (2603:10a6:803:44::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2686.26; Thu, 30 Jan 2020 11:43:14 +0000 Received: from AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::203) by VI1PR08CA0105.outlook.office365.com (2603:10a6:800:d3::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.21 via Frontend Transport; Thu, 30 Jan 2020 11:43:14 +0000 Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT045.mail.protection.outlook.com (10.152.17.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.18 via Frontend Transport; Thu, 30 Jan 2020 11:43:14 +0000 Received: ("Tessian outbound efdea641ed36:v42"); Thu, 30 Jan 2020 11:43:14 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c59dd8cd6142e2bb X-CR-MTA-TID: 64aa7808 Received: from aeb3c48885d5.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1B197EC8-17EC-4302-8E14-43A0773AE785.1; Thu, 30 Jan 2020 11:43:08 +0000 Received: from EUR03-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id aeb3c48885d5.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 30 Jan 2020 11:43:08 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ftW/WZ3q/miBocEUVP06Q6/69p8Y5CE4t46OSNfrRW7jW1UEXwtsbwxVl46+LvqoxnCTkjxHTUUp0bC0A8/ujBZ3yDyn8Qv+CXqzOUmX7pkYpllW8sLyKy0FhRH2cV8LodJond5IttJlZB4mxB1oOSrNQJeA8g64e1xIioeBaQAsCH6Hn4jF8RFnO0WKlNDNJFfYNTRGBggr038tu6xY2AsCTiJJcHwJr1vXObl/IsHx7/3zAlxSlWljgaX0rSdx4iKM8RVF0Zm+H1eC0/vDhpoOkDzKDff3NNhQd6meD5o/ByCKw6zKoGPLA1k/9mHShjnHxxGlRoPxj6DxkCu6+g== 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=eh1uRdT0r5mByAD8QqyZetR7QCeywhMD+fd3LPpTIWc=; b=Egr40tUq7Hpc9bAibLJOYhjxMFSO8ZS2tAdDVOpeDrHcOiTT7i/BTxRVxIQuuOOLbozZojcWAoltgNuZLl3XQRjfzMjHZLUH6Ngv4Jm0tPkbZELfVjTeOYGUSH6xXY92ACajthjVu/PdGcz7ZPEynQmepid2uSZcuD9s6ru1vnqiAcK3mvQ50U0wrpEdUMgvjNiSyO7GfsP2RwEOn5+hnunwyoHjdjde1JYxOPkKQ5YkUA/z2g3oIWzLyb0FxvY8Qo4I8PqRw1lhmQE4W2FkHDK+SBDAAitpHlyQ6F3IYWFAkSyUHqGYZsVq0jUIAT0pauiBywGQmXWG0DvbP3GjWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=bestguesspass action=none header.from=arm.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eh1uRdT0r5mByAD8QqyZetR7QCeywhMD+fd3LPpTIWc=; b=QTJRCDePIZVP2YGn9UapTzagQxrDVGeOyEagsKmuzD3Mc1NHDShvnUGFkYWydhBfdQB6I8TzRVG/pCafN5QZtd7Sp5rr8MnSGvyt9sE6i/KivnHCV5Vp5l0KYhDEdg5BnbRxgYBCLqCLBiAortFGoLKCQPsO/hLvkgbipDzPm6E= Received: from DB6PR0802CA0048.eurprd08.prod.outlook.com (2603:10a6:4:a3::34) by VI1PR08MB5422.eurprd08.prod.outlook.com (2603:10a6:803:12e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.20; Thu, 30 Jan 2020 11:43:06 +0000 Received: from DB5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::200) by DB6PR0802CA0048.outlook.office365.com (2603:10a6:4:a3::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2665.21 via Frontend Transport; Thu, 30 Jan 2020 11:43:06 +0000 Authentication-Results-Original: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; Received: from nebula.arm.com (40.67.248.234) by DB5EUR03FT051.mail.protection.outlook.com (10.152.21.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2665.18 via Frontend Transport; Thu, 30 Jan 2020 11:43:06 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Thu, 30 Jan 2020 11:43:01 +0000 Received: from E119924.Arm.com (10.1.199.55) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Thu, 30 Jan 2020 11:43:01 +0000 From: "Krzysztof Koch" To: CC: , , , , Subject: [PATCH v1 1/1] ShellPkg: acpiview: Remove duplicate ACPI structure size definitions Date: Thu, 30 Jan 2020 11:42:55 +0000 Message-ID: <20200130114255.57188-1-krzysztof.koch@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;IPV:;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(39860400002)(376002)(136003)(396003)(346002)(199004)(189003)(44832011)(6666004)(356004)(70586007)(6916009)(336012)(7696005)(5660300002)(70206006)(8936002)(86362001)(186003)(8676002)(2906002)(316002)(966005)(1076003)(54906003)(81166006)(81156014)(4326008)(478600001)(426003)(26005)(36756003)(2616005);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB5422;H:nebula.arm.com;FPR:;SPF:Pass;LANG:en;PTR:InfoDomainNonexistent;A:1;MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5384c216-37af-4eea-492d-08d7a5799763 X-MS-TrafficTypeDiagnostic: VI1PR08MB5422:|VI1PR08MB2992: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-Forefront-PRVS: 02981BE340 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: BixbrSlZf2U8Df5ssJkXPAcZ54LXLQPKV6Jp68cGhXQ7C4YT9W6jHpKCpdnG9aYxoKc0uw5K4ggmWCl97PhR0sOwAE0/csgPhSyheLxfY4GTIgKOT9I2imqvSqGAChruwZuXxfBCgDEF/KRuNSYKfZ5gl+60iN2AXS+lcVL8ysPP6oJNFlH7XT+PzJmJKB+xmB04jrGDrxfXGtmB7kGcsSsCdNqAgcxj5t0j/jRHgaAEhjWN626YmeatruuW//7/vIE98lCBfDWkYCML40PAs5xIvrzlnZJQPDJWo4PZsMVORuzNzA0J0pztU8O4p0MK7d6yCFHCTKC7aD29dF9iqtEaCyzX1FlT88bUAEM2Y0znqM0T8GNwljfygDRgw/IQG4Q9yQNy80LtUVmF4FYrq+o2fXJr4Z33xJHeuEwdIaTg4IeyWzGBKYWeVt9CF1c/ACmuQ+0zhcNLgQYXXtlDay7EaWoRSO+8WDsIlFiHmYtQ9gq/MNu++DtksnGy5lEYQv/ozSC12VkrfUCKyPQ3Zw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5422 Original-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=bestguesspass action=none header.from=arm.com; Return-Path: Krzysztof.Koch@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT045.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;IPV:CAL;SCL:-1;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(136003)(376002)(346002)(39860400002)(189003)(199004)(36906005)(1076003)(54906003)(4326008)(426003)(2616005)(316002)(44832011)(36756003)(7696005)(26826003)(26005)(8936002)(81156014)(478600001)(70206006)(86362001)(186003)(70586007)(81166006)(8676002)(6666004)(6916009)(2906002)(336012)(966005)(5660300002);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR08MB2992;H:64aa7808-outbound-1.mta.getcheckrecipient.com;FPR:;SPF:Pass;LANG:en;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;MX:1;A:1; X-MS-Office365-Filtering-Correlation-Id-Prvs: 08d1083d-d39c-401f-17cd-08d7a579927d X-Forefront-PRVS: 02981BE340 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: OAq9iVZasppJENRO2qptSSuqjqwUkAcBHlMYb4bH5hoH9azh09dq6HwVlV7ae9ZLmkpgVWVkrshzRkHyhJNaftoXvr+GAhspCghk3WeWCkjQoe7depzQEVQCa698CpqDpxjzOjyWl1glCF0p+d1Zphfl+Yc+eQWqCJDMYg8wpPuC3wOPpg6WwGZOyTgQsxTgj/24H+68t2iPYH68q9zshJ5rRDu6X/Hcmh8c9nqnuXanYl0Fe0SIfikco+Oln7uewkC4rC/NULNW5RGTvsKXWLeF4D7bhcI/hsYAA1/9CBG0pbJ9NE+p0DiGCao6TFApdLAsTX87d3hcapp5DsAkCj4RMPIxd/DYRF6Vj5sPbxcsc+u5HThNE8M0KIUZZ7SIBtAuNWjuWsjcCjEyp6rrod6khi9BP3NlmQLRmqKFJ+LADfK+9HUcGE1Swrga3p3uOXwReonjnxqNrsmZw5DZC8qDuv8UbUSUF4Sw8Oo2uPVdjBucHtSORhX+iTskbK0bttpBVHgNWBc87MCWcDzTLQ== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Jan 2020 11:43:14.5036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5384c216-37af-4eea-492d-08d7a5799763 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2992 Content-Type: text/plain Remove duplicate Generic Address Structure (GAS) and ACPI table header size definitions. Replace any dependencies with the definitions from Acpi63.h. AcpiParser.h redefines the size of Generic Address Structure (GAS) and the ACPI table header. The motivation is to 'minimise any reference to the EDK2 ACPI headers in an attempt to provide cross checking'. While the redefined values are unlikely to change, redefinition causes unnecessary maintenance overhead for acpiview. In addition to this, EDK2 ACPI headers are referenced throughout the entire project, so the assumption should be that the definitions in these header files are correct. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/tianocore/edk2/compare/master...KrzysztofKoch1:remove_dup_defs_acpiview_v1?expand=1 Notes: v1: - Remove duplicate definitions [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 8 +++---- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 22 +------------------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 2b2ecb93cef9ee28b752e7bf2d920b059dbf7d6b..ed8767da64280d0b02fe42b7d2120690d5573bba 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -1,7 +1,7 @@ /** @file ACPI parser - 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 **/ @@ -666,7 +666,7 @@ DumpGas ( IN UINT8* Ptr ) { - DumpGasStruct (Ptr, 2, GAS_LENGTH); + DumpGasStruct (Ptr, 2, sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)); } /** @@ -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) ); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index 6deee3542e09bc18b03fdd18dece5b6f9725839c..f81ccac7e118378aa185db4b625e5bcd75f78347 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -1,7 +1,7 @@ /** @file Header file for ACPI parser - 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 **/ @@ -396,26 +396,6 @@ ParseAcpi ( { L"Creator Revision", 4, 32, L"0x%X", NULL, \ (VOID**)&(Info)->CreatorRevision, NULL, NULL } -/** - 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. -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'