From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-AM5-obe.outbound.protection.outlook.com (EUR03-AM5-obe.outbound.protection.outlook.com [40.107.3.83]) by mx.groups.io with SMTP id smtpd.web11.7229.1592919813033346301 for ; Tue, 23 Jun 2020 06:43:34 -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=cQmBUFEH; spf=pass (domain: arm.com, ip: 40.107.3.83, 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=hnhlfV5VnSLYulw+3VVWoQe2Ag2R6b5dF81gnB/xyQg=; b=cQmBUFEHNx/c6wyLLd2ti2O5DlGWsvsNtW2js+FtUUVZJT+RnInnKkY2tXr9bgWAhUkP0eydzMqCJ4wYdzrhlYdmfEQkXP7MStTjjiP+NUH8x95y/odEMTgeU0fzpiD/slV4bJYhV7vayBOZnrunNsH4LbBgTQYomOYRTRHBq4s= Received: from AM6P192CA0011.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:83::24) by VI1PR08MB4029.eurprd08.prod.outlook.com (2603:10a6:803:ec::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23; Tue, 23 Jun 2020 13:43:30 +0000 Received: from VE1EUR03FT027.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:83:cafe::1f) by AM6P192CA0011.outlook.office365.com (2603:10a6:209:83::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 13:43:29 +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 VE1EUR03FT027.mail.protection.outlook.com (10.152.18.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 13:43:29 +0000 Received: ("Tessian outbound f44be76249db:v59"); Tue, 23 Jun 2020 13:43:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b7ecca4af282ddcb X-CR-MTA-TID: 64aa7808 Received: from d8cb3e0c63fd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7AC77B54-61D9-4F55-B208-2F7EF313491E.1; Tue, 23 Jun 2020 13:43:24 +0000 Received: from EUR04-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d8cb3e0c63fd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 23 Jun 2020 13:43:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UvIS/1Vbk5JQgAuX/JVHf1Rer6snY7XYeICN3olN/yxjnPAuDkI9F6wFYOEXzaf+JKwZyT8NC1taP1KXKxLRa7Bw4h/kcXwupo3UjcfXZxZXOQIUXIv8JZqaZSka1rNbUlx2gejFBrStGeQCCAxNnAKFh/j1Ya39MbhrWgeQm3Moco02gfVboIAbt0JiftYjv7nxHY615srLguKvJBFTuVMY1qn+fDwcDsKW04Ug+3+VQMZz6xo361LjYpNLkBq7ffYNUkZSTQkqseC1Q74ttAEHD4RffLXqkKdL8zRxsP5SrMZ++l/lJMFSCsTixP41rYBwLowmATJfMayepj1w5Q== 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=hnhlfV5VnSLYulw+3VVWoQe2Ag2R6b5dF81gnB/xyQg=; b=cuz3E3aUx4MRCpYUfERwdcpS7y9LcL9PJDxfNvpzhEu53QTsxwEK1ZRyuy4nETFmzWhzlC80Lsu+YpNoteNyF5FFNRsCncXZMCOjuNbCZYcvEWtCnKfHW4EoWI9+VS8OPzLic0Jtb/F8c1WyXlqCRugXRte0jZirC/FFYKsZeHI1YxjpuODhPADL+phphx93MU9sDgt2W/aQCdn/xxY5x0XBOHydDx2W2ib1iMa7AgIdoiRNbAe3uvU9IyYuZsvUMoLtswOSio2FdcEqRNgo5l+fi24SZJzvzJLeKcD9PX1WCDsZ+Y5XBC3/CZ8PdDBPT5fcppVm02SToTD6NYPxdA== 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=hnhlfV5VnSLYulw+3VVWoQe2Ag2R6b5dF81gnB/xyQg=; b=cQmBUFEHNx/c6wyLLd2ti2O5DlGWsvsNtW2js+FtUUVZJT+RnInnKkY2tXr9bgWAhUkP0eydzMqCJ4wYdzrhlYdmfEQkXP7MStTjjiP+NUH8x95y/odEMTgeU0fzpiD/slV4bJYhV7vayBOZnrunNsH4LbBgTQYomOYRTRHBq4s= Received: from DB6PR0801CA0064.eurprd08.prod.outlook.com (2603:10a6:4:2b::32) by AM6PR08MB4423.eurprd08.prod.outlook.com (2603:10a6:20b:bf::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.21; Tue, 23 Jun 2020 13:43:22 +0000 Received: from DB5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:2b:cafe::f4) by DB6PR0801CA0064.outlook.office365.com (2603:10a6:4:2b::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3109.23 via Frontend Transport; Tue, 23 Jun 2020 13:43:22 +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 DB5EUR03FT052.mail.protection.outlook.com (10.152.21.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3109.22 via Frontend Transport; Tue, 23 Jun 2020 13:43:22 +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, 23 Jun 2020 13:43:21 +0000 Received: from localhost.localdomain (10.57.20.205) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 23 Jun 2020 13:43:21 +0000 From: "Tomas Pilar (tpilar)" To: CC: , , Ray Ni , "Zhichao Gao" Subject: [PATCH v4 0/7] Standalone AcpiView Application Date: Tue, 23 Jun 2020 14:42:57 +0100 Message-ID: <20200623134304.2619-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)(376002)(396003)(136003)(39860400002)(346002)(46966005)(426003)(47076004)(316002)(82740400003)(2616005)(70586007)(26005)(83380400001)(6666004)(8936002)(81166007)(4326008)(86362001)(6916009)(8676002)(5660300002)(478600001)(336012)(186003)(82310400002)(1076003)(356005)(54906003)(36756003)(70206006)(2906002);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a8928f0f-ca83-4ea4-bf5f-08d8177b69d8 X-MS-TrafficTypeDiagnostic: AM6PR08MB4423:|VI1PR08MB4029: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-Forefront-PRVS: 04433051BF X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: SfIvw+4AmFVmxck8nPA3pIvXmbKH/ZNSz3Wt6Zo2V41PfkAuiG4lc9J4qoZaLrxrVT56r6U5rdB3U26sRmtoFb2wX/jjX3StoN4/7edwdUnGN94ElkFX1qc5/PGicIoVr4zHYczRqb2Nhbwz1kbsTpFPZV5becgp6v8wadPDHElqSxoDcfEPyDBJkPaGyXq9SOhqdUnzYuz5wVYTuXTw0zpyKro8Ad8VjyKjlxEsJ46qjgEKEQjSRVemBVz+4kPPQ8l0KhB29vyoezu1nDBPhy5ArVwLGOfZ2dSULYggAnbzVaZjkmZEogdAsv78E8lWLohZAUL7FV1hncGBiwmmJlxZnVcFas5TF4zJz0G3p8QKZHHUlf8dJFKUqO/UzYcNXcvj8ed3mScrNBVZmu2AEw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4423 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT027.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)(346002)(136003)(396003)(376002)(39860400002)(46966005)(36756003)(2616005)(336012)(8936002)(1076003)(426003)(86362001)(4326008)(478600001)(83380400001)(107886003)(70206006)(70586007)(316002)(6666004)(5660300002)(26005)(81166007)(2906002)(186003)(54906003)(8676002)(47076004)(36906005)(82740400003)(6916009)(82310400002);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 36254038-e92e-47ac-692f-08d8177b659b X-Forefront-PRVS: 04433051BF X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RyrBhs1yIC2IuxTkS4rxSwlCRYl2ZLnIW/IRDt5OStm2USQwu4zP8EJuwWIYCacEK2fijBaGLw0YzwVe40WXpPEhgh7HAN73uQ6CBnJtON8F6UrJnx0NvxJMLit83e2m996tYuBJ7kPhi8Ota73+iRY4KVy6JKRB9V6dy5hcxKNntxJompUPj53zKBUXaom9wZc1GVOhsblaK/tS3yWAVYnRqskIX7Q70icCTu8xKjw3IM+s/Dcykj/9BSPybFCo5HwiF6O4EbqgppS6+jUlGYe4jSKq+uHNw2ae9QxYwjNZHIM73UIIYxWVicIXbp0xGs8L9LAMH3Y6jDhOrdiOVd/FYiZiaNYbx1zUDFj9OQKwfFUC8YewCtsODomad58KRQmirXozt6s/EVFVGRVN4g== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jun 2020 13:43:29.6045 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a8928f0f-ca83-4ea4-bf5f-08d8177b69d8 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: VI1PR08MB4029 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. --- v4: Minor formatting. 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