From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.57]) by mx.groups.io with SMTP id smtpd.web12.8382.1620383914176655589 for ; Fri, 07 May 2021 03:38:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=nzZrsoPE; spf=pass (domain: arm.com, ip: 40.107.7.57, mailfrom: joey.gouly@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=ZqG1EdBoW7C3LTkpY4kO3J0iydBTxVmW+PPIli+XqJg=; b=nzZrsoPEBQukoWuQ0mWMStkItVw3sazeZiVB5S1+x6t/h1LcIlb8H7KYyqV7pXo18gsXCcn1GPVd8fZGQtNGau4BvkXMzfMJ3Qa8RuLZBOTD3r20AoRpy54XQvHCKOnLpVyWauSye8suUzkfHprwByPo38kzP5h5tSA9nYQ21E8= Received: from DB9PR06CA0019.eurprd06.prod.outlook.com (2603:10a6:10:1db::24) by DB6PR08MB2661.eurprd08.prod.outlook.com (2603:10a6:6:17::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.41; Fri, 7 May 2021 10:38:31 +0000 Received: from DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1db:cafe::ec) by DB9PR06CA0019.outlook.office365.com (2603:10a6:10:1db::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 10:38:31 +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 DB5EUR03FT014.mail.protection.outlook.com (10.152.20.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 10:38:31 +0000 Received: ("Tessian outbound 52fcc5bd9d3a:v91"); Fri, 07 May 2021 10:38:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8f1d9988d156defb X-CR-MTA-TID: 64aa7808 Received: from 2ecd4f12729b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5DAB225C-8B9A-4073-A7E3-B2FA2A7BF263.1; Fri, 07 May 2021 10:38:21 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 2ecd4f12729b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 07 May 2021 10:38:21 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZXdb1K1FhinmZ8v23fqTIWBqG0WTN1euKzR4/IRFX6Clf3kz2/2ezWiuhQUXLzWdhM4lsvPJ4dB5PuiDXLMXU622pRlvxBbiz6B27NQWKezRMcKTsQ1G5spZZKuKkA1V8ltWEZoR4YqeL8dAdRPyyn9BmNXPPxvrZL2iJPlasxF8Ev95VeP2WOKfCIGUDkpO4fFfBmS8BdWUpz+hTAUiK/lbRp+KjzBsNOBxNyd8YhAcSROjvmY0F/I6kdcLv9SxL/OMRmu8krEv8gJFX/N2UV6t5k72D6y9rdUurm1kB+u2lqSJO5SrpEEErqhfhDbs5+x8dDpW22MEd1gf0c5iBw== 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=ZqG1EdBoW7C3LTkpY4kO3J0iydBTxVmW+PPIli+XqJg=; b=mVMnTqQz862NDK7gx90UhD9gao2hVr55xTUZJ0z40nXuVZHHMySOLuLt9MQiCdhmxb8Dteq2e5s2U1bbcpYyGy7Tswpl6I8MZU/K1hcx4gqo/8zYE/VA91+J2VAtfKCTda2CrsBJGfyJ8j2/HmrJlhaqDBYfFlChfdJbhTQExa3/ozeU16BilbX8J18FyGp5yObtmSup8tQ3JFZLBHmMzrUN8nfE+GBBF2IeK4qMWfgtvh09byj0iZEYs18vQ2LwJJeDff7scWP7FgYYlD0fItFDAiyQkbSPRq6aaRxYc484QmQMZkah1R4F3Mt48RvKo/hfqA1S8ELRP2Kj++1MVg== 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=ZqG1EdBoW7C3LTkpY4kO3J0iydBTxVmW+PPIli+XqJg=; b=nzZrsoPEBQukoWuQ0mWMStkItVw3sazeZiVB5S1+x6t/h1LcIlb8H7KYyqV7pXo18gsXCcn1GPVd8fZGQtNGau4BvkXMzfMJ3Qa8RuLZBOTD3r20AoRpy54XQvHCKOnLpVyWauSye8suUzkfHprwByPo38kzP5h5tSA9nYQ21E8= Received: from AM5PR1001CA0056.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::33) by DB6PR0801MB2087.eurprd08.prod.outlook.com (2603:10a6:4:77::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4087.44; Fri, 7 May 2021 10:38:18 +0000 Received: from AM5EUR03FT051.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:15:cafe::36) by AM5PR1001CA0056.outlook.office365.com (2603:10a6:206:15::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 10:38:18 +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 AM5EUR03FT051.mail.protection.outlook.com (10.152.16.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4108.25 via Frontend Transport; Fri, 7 May 2021 10:38:18 +0000 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.2176.2; Fri, 7 May 2021 10:38:05 +0000 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.2176.2; Fri, 7 May 2021 10:38:05 +0000 Received: from e124191.cambridge.arm.com (10.11.7.12) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Fri, 7 May 2021 10:38:05 +0000 From: "Joey Gouly" To: CC: , , , , Subject: [PATCH v1 3/5] ShellPkg: add a Graph option to the Parser Flags Date: Fri, 7 May 2021 11:38:02 +0100 Message-ID: <20210507103804.8131-4-joey.gouly@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210507103804.8131-1-joey.gouly@arm.com> References: <20210507103804.8131-1-joey.gouly@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 810b5cd0-a204-47b2-eed5-08d9114441e5 X-MS-TrafficTypeDiagnostic: DB6PR0801MB2087:|DB6PR08MB2661: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:1051;OLM:1051; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: mRteSuYjziHRVqiEJvgfmPOFNRqPQ0orDfQ6NQ17A/a1w0WZ+aV9kvZX6QfU0UvqBtehpopmQB46yTeWgxRqrBiffeoXUJTcqZkOj57aJuU5M8/0S3kO67lf6mzg56y5KHXR9xnAZ+O9VGLn/QRlzzcYBXnkYY42DO4HbQhO/2a/lWUCp2YWGkOOOrXiJIN0j9qLdIZcwWxSRlyeUypTmNDo+6Ys68pauXeD5qTBZZNErsAa+M9PgxoXi3dBXrpStkZBXT0ZnuxkW6P4L8qjnmDdhGPJVMPDi4BlwXIIRhMwvs6kB44U2dDS7rk9qwDRw2GMlSnt6Ak2QWvZMLDRbFVg453rF/GuPyJ50ApLLLYOsycyOAgnRVjCMTo+2FQmov7scO1TFfM+edlUq6qwgq9ocMiOjxGR34yL9zPFe5wY4J4CpvkTksCv9oXobwi9Cbk1z4KLYjvlw5R4oaDxLV46nEb4gFHeiPgMY1NjseDE2Z3ZzhD4AcHbNZYSCQFRnhg8s4uwfTWOmAAcmKNBmv9s5XmBlgvwfSEKoGCgGY+qs1xeB8QdgDA2Po38egDEv0P/JLr6Ib7GYJda4q0k4NMYacBj1HsWHgI9ISSWk/wVEgOKRC2TZ4uulpTsrMTLOXNNU9EhCiCu8oq7Es3/0+DiwH+B4ELvVjHxF9G4wkNx8JDCfLSl7wczjKRd+cu9EHoSn1hdz6OYy42CW8nlnwOVUzKXh0D3g0NmoO1Vk1vRrJDHymDD8w4i1mvgzsR7z+IzZrtgkapbZZLTNNBmtg== 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)(376002)(136003)(396003)(39850400004)(346002)(36840700001)(46966006)(6666004)(1076003)(4326008)(86362001)(36860700001)(44832011)(82310400003)(8676002)(36756003)(478600001)(47076005)(70586007)(186003)(426003)(2616005)(5660300002)(83380400001)(7696005)(82740400003)(6916009)(26005)(356005)(8936002)(81166007)(2906002)(54906003)(336012)(316002)(70206006)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0801MB2087 Return-Path: Joey.Gouly@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5d9014ff-8f91-4d8c-367f-08d911443a41 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UwgQ0KFGDLB74nO7bKF4RXNxiMuIecjdbOZajN1A5YkTPv0csl4VDVzlF5IO7xKWWsecKu/zsPMlZqbHbv1IVDBjGSzb32tMSatb8Zbxz4SxHk39INlnvUt0YDTqk3Aj11EzWdOgaqNq+SDwqJ6I04InJ81ZLdaQKs+tcAgiAxE/YXAiSD6SluTPqBUHD4264b/E2ILAyqmg3o9Xe8CeGrmSKM2dgR5YFH+cP3W/puFkxd/hKTqFbqPJl/zofaEsBpz4Kd9Lv6xpMnb+zkRCtCYfdrv0jdRmGwI2h2aWC0rOShnSvybdFX9OxZD5MNORCQTNLzuGMaAHjHLzoNySPYPkvPNpBpCPbUHTrUVXp4m41mPoNvYj59QOX1l+tc06f2TAEGJK3f1JyXZl3YfYzj14bFlFsTa2Qp/8wCXmOlMZDqlImbTky1MMxdPuzcCZ6vap3RJuSbTpGmWfq430Fbn1ttOEWGsj9oi9kTkeMjV1wVnOYiXFJzmHMFnSbzwM1QgRXYYMT+VO3bydDDPlNzdR5vxocUj0WJU23VpUM4aDe4Vf+7QoOGz+PXJnvHxdThEY9NQW7Mwoo3AkIV6yGfGOHsw3EsWoBuhDkBPgfnlpqVSZBfxRWf/V8PT+x9MvlzaxV4k1a5h3k+/59FGWgwvmP3RUnHFReHjgqHKZi/I4pgzAbvUJb9kPY8Zmkh9ahoai+HposzCp2U+X635AQpKVqzLkqmuZ2Rc8zQ2BJ1k= 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)(136003)(346002)(376002)(39850400004)(396003)(46966006)(36840700001)(8936002)(1076003)(83380400001)(70586007)(82310400003)(4326008)(44832011)(5660300002)(2616005)(426003)(2906002)(336012)(7696005)(82740400003)(478600001)(86362001)(81166007)(36756003)(316002)(186003)(54906003)(70206006)(6666004)(6916009)(8676002)(36860700001)(26005)(47076005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2021 10:38:31.0602 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 810b5cd0-a204-47b2-eed5-08d9114441e5 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: DB5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2661 Content-Type: text/plain From: Marc Moisson-Franckhauser Bugzilla: 3378 (https://bugzilla.tianocore.org/show_bug.cgi?id=3378) This option informs the parser to generate a dot graph of a table. This can be useful to understand or debug a table, such as the PPTT table. Signed-off-by: Marc Moisson-Franckhauser Signed-off-by: Joey Gouly --- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h | 2 ++ ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewConfig.h | 3 ++- ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c | 9 +++++++- ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c | 24 +++++++++++++++++--- ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni | 9 ++++++-- 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h index b078c0b99335ba28f7589cac6b0a4190d9a6c3b5..9a67fe084327434bf21b37b3089779468edfb0f1 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h @@ -20,11 +20,13 @@ Flags for the parser. */ #define PARSE_FLAGS_TRACE BIT0 +#define PARSE_FLAGS_GRAPH BIT1 /** Helper macros to test parser flags. */ #define IS_TRACE_FLAG_SET(Flags) (((Flags) & PARSE_FLAGS_TRACE) != 0) +#define IS_GRAPH_FLAG_SET(Flags) (((Flags) & PARSE_FLAGS_GRAPH) != 0) /** This function increments the ACPI table error counter. diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewConfig.h b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewConfig.h index 2db4a65415d8f9e70686cb2cc432862ab4e4c2dd..262302a15cbbe04a228fd55e523930fb76bcf6a8 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewConfig.h +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewConfig.h @@ -1,7 +1,7 @@ /** @file Header file for 'acpiview' configuration. - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -106,6 +106,7 @@ typedef enum { ReportSelected, ///< Report Selected table. ReportTableList, ///< Report List of tables. ReportDumpBinFile, ///< Dump selected table to a file. + ReportDotGraph, ///< Create Dot Graph for selected compatible table. ReportMax, } EREPORT_OPTION; diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c index db7b2e2a30525cc85a333b93f5eb97ec3a517b37..1155b2f3f411247c866f635fb666dd76455f18a4 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiView.c @@ -192,6 +192,12 @@ ProcessTableReportOptions ( DumpAcpiTableToFile (TablePtr, Length); } break; + case ReportDotGraph: + if (Signature == SelectedTable->Type) { + SelectedTable->Found = TRUE; + ParseFlags |= PARSE_FLAGS_GRAPH; + } + break; case ReportMax: // We should never be here. // This case is only present to prevent compiler warning. @@ -340,7 +346,8 @@ AcpiView ( ReportOption = GetReportOption (); if (ReportTableList != ReportOption) { - if (((ReportSelected == ReportOption) || + if (((ReportSelected == ReportOption) || + (ReportDotGraph == ReportOption) || (ReportDumpBinFile == ReportOption)) && (!SelectedTable->Found)) { Print (L"\nRequested ACPI Table not found.\n"); diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c index b30ed3fc8597b229dd15b6ad4f2aab2e3d0ca583..d837b390938f3c3bc5cb90c1161e2feeb1ed6a6b 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c @@ -1,7 +1,7 @@ /** @file Main file for 'acpiview' Shell command function. - Copyright (c) 2016 - 2020, Arm Limited. All rights reserved.
+ Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -34,6 +34,7 @@ EFI_HII_HANDLE gShellAcpiViewHiiHandle = NULL; STATIC CONST SHELL_PARAM_ITEM ParamList[] = { {L"-q", TypeFlag}, {L"-d", TypeFlag}, + {L"-g", TypeFlag}, {L"-h", TypeFlag}, {L"-l", TypeFlag}, {L"-s", TypeValue}, @@ -293,6 +294,18 @@ ShellCommandRunAcpiView ( L"-d" ); ShellStatus = SHELL_INVALID_PARAMETER; + } else if (ShellCommandLineGetFlag (Package, L"-g") && + !ShellCommandLineGetFlag (Package, L"-s")) { + ShellPrintHiiEx ( + -1, + -1, + NULL, + STRING_TOKEN (STR_GEN_MISSING_OPTION), + gShellAcpiViewHiiHandle, + L"acpiview", + L"-s", + L"-g" + ); } else { // Turn on colour highlighting if requested SetColourHighlighting (ShellCommandLineGetFlag (Package, L"-h")); @@ -316,10 +329,15 @@ ShellCommandRunAcpiView ( SelectAcpiTable (SelectedTableName); SetReportOption (ReportSelected); - if (ShellCommandLineGetFlag (Package, L"-d")) { + if (ShellCommandLineGetFlag (Package, L"-d") || + ShellCommandLineGetFlag (Package, L"-g")) { // Create a temporary file to check if the media is writable. CHAR16 FileNameBuffer[MAX_FILE_NAME_LEN]; - SetReportOption (ReportDumpBinFile); + if (ShellCommandLineGetFlag (Package, L"-d")) { + SetReportOption (ReportDumpBinFile); + } else { + SetReportOption (ReportDotGraph); + } UnicodeSPrint ( FileNameBuffer, diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni index 393110e0ee98d54b3be0309c2d297a121c258570..51f2bea10f7b768e5e67f930237207193cba4246 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.uni @@ -1,6 +1,6 @@ // /** // -// Copyright (c) 2016 - 2020, Arm Limited. All rights reserved.
+// Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.
// SPDX-License-Identifier: BSD-2-Clause-Patent // // Module Name: @@ -30,7 +30,7 @@ "Display ACPI Table information.\r\n" ".SH SYNOPSIS\r\n" " \r\n" -"ACPIVIEW [[-?] | [[[[-l] | [-s AcpiTable [-d]]] [-q] [-h]] [-r Spec]]]\r\n" +"ACPIVIEW [[-?] | [[[[-l] | [-s AcpiTable [-d] [-g]]] [-q] [-h]] [-r Spec]]]\r\n" " \r\n" ".SH OPTIONS\r\n" " \r\n" @@ -39,6 +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" +" -g - Generate a dot graph of the specified AcpiTable.\r\n" " -q - Quiet. Suppress errors and warnings. Disables consistency checks.\r\n" " -h - Enable colour highlighting.\r\n" " -r - Validate that all required ACPI tables are installed\r\n" @@ -123,6 +124,10 @@ " in the current working directory:\r\n" " fs0:\> acpiview -s DSDT -d\r\n" " \r\n" +" * To save a dot graph in the current working directory\r\n" +" representing the processor architecture described in the PPTT table:\r\n" +" fs0:\> acpiview -s PPTT -g\r\n" +" \r\n" " * To display contents of all ACPI tables:\r\n" " fs0:\> acpiview\r\n" " \r\n" -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")