From nobody Mon May 6 12:23:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42997+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1561712250; cv=none; d=zoho.com; s=zohoarc; b=Cf43RH8yPQdoyKpDyw/Vo5M5GLFQMk7Yw5sC7O4zb5uCxPlFFpPfabPq8aPWRAa3itasVEPkrGGLT8s3JbhXebm5I0UHk7AwtM/5zxcPKXe3iR2CEDFwlNSHaRtQTD6CwWAymw9YB1wUjZ43kVqT3lzFsO36QH7nKiYqr8qlG14= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561712250; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=NJQNa1fQryKAOMirs1bmvZI+ZKZ56ddWZuMz4V2sfw4=; b=BUz38Tn2vQ4foCAF2PpI+2INL9G8zAvyf0SPq8bzgpuigM7GujeP6xWdB20/m72s8x7xpaJzHucBxef+9HPciEuaOMzcGaNnjzZ5RoP9UxHsF7bUcvZAib8SFgud8dfoNwDh++L7aGbbAOgOIcA13m081nysjPOUCBl9DzeAa8M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42997+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561712250638767.4614373473198; Fri, 28 Jun 2019 01:57:30 -0700 (PDT) Return-Path: X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.43]) by groups.io with SMTP; Fri, 28 Jun 2019 01:57:29 -0700 X-Received: from VI1PR0802CA0044.eurprd08.prod.outlook.com (2603:10a6:800:a9::30) by AM6PR08MB4311.eurprd08.prod.outlook.com (2603:10a6:20b:b8::14) 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 08:57:25 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::206) by VI1PR0802CA0044.outlook.office365.com (2603:10a6:800:a9::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2008.16 via Frontend Transport; Fri, 28 Jun 2019 08:57:25 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42997+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) 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 08:57:23 +0000 X-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.1415.2; Fri, 28 Jun 2019 08:57:10 +0000 X-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 08:57:09 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 1/5] ShellPkg: acpiview: Remove '/?' from valid command line flags Date: Fri, 28 Jun 2019 09:56:56 +0100 Message-ID: <20190628085700.17472-2-krzysztof.koch@arm.com> In-Reply-To: <20190628085700.17472-1-krzysztof.koch@arm.com> References: <20190628085700.17472-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0e20996d-9736-4283-fe82-08d6fba6a303 X-MS-TrafficTypeDiagnostic: AM6PR08MB4311: X-MS-Exchange-PUrlCount: 1 NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1013; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: v7//rLxWGnNsCv5EtcmEhs7w/3a7k5IlkDWWLQONYKBZCKp8evEwr/0ahD0Fia489aII7zZ1hITu+eZEmbws6WSMTAl6/YhwCo9IpNJ3wQ5cExE67dESyB0N7MvevyEynixF9fGiiZ/jfBbAjs0W4Gtpryhp8ERaLWV4aZhJe0+KhZ3Zu/k6GnGap7D3GPLzEsp5CrWCQi1j+K3easxzF1Ejc4KM61XvIase6upZQTd4rt3cq/kfkJmWOBWTHMTwFqfffx5ELnrSfv5ecjpA9W3lTg3JSlxwXuPgH/+CvqwyCojyt4p0NFS/fHXS9FyuooEiqsE4M21faWljnRTH4TLY8oBG3dWIS5HLBBaG8D1YtM+jpgPaJdhpUra4OqYtHoDAIr9GyoA79GJh3DN3P8Lmiz6qK2o8svscigmNU1o= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 08:57:23.6263 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e20996d-9736-4283-fe82-08d6fba6a303 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: AM6PR08MB4311 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561712249; bh=c/4+ijTdzdRFTlpSZnh+agDf0RCfHO5iSnKohu5CUN8=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=thg+qhRxP5uDRfa/lX0LJr5Q5ZUnu2JoABcyQjv8KfY4mv4qzVSTcXo8W4e71y/JZdZ PeEi5Cxh7kMhye7OeHfVnhM6DTB0EcUC2MrcbJz7GyFYGGJbkx00uOBPMxktziS/4ZfU9 M5ds02Df11AwO7Oxl7v7FLAV+0Ib4c+9wMQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Acpiview currently allows displaying help info by specifying both -? and /? flags. This patch removes /? from valid command line flags that can be passed to the acpiview tool, as this flag is not used for such purpose in other UEFI shell commands. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov Reviewed-by: Sami Mujawar --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/55cb3= 07eac7cfc4cc46df0af8c6edf59863518dc Notes: v1: - Remove '/?' from allowed acpiview input flags [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 25d61158320f5d68023f7187a936d50f2bcd20e7..9bbb00cacafa34760c9d45cb6a9= fe15bcd4c100e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -1,6 +1,6 @@ /** @file =20 - 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 **/ =20 @@ -33,7 +33,6 @@ STATIC BOOLEAN mColourHighlighting; An array of acpiview command line parameters. **/ STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { - {L"/?", TypeFlag}, {L"-c", TypeFlag}, {L"-d", TypeFlag}, {L"-h", TypeValue}, -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42997): https://edk2.groups.io/g/devel/message/42997 Mute This Topic: https://groups.io/mt/32240029/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 12:23:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+42998+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561712256659285.0503408301206; Fri, 28 Jun 2019 01:57:36 -0700 (PDT) Return-Path: X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.53]) by groups.io with SMTP; Fri, 28 Jun 2019 01:57:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=lOa4UQaJsNjdLTKsnug+ZsbHevmr9i4AqnVYZMoE6IzxLTSjXA/NNSRqpDdXw7BD8lMK97tt142LMVXQRUcxNUGABgUQ1swA43LaOe515ngczLF8MiFfAa6qQ0jMpCC7jhhB0VdqPCLzEJabZ9o2I/IV5yaaOgAgTAMbanca7n8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ArxMmkQqAIln5ipPTe7gklvew10YwoVJDHYR+/yOg7U=; b=BSojbU9ecHnjvKZR+5/9N8nbVtTqITGtk6CHSy/PEPFIZ8CYBU07YY+A8IZxZR1gc+3zBbLgQQIEOZQIGliLOADQ4wAqrISKrnBgTJncNMjuN0hUgWIgkS5EMhVYfXM8mxZyGuAXIFNwsGV8lpktNPPLS2ZWGAIRiHUGtrI15F0= ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com;dmarc=temperror action=none header.from=arm.com;dkim=none (message not signed);arc=none X-Received: from VI1PR0802CA0004.eurprd08.prod.outlook.com (2603:10a6:800:aa::14) by AM0PR08MB4306.eurprd08.prod.outlook.com (2603:10a6:208:139::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Fri, 28 Jun 2019 08:57:30 +0000 X-Received: from AM5EUR03FT033.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e08::201) by VI1PR0802CA0004.outlook.office365.com (2603:10a6:800:aa::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2032.17 via Frontend Transport; Fri, 28 Jun 2019 08:57:30 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+42998+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT033.mail.protection.outlook.com (10.152.16.99) 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 08:57:29 +0000 X-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.1415.2; Fri, 28 Jun 2019 08:57:10 +0000 X-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 08:57:10 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 2/5] ShellPkg: acpiview: Fix '\n\n' printing in Table Checksum reporting Date: Fri, 28 Jun 2019 09:56:57 +0100 Message-ID: <20190628085700.17472-3-krzysztof.koch@arm.com> In-Reply-To: <20190628085700.17472-1-krzysztof.koch@arm.com> References: <20190628085700.17472-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5531170c-2964-459b-75ff-08d6fba6a647 X-MS-TrafficTypeDiagnostic: AM0PR08MB4306: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 7yNYvUdVawlHyNzFYUAB95Xqg6ACLpb3taquvKl7bRwGsJ6TDatO3zjo9ANpEfyWRxdZZA5ns636Ghe+6/KIXQuRPzuX+SAbiJeVxDxOXIXvanG/Y0mGdmEnf6YNAOSIzsJNQ0eOBwJETxv361IMzwA4zZRbnwy8csu6gTL6ls7kboegLi4vU/HrQlFRUnp9uovunXj7tendEGiVfdhrnH28D9MYHizTCnvMmUpU3oGTys5ldXFCN0B7nGqs/l8pV6hpg1fIsxUe9xq3YrMx6F/kb7+WKlMjQP5j8TVQXMGlFa9awh4TzSby6EH9guID3I1Mb9njO0YGqwuE2obhAI/WZPx3c6F9lEJtUd66X5B0YULPyc3EXwHRTKaJKTKD23F8YRowaEhJ6P+UZEES5fHPYw1chEKiuOdX2cm2nFg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 08:57:29.1036 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5531170c-2964-459b-75ff-08d6fba6a647 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: AM0PR08MB4306 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561712256; bh=Lp3XWzdXNoSk3Ut0k6aR/Ct+vbzI91XuCtuGcQfq1c0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Gf9zLF3SmZCh5dGnwKfxdkac89jqCH9S1/GeI5J4rzN0VaE29PwvFMwQgEZhAE3LkHl yYiG4GhApytiMPbRSRSzkHkSWREFcOg9ugNsfwLjqTAeF8lfqABDh+IYaNOl1qha/VxZh ry4njS1x6o31dvcisC7EqFr3jZVcQNwaNu4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Move printing double newline character ('\n\n') from the beginning of ACPI table checksum validation message to the end of the raw binary data dump. This way acpiview table dump looks similar regardless of whether Table Checksum is validated or not. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov Reviewed-by: Sami Mujawar --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/db22c= 06817971220875e98ec891ed73359f823de Notes: v1: - Unify acpiview output with/without checksum reporting [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index b5965507b498b9fa9bc4d3124b2285f509004c4f..f9dbbd35449e74fdf81f09e6279= 20b10583a9816 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -1,7 +1,7 @@ /** @file ACPI parser =20 - 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 **/ =20 @@ -139,7 +139,7 @@ VerifyChecksum ( ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)) ); } - Print (L"\n\nTable Checksum : OK\n\n"); + Print (L"Table Checksum : OK\n\n"); } else { IncrementErrorCount (); if (GetColourHighlighting ()) { @@ -149,7 +149,7 @@ VerifyChecksum ( ((OriginalAttribute&(BIT4|BIT5|BIT6))>>4)) ); } - Print (L"\n\nTable Checksum : FAILED (0x%X)\n\n", Checksum); + Print (L"Table Checksum : FAILED (0x%X)\n\n", Checksum); } if (GetColourHighlighting ()) { gST->ConOut->SetAttribute (gST->ConOut, OriginalAttribute); @@ -219,7 +219,7 @@ DumpRaw ( =20 // Print ASCII data for the final line. AsciiBuffer[AsciiBufferIndex] =3D '\0'; - Print (L" %a", AsciiBuffer); + Print (L" %a\n\n", AsciiBuffer); } =20 /** -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#42998): https://edk2.groups.io/g/devel/message/42998 Mute This Topic: https://groups.io/mt/32240030/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 12:23:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43000+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1561712282; cv=none; d=zoho.com; s=zohoarc; b=X/VFRclN/8/pkil8+Q78Fpn1P0MfarIXpZM0+YDiObrx9zr6+oKDdg2ehYezAT/nK1wmoGoVMnSh8ckkXhrlR9JNp1QNxJEgattXOu5UXVaEhEpgpQW2jRzm/oyiP6TtFUjWRZhE0ywu3dydgNYYS3tgOJpUREC1jDMJLqsYxPs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561712282; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=xqVdngMUNmoooFYB85XEH6zDUw/iVg+d3s/dJzS7ACU=; b=lPrLv6X8QVsgDysljqjZdRi/g4sTbldmJEjg4Jse8oTLAkyUrauQRCDSFtjlB05ygAFFijSkeSW2wrcp6XFDA6rRynfb6MyilkF48pRh+cMWDDn5pIrKKhGfdapzsDQLFH2EC0OnpSdYdlaKqXTK5qMz3qSLdrpn1shAMFHtC3c= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43000+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561712282394655.755037189899; Fri, 28 Jun 2019 01:58:02 -0700 (PDT) Return-Path: X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com (EUR03-DB5-obe.outbound.protection.outlook.com [40.107.4.83]) by groups.io with SMTP; Fri, 28 Jun 2019 01:58:01 -0700 X-Received: from VI1PR08CA0135.eurprd08.prod.outlook.com (2603:10a6:800:d5::13) by AM6PR08MB4311.eurprd08.prod.outlook.com (2603:10a6:20b:b8::14) 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 08:57:57 +0000 X-Received: from VE1EUR03FT025.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::209) by VI1PR08CA0135.outlook.office365.com (2603:10a6:800:d5::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2032.17 via Frontend Transport; Fri, 28 Jun 2019 08:57:57 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43000+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT025.mail.protection.outlook.com (10.152.18.74) 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 08:57:55 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 28 Jun 2019 08:57:11 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Fri, 28 Jun 2019 08:57:11 +0000 X-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 08:57:11 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 3/5] ShellPkg: acpiview: Allow disabling consistency checks (-q flag) Date: Fri, 28 Jun 2019 09:56:58 +0100 Message-ID: <20190628085700.17472-4-krzysztof.koch@arm.com> In-Reply-To: <20190628085700.17472-1-krzysztof.koch@arm.com> References: <20190628085700.17472-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3fb9362e-de54-4b94-b5a2-08d6fba6b622 X-MS-TrafficTypeDiagnostic: AM6PR08MB4311: X-MS-Exchange-PUrlCount: 1 NoDisclaimer: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:480; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: omdCtilros0nNti06z9PTXy0SahhrUzVQD3LfpWXJrMYEsYBiU3GM9jJmMYh6TkdzL5nn4URADPne9A0m52PBW2KynuMJMWUcqiZVi5Xh0VA84pHqzyVkH3nKtGFPMoXcuuwWNYRPrd/9zNFb2g4eBl1FEe916nibTortlFSk3ATEQP6rfPIHo32P2cpMSWkBeJkTzzFIrcVoXw4fP9KstfWEchnyR/ofsKjKjleVOxq63bC9oREuvNYNNm8tQRNBQKNEvRZzW9oSnp4rsInwQe80E85BL+R832J07FLW4BPL9ooZhsluyQf8ZTRRVJ/lhNfuFNHmFvzs5kug8gmWeTANBpea0uq2YC8tHa3EYC+kJWmYr1MJ1S0oo7FMawkeaANJHZe9v+VTtS1J3AFyQA9KXpSgSWNL39UGa3UVok= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 08:57:55.6803 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3fb9362e-de54-4b94-b5a2-08d6fba6b622 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: AM6PR08MB4311 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561712281; bh=DwxVnPsiaEazsETAOfZ8kLHbP0jNWf/yOfQ7YiM2fk4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=KKjQhMhJ5j/MK01Moya9gwcT0OG6NmsaZb92EPohaXVaVZyHFKy9/dLefRjV/Nh4cHx a9QmeicC47NHLwN3DPN5XNP3EMSP+56ngj0+4+68X7IDHx0aAlf021tDiBVu1QmLQaXU6 FWOzRbBXwx+ojV4dstaQmd5TLkMT5G/XFR4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The current documentation for the acpiview UEFI shell tool states that the '-c' flag enables consistency checks on ACPI table data. However, these checks are enabled anyway by default. This patch keeps ACPI table validation as a default option, but it makes it possible to turn ACPI table validation off by setting the newly-introduced '-q' flag. Consequently, the '-c' flag is removed. The remaining code changes in this patch make a number of consistency checks optional (but enabled by default): 1. ACPI table field offset mismatch. 2. ACPI table field validation functions provided in the ACPI_PARSER arrays. 3. Table checksum computation. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov Reviewed-by: Sami Mujawar --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/fa016= 236b0955d19db70bf83fe4e5048e3b858f4 Notes: v1: - make table consistency checks optional where applicable [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c = | 6 ++-- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c = | 6 ++-- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c = | 35 ++++++++++++++++++-- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h = | 23 ++++++++++++- ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.u= ni | 4 +-- 5 files changed, 65 insertions(+), 9 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c b/Sh= ellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c index f9dbbd35449e74fdf81f09e627920b10583a9816..8b3153516d2b7d9b920ab2de034= 4c17798ac572c 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.c @@ -506,7 +506,8 @@ ParseAcpi ( break; } =20 - if (Offset !=3D Parser[Index].Offset) { + if (GetConsistencyChecking () && + (Offset !=3D Parser[Index].Offset)) { IncrementErrorCount (); Print ( L"\nERROR: %a: Offset Mismatch for %s\n" @@ -549,7 +550,8 @@ ParseAcpi ( =20 // Validating only makes sense if we are tracing // the parsed table entries, to report by table name. - if (Parser[Index].FieldValidator !=3D NULL) { + if (GetConsistencyChecking () && + (Parser[Index].FieldValidator !=3D NULL)) { Parser[Index].FieldValidator (Ptr, Parser[Index].Context); } } diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c= b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c index 504c81e3f1405095afd0d77fee64a02fd06a64d2..d5500bcb2b4a55c7a69f45444aa= 49d36d2c1694f 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiTableParser.c @@ -1,7 +1,7 @@ /** @file ACPI table parser =20 - 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 **/ =20 @@ -193,7 +193,9 @@ ProcessAcpiTable ( =20 if (Trace) { DumpRaw (Ptr, *AcpiTableLength); - VerifyChecksum (TRUE, Ptr, *AcpiTableLength); + if (GetConsistencyChecking ()) { + VerifyChecksum (TRUE, Ptr, *AcpiTableLength); + } } =20 Status =3D GetParser (*AcpiTableSignature, &ParserProc); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 9bbb00cacafa34760c9d45cb6a9fe15bcd4c100e..e99537acf36616783103e1e9d15= 4278f8dedb78e 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -33,7 +33,7 @@ STATIC BOOLEAN mColourHighlighting; An array of acpiview command line parameters. **/ STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { - {L"-c", TypeFlag}, + {L"-q", TypeFlag}, {L"-d", TypeFlag}, {L"-h", TypeValue}, {L"-l", TypeFlag}, @@ -69,6 +69,33 @@ SetColourHighlighting ( mColourHighlighting =3D Highlight; } =20 +/** + This function returns the consistency checking status. + + @retval TRUE if consistency checking is enabled. +**/ +BOOLEAN +GetConsistencyChecking ( + VOID + ) +{ + return mConsistencyCheck; +} + +/** + This function sets the consistency checking status. + + @param ConsistencyChecking The consistency checking status. + +**/ +VOID +SetConsistencyChecking ( + BOOLEAN ConsistencyChecking + ) +{ + mConsistencyCheck =3D ConsistencyChecking; +} + /** This function returns the report options. =20 @@ -380,7 +407,8 @@ AcpiView ( (ReportDumpBinFile =3D=3D ReportOption)) && (!mSelectedAcpiTableFound)) { Print (L"\nRequested ACPI Table not found.\n"); - } else if (ReportDumpBinFile !=3D ReportOption) { + } else if (GetConsistencyChecking () && + (ReportDumpBinFile !=3D ReportOption)) { OriginalAttribute =3D gST->ConOut->Mode->Attribute; =20 Print (L"\nTable Statistics:\n"); @@ -554,6 +582,9 @@ ShellCommandRunAcpiView ( } } =20 + // Surpress consistency checking if requested + SetConsistencyChecking (!ShellCommandLineGetFlag (Package, L"-q")); + if (ShellCommandLineGetFlag (Package, L"-l")) { mReportType =3D ReportTableList; } else { diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h index 1b26d8fb1771eb4adb3f381e04234932480b6110..b5cb274ecbf77f7ccb81d78f852= caa0f50854312 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.h @@ -1,7 +1,7 @@ /** @file Header file for AcpiView =20 - 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 **/ =20 @@ -91,6 +91,27 @@ SetColourHighlighting ( BOOLEAN Highlight ); =20 +/** + This function returns the consistency checking status. + + @retval TRUE if consistency checking is enabled. +**/ +BOOLEAN +GetConsistencyChecking ( + VOID + ); + +/** + This function sets the consistency checking status. + + @param ConsistencyChecking The consistency checking status. + +**/ +VOID +SetConsistencyChecking ( + BOOLEAN ConsistencyChecking + ); + /** This function processes the table reporting options for the ACPI table. =20 diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiView= CommandLib.uni b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpi= ViewCommandLib.uni index 4c63143cbef85262793c287dfeb8ebb394394416..f0610870505d5c5d89e6516122f= c9e782479df0c 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni @@ -30,7 +30,7 @@ "Display ACPI Table information.\r\n" ".SH SYNOPSIS\r\n" " \r\n" -"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-c] [-v] [-h Highlight]]\r= \n" +"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-v] [-h Highlight]]\r= \n" " \r\n" ".SH OPTIONS\r\n" " \r\n" @@ -39,7 +39,7 @@ " invocation option.\r\n" " AcpiTable : The required ACPI Table type.\r\n" " -d - Generate a binary file dump of the specified AcpiTable.\r\n" -" -c - Consistency checking (enabled by default).\r\n" +" -q - Quiet. Suppress errors and warnings. Disables consistency checks.\= r\n" " -v - Display verbose data (enabled by default).\r\n" " -h - Enable/Disable Colour Highlighting.\r\n" " Highlight : TRUE/ON enables highlighting;\r\n" -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43000): https://edk2.groups.io/g/devel/message/43000 Mute This Topic: https://groups.io/mt/32240036/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 12:23:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43001+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one) Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561712351419291.85979845400277; Fri, 28 Jun 2019 01:59:11 -0700 (PDT) Return-Path: X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.40]) by groups.io with SMTP; Fri, 28 Jun 2019 01:59:10 -0700 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=FhlYUoaZ9w6vgiYpBQ9/H5ysDkdrAHkYmuhGXCcLrMi3QkF4dGKTsdYPcJXs8hHgw1qebKqXoAXdzqcn7AWDiRfflfg7Pijp4VaPoSFOvcQ8oJyEPSuOTLKvqdQBaH0VMVezMgd5E2pnJLHcUcu0n8Goqh/jdoNfFRh2PIVvlt0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2SwBxMmW1eV9eQ7uVvbNJyvj+mSXMs4W/0TP0TNnc5s=; b=sKcshPXYnOsSu1ti3tWzkvFTUv+EK1lncKUGJkDBZnzsbIsaJAInsuoOaklgqJar2KRI2eeZttWClXyfue17k4i4eFX3q8bfALJW7YVKvlK4RvlW/2wjUQX5gLOzoNPoYIQYFNLMClPaAEnsjZ/Iecx+pTriFthxLma14wpcVsY= ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=temperror (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com;dmarc=temperror action=none header.from=arm.com;dkim=none (message not signed);arc=none X-Received: from DB6PR0801CA0063.eurprd08.prod.outlook.com (2603:10a6:4:2b::31) by AM0PR08MB4307.eurprd08.prod.outlook.com (2603:10a6:208:13d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Fri, 28 Jun 2019 08:59:06 +0000 X-Received: from VE1EUR03FT048.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::208) by DB6PR0801CA0063.outlook.office365.com (2603:10a6:4:2b::31) 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 08:59:06 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43001+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT048.mail.protection.outlook.com (10.152.19.8) 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 08:59:04 +0000 X-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.1415.2; Fri, 28 Jun 2019 08:57:12 +0000 X-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 08:57:11 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 4/5] ShellPkg: acpiview: Remove '-v' flag from allowed command line args Date: Fri, 28 Jun 2019 09:56:59 +0100 Message-ID: <20190628085700.17472-5-krzysztof.koch@arm.com> In-Reply-To: <20190628085700.17472-1-krzysztof.koch@arm.com> References: <20190628085700.17472-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2a1c7bf0-1582-42e6-40c1-08d6fba6defd X-MS-TrafficTypeDiagnostic: AM0PR08MB4307: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:37; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: kOMglkI5a9gxWEbu8Z5YWuhK8ILDrxSlfKkhQ5Ki/CEg2Cfmt0QblJtu1fKy8pp75OSihbYoaYRF1lvw+5cieX6r/vgnjSGGhpe0nB5/ODFOho4mHHG5K/pxMq0iBmYhyqqlnuPi6zeZJ2XDKj/372B8RVoNijMyl14RiPgYKtp6UGczuZxeMCP5ni2jM7vdWkjCKTzTl3HPs+agU2F4Y2fGE/bNVqGPFRljPudfXJo0LVaZbA18+WEik5Zk+qX4xoTh3LpH6ypPFK1/TnjAF9kxnIEcuRFHxIpx+4e0NCg1Bs8KaW09OLbzZlBEwr1HuqnHl+6j0XH/fKBKJtZqqviedtUbYVt89Xeq8u8LDF73h/PNSoXqmUtc6PzLsuYQxZuFxtMS3Fc8P7rnTf1yB6sUtjZ81WmEVVwu/OhN3hc= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 08:59:04.2234 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2a1c7bf0-1582-42e6-40c1-08d6fba6defd 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: AM0PR08MB4307 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561712350; bh=+jB7/qW+NvU9k06cgaiVkxDJdeuDV7s4lj2PPHIMhdY=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=jKVn7iY4gm1mskX3PyuW2dBJ4v8wMqK1PKYrstfnqG9o2lwSXj469/8eoo+wI+fZmvY kdJc0reMtXyqJ+hQUobLwu+rKB/IR147mtQQBT0olAu4aMkVrYu/kq8YsgwaELqofNaxE o7XgDBN3ja9vgOh21thAZQASgRMjlihnkWM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to the acpiview documentation, the -v flag enables verbose output and it is set on default. Moreover, the acpiview UEFI shell tool dumps the same output with and without this flag set. Therefore this patch removes the superfluous -v flag from allowed command line parameters. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov Reviewed-by: Sami Mujawar --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/6400c= 6323f78ac89e790e57c07e9cca2e979ef05 Notes: v1: - Remove the unused '-v' flag [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c = | 3 --- ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.u= ni | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index e99537acf36616783103e1e9d154278f8dedb78e..911b2da3dd9f19010d0f4993bcf= 017749cafb749 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -25,7 +25,6 @@ STATIC BOOLEAN mSelectedAcpiTableFound; STATIC EREPORT_OPTION mReportType; STATIC UINT32 mTableCount; STATIC UINT32 mBinTableCount; -STATIC BOOLEAN mVerbose; STATIC BOOLEAN mConsistencyCheck; STATIC BOOLEAN mColourHighlighting; =20 @@ -38,7 +37,6 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { {L"-h", TypeValue}, {L"-l", TypeFlag}, {L"-s", TypeValue}, - {L"-v", TypeFlag}, {NULL, TypeMax} }; =20 @@ -472,7 +470,6 @@ ShellCommandRunAcpiView ( mSelectedAcpiTable =3D 0; mSelectedAcpiTableName =3D NULL; mSelectedAcpiTableFound =3D FALSE; - mVerbose =3D TRUE; mConsistencyCheck =3D TRUE; =20 ShellStatus =3D SHELL_SUCCESS; diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiView= CommandLib.uni b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpi= ViewCommandLib.uni index f0610870505d5c5d89e6516122fc9e782479df0c..0d10b5debe470cb096cf414d0a0= 144fd3bde03ee 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni @@ -30,7 +30,7 @@ "Display ACPI Table information.\r\n" ".SH SYNOPSIS\r\n" " \r\n" -"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-v] [-h Highlight]]\r= \n" +"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h Highlight]]\r\n" " \r\n" ".SH OPTIONS\r\n" " \r\n" @@ -40,7 +40,6 @@ " AcpiTable : The required ACPI Table type.\r\n" " -d - Generate a binary file dump of the specified AcpiTable.\r\n" " -q - Quiet. Suppress errors and warnings. Disables consistency checks.\= r\n" -" -v - Display verbose data (enabled by default).\r\n" " -h - Enable/Disable Colour Highlighting.\r\n" " Highlight : TRUE/ON enables highlighting;\r\n" " FALSE/OFF (default) disables highlighting.\r\n" -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43001): https://edk2.groups.io/g/devel/message/43001 Mute This Topic: https://groups.io/mt/32240039/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Mon May 6 12:23:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43002+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1561712366; cv=none; d=zoho.com; s=zohoarc; b=TA1G1pCYIZdXrTJShekJ7Hufgroqd+g18mjY7Y61qyjz9Y2B5aDzr/iPZd5/Fb5Aw668CTyIAkBZ4NkQHA8k3Ei4pVzqBh/iUcAux5RJQB0r8dgLL6BlbStLisYQ0jHyAH60B7rbz+2jcVNgzs6bncD36pynlIbeKJ+NAJkZB0s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1561712366; h=Content-Type:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=VIIq5KU2rGdcCyvA/iZY50t19+vKAjAgHI5tQsKav80=; b=Ok7anzhC9ah26N4BurKMT32V3sfFN2j9MiVDtDLSTxDXA1H8q8BUxSqRvIWVeOM1oP/niWGcmZ2NoT8cc042zkoSjS18i0o3oheF5mNfZB1bD8bAFT8Bmtc414lGV8KpRCP4SC69gyTWZ95OOgDjXoInnkcZYowHFD2ruAlvvdI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+43002+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1561712366102628.5326951152288; Fri, 28 Jun 2019 01:59:26 -0700 (PDT) Return-Path: X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.84]) by groups.io with SMTP; Fri, 28 Jun 2019 01:59:24 -0700 X-Received: from HE1PR08CA0073.eurprd08.prod.outlook.com (2603:10a6:7:2a::44) by DB8PR08MB5033.eurprd08.prod.outlook.com (2603:10a6:10:e7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2032.17; Fri, 28 Jun 2019 08:59:20 +0000 X-Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e09::204) by HE1PR08CA0073.outlook.office365.com (2603:10a6:7:2a::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2008.16 via Frontend Transport; Fri, 28 Jun 2019 08:59:20 +0000 Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+43002+1787277+3901457@groups.io; helo=web01.groups.io; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) X-Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) 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 08:59:18 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1415.2; Fri, 28 Jun 2019 08:57:12 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Fri, 28 Jun 2019 08:57:12 +0000 X-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 08:57:12 +0000 From: "Krzysztof Koch" To: CC: , , , , , Subject: [edk2-devel] [PATCH v1 5/5] ShellPkg: acpiview: Make '-h' option not require a parameter Date: Fri, 28 Jun 2019 09:57:00 +0100 Message-ID: <20190628085700.17472-6-krzysztof.koch@arm.com> In-Reply-To: <20190628085700.17472-1-krzysztof.koch@arm.com> References: <20190628085700.17472-1-krzysztof.koch@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d7acfbf8-8807-488f-a07f-08d6fba6e76b X-MS-TrafficTypeDiagnostic: DB8PR08MB5033: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: NoDisclaimer: True X-MS-Oob-TLC-OOBClassifiers: OLM:31; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: pZrLrN9Aa8wgzv14r6xWjqqiwMv2bg9lz/m3Xpd1+VXbBTx1Lry2Yd0exJ4aBQq2i0I5gEfmkHFAVcFXe6zs4bDV5ymQHMeMEkFV4FLQLTjG51MZtrHFdyUHcPryBJHIoyKsyLK3A2OAdppoAPzKH0Ynx5yL3Nl/o6F3wjKl7v36TrtJPTjko3juaIPvYLTUJUQVdJcxZj/lUMbzvY4jO635DY9aseqK3PW2+lgaePrfdpOkJs7LXBRju6fqRWtZL6khCUNPc6nkt0+zFYHZ1a8SwmsoGFbgWSNZvUkAvxibkULP9S2aG1pf5IT44ADXXHCfoEUx8kvuYHEmSdccOKlXea+Ojcut3x/l6P84HlXsRwO0ax+Xy+RP52n3qpIuOyMdDfpY74k+hBkx62bpoSCErYl0aB97xcd+IZx7lcg= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2019 08:59:18.3675 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7acfbf8-8807-488f-a07f-08d6fba6e76b 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: DB8PR08MB5033 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,krzysztof.koch@arm.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1561712365; bh=RZpqgTjY41GmvMU4dUcN3WkjgUuLdEVmBNEy/zAIK+o=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=IknizVox9kPvhkJydwnJA+PgC/Kxso0n5N05QQwdrHHTtsz9IyHEq9/v+CHDlS2ZzHP upaPIfSY7jVS/Or4a1jT38hyjI+w2ECPiCIetUtMey9F8MM+gplDyRHFgyAtzg338imnc YdAhbO7cF8neQAwT2+7BPJzdhhPx+0Dg8xE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Make the -h command line option a binary flag. Now, colour highlighting is enabled whenever this flag is set (stateless), instead of being dependent on previous acpiview command invocations. By removing the parameter required with the -h flag the command line parsing logic becomes simpler. Signed-off-by: Krzysztof Koch Reviewed-by: Alexei Fedorov Reviewed-by: Sami Mujawar --- Changes can be seen at: https://github.com/KrzysztofKoch1/edk2/commit/c3e78= ab9d47f51e4c6a786a8813d1fa01685f0c9 Notes: v1: - turn the '-h' acpiview input option into a flag [Krzysztof] ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c = | 30 ++------------------ ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.u= ni | 6 ++-- 2 files changed, 5 insertions(+), 31 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/Shel= lPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index 911b2da3dd9f19010d0f4993bcf017749cafb749..9feb2df2078f5aff41e1d39081f= bb8cbc0bc32dd 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -34,7 +34,7 @@ STATIC BOOLEAN mColourHighlighting; STATIC CONST SHELL_PARAM_ITEM ParamList[] =3D { {L"-q", TypeFlag}, {L"-d", TypeFlag}, - {L"-h", TypeValue}, + {L"-h", TypeFlag}, {L"-l", TypeFlag}, {L"-s", TypeValue}, {NULL, TypeMax} @@ -459,8 +459,6 @@ ShellCommandRunAcpiView ( SHELL_STATUS ShellStatus; LIST_ENTRY* Package; CHAR16* ProblemParam; - CONST CHAR16* Temp; - CHAR8 ColourOption[8]; SHELL_FILE_HANDLE TmpDumpFileHandle; =20 // Set Defaults @@ -540,18 +538,6 @@ ShellCommandRunAcpiView ( L"acpiview" ); ShellStatus =3D SHELL_INVALID_PARAMETER; - } else if (ShellCommandLineGetFlag (Package, L"-h") && - ShellCommandLineGetValue (Package, L"-h") =3D=3D NULL) { - ShellPrintHiiEx ( - -1, - -1, - NULL, - STRING_TOKEN (STR_GEN_NO_VALUE), - gShellAcpiViewHiiHandle, - L"acpiview", - L"-h" - ); - ShellStatus =3D SHELL_INVALID_PARAMETER; } else if (ShellCommandLineGetFlag (Package, L"-d") && !ShellCommandLineGetFlag (Package, L"-s")) { ShellPrintHiiEx ( @@ -566,18 +552,8 @@ ShellCommandRunAcpiView ( ); ShellStatus =3D SHELL_INVALID_PARAMETER; } else { - // Check if the colour option is set - Temp =3D ShellCommandLineGetValue (Package, L"-h"); - if (Temp !=3D NULL) { - UnicodeStrToAsciiStrS (Temp, ColourOption, sizeof (ColourOption)); - if ((AsciiStriCmp (ColourOption, "ON") =3D=3D 0) || - (AsciiStriCmp (ColourOption, "TRUE") =3D=3D 0)) { - SetColourHighlighting (TRUE); - } else if ((AsciiStriCmp (ColourOption, "OFF") =3D=3D 0) || - (AsciiStriCmp (ColourOption, "FALSE") =3D=3D 0)) { - SetColourHighlighting (FALSE); - } - } + // Turn on colour highlighting if requested + SetColourHighlighting (ShellCommandLineGetFlag (Package, L"-h")); =20 // Surpress consistency checking if requested SetConsistencyChecking (!ShellCommandLineGetFlag (Package, L"-q")); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiView= CommandLib.uni b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpi= ViewCommandLib.uni index 0d10b5debe470cb096cf414d0a0144fd3bde03ee..1f07b7ae20d474be67a433ff377= 4a508a5289318 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommand= Lib.uni @@ -30,7 +30,7 @@ "Display ACPI Table information.\r\n" ".SH SYNOPSIS\r\n" " \r\n" -"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h Highlight]]\r\n" +"ACPIVIEW [[-?] | [[-l] | [-s AcpiTable [-d]]] [-q] [-h]]\r\n" " \r\n" ".SH OPTIONS\r\n" " \r\n" @@ -40,9 +40,7 @@ " AcpiTable : The required ACPI Table type.\r\n" " -d - Generate a binary file dump of the specified AcpiTable.\r\n" " -q - Quiet. Suppress errors and warnings. Disables consistency checks.\= r\n" -" -h - Enable/Disable Colour Highlighting.\r\n" -" Highlight : TRUE/ON enables highlighting;\r\n" -" FALSE/OFF (default) disables highlighting.\r\n" +" -h - Enable colour highlighting.\r\n" " -? - Show help.\r\n" " \r\n" ".SH DESCRIPTION\r\n" -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#43002): https://edk2.groups.io/g/devel/message/43002 Mute This Topic: https://groups.io/mt/32240040/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-