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.70]) by mx.groups.io with SMTP id smtpd.web11.18788.1592229863803196135 for ; Mon, 15 Jun 2020 07:04:24 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=arrG+EMW; spf=pass (domain: arm.com, ip: 40.107.21.70, mailfrom: tomas.pilar@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=dvsrs+IW1746vf3HJ55xw+IJ7RoStz82rZy/FeDEhoc=; b=arrG+EMWbT1/ilLEA53dBrNwpj630pNFgDoO9/85ykQPvxLK+QabekmRWzC65fUUvtxqkVdMJi09MflDEBlzvWnvu+9R/oGhaFnznhFS3agbSrzsFV7CTfyXZcBBxmKf41fa7URQJ/e0kOlvEmV2F68RTjweovZBjmdmgdH4pLU= Received: from AM6PR01CA0062.eurprd01.prod.exchangelabs.com (2603:10a6:20b:e0::39) by DB6PR08MB2871.eurprd08.prod.outlook.com (2603:10a6:6:23::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.26; Mon, 15 Jun 2020 14:04:20 +0000 Received: from AM5EUR03FT009.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:e0:cafe::ef) by AM6PR01CA0062.outlook.office365.com (2603:10a6:20b:e0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.19 via Frontend Transport; Mon, 15 Jun 2020 14:04:20 +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=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 AM5EUR03FT009.mail.protection.outlook.com (10.152.16.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.18 via Frontend Transport; Mon, 15 Jun 2020 14:04:19 +0000 Received: ("Tessian outbound 39cdd740f5cb:v59"); Mon, 15 Jun 2020 14:04:19 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 6e786d9775a10ce9 X-CR-MTA-TID: 64aa7808 Received: from eafa92f87f00.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 14D9DE37-0ACF-4C80-9ECB-7C87DBCD7A24.1; Mon, 15 Jun 2020 14:04:14 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id eafa92f87f00.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 15 Jun 2020 14:04:14 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dzwyHuQ76RFE3DJ/iErJN7J2sSC3yoHL4I4f+jblcyI4Tmd/BCt/UvebutlkT811HaVH9DMLhYoqrweDFm3kkVfSFvVT2QTm1Pf3mtwig55CvUN0b2XFQNCNbXMQjVH1b/g8f7PzLWCpRLa4y2Lik90Z9sjzPz7BhAdwpZviQRQswZDsnKi6IeTpcnk1yC95Fk8EmiBmuCCdhJQMIG9EF2na6nWgNBPNb7fsiCAzCvGlJWITZP4omndOclAZXByzqgf/vB7CIN6HI3Ww8UGSJkxR/Mbw8Qf1O4yCXCHqh0p0aumEf/tFA4Yc8DiaX6Pe0g2ASsbzTrkfqRUX1GhuKg== 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=dvsrs+IW1746vf3HJ55xw+IJ7RoStz82rZy/FeDEhoc=; b=lDEbSed8NolG36mruLKktAQzHY63XaGxDzHvw0sAG1G+4DeEpN1gXVxTbrciNiLqSlFWMcejKyX/gaGO+JycRc2Ney6JSx+/gdBPGdv7XutFDShErHDJwVhNYidWOvakfr0hd2+2bxApRka6EWZh69Y7HkdXVPm9KFPOvzfW/v2dte9oeojuk5boXAMXr3wAzg5EAhn3iHOiou6Sv1vXN4BFMTYM9IrEKK9hM+SsxQhfqp9QBginwKO/Iv57KXokBJqjTp+sNGWSDae5LDzE0s47czWICYf81v/irpgusn67X0E41vaCtHGirduriFQ1BVAzVnUPboi9oSS9+Jl7fQ== 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=dvsrs+IW1746vf3HJ55xw+IJ7RoStz82rZy/FeDEhoc=; b=arrG+EMWbT1/ilLEA53dBrNwpj630pNFgDoO9/85ykQPvxLK+QabekmRWzC65fUUvtxqkVdMJi09MflDEBlzvWnvu+9R/oGhaFnznhFS3agbSrzsFV7CTfyXZcBBxmKf41fa7URQJ/e0kOlvEmV2F68RTjweovZBjmdmgdH4pLU= Received: from DBBPR09CA0014.eurprd09.prod.outlook.com (2603:10a6:10:c0::26) by AM0PR08MB3633.eurprd08.prod.outlook.com (2603:10a6:208:de::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.19; Mon, 15 Jun 2020 14:04:12 +0000 Received: from DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::b3) by DBBPR09CA0014.outlook.office365.com (2603:10a6:10:c0::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.21 via Frontend Transport; Mon, 15 Jun 2020 14:04:12 +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=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 DB5EUR03FT018.mail.protection.outlook.com (10.152.20.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3088.18 via Frontend Transport; Mon, 15 Jun 2020 14:04:12 +0000 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; Mon, 15 Jun 2020 14:04:11 +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.1779.2; Mon, 15 Jun 2020 14:04:10 +0000 Received: from localhost.localdomain (10.57.15.84) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Mon, 15 Jun 2020 14:04:09 +0000 From: "Tomas Pilar (tpilar)" To: CC: , Ray Ni , Zhichao Gao Subject: [PATCH v3 0/7] Standalone AcpiView Application Date: Mon, 15 Jun 2020 15:03:44 +0100 Message-ID: <20200615140351.1725-1-Tomas.Pilar@arm.com> X-Mailer: git-send-email 2.24.1.windows.2 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)(346002)(376002)(39860400002)(136003)(46966005)(70586007)(70206006)(36756003)(2906002)(8676002)(8936002)(478600001)(86362001)(82740400003)(336012)(426003)(82310400002)(4326008)(47076004)(83380400001)(81166007)(356005)(6666004)(5660300002)(1076003)(54906003)(6916009)(186003)(26005)(2616005)(316002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8914c8f6-26ac-492c-6297-08d81134ffc0 X-MS-TrafficTypeDiagnostic: AM0PR08MB3633:|DB6PR08MB2871: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-Forefront-PRVS: 04359FAD81 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: RidaW2guStAA9C2kJwApdbdNqQSQDkiedS5ibL0fQqil+38rBjiQA7bpMOR782hNXs5HUaTBmzIyc26IxFXFRViN104gLY3DRkoANu3c/TMX8qYtIwgNZX0LQjrz4wNISR/wCKCROsMWJF6lgAA+wFk1aEjBrcFgAGt4h86/Gb6fQ5v/NWF5a6/jPLDdbbUWOS6delhFZ2lAQ0uSoyZ2R8AQujFHBFvbD+XFXy39QnhX06DT+mNqp27CNVMLoizpzknVSh68+BWlwT72z3LE2BMIpKPeZaj4omdDWAnbn2o0qbEdqB57S75Cpp8lBj+rzhhIAVaWDzkx8f/YIMPcRLt2TBb+P9eLZLhZWH74lq571CR6zbsPL9wyNo2mIluqIuR2L1yiaVbcrmNrU9Lnmw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3633 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT009.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)(396003)(346002)(39860400002)(136003)(376002)(46966005)(8936002)(82740400003)(4326008)(82310400002)(83380400001)(107886003)(86362001)(8676002)(336012)(2616005)(54906003)(36906005)(47076004)(426003)(316002)(81166007)(186003)(26005)(6916009)(478600001)(6666004)(1076003)(2906002)(5660300002)(70586007)(70206006)(36756003);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 2a0bb3bb-002b-46cb-8be9-08d81134fb71 X-Forefront-PRVS: 04359FAD81 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7Xn+e1cGg0rymYVPklMcRiGc74qlQHbwfSPH8+oBP7FSMuw3nrqSBo2O6P/jexbyQlbAaeMVjHEcf0ygWACp1kMvtt8286HtzuYBfyXsTUo9oQMLW637r+tIImSgz/lv9pXvJS/En933v+56ggbmwl104K9j80U9DZ60oHWuHG5607Yq+vRF+5oDXx3qraKCesXlaIUP0LBkYMrOMLI/8qSzm4t3hobfjbfEDabuo1M7dAHx4obIMjSHEaojUv7MG7mlO2rj2pMhZmt2FpFxjqaXy/qqNJoGMJLWRPmJPjkOui2RjnP9YSKPdgyGVYzzDe6jFO2yBXjM10TgLqsv7GOWcUqjEaSXgfa+0ktloR4hhX3QKSeUST0kxi8r1jWDMl6U41iE3S/XgbUIgVHksw== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2020 14:04:19.9101 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8914c8f6-26ac-492c-6297-08d81134ffc0 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: DB6PR08MB2871 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This patchset adds a new application module to the=20 ShellPkg with the functionality of the 'acpiview' command. The existing code is tidied and a clean boundary between the UEFI shell command wrapper and the acpiview functionality is created. Then, a new application wrapper is added. The motivation for a standalone AcpiView application lies in the desire to test implementation of the Acpi tables on=20 a wide selection of platforms, particularly platforms still in development, platforms that might have an older implementation of the UEFI shell or platforms that might not include the 'acpiview' command in the internal build of the UEFI shell. Furthermore, this application can then be integrated in larger firmware testing frameworks. --- v3: Fix pointer dereference in GetSelectedTable. Create library interface for the UefiShellAcpiViewCommandLib and convert to named library. Tidy help text shell hook in standalone app. v2: Patch formatting Cc: Ray Ni Cc: Zhichao Gao Tomas Pilar (7): ShellPkg/AcpiView: Move log reset to main method ShellPkg/AcpiView: Refactor configuration ShellPkg/AcpiView: Move table count reset ShellPkg/AcpiView: Move parameter parsing ShellPkg/AcpiView: Refactor DumpAcpiTableToFile ShellPkg: Add AcpiViewCommandLib ShellPkg/AcpiView: Add application wrapper .../Application/AcpiViewApp/AcpiViewApp.c | 40 ++ .../Application/AcpiViewApp/AcpiViewApp.inf | 34 ++ .../Application/AcpiViewApp/AcpiViewApp.uni | 122 +++++ ShellPkg/Include/Library/AcpiViewCommandLib.h | 46 ++ .../UefiShellAcpiViewCommandLib/AcpiParser.c | 1 + .../AcpiTableParser.c | 1 + .../UefiShellAcpiViewCommandLib/AcpiView.c | 474 ++---------------- .../UefiShellAcpiViewCommandLib/AcpiView.h | 113 +---- .../AcpiViewConfig.c | 246 +++++++++ .../AcpiViewConfig.h | 177 +++++++ .../Parsers/Gtdt/GtdtParser.c | 1 + .../Parsers/Iort/IortParser.c | 1 + .../Parsers/Madt/MadtParser.c | 1 + .../Parsers/Pptt/PpttParser.c | 1 + .../Parsers/Srat/SratParser.c | 1 + .../UefiShellAcpiViewCommandLib.c | 279 ++++++++++- .../UefiShellAcpiViewCommandLib.h | 26 - .../UefiShellAcpiViewCommandLib.inf | 33 +- ShellPkg/ShellPkg.dec | 3 + ShellPkg/ShellPkg.dsc | 4 +- 20 files changed, 1019 insertions(+), 585 deletions(-) create mode 100644 ShellPkg/Application/AcpiViewApp/AcpiViewApp.c create mode 100644 ShellPkg/Application/AcpiViewApp/AcpiViewApp.inf create mode 100644 ShellPkg/Application/AcpiViewApp/AcpiViewApp.uni create mode 100644 ShellPkg/Include/Library/AcpiViewCommandLib.h create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewCo= nfig.c create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewCo= nfig.h delete mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellA= cpiViewCommandLib.h --=20 2.24.1.windows.2