From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.41]) by mx.groups.io with SMTP id smtpd.web10.46.1588693582277619880 for ; Tue, 05 May 2020 08:46:22 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=cYPtQKcO; spf=pass (domain: arm.com, ip: 40.107.21.41, 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=UQDVzuqptwHT8wkS5v8BP4hKl5d1RCQ9i8m5d8XnJrA=; b=cYPtQKcOjWVvdpgqwPYaLZet48zRIXLmSofIpMyYv0fDAldUcG12S4ipR2IMJ2L4gk3IkdZg6I1gLpOjvb9LnAX2pe2zhix4esK/w3BVqeQGR1iap/xxfpl26WJdgeRk89GPIinT0PdBjwYhGyoofIlsaOCpT/IQdDPi+3G+Q7I= Received: from DB6P191CA0004.EURP191.PROD.OUTLOOK.COM (2603:10a6:6:28::14) by AM0PR08MB4353.eurprd08.prod.outlook.com (2603:10a6:208:144::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.29; Tue, 5 May 2020 15:46:19 +0000 Received: from DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:6:28:cafe::a7) by DB6P191CA0004.outlook.office365.com (2603:10a6:6:28::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 15:46:19 +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 DB5EUR03FT005.mail.protection.outlook.com (10.152.20.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 15:46:18 +0000 Received: ("Tessian outbound ff098c684b24:v54"); Tue, 05 May 2020 15:46:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 41ddf542785fdd86 X-CR-MTA-TID: 64aa7808 Received: from 091a6a94f14f.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3899A82C-D995-46E1-A036-BA82BC056E56.1; Tue, 05 May 2020 15:46:13 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 091a6a94f14f.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 05 May 2020 15:46:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T6tghK/1KH+zHPsI1TAHs9jRaqMnoeurufrCUQ4VBvLG4kurLEOsVR49OClG+fRddaA3tKWTORV7KCTs0MCfMcdYA8z+O4b2j1vZwUbseeWMDsxbVHBZveIFpyk4r94lPquaZvRenRHwsDAcboS7CkgS2iKjvzEUxY/SnLe5DvDQAvxiA3ned7WHGBeURM5fDLBNC+yTG8TKFkmpOh3MKbkg2L2DU07FN1/Y19lgezadyI3SFmnzzliEWGSGAzJn0412Uir8GBM0zdrsXwg/QPDTBzPF7iqmPf8RWgwVtFlDBmVukSuztWtlgfSdl9lLZZsdSJXxAjlmqXIXkYHd3w== 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=UQDVzuqptwHT8wkS5v8BP4hKl5d1RCQ9i8m5d8XnJrA=; b=BNntIlVGi09lY45rZO6tn7hxCeiH9S86UJL4Rh1h5Q1Jz4FfTvXKCE/bk7oLzzDuPAL08aJsdRWZKP94N0FDnlQ+R6j3OVmrDCJbhy3C+aUpycWZcQ4CEE4gJidt6uUQ0lpidWOg69pCS6ZVnKG9Ailp5oSQqMzo1arlIlyhKC8I4luwbPttQlKeZ478T7NYdD+C7zjcWKi2yvG0av3oPAV862u0BqfyKDB13yDjkyDSZanGkG8vW23aqtCtdEOLZlE5QEeXIQdZlbZvoe1CAGyUEmioqqSIZ5EiYnP64wXIBI+orRmrDwpEPOYFRKPUw4tHi3bobtoiUdIJ8i/BMA== 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=UQDVzuqptwHT8wkS5v8BP4hKl5d1RCQ9i8m5d8XnJrA=; b=cYPtQKcOjWVvdpgqwPYaLZet48zRIXLmSofIpMyYv0fDAldUcG12S4ipR2IMJ2L4gk3IkdZg6I1gLpOjvb9LnAX2pe2zhix4esK/w3BVqeQGR1iap/xxfpl26WJdgeRk89GPIinT0PdBjwYhGyoofIlsaOCpT/IQdDPi+3G+Q7I= Received: from AM5PR04CA0011.eurprd04.prod.outlook.com (2603:10a6:206:1::24) by AM6PR08MB4453.eurprd08.prod.outlook.com (2603:10a6:20b:b9::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2958.20; Tue, 5 May 2020 15:46:12 +0000 Received: from AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:1:cafe::2a) by AM5PR04CA0011.outlook.office365.com (2603:10a6:206:1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.26 via Frontend Transport; Tue, 5 May 2020 15:46:12 +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 AM5EUR03FT007.mail.protection.outlook.com (10.152.16.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.2958.20 via Frontend Transport; Tue, 5 May 2020 15:46:11 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Tue, 5 May 2020 15:46:05 +0000 Received: from E119924.Arm.com (10.57.59.39) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 5 May 2020 15:46:04 +0000 From: "Krzysztof Koch" To: CC: , , , , Subject: [PATCH v1 0/6] ShellPkg: acpiview: Refactor ACPI table parsing loops Date: Tue, 5 May 2020 16:45:58 +0100 Message-ID: <20200505154604.9848-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;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFTY:;SFS:(4636009)(396003)(39860400002)(136003)(346002)(376002)(46966005)(33430700001)(7696005)(186003)(478600001)(26005)(316002)(426003)(2616005)(44832011)(8676002)(336012)(54906003)(2906002)(4326008)(81166007)(86362001)(47076004)(6916009)(82740400003)(356005)(82310400002)(966005)(70586007)(5660300002)(8936002)(70206006)(36756003)(1076003)(33440700001)(6666004);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8a88fa44-30ca-4970-df12-08d7f10b73f9 X-MS-TrafficTypeDiagnostic: AM6PR08MB4453:|AM0PR08MB4353: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-Forefront-PRVS: 0394259C80 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 0UwgJS9Nfw3DYxgV+mjecpvF7ST7rtAiGsXrag+nkN/1Bw/aq4RD0JngAjBhv0PGt3IZvnz5HJVQ+eLus2+2MOfX4SNMWH/Pv4AeQqmK8EWDpzYC5jKV7ZoBlRokeRu2j8ek+D56FvtB0933b8y47ZnYN1Fm2Oi3R7gezGSYkmulH8qd27XAr/AEW89+onNZlKm5w7hHDff4NP95Raj01OPfJ0/n3o0vMvLvXCHjjPIcIYWwYkBrSvJISxKS/61PC2d5BHPhqXuBPuRVCFkYEn1TrXyrchhFudpDSCoUFbQjQ0aQqBERaWCglDQmRYdYwrDMV8mKTXaDNb8XAenp81Jg2qHjUUOgMk9ZdLTERc0i8Q8SxKoNUtvJHsdkzOKsP0SdswBsaEnoyfHTSwOZ+iWiscKp+kPrmliKh94oj2dJuRDSk2oWOxbxJVZqPYaO1ENSUfCHwbSIPCSLU8XJfWXla4KYZVOig8qhp0um/ngnQw1Pl0CbNC7UyMAnFjn41o6feDJND4hMv7PerD2APsN4hdr8gekNfLHAhgdZBzThrJAn3McYjtUB9c0jL6upGyJNrUrBqYURZqifKr/R6X1lbKMogjx5fEaXf4bmXTgrwktWvonLO0V4iXer5yiBMJgNQeNQu1bL3noVFmVf5TpSAuqorwhm1WTj1bjMp1c= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4453 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: DB5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFTY:;SFS:(4636009)(136003)(39860400002)(376002)(346002)(396003)(46966005)(33430700001)(478600001)(7696005)(316002)(86362001)(2616005)(4326008)(33440700001)(426003)(336012)(6666004)(44832011)(5660300002)(36756003)(8676002)(6916009)(8936002)(966005)(82740400003)(54906003)(70586007)(81166007)(82310400002)(2906002)(26005)(1076003)(47076004)(186003)(70206006);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 99603cde-6515-45c6-2df3-08d7f10b6fba X-Forefront-PRVS: 0394259C80 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ETr3WDciFkyIiAgnGKFcZZvzqrJzJhy4AYMCaLSz+ChFsU5b42gRoLSX19N9sM9dy2V64aKJukXyr5bs+Qe7ardUKhGhvfLdovoaB3iPYTO68EBaNb10GAjVDMklT23PfcCxuFoUcS7I2onXcDbt3JuRR0ia+P1nwWt6fTGsHOIwc5q7XyrvWcteiJUgpU+cE4+vDQlg9bZTZwH4ORD+UBj7riUuFPXFQAkKBw2Yrm9UVnrhBDRrn5jxT9S2s0Qcips6MLD0UrgvlSsgk3Rh6bweJNgLXndlRoQEL2mdMsi4i4YubesZl2MXQFCuDRkCr/zq/X/51FYXV5j7nG8vz7p+jmlwPghg/LB2VsArXxNhhW1LfldN2Hdyt5L2PdTpJajQz6qwvrJHEI0X56riiUuA82RHjCovVcjk7nVE/iTJ3ajVHBBAwF2qSEWgwClfBIdf9pT3N6xZNJQjxkT644fst/dGHTaKRO13wVClew9laaBKPj92MPUeCC4nUOqRbCXjaiYsNRg/RPmf5BAH9t6oTZA8vCuAoFMQVHxkoaK6yCvAUNj/orSqGaJ3iJfYijMUrhyrIo7KkmZqUZG2xdH8O8NsrAwd/1dLjjXWvuGInHZPqnz4TFC+x84T7mvp+cS1ijcCl76RdhhIy59EHB7OyhCmb6UHqDTgO5upJGU= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 May 2020 15:46:18.8839 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8a88fa44-30ca-4970-df12-08d7f10b73f9 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: AM0PR08MB4353 Content-Type: text/plain This patch series modifies existing ACPI table parsers. Now, structure type values are used as indexes to access a centralized database containing information on how to parse each structure in the table. Replacing a 'switch' statements with arrays indexed by the Type value allows consolidation of metadata about buiding blocks of an ACPI table. The additional data stored about each structure includes: - ACPI-defined name - instance count - compatible architectures (x86, AArch64, etc...) - information on how to parse the structure The new metadata allows more extensive ACPI table contents validation in acpiview, which is implemented in this patch series. Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/tree/616_refactor_acpiview_parser_loops_v1 Krzysztof Koch (6): ShellPkg: acpiview: Add interface for data-driven table parsing ShellPkg: acpiview: Make MADT parsing logic data driven ShellPkg: acpiview: Make SRAT parsing logic data driven ShellPkg: acpiview: Make GTDT parsing logic data driven ShellPkg: acpiview: Make IORT parsing logic data driven ShellPkg: acpiview: Make PPTT parsing logic data driven ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 263 +++++++++++++++ ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 234 +++++++++++++ ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c | 123 ++++--- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 353 +++++++++++++------- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 217 +++++++----- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.h | 3 +- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 152 ++++----- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.h | 2 +- ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c | 204 +++++------ 9 files changed, 1093 insertions(+), 458 deletions(-) -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'