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.70]) by mx.groups.io with SMTP id smtpd.web12.21083.1593444048333789041 for ; Mon, 29 Jun 2020 08:20:48 -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=4LOrhr1m; spf=pass (domain: arm.com, ip: 40.107.7.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=mz+yAv0jV/6kIDMgTbgsK+L/2zLl+fCwpyBm3otQrHQ=; b=4LOrhr1m5p1pO0wv1gU2lh0DJpb4AEAcq65rvyzO4pf1AIqGoGsRGZtyRZGtWEU4IBmWWqm7ua9QwCgbTdIFPC5IwJEUcUVn1R4s1Ov/ACIiVL3jZ5oYueZ/AG3jY3NcwUqf8ZXGxGCZAn6LozeZClcCngOzPJH6CTKstC1zE+4= Received: from AM5PR0101CA0033.eurprd01.prod.exchangelabs.com (2603:10a6:206:16::46) by VE1PR08MB4942.eurprd08.prod.outlook.com (2603:10a6:803:10f::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.26; Mon, 29 Jun 2020 15:20:36 +0000 Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:16:cafe::29) by AM5PR0101CA0033.outlook.office365.com (2603:10a6:206:16::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21 via Frontend Transport; Mon, 29 Jun 2020 15:20:36 +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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:35 +0000 Received: ("Tessian outbound c90b0f113c0c:v60"); Mon, 29 Jun 2020 15:20:35 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: b9cd3bf0a5478e5e X-CR-MTA-TID: 64aa7808 Received: from 11d3d47ec144.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id EE1BBD05-B1B4-4D2B-BAB8-236FE0E28D01.1; Mon, 29 Jun 2020 15:20:28 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 11d3d47ec144.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 29 Jun 2020 15:20:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=diPjg5R/IQg0Z30vlakObk99pJKavc6CRGvrEtGocZ95EQuY2onbc+LYBdbIhYoEV2fcYigpz0nTL3fyWMarELA8pXvfLpJesAEuhpf+8p91N2RTThFbB/OvJI0/uok2j3TCwH5eOkG2kbY1FjE0YaH54HALjVd/4yWf4CGQg6r+epXwZHepJcWb688EvV7yHV70ohtPdijVcHNX9vdrKtqjwmT79NNNgUZLIbbNPEBAb23jbpNcKBlCupTLWCcGUGEBh/x57T4++4Oi3SHTkr1UUbv1QRp2AW6uYqqtcj3rm/PAwMnpNJn8aUcjaNUkcGYDV3f5AfTuLBR8BORZTQ== 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=mz+yAv0jV/6kIDMgTbgsK+L/2zLl+fCwpyBm3otQrHQ=; b=bQQGY5xj+jECgLChwqPhe/mUV/3qA1aCrg4gncVV7jAX6JvWdR+Ixe679VdrSKb3rIJGX2X0u5qGZEqPAezOPvEEFN25cnYzcTPeZb/9xtPQiS/QAxH/oKByDBC8Sg1IX2Qo71fcresoUhTZSXfwi4Z2r0fsQgQmLlrE7fxCO0NFi+2tQRlCklQsXqNXmwTfuYMNN18o94cVlTQI0p+mn6e0DWbAu1H/SzW1aUO0RXfiYFXdVTLZagAJvpLtbXcCmqPzIsBLDaAf9arMk2kT+EMlgizrF1ci87izTXDUrEFTKO0UbhjPgZjExypXyIyVH4N7vwxkOkS40HNv2E/GYQ== 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=mz+yAv0jV/6kIDMgTbgsK+L/2zLl+fCwpyBm3otQrHQ=; b=4LOrhr1m5p1pO0wv1gU2lh0DJpb4AEAcq65rvyzO4pf1AIqGoGsRGZtyRZGtWEU4IBmWWqm7ua9QwCgbTdIFPC5IwJEUcUVn1R4s1Ov/ACIiVL3jZ5oYueZ/AG3jY3NcwUqf8ZXGxGCZAn6LozeZClcCngOzPJH6CTKstC1zE+4= Received: from DB8PR09CA0026.eurprd09.prod.outlook.com (2603:10a6:10:a0::39) by AM7PR08MB5480.eurprd08.prod.outlook.com (2603:10a6:20b:de::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.21; Mon, 29 Jun 2020 15:20:27 +0000 Received: from DB5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:a0:cafe::33) by DB8PR09CA0026.outlook.office365.com (2603:10a6:10:a0::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:27 +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 DB5EUR03FT035.mail.protection.outlook.com (10.152.20.65) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.3131.20 via Frontend Transport; Mon, 29 Jun 2020 15:20:27 +0000 Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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; Mon, 29 Jun 2020 15:20:26 +0000 Received: from localhost.localdomain (10.57.4.19) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Mon, 29 Jun 2020 15:20:25 +0000 From: "Tomas Pilar (tpilar)" To: CC: , Subject: [PATCH 0/8] ShellPkg/AcpiView: Refactor Error Logging Date: Mon, 29 Jun 2020 16:20:00 +0100 Message-ID: <20200629152008.685-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)(46966005)(82310400002)(426003)(19627235002)(2616005)(47076004)(86362001)(498600001)(5660300002)(356005)(2906002)(81166007)(6916009)(70206006)(4326008)(336012)(8676002)(6666004)(8936002)(36756003)(70586007)(186003)(26005)(83380400001)(54906003)(1076003);DIR:OUT;SFP:1101; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf1c3221-17ab-491d-244e-08d81c3ff8f6 X-MS-TrafficTypeDiagnostic: AM7PR08MB5480:|VE1PR08MB4942: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-Forefront-PRVS: 044968D9E1 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: kssESUOY6X2pUP8lU4D4mypHKH602I6uS2VXYy8tQ0xLvW5fHLeBNoR+GcM4FkCWutuj0qZId+Bxr5Nu6Lm4O1vMNPzJBOgMtwEj4Tj58P5h/jrKje6gkypsE1RCxkQUoHZGQrXzFISjg1SlI1n4H9O9DoASsPBcJVE4RQkkh2+YlSc99oD6cOcGrQnXdrMN5joIFYY/b1krnnPS6MkT4wait0heuO/5hYIO0NxymqL+P+9MY5HINd2eiY91SVOPg5Q37bIzFx6Fim4EYB2Y/UbGqIebrUzybtiyaNwwTHi3zZKEznL1n0bcHGpsdr7bEgUagXMAaBxjRyT95RLlq73OPD4i+ECwiAGPWmRsadwIpRNzt01LvVYp8mn0vIUiJ8irhHzdOoV8W72gzAP4bw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR08MB5480 Return-Path: Tomas.Pilar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT014.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)(46966005)(186003)(26005)(81166007)(2616005)(5660300002)(86362001)(426003)(336012)(47076004)(70206006)(83380400001)(1076003)(19627235002)(36756003)(70586007)(6916009)(36906005)(6666004)(8676002)(8936002)(82310400002)(2906002)(4326008)(54906003)(498600001);DIR:OUT;SFP:1101; X-MS-Office365-Filtering-Correlation-Id-Prvs: 53f4f64d-fced-4238-6981-08d81c3ff3b8 X-Forefront-PRVS: 044968D9E1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qP/fGuLeSDk4dlN+f4ytqfe3uFSyM4DI0LDlGRQ9bTyAlEH6G76tL+gX6AECyI4RftLn7BwJnF+G09uk5uQB28fbU8DKSMNJbQxPYP/nbDyWEVzL+LHGpmx8UG0C3SL7hEDFKK+8kesj4j6jVR/NBvFOtFWadx9lTQ26aqJlCpt4HZbdT7JRxtVY5OMH+92MpGE+pq1NSI2l2JfgXVwHsKG3Ic67rFsJbjE+bzcHNV5yL93E3uA8U9rKJlaVYx80XLWVrur5uNtPTSzjBggQV22nFBw9fXm0WUdLkujQUdYUN8qr7p0A4+x/9f5nFfxQic3ng5BPb7pBx7jq9/7JTI0wFMuX9uC1C6vkRsYmEga/0F3aMdn042yVTikOFnDKkAyFXAiDoYw81lvWu4jtcg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2020 15:20:35.7703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cf1c3221-17ab-491d-244e-08d81c3ff8f6 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: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB4942 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain This patch series refactors the error logging in the AcpiView functionality to a newly created logging facility. The new error logging facility in AcpiViewLog.[ch] contains helper functions to log messages of various types and severities, enumerations of known error types as well as common abstractions for outputting the log. This allows for modularity when determining how the output should be delivered to the user as well as significantly reduced code footprint of the logging mechanism in the core AcpiView code. Tomas Pilar (8): ShellPkg/AcpiView: Extract configuration struct ShellPkg/AcpiView: Declutter error counters ShellPkg/AcpiView: Modify error message ShellPkg/AcpiView: Create a logging facility ShellPkg/AcpiView: Refactor PrintFieldName ShellPkg/AcpiView: Refactor dump helpers ShellPkg/AcpiView: Refactor AcpiView ShellPkg/AcpiView: Refactor table parsers .../UefiShellAcpiViewCommandLib/AcpiParser.c | 530 +++--------------- .../UefiShellAcpiViewCommandLib/AcpiParser.h | 173 +----- .../AcpiTableParser.c | 56 +- .../AcpiTableParser.h | 2 +- .../UefiShellAcpiViewCommandLib/AcpiView.c | 226 +++----- .../UefiShellAcpiViewCommandLib/AcpiView.h | 36 -- .../AcpiViewConfig.c | 180 +----- .../AcpiViewConfig.h | 138 +---- .../UefiShellAcpiViewCommandLib/AcpiViewLog.c | 266 +++++++++ .../UefiShellAcpiViewCommandLib/AcpiViewLog.h | 254 +++++++++ .../Arm/SbbrValidator.c | 65 +-- .../FieldFormatHelper.h | 164 ++++++ .../Parsers/Dbg2/Dbg2Parser.c | 119 ++-- .../Parsers/Fadt/FadtParser.c | 49 +- .../Parsers/Gtdt/GtdtParser.c | 84 +-- .../Parsers/Iort/IortParser.c | 208 +++---- .../Parsers/Madt/MadtParser.c | 99 +--- .../Parsers/Mcfg/McfgParser.c | 11 +- .../Parsers/Pptt/PpttParser.c | 166 ++---- .../Parsers/Rsdp/RsdpParser.c | 42 +- .../Parsers/Slit/SlitParser.c | 123 ++-- .../Parsers/Spcr/SpcrParser.c | 31 +- .../Parsers/Srat/SratParser.c | 189 ++----- .../Parsers/Xsdt/XsdtParser.c | 93 +-- .../UefiShellAcpiViewCommandLib.c | 22 +- .../UefiShellAcpiViewCommandLib.inf | 3 + 26 files changed, 1289 insertions(+), 2040 deletions(-) create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLo= g.c create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiViewLo= g.h create mode 100644 ShellPkg/Library/UefiShellAcpiViewCommandLib/FieldForma= tHelper.h --=20 2.24.1.windows.2