From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=NL8SZwAX; spf=pass (domain: arm.com, ip: 40.107.3.68, mailfrom: krzysztof.koch@arm.com) Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.68]) by groups.io with SMTP; Fri, 28 Jun 2019 03:25:42 -0700 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=pP8vGeoERjfVmn4IHx4BVHaMiXD4jpbBaBLYYar7C3Y=; b=NL8SZwAXzNgrea0iRGMilv93cR2Vp0hVnazjbtBxoRY3koIwyI36ueLjFCUW8efdD+yUIyD2N3PpjXa9e4YAi9uqnPAiOx5yDxEQlTyzXvrqCNVPxWahzXD2I9rRX/w6eY44dvdFlZR2j/I2jZuyweBpW4wTgC97hNlYHqG/deA= Received: from AM6PR08CA0046.eurprd08.prod.outlook.com (2603:10a6:20b:c0::34) by DB8PR08MB5035.eurprd08.prod.outlook.com (2603:10a6:10:eb::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.18; Fri, 28 Jun 2019 10:25:39 +0000 Received: from AM5EUR03FT034.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::204) by AM6PR08CA0046.outlook.office365.com (2603:10a6:20b:c0::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2032.18 via Frontend Transport; Fri, 28 Jun 2019 10:25:39 +0000 Authentication-Results: spf=temperror (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=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT034.mail.protection.outlook.com (10.152.16.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.20.2032.15 via Frontend Transport; Fri, 28 Jun 2019 10:25:38 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1415.2; Fri, 28 Jun 2019 10:24:47 +0000 Received: from E119924.Arm.com (10.1.199.124) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Fri, 28 Jun 2019 10:24:47 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [PATCH v1 3/4] ShellPkg: acpiview: Remove redundant IORT node types enum Date: Fri, 28 Jun 2019 11:24:37 +0100 Message-ID: <20190628102438.30544-4-krzysztof.koch@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20190628102438.30544-1-krzysztof.koch@arm.com> References: <20190628102438.30544-1-krzysztof.koch@arm.com> Return-Path: Krzysztof.Koch@arm.com MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:40.67.248.234;IPV:NLI;CTRY:IE;EFV:NLI;SFV:NSPM;SFS:(10009020)(4636009)(396003)(346002)(39860400002)(136003)(376002)(2980300002)(189003)(199004)(77096007)(19627235002)(70206006)(70586007)(6916009)(26005)(53936002)(48376002)(54906003)(50466002)(316002)(2351001)(356004)(6666004)(186003)(47776003)(16586007)(5660300002)(966005)(1076003)(72206003)(86362001)(478600001)(76176011)(6306002)(81166006)(81156014)(8676002)(305945005)(8936002)(68736007)(336012)(486006)(51416003)(44832011)(476003)(2616005)(7696005)(2906002)(126002)(53416004)(36756003)(4326008)(11346002)(50226002)(426003)(446003)(63370400001)(63350400001);DIR:OUT;SFP:1101;SCL:1;SRVR:DB8PR08MB5035;H:nebula.arm.com;FPR:;SPF:TempError;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ad07ac6-3bee-4f7b-a57e-08d6fbb2f6e8 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328);SRVR:DB8PR08MB5035; X-MS-TrafficTypeDiagnostic: DB8PR08MB5035: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:2733; X-Forefront-PRVS: 00826B6158 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: Cv9kaXTDaifhnXszdMfZx2oEKYBBik0+D4R1by8LnE2yPDMV7mKawGBar9rxwgVUAOP9TlJOhquQoEt8SNpe07LowqTlxdRJ3qJszs13/gAl/077KzefUuSpYscbwEcwh/7GKsgROXvOereqjcButf+mPTgwBEl9flu0WZrIVBQJDBMzuuplPxsnzQhsR1nOj+lPOXGoOSxOVTHGX0qdPHArcGFO5mJoBWq8YCZzE+3IyOuWwC6MCMQCZIQhZIvhYQoLkWUeyUHigKPlHyIZ1PNB7XA/fcUzRdXykoDC/4bBPiJNStrYEPeXBJyv7QwDvQitp6NVEwOvm8dJC0ST38EFYC53A7FWHWz7wX126zxV1MN/7uhlvFZHSUonnjv+tzuQUXZwVadRR+dubHdkty1fpqtP8kx7OX2njWvCXZU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 10:25:38.3405 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ad07ac6-3bee-4f7b-a57e-08d6fbb2f6e8 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[40.67.248.234];Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5035 Content-Type: text/plain Replace the enum defining valid node types in the IORT table with macros from IoRemappingTable.h. Signed-off-by: Krzysztof Koch --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/79650cd6f2552e849afcd89aa016f35774376408 Notes: v1: - Remove redundant enum defining allowed IORT node types [Krzysztof] - Use macros from IoRemappingTable.h instead [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 30 ++++++-------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c index e3d9bc9a996001f77ed8b13a1c57505496807f4c..a91a4f9db13a52285bf56abe33f359a771fc04bd 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c @@ -1,7 +1,7 @@ /** @file IORT table parser - Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): @@ -17,24 +17,10 @@ // Local variables STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo; -/** - The EIORT_NODE enum describes the IORT Node types. -**/ -typedef enum IortNode { - Iort_Node_ITS_Group, ///< ITS Group node - Iort_Node_Named_Component, ///< Named Component node - Iort_Node_Root_Complex, ///< Root Complex node - Iort_Node_SMMUV1_V2, ///< SMMU v1/v2 node - Iort_Node_SMMUV3, ///< SMMU v3 node - Iort_Node_PMCG, ///< PMC group node - Iort_Node_Max -} EIORT_NODE; - -// Local Variables STATIC CONST UINT32* IortNodeCount; STATIC CONST UINT32* IortNodeOffset; -STATIC CONST UINT8* IortNodeType; +STATIC CONST UINT8* IortNodeType; STATIC CONST UINT16* IortNodeLength; STATIC CONST UINT32* IortIdMappingCount; STATIC CONST UINT32* IortIdMappingOffset; @@ -659,13 +645,13 @@ ParseAcpiIort ( Print (L"0x%x\n", Offset); switch (*IortNodeType) { - case Iort_Node_ITS_Group: + case EFI_ACPI_IORT_TYPE_ITS_GROUP: DumpIortNodeIts ( NodePtr, *IortNodeLength ); break; - case Iort_Node_Named_Component: + case EFI_ACPI_IORT_TYPE_NAMED_COMP: DumpIortNodeNamedComponent ( NodePtr, *IortNodeLength, @@ -673,7 +659,7 @@ ParseAcpiIort ( *IortIdMappingOffset ); break; - case Iort_Node_Root_Complex: + case EFI_ACPI_IORT_TYPE_ROOT_COMPLEX: DumpIortNodeRootComplex ( NodePtr, *IortNodeLength, @@ -681,7 +667,7 @@ ParseAcpiIort ( *IortIdMappingOffset ); break; - case Iort_Node_SMMUV1_V2: + case EFI_ACPI_IORT_TYPE_SMMUv1v2: DumpIortNodeSmmuV1V2 ( NodePtr, *IortNodeLength, @@ -689,7 +675,7 @@ ParseAcpiIort ( *IortIdMappingOffset ); break; - case Iort_Node_SMMUV3: + case EFI_ACPI_IORT_TYPE_SMMUv3: DumpIortNodeSmmuV3 ( NodePtr, *IortNodeLength, @@ -697,7 +683,7 @@ ParseAcpiIort ( *IortIdMappingOffset ); break; - case Iort_Node_PMCG: + case EFI_ACPI_IORT_TYPE_PMCG: DumpIortNodePmcg ( NodePtr, *IortNodeLength, -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'