From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.50]) by mx.groups.io with SMTP id smtpd.web12.9483.1635954108704698537 for ; Wed, 03 Nov 2021 08:41:49 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=rGpBBFAu; spf=pass (domain: arm.com, ip: 40.107.6.50, mailfrom: christopher.jones@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=bvO7bfJgOW7kmFTHe91ULhWl8sMrVnSZ4k33xC7roNk=; b=rGpBBFAukiMItdYYY0VY5zvPzisgFWDw3how4Cxl3xEU2lIOrmR0694Qmw7Wmw+znAJbxi96upwASZ26v+FD7ePQu6CiPYYHnvpMghwrxqBDntxjLVr4v8uPeovxCaz8Be6IteQ7bGD3wXe6Asqa8ejL1yi/1zqIT725LDr6iEo= Received: from AS9PR04CA0081.eurprd04.prod.outlook.com (2603:10a6:20b:48b::22) by DB9PR08MB6491.eurprd08.prod.outlook.com (2603:10a6:10:23f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14; Wed, 3 Nov 2021 15:41:45 +0000 Received: from VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:48b:cafe::d8) by AS9PR04CA0081.outlook.office365.com (2603:10a6:20b:48b::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 3 Nov 2021 15:41:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;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 VE1EUR03FT031.mail.protection.outlook.com (10.152.18.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Wed, 3 Nov 2021 15:41:44 +0000 Received: ("Tessian outbound 6ebd41198c5d:v108"); Wed, 03 Nov 2021 15:41:44 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 5ed315d0070a7592 X-CR-MTA-TID: 64aa7808 Received: from d7088ff92c80.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 75681B8C-1403-413A-A632-57A563698D9A.1; Wed, 03 Nov 2021 15:41:31 +0000 Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d7088ff92c80.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 03 Nov 2021 15:41:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bTDiWzU5mY4qno87YGsIX7vAsk4wTNXP3uBfAA9nEa1Z0FIHKYVfLHMwbqXWP7oSDbcbyZrYXSJPymKQpGwLcwXZEpwmyYD4eKT9+IMP7kbAptm+u3nw5KfLRK4Hgyan85f59JUcpSYR4Kyr+JIeqKi+dRpyfc7LlwBBgO61JSkz3d+HI9Sq3f74+4I0YXSH1bG4Od2L3uofJXJG/k+fN8xi6T4cdyx9MrFyAjn8prZ/6ubA0qXiryt17NZqjVdAQRX1gTU2LhhpS7Rbkqdxa0q35wOCQ/CQ0ZLiO5cmsVKO9FxGQU/I2REPgThzCEcetKiiHjdo1zp9Hob83xBJgA== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bvO7bfJgOW7kmFTHe91ULhWl8sMrVnSZ4k33xC7roNk=; b=boU6tURvkQJkgdrRfc9ZAsn/WEExbHHzLwlK3ZUVsEnHaPAOTurgqr8wWVhRVslAqPSU2E3Q6roAoJbniP9x9Qq+Uoqxi+3CixN1dwn2ArBsHu/93LBHqtIaIo2XjcHeGaHDusSj6gxPgNJEcl6jS5G1sC2wjUlPblVHIsq7blSPYFq0DBPFkIRdZudPaJvJCPgjiXcDvGBMjxn4E9XRsoQIUq67S4DKm5f8A/CqiIQEiJD+e9pwjqDq79/BAtboyQVV3dRi5OD3OVwRYGMsd2j7DWMsGd4p1GcqWFE4eqDNt9J63Arz1DOy74DV5gFdVtdA2kQ/rrOwnAPieWUmlA== 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=bvO7bfJgOW7kmFTHe91ULhWl8sMrVnSZ4k33xC7roNk=; b=rGpBBFAukiMItdYYY0VY5zvPzisgFWDw3how4Cxl3xEU2lIOrmR0694Qmw7Wmw+znAJbxi96upwASZ26v+FD7ePQu6CiPYYHnvpMghwrxqBDntxjLVr4v8uPeovxCaz8Be6IteQ7bGD3wXe6Asqa8ejL1yi/1zqIT725LDr6iEo= Received: from AM7PR03CA0021.eurprd03.prod.outlook.com (2603:10a6:20b:130::31) by AM0PR08MB3106.eurprd08.prod.outlook.com (2603:10a6:208:5a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10; Wed, 3 Nov 2021 15:41:28 +0000 Received: from AM5EUR03FT049.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:130:cafe::f9) by AM7PR03CA0021.outlook.office365.com (2603:10a6:20b:130::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.11 via Frontend Transport; Wed, 3 Nov 2021 15:41:28 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;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 AM5EUR03FT049.mail.protection.outlook.com (10.152.17.130) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4649.14 via Frontend Transport; Wed, 3 Nov 2021 15:41:27 +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.2308.14; Wed, 3 Nov 2021 15:41:16 +0000 Received: from e125153.arm.com (10.57.26.45) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.14 via Frontend Transport; Wed, 3 Nov 2021 15:41:16 +0000 From: "Chris Jones" To: CC: , , , , , , , Subject: [PATCH v2 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Date: Wed, 3 Nov 2021 15:41:04 +0000 Message-ID: <20211103154108.6534-4-christopher.jones@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211103154108.6534-1-christopher.jones@arm.com> References: <20211103154108.6534-1-christopher.jones@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce7f9bf7-3818-4aaa-da1b-08d99ee07089 X-MS-TrafficTypeDiagnostic: AM0PR08MB3106:|DB9PR08MB6491: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: ljAiQh1A0H6VERrcNbpAi47lV5Fs7lJPvfFQAWmOfVFby7f+DgHnegKJSENRgTlPUbYzDpKLaOi0qqcaf5bcvpawwepNPn28mx3t2TiHGs/3CmTU5nW2x1/B3BxO087cShRs75nzCRQlxDyG9dDsTfWfK6s1SwShl9Zh5asyYSH0DSs/v7fvyvZwePzC3IuBycFmj02iIKP2Mr8Ji/07SN++xngwgjJ7fj0Kp9ROa0V7uEqccOKLqjoJd0ZDmRmfQCW3rwRZdkEWew+jtZiYiGuvi3nYLawoxihXFqxCUP87Go5kuO8lgvgIKbdP5aJJUAI8TFd60iwZ+oxhlMq7HvjDA4fSMQ0NN1iYxpn5387vTOnVWGhIUA/2t0vQPJ2aNPbBmSpgFBs3HYrHowSG/Jqq83Dyf1gBp296Almx7JjjzO0k1UbyLm7E8px/sCX5AMh8ebVhs3Km3nUa7WIudoY5RNUOWF+FbGpFH4KFhAeFSbDXFRwuS3Ovd7ZVQkqk6R9BZME6AqY7MWAb7wueu7hfj8FxU882LtaaAvUKH4fAuplUH6HjQMpp4NngvyB6cADz/cl2lWfMTzWSwu8UzoTt7ZDLDNogQKlAJ4wW/ZnvH6Gtyi1rmJk0MX21Xp9gaXRocoiBot+vEhsCB86WMmF61rctTtSXpn1HDej/hkCxQ18boCy3Oe09JfKpmQEF/muj/4+Eb5P4nghcJ2GrwqO9VndIP5+Q2GQrhMKnrI394hSq4a6nFd9+MnUFNxGPhgpdN9HnLov3aZB+bSJfhV/P1U6onhzs31RhVvvA5UiVpTotibMk5KgKVQbYEmiq 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)(36840700001)(46966006)(86362001)(186003)(36860700001)(2906002)(81166007)(6916009)(8676002)(26005)(82310400003)(7696005)(1076003)(83380400001)(356005)(70206006)(6666004)(336012)(8936002)(36756003)(5660300002)(316002)(47076005)(70586007)(508600001)(4326008)(2616005)(15650500001)(426003)(54906003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3106 Return-Path: Christopher.Jones@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 3cc937bb-9dc1-480c-fff6-08d99ee0668e X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SbALrVd/1COxCO+DSABHHiPuovhH4i/oTz5m5OlvdtWrnK3hH9Xo+FK7nW8khjs+FbNbBNwDoNBQcECnDveo/rANLaGuK4L2jM4Gjhftp+gPmL81spJVpXq+eTrq82Af2jUR3GfUeNBav2Pa3FWa4j/vLxv6nhiCJHyL84e0Qdm5RbnBNSAOjtilVqT7h/uiqqWrnrinoDXxatICodEssRv98Otq5RfiTmJi4jutyVLCiHA4npkeRXKzcKkSKSXppUj8Et1t/0CAyiad6l26qqDmrQoWs7J39lNZhmfuNm0DspK6rGjG5+BKiqhbetsA15HvyosjAQSjB9s8j/s/XvYlC8CFd16gkbt06sNUU/aXo6jmmNEQi5KDqEHmO7yYn2t4UoAUq+rQeIeETaU8zuso6sUPOFJb3n1K4mwg4fDLD1Tv4tLY14ScFfoej0P/PR7Rso44ZQ1t9YL4k/m0gZsTpc+QXb9NlvkQS33HF1FNKelQVpTtznDeMSEtYaQAevM02vbQJA1Ehf5NSS5iAdvlH0K5JPaLACTEkRx4Thx3t1UmyW6KvjrQ2XsQQ/iSKS55Wg4pyqJX6R+aGc7A2hgDd8bV14AeJWfoEBX3asNxezziYTfQj48jUMdOsEixNUAYJOzsYazvImr3fMUQPC0fGy1HnB5nw6C9RpFNtJC0tKZlbMlHQjAQJr71wBSTlUKczhrum1yhRKzbsevk4fwuldM3laV+eNQpGU6pfwtPd1ia02QzwKskFsNQ1Kr0xjQiI/G9hxl7DAhbiZ4s1ZGd9pQEPVFKrl3B5eMPgqI= 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)(36840700001)(46966006)(1076003)(26005)(15650500001)(83380400001)(186003)(2616005)(2906002)(36756003)(81166007)(336012)(4326008)(426003)(508600001)(6916009)(47076005)(6666004)(70586007)(70206006)(7696005)(86362001)(36860700001)(8676002)(5660300002)(8936002)(82310400003)(54906003)(316002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 15:41:44.6101 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce7f9bf7-3818-4aaa-da1b-08d99ee07089 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: VE1EUR03FT031.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6491 Content-Type: text/plain Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3697) Update the Acpiview PPTT parser to use Acpi64.h. As part of the changes, remove support for parsing PPTT type 2 ID structure. Signed-off-by: Chris Jones --- Notes: v2: - Changed PPTT ID error message to say "removed" instead of "deprecated". ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c | 61 ++++---------------- ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c | 2 +- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c index acd2b81bb3258c7322aa10d2c0e0d842d89e358b..bb840a0dbab240d371aa58d323e61f47fa8d1587 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c @@ -1,11 +1,11 @@ /** @file PPTT table parser - Copyright (c) 2019 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2019 - 2021, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): - - ACPI 6.3 Specification - January 2019 + - ACPI 6.4 Specification - January 2021 - ARM Architecture Reference Manual ARMv8 (D.a) **/ @@ -157,8 +157,8 @@ ValidateCacheAttributes ( ) { // Reference: Advanced Configuration and Power Interface (ACPI) Specification - // Version 6.2 Errata A, September 2017 - // Table 5-153: Cache Type Structure + // Version 6.4, January 2021 + // Table 5-140: Cache Type Structure UINT8 Attributes; Attributes = *(UINT8*)Ptr; @@ -222,22 +222,6 @@ STATIC CONST ACPI_PARSER CacheTypeStructureParser[] = { {L"Line size", 2, 22, L"%d", NULL, NULL, ValidateCacheLineSize, NULL} }; -/** - An ACPI_PARSER array describing the ID Type Structure - Type 2. -**/ -STATIC CONST ACPI_PARSER IdStructureParser[] = { - {L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL}, - {L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL}, - {L"Reserved", 2, 2, L"0x%x", NULL, NULL, NULL, NULL}, - - {L"VENDOR_ID", 4, 4, NULL, Dump4Chars, NULL, NULL, NULL}, - {L"LEVEL_1_ID", 8, 8, L"0x%x", NULL, NULL, NULL, NULL}, - {L"LEVEL_2_ID", 8, 16, L"0x%x", NULL, NULL, NULL, NULL}, - {L"MAJOR_REV", 2, 24, L"0x%x", NULL, NULL, NULL, NULL}, - {L"MINOR_REV", 2, 26, L"0x%x", NULL, NULL, NULL, NULL}, - {L"SPIN_REV", 2, 28, L"0x%x", NULL, NULL, NULL, NULL}, -}; - /** This function parses the Processor Hierarchy Node Structure (Type 0). @@ -335,29 +319,6 @@ DumpCacheTypeStructure ( ); } -/** - This function parses the ID Structure (Type 2). - - @param [in] Ptr Pointer to the start of the ID Structure data. - @param [in] Length Length of the ID Structure. -**/ -STATIC -VOID -DumpIDStructure ( - IN UINT8* Ptr, - IN UINT8 Length - ) -{ - ParseAcpi ( - TRUE, - 2, - "ID Structure", - Ptr, - Length, - PARSER_PARAMS (IdStructureParser) - ); -} - /** This function parses the ACPI PPTT table. When trace is enabled this function parses the PPTT table and @@ -366,7 +327,6 @@ DumpIDStructure ( This function parses the following processor topology structures: - Processor hierarchy node structure (Type 0) - Cache Type Structure (Type 1) - - ID structure (Type 2) This function also performs validation of the ACPI table fields. @@ -444,22 +404,23 @@ ParseAcpiPptt ( Print (L"0x%x\n", Offset); switch (*ProcessorTopologyStructureType) { - case EFI_ACPI_6_2_PPTT_TYPE_PROCESSOR: + case EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR: DumpProcessorHierarchyNodeStructure ( ProcessorTopologyStructurePtr, *ProcessorTopologyStructureLength ); break; - case EFI_ACPI_6_2_PPTT_TYPE_CACHE: + case EFI_ACPI_6_4_PPTT_TYPE_CACHE: DumpCacheTypeStructure ( ProcessorTopologyStructurePtr, *ProcessorTopologyStructureLength ); break; - case EFI_ACPI_6_2_PPTT_TYPE_ID: - DumpIDStructure ( - ProcessorTopologyStructurePtr, - *ProcessorTopologyStructureLength + case EFI_ACPI_6_3_PPTT_TYPE_ID: + IncrementErrorCount (); + Print ( + L"ERROR: PPTT Type 2 - Processor ID has been removed and must not be" + L"used.\n" ); break; default: diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c index d725cad14c5d018e2004eb8e33c845aa9c719429..ab9e6c619d70df4f79d782416037d7bef62c92d5 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c @@ -62,7 +62,7 @@ ACPI_TABLE_PARSER ParserList[] = { ParseAcpiMcfg}, {EFI_ACPI_6_4_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE, ParseAcpiPcct}, - {EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, + {EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE, ParseAcpiPptt}, {RSDP_TABLE_INFO, ParseAcpiRsdp}, {EFI_ACPI_6_2_SYSTEM_LOCALITY_INFORMATION_TABLE_SIGNATURE, ParseAcpiSlit}, -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")