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.51]) by mx.groups.io with SMTP id smtpd.web10.37666.1634569875648429399 for ; Mon, 18 Oct 2021 08:11:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=hlcIuU3W; spf=pass (domain: arm.com, ip: 40.107.7.51, 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=tL9IIW07lU1YrnaODhhwDmK2vGKD9I3BpcHZSoEUeCc=; b=hlcIuU3WpvsifYCIVXYGF/JfUJKOLDxoLrWJffJzQypmWEfvPFN3475yG6bNA2gkI/nxAiuV99a5eVpy1trILogH/0rCVsCLsKi9z7a9vfNmMmxMqqioe12eOnNPg8xEiQ8t/zJmzbKtO6oS/bBvzuB9LgSP8WOBEqKQgqOasoQ= Received: from AS9PR0301CA0019.eurprd03.prod.outlook.com (2603:10a6:20b:468::29) by AM4PR08MB2931.eurprd08.prod.outlook.com (2603:10a6:205:9::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.18; Mon, 18 Oct 2021 15:11:11 +0000 Received: from AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:468:cafe::87) by AS9PR0301CA0019.outlook.office365.com (2603:10a6:20b:468::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Mon, 18 Oct 2021 15:11:11 +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 AM5EUR03FT013.mail.protection.outlook.com (10.152.16.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.15 via Frontend Transport; Mon, 18 Oct 2021 15:11:10 +0000 Received: ("Tessian outbound 8e26f7114b75:v103"); Mon, 18 Oct 2021 15:11:10 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4711a7739e94f039 X-CR-MTA-TID: 64aa7808 Received: from dd6fc9c01b01.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E3D5F042-1973-45C2-96C4-6A362F30A054.1; Mon, 18 Oct 2021 15:11:04 +0000 Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id dd6fc9c01b01.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 18 Oct 2021 15:11:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGE71LaiEUN9ZSUKG8qt1JMaOtfMgeDkxxo8qT1jbi2RXHerxWrkVwsvdB8IfMtvyZGVhHE1f1n0AQZCv7yOJ/mI8iJEzUa7w5q3jcqNM/p5uaAs/jznM4COHmjt58Husr4+/Tk5z6mvMOxy1e/+9p7cex8iDxGmhi74pVIl7zrd+HXDbQlaF/rV5VNFV+OoQADDW6XeGej2ZM3EUG9rted/jhHuQnXwqY7cLoDsZgm+ntHG1XMWmkjInGgeOn043QZoY5JSrsKb6Z7lApB2jWHmsxi1qkt9RJS/liChHJf2SmaVkvAakNr2ph8o5qkIrIPZICEyQzUqBPOTZGs01A== 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=tL9IIW07lU1YrnaODhhwDmK2vGKD9I3BpcHZSoEUeCc=; b=Zf+E03Ip4H0qNDVMCrPfE7/wg0Ln7aNe3R9gdUOqiZdN2pj60HlosQTG2t1mlKpNozjhILvfbhJ1sEV5npBSzyY3kHMR42ddskDvEjL2tw3xscjbqgNACFQaq188+x9W+hkeE0zS7VGrwI9K+45HAIekTqZU8bk4l73H7t+qYgtOR3QMysSQ2HeYwwCIhnsLzKdQaqx78irVDEUDsabuyWPInCc8P3UmhfMDQFm2JvlWatbNudFLOt1sCTlcvc4qywD6PPoCu7QQwTZm0jGb6mFa6FXtEwlYkBN3+AUs+f4/CFrsTxtGKEDMsOtYH+sfpkI7Q34l5oN79PhxMHt5mQ== 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=tL9IIW07lU1YrnaODhhwDmK2vGKD9I3BpcHZSoEUeCc=; b=hlcIuU3WpvsifYCIVXYGF/JfUJKOLDxoLrWJffJzQypmWEfvPFN3475yG6bNA2gkI/nxAiuV99a5eVpy1trILogH/0rCVsCLsKi9z7a9vfNmMmxMqqioe12eOnNPg8xEiQ8t/zJmzbKtO6oS/bBvzuB9LgSP8WOBEqKQgqOasoQ= Received: from AS8P251CA0019.EURP251.PROD.OUTLOOK.COM (2603:10a6:20b:2f2::22) by AM0PR08MB3874.eurprd08.prod.outlook.com (2603:10a6:208:108::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16; Mon, 18 Oct 2021 15:11:00 +0000 Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2f2:cafe::48) by AS8P251CA0019.outlook.office365.com (2603:10a6:20b:2f2::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4608.16 via Frontend Transport; Mon, 18 Oct 2021 15:11:00 +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 AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4608.15 via Frontend Transport; Mon, 18 Oct 2021 15:11:00 +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; Mon, 18 Oct 2021 15:10:49 +0000 Received: from e125153.arm.com (10.57.27.61) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2308.14 via Frontend Transport; Mon, 18 Oct 2021 15:10:48 +0000 From: "Chris Jones" To: CC: , , , , , , , Subject: [PATCH v1 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Date: Mon, 18 Oct 2021 16:10:42 +0100 Message-ID: <20211018151046.31232-4-christopher.jones@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211018151046.31232-1-christopher.jones@arm.com> References: <20211018151046.31232-1-christopher.jones@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02125a1f-47fb-4650-4862-08d9924984e0 X-MS-TrafficTypeDiagnostic: AM0PR08MB3874:|AM4PR08MB2931: 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: AqusAAHUjCQHAt6rUnWZJFbvzSkETaemkarvPuQUlixCrnIJnefHbviEht0rZ6u12OmQASfrOHE9LLtIr5b7M9BwkILEallUgRKl+pT1wpTtAoqeYCV0yIiJoOLS7CPp6O1VhCi6dqI5T99rwhVZHHi8QIEJPH3i+mbkUwTcQB7NrEhQwiwLqBxF2h77Lzrn53aIFNY1pnbuzy9iCy3rj+janqE66oTP/u2gCphn4CvxOBmyPlpkwBx6r1DK4DYwCWAInpDG7PmXCuPt3oyc38BP2ATrsx0/MCMxy+K2tKDOpLeIxVStecSvKt3bb4yA8X846ZBCrvFm0VXPvlp7SGgJii9HT8sJTSeTzPspbOlE34Tkf1MHwgMthwe9X7uX+kzfrsv+4vjWsrfrUrT+TFp7EMiDwVd91mR7fSvVr/txUpXDF/0S+F/JhYUVSi7NVbdXHypVbEmZDrghWAeaKyfOHbV9KX5TxPg8aIkHyL+9Wh+HA29GQTz7d/Rlfilm96MzLTBlrOZXQ+VDzUj3dVUag3uBPDeu0qx195u6K4xTXgRT7CjHja1FxfmnKHyxkzdTpMAknU1Dul3YrNyg4m2IRc2EA7fTi7HY/FZ15AOFQef5Kcl0f9diy1wR6dIuKHEJ2v7Eq05vULpBNDStrr5Zc2YDkec1NJkc9VhDHrIHKwiuMHnTpB8v8irejOHWsZnzvfb2/BoMXlVw7SaIZFAIwyB4LEWWJdqgMhw3ydU35d/DMEbATANOhWBzyqZWhUonUSeootXX5HeHX0mmFsgl/5jJCJe64bvh0jeYfU10uCMaZCAX9Z2Z74jdLWUb 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)(46966006)(36840700001)(186003)(70206006)(36756003)(82310400003)(26005)(508600001)(6916009)(54906003)(356005)(2906002)(5660300002)(7696005)(8676002)(36860700001)(86362001)(8936002)(336012)(6666004)(1076003)(81166007)(47076005)(83380400001)(2616005)(426003)(316002)(70586007)(4326008)(15650500001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3874 Return-Path: Christopher.Jones@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: bac7660a-29c6-4bdd-188c-08d992497e90 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L28zcZ6iyIRQMRXjqSxmS3rYyei8HLYzg1XE4WuKMZkcJE2qndXLSx8wdeiKNYJ6gwpIsG2ADku0ZCFCnadI7Fv87WYmjbvgKPfyNelr4kVaKCoz2i+OWfCd1g0Wca8aZUG5N5URjSevAqDWYifBm8LOHPzLiDUV992AaK+vzVJtTkVh0963DDFAagSPGlpvrFw+ktRxWGWLuCYFt7mCBooSNyxcmjSfiq74RiU8OvhlkEnohiB2qWQ0eSEJ/505X2ZVsdTS4GLU/dgPqiyjusKcVLTg5xlB0l/LdmQIVHcQ1rWVc8RgAm3ws8jcpCee7tA5UdbfeLKZP83SDKGqOZRhSefiyp9+tA7CWM9kUnfuIoz2RKR2iaqriE9zmk5KKvkfRE1MqOSdqr/Jw8YaYnMG672pUS9TIPibrTpnIY+e4hx5GSpfebhF3Bx4K2Mm/kaiCnomSuejRJjZksX9HR7Uw3AVEYNlURQmbW4GbSWI2RZzDfx8BhbVXMJyDyrGoj7eNmCaBWkPYuFiCrtFhSePEh/TV4rm2qiH7pusWTwktiUwI8OqoRoEWty/ffWQModgo2EPWppqSs+wU2Bk4upC+sE2YAzWnY19njgFLjPMAsTHRpCLPd2R4D4xf8QLL7u2ZuhEozygtu4lqG4Yx85+FuXeYmy8p+X96b1rgYcA8qgNXC6UPXSnIEfjWmE5Ckxz5jOwgRQWg5k3kCZQlZREccTtAH5LevPtp2qBHNRXVh3+PNZi59Zukifs1a4ebqg0pkMhdsJkA5ptF2eEXT3dybnFG9Fu4qJDP4A4RX8= 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)(46966006)(36840700001)(8936002)(4326008)(26005)(508600001)(47076005)(86362001)(8676002)(82310400003)(81166007)(70586007)(6916009)(70206006)(186003)(426003)(54906003)(36756003)(336012)(83380400001)(15650500001)(2906002)(6666004)(316002)(36860700001)(1076003)(2616005)(7696005)(5660300002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2021 15:11:10.8635 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02125a1f-47fb-4650-4862-08d9924984e0 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: AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR08MB2931 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 --- 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..bce9edcedde50e53035059e6da57b9449209a674 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 is deprecated 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")