From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.48]) by mx.groups.io with SMTP id smtpd.web11.11783.1604492354720419822 for ; Wed, 04 Nov 2020 04:19:17 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=CdqSz5VS; spf=pass (domain: arm.com, ip: 40.107.1.48, mailfrom: sami.mujawar@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=C03xTJJQPqHyCHyya2NgnmzGIZgpI5dvNsqAXC82kkg=; b=CdqSz5VSsbBLYVYtC7krYwQL/p9BHRFep5xHJMIVGlPNpKMbpYJFFJUFq4sM72XREyCFQbG29S2+6DlHZZt5RbaHeKwG/1ykyp7ZmoawyrIa4Xj9ZXt9R6eAhDEpk3pNE1/7BbXRxqr2GnKyBfKJgCpd7r3THZIezlxOM9/YfVw= Received: from AM6PR02CA0032.eurprd02.prod.outlook.com (2603:10a6:20b:6e::45) by VI1PR08MB5551.eurprd08.prod.outlook.com (2603:10a6:803:f1::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.29; Wed, 4 Nov 2020 12:19:04 +0000 Received: from AM5EUR03FT047.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:6e:cafe::a4) by AM6PR02CA0032.outlook.office365.com (2603:10a6:20b:6e::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18 via Frontend Transport; Wed, 4 Nov 2020 12:19:04 +0000 X-MS-Exchange-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=pass 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 AM5EUR03FT047.mail.protection.outlook.com (10.152.16.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3520.15 via Frontend Transport; Wed, 4 Nov 2020 12:19:04 +0000 Received: ("Tessian outbound d5e343850048:v64"); Wed, 04 Nov 2020 12:19:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0aa4ce0dffd63245 X-CR-MTA-TID: 64aa7808 Received: from 13c993150052.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1E0180D3-CBD3-4FE0-A3DC-6ADE4CB4FE38.1; Wed, 04 Nov 2020 12:18:28 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 13c993150052.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 04 Nov 2020 12:18:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GUr5UIUES7uZVanwGCaJKUooo+CQdyhlK9xnH1qy2kGnI7MkTFZCkQfPiwKxzRZ5EurRYu+MKorj6ACKnys8rPo3G6Qh9rUowXURdMZRxTqGzM6QN8RrvhJxT2L0skRfA7Bmp29FUprxRhXaRXvVIuwTogIayzFbleaseKEWSK8o6BihY4Fpuk21g/NYOrWCbQh18c2XUXA2RLxbKEKlimcc1hOBCKJ2nZ9422gpA0rKIBqDDGB68Bmk+32Op4YjRnHZisEML5Z+LyMxeE1MoF8xkzpoXWKIg8H+Xq+CemUBbIbTS5s8JIAJCVCVaVFNwIJOb2OPlbupvmamik8BZQ== 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=C03xTJJQPqHyCHyya2NgnmzGIZgpI5dvNsqAXC82kkg=; b=L5dvSEo7o/Xk7WAWtIj7dAhSa7S5rc3AmNEDGUtxCerMQv0tvs3V0hs0R0TzSeA1QhLQLSH0g7b1yprSOSLCzAs+xWRK9os7S1HPbcUUab/byVXdnqiwYtPTMJ+9EMSdAF6iKzoHDDNAV88C87ubc7KvaukLj/G3dz1pfjotjNdz+6KmPoz3tnM69rbBUY28MXBQvt7DM5F+uPLuCAwyuYh/Qg8ZA/Z3Iz/FS5tl8rhPW6S0SqKV3HKq75Cr0iiLE3PWqDqO+0ox9YWob4PPOCjyFmrdYgY24VLPAptlwbHUu+cVx8kiuz+lMQ2wQKr3PlQoFY6mmb0GVP4equ++OQ== 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=pass (p=none sp=none pct=100) 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=C03xTJJQPqHyCHyya2NgnmzGIZgpI5dvNsqAXC82kkg=; b=CdqSz5VSsbBLYVYtC7krYwQL/p9BHRFep5xHJMIVGlPNpKMbpYJFFJUFq4sM72XREyCFQbG29S2+6DlHZZt5RbaHeKwG/1ykyp7ZmoawyrIa4Xj9ZXt9R6eAhDEpk3pNE1/7BbXRxqr2GnKyBfKJgCpd7r3THZIezlxOM9/YfVw= Received: from AM5PR0701CA0072.eurprd07.prod.outlook.com (2603:10a6:203:2::34) by DB8PR08MB5146.eurprd08.prod.outlook.com (2603:10a6:10:e7::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3499.18; Wed, 4 Nov 2020 12:18:26 +0000 Received: from AM5EUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:2:cafe::a4) by AM5PR0701CA0072.outlook.office365.com (2603:10a6:203:2::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3541.10 via Frontend Transport; Wed, 4 Nov 2020 12:18:26 +0000 X-MS-Exchange-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=pass 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 AM5EUR03FT064.mail.protection.outlook.com (10.152.17.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3520.15 via Frontend Transport; Wed, 4 Nov 2020 12:18:26 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2044.4; Wed, 4 Nov 2020 12:18:22 +0000 Received: from E107187.Arm.com (10.57.51.198) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2044.4 via Frontend Transport; Wed, 4 Nov 2020 12:18:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , Subject: [PATCH v2-resend 2/2] ShellPkg/AcpiView: Fix field validator invocation Date: Wed, 4 Nov 2020 12:18:20 +0000 Message-ID: <20201104121821.18728-2-sami.mujawar@arm.com> X-Mailer: git-send-email 2.11.0.windows.3 In-Reply-To: <20201104121821.18728-1-sami.mujawar@arm.com> References: <20201104121821.18728-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0ae7b73-efa4-4321-6aaf-08d880bbd1fe X-MS-TrafficTypeDiagnostic: DB8PR08MB5146:|VI1PR08MB5551: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: FXg/srnX1ZC27EL/kmfyZBQA+dn5EUVNUMUvU6xRz4elyO8rxZ49n/WXIjfPgxlNWOk9kxbBRHiReIAjeTZj3SI+MdarkJ1DFuxNNAwZsjp0xuXSHgTWJfz0AArt3IMnA4u8fHvrUUj2D7eBIFAHHSzM6FhSXrmhEo/0CThQ8sQ+7Ib/G668XCXTHidliRHrjWc6oP8nD7cPTyRLaMvX76qiuUkgLh1yh5aEzmptDCz74JdbJwT8orv7+rscSeVdfXYb42sPHXg6wq/EE0pmWd6QkB/7Yf7iOX5aXwGzJALxY28FON9tTgnZQWtAGkkt9+fFwM9rQWgh+Mtz9zPR9OpiH591vwhMqT06aPwWANy4eMZMSOFQZ8LXuJXhrPgJ4aGrIHiINoa8EbXaY6/51UZVHtjIQUHAM1FWCf8ArtnS+Zmjz7F8/KbOjj5Hdb1Y6GS2z8jNbaStYcFfKrUJUohr4DB1e15A24zksyPy9II= 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;SFS:(4636009)(396003)(39860400002)(346002)(136003)(376002)(46966005)(316002)(426003)(6916009)(8936002)(336012)(82310400003)(478600001)(54906003)(47076004)(83380400001)(7696005)(4326008)(86362001)(186003)(8676002)(70206006)(82740400003)(81166007)(2906002)(5660300002)(44832011)(70586007)(1076003)(2616005)(356005)(36756003)(26005);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5146 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 2f0392c0-6241-4766-a3a1-08d880bbbb46 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Nbqp26EtpXiQIPvJkCL943YOJS0uIPURklS+HU101ThQlnHzd5W96uDsS9btRe7fGZULU1wwAGrMkd6me9J4pbVbsrOQNcGQaQQv0LB7vz0Y/OMkz8b5jv3fYVqfpbsPveGLqocyMBn1JRTBvH+VCNYfCqQFSx3F/UkLHOGJ30pMD6umSHPJ7lOZdz/OqdLZA2pgJpoyR7PBX6/67/GtffaGl3HHbqOCkFuMG1ggVtu18ADD15Eb4BDKHdg1uOSnFx7F8EaZFCwFkJOQ3LZbOlSsGC+mN19d0JrXEoMUm9FKkZmscIsCnLZhtbhFpH/TbMZIst+imY01Tgp8huzq+b3DbNLAvajUDn0YO2aghlNlw0kUNzhfAp0RebQzS3jBXB9pg+4ZMyghb9DvXH7NE0d5PLzgsPRq12/7gbufeDPVm5dMEtJk/QKVX45FIsdnGcliILffD1R0GpSzMLne/JVgyjaNlWPZE7OQt9IEk60= 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;SFS:(4636009)(376002)(39860400002)(346002)(396003)(136003)(46966005)(7696005)(4326008)(316002)(26005)(186003)(54906003)(36906005)(8676002)(8936002)(2906002)(36756003)(1076003)(426003)(2616005)(336012)(47076004)(81166007)(82740400003)(86362001)(478600001)(6916009)(82310400003)(70206006)(70586007)(83380400001)(5660300002)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2020 12:19:04.2716 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0ae7b73-efa4-4321-6aaf-08d880bbd1fe 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-AuthSource: AM5EUR03FT047.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5551 Content-Type: text/plain Bugzilla: 3046 (https://bugzilla.tianocore.org/show_bug.cgi?id=3046) The field validator function provides means to validate fields in the ACPI table structures. To print complex field types a print formatter function is provided. The field validator was being invoked for simple data fields for which the default print format is used. However, the field validator function was not invoked if a print formatter function was provided. This problem is noticed when a Generic Address Structure (GAS) is printed using DumpGas() and a field validator is present to validate the GAS structure. To fix this move the invocation of the field validator after the field is printed such that the validation function is called even when a print formatter function is present. Signed-off-by: Sami Mujawar --- Notes: v2: - This is a new patch introduced in v2 series. [SAMI] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index 02f6d771c7e1a9b8faa577b38e51c9de350d24fd..01ac9a9bafeb2ca12c1ba19f406d626b108f5fe2 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -1,7 +1,7 @@ /** @file ACPI parser - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2020, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -596,13 +596,12 @@ ParseAcpi ( Parser[Index].Length ); } // switch - - // Validating only makes sense if we are tracing - // the parsed table entries, to report by table name. - if (GetConsistencyChecking () && - (Parser[Index].FieldValidator != NULL)) { - Parser[Index].FieldValidator (Ptr, Parser[Index].Context); - } + } + // Validating only makes sense if we are tracing + // the parsed table entries, to report by table name. + if (GetConsistencyChecking () && + (Parser[Index].FieldValidator != NULL)) { + Parser[Index].FieldValidator (Ptr, Parser[Index].Context); } Print (L"\n"); } // if (Trace) -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'