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.40]) by mx.groups.io with SMTP id smtpd.web10.288.1635961653105102107 for ; Wed, 03 Nov 2021 10:47:34 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Vyb9MF8S; spf=pass (domain: arm.com, ip: 40.107.7.40, 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=wR2/Qgu4/wsQQMKw9melXytpi3Y50CoEUs3On7GjUsM=; b=Vyb9MF8SnOkOlm/VgBt9BMh6BN0pLggYccJlg+sxOTiek2z6DcgTPyPO07PFFXmas/NWjYGRw9qDJMFGtWeZUNHkVmK7mlMs9N4nQM7NbneIMSHvA7r2iW9HOgfm7aNv+r0C6Bbu9/bmONIxvCM8nmAGEWvPUeDjffdfDwoAfIM= Received: from AS8P250CA0025.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:330::30) by VE1PR08MB5838.eurprd08.prod.outlook.com (2603:10a6:800:1a7::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.17; Wed, 3 Nov 2021 17:47:28 +0000 Received: from AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:330:cafe::71) by AS8P250CA0025.outlook.office365.com (2603:10a6:20b:330::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Wed, 3 Nov 2021 17:47:28 +0000 X-MS-Exchange-Authentication-Results: spf=temperror (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=temperror action=none header.from=arm.com; Received-SPF: TempError (protection.outlook.com: error in processing during lookup of arm.com: DNS Timeout) Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT035.mail.protection.outlook.com (10.152.16.119) 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 17:47:27 +0000 Received: ("Tessian outbound d49ee2bec50d:v108"); Wed, 03 Nov 2021 17:47:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e1b5ca01f344008d X-CR-MTA-TID: 64aa7808 Received: from 1e09d54def3e.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 24DCE5AC-115E-48DE-85FE-76330AD84CBB.1; Wed, 03 Nov 2021 17:47:20 +0000 Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1e09d54def3e.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 03 Nov 2021 17:47:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oSN6QOc2bKZo1Zcoo/nRF7/HDwT5G7oC+d9r7p9pJYaQqLlcqDDm6CmzKUrtJhUvOVKc4+IH/6makI5VtReoITRSXLxQTozPaHtpJZtA8Oc8rrawGnm+ROOFuD4fHb6kC1gvU9w0th2vksdBzd4nLbARJPiZGEGvalIlRcaQovxrwGbg8QXCK7mdZJaAWH5ovbVnl0MOi7OxKBd33m5NWoIYDd3KiQfSvhRs+lOVLr8CABcBqVgVqZLyf+pJ/aNvmwfjnZ8cLiV3GzI8/95zjRcrL6jJFfCuiOVOheElYlrCbjmPEmjS6Vv6WT0VAjMtYk/vns5ZCdNypaQmVB6Lag== 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=wR2/Qgu4/wsQQMKw9melXytpi3Y50CoEUs3On7GjUsM=; b=WZqMfcS9JUhXj1lVTl7mXokVcozWOXXsxX6eaSr85p6vPQh0WZkIoVnpbJYlA1uxbIyhhMXT+GGAuTQzo5nl9ypowzWh8JiEJCp2EHX6+twKCuLXYlvm371WbBbBFgo1BmpiuXrCpBpuevxT5ZZiDCHOX6IfRIbszHyg6fm1ggEMXzO8X/EzfJ30p532XOISAXsHIDJPjOMeVpfgXYlrsWPNx7e9GacjGkd8Gs5CMlYXMT5S0OUxuCPggOBbqpR8UdtSoKbENNFyiq5tjDD12rRaDCmWc3swT+ffY7IjgX83LlYI8NjyXCzOHVkM9eYZpx3VzMt+iI9A8gkbBpAS3g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; 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=wR2/Qgu4/wsQQMKw9melXytpi3Y50CoEUs3On7GjUsM=; b=Vyb9MF8SnOkOlm/VgBt9BMh6BN0pLggYccJlg+sxOTiek2z6DcgTPyPO07PFFXmas/NWjYGRw9qDJMFGtWeZUNHkVmK7mlMs9N4nQM7NbneIMSHvA7r2iW9HOgfm7aNv+r0C6Bbu9/bmONIxvCM8nmAGEWvPUeDjffdfDwoAfIM= Received: from VE1PR08MB5758.eurprd08.prod.outlook.com (2603:10a6:800:1a0::11) by VI1PR08MB3022.eurprd08.prod.outlook.com (2603:10a6:803:41::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Wed, 3 Nov 2021 17:47:18 +0000 Received: from VE1PR08MB5758.eurprd08.prod.outlook.com ([fe80::ecea:7a9e:5023:7f45]) by VE1PR08MB5758.eurprd08.prod.outlook.com ([fe80::ecea:7a9e:5023:7f45%9]) with mapi id 15.20.4669.011; Wed, 3 Nov 2021 17:47:18 +0000 From: "Chris Jones" To: Jeremy Linton , "devel@edk2.groups.io" CC: "michael.d.kinney@intel.com" , "gaoliming@byosoft.com.cn" , "zhiguang.liu@intel.com" , "ray.ni@intel.com" , "zhichao.gao@intel.com" , Alexei Fedorov , Sami Mujawar , nd Subject: Re: [edk2-devel] [PATCH v1 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Thread-Topic: [edk2-devel] [PATCH v1 3/7] ShellPkg: Update Acpiview PPTT parser to ACPI 6.4 Thread-Index: AQHXxD3Tu7sUrxZ840e5W9Y5Fqbho6vyLA/Z Date: Wed, 3 Nov 2021 17:47:18 +0000 Message-ID: References: <20211018151046.31232-1-christopher.jones@arm.com> <20211018151046.31232-4-christopher.jones@arm.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: 31a8524c-7109-25e6-a746-266a13188e94 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-publictraffictype: Email X-MS-Office365-Filtering-Correlation-Id: da07bf21-cb0f-4c09-9d1b-08d99ef2001d x-ms-traffictypediagnostic: VI1PR08MB3022:|VE1PR08MB5838: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true nodisclaimer: true x-ms-oob-tlc-oobclassifiers: OLM:10000;OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: NKgMR7U3Mkv3UAlOdzvYh5iqYj5WE9Q0Zz688IPyJ2OAXJSjiAsYrtJ8M/eyZx73+6dVWk8kgyd8l3Ct5WVEpZBkkPZ9DMfNfAYUL1esHEJIrwRVKAZcGCVEq6x3n+p2a7ry0XNHY7IxnvXNRHwPsDeVwJZHDFiyIJeaPwCBRRC4XQwIOKloxCbOPcEe2DaOWMAV3OaI0iEUd0ex+uuuEF9qzyxy1NSAIVi2zhJ7/RMWfYmsYx1752u2c+IJe0VdLum4D6O3brOy8gJXGcky4Ba2UrXQp0Ic6MyIuOwVYv9tOubBrHf+UQwqlyzFQcQu1DyYAZCDssMNGlhZR+McgGZwduP7EjD0/Uc2sfrchqRkKmsyu8zBQembnujsinsvvNOzfzTi7ey7zRRCIs74WpwTBqPy1LUNyagm2FcozGtDFtbYByb51N7GsrrIlinXWmB2wX+CrwLTa0chVhRojWAaMMH9SX3QnxTycwpGfITHc9vASTNOAoExE+Hn4pqfSCS72/M+tOSYgnJsJTAboTlpaA2RHeuGMbBIZ4eQQhzWmIxKb0WthRALzctkn/paB0Na/tae99QEAG66GTtDjx5NI/IJswFzBfH/L2G+tMTngjYYRciRyjlM9A5dhR9Krc7ee6myfVT1sdh6RbiA3RKHLZP3jRK2NSpqyKpsoRKdQBiSnOMkh8mZCCSunROd2nwKcC3zBMICLOxskOIjERAUHQ2PzjkOJ3kfUs/31GsMBZ2WWzh1soKOqLZPoBy5SmleGlfG7UNCdavFyqeMWjcR/yJVtGVcHrU5Pi0DK8rmCslVpZcDUTumFvKrHX4cfYdBBS4Ooip6AKndZTpD1A== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VE1PR08MB5758.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(66946007)(76116006)(19627405001)(38100700002)(122000001)(38070700005)(9686003)(55016002)(186003)(54906003)(53546011)(5660300002)(83380400001)(7696005)(66446008)(52536014)(110136005)(508600001)(26005)(66556008)(316002)(15650500001)(4326008)(2906002)(91956017)(64756008)(66476007)(6506007)(166002)(8936002)(71200400001)(8676002)(86362001)(33656002);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3022 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Christopher.Jones@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 9da2ed0d-0634-4910-912b-08d99ef1fb36 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: st67QEjyAkUM4werr+dJVNPjY7fmyaNGIGZ79YzN1W0zU6m0xlrz6w+myLuAX4he8oLm/86aeSSjxvUGsIpny9Pbcig9FuYqIVo8st3j9uT88XVJ+W3FMfoI2c/PswI6tk/uZ+r3bdetmfjK6w6b1RfcFCyeuG8lbmmbxV9QVEYngoJNFfTApWDn+5ALuZMuGdiHlKMZStpiU+305ji7XzYsogjqYBL0mBd9VFT1SkhPykKy/hL3W6vT9bcza2WnbLDYrhcfBMlQp7wL4cVmZbHW+LawcweuZadWQSfj29EFk60L7rH9vdOLpNwZIJ881hyCqpjjbmtWNdyBTr1SKyTBIntgkoZWCwWdLmJgAobaFr0ju1JnjQDUdrGiwFq6plHT/ZZWdAkasMe4poyAWShvm5d6rRisrn5YIT979crgQSxOZpecYDy1Ols8SSCJJuxSUeqDV5bxyPnmJz9eZACLdyzbqHJWl5iFBYijGbi7QHSEoyOyDlihlSqI/EhBkqzAhfCo1HPVZtPu6uKrZ5L+KYyf4A/RLUGFOHYMpWZLop4An/mQfBvBrh9jiVORyY2iM80WGHc8F7JhCdHIpskEL8oYDZCPVW4oy/qDjQ28pSQSneBp/5OrNG1+gX14aZXbjdEZuRnr7B9YfRTZ00ZpWGn2s1orSy9rRqrmQhkUWLhb8xQRtlEsiVIZqdfrxQZYIrqRHe6yVm4nT/ZxSWFaViWrBdcN969IneAU0S/uBCV0QsL6gp/w9Yozhm8j0+ncdiLj6x4YY9u5jgbLpKZOuSTPxy5c759/dpXS4daduH0qMUntXM0D2A4uz32NdeYdVGERWg5TzTzv533WMA== 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)(82310400003)(2906002)(36860700001)(8936002)(30864003)(508600001)(86362001)(55016002)(9686003)(186003)(5660300002)(26005)(166002)(83380400001)(53546011)(52536014)(4326008)(63350400001)(63370400001)(70206006)(70586007)(336012)(356005)(54906003)(110136005)(8676002)(19627405001)(47076005)(316002)(33656002)(15650500001)(7696005)(81166007)(6506007);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2021 17:47:27.0161 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: da07bf21-cb0f-4c09-9d1b-08d99ef2001d 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: AM5EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR08MB5838 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_VE1PR08MB5758F64C570808B4820DC972EF8C9VE1PR08MB5758eurp_" --_000_VE1PR08MB5758F64C570808B4820DC972EF8C9VE1PR08MB5758eurp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Jeremy, While we have had some discussions internally, I thought I would share thes= e with the rest of the list for those interested. No, this patch series does not break either build or runtime compatibility.= If anyone tries to build an old table with PPTT ID type (type 2) structure= s then Acpiview will flag an error and not parse the structure however this= only affects Acpiview and DynamicTablesPkg. Normally we would want a versi= on check to ensure that old systems using the feature can still run and pas= s Acpiview validations however in this case that is not what we want. The t= ype 2 structures were deprecated in an errata (ACPI 6.3A) and subsequently = removed in ACPI 6.4. The original bugzilla ticket for removing the structur= e (https://bugzilla.tianocore.org/show_bug.cgi?id=3D2492) shows that the st= ructure should not have been added in the first place hence it being remove= d before anyone had a chance to use it. If anyone is using PPTT type 2 structures then they are doing so mistakenly= and should replace those structures with the alternative SMCCC API archite= ctural call (SMCCC_ARCH_SOC_ID). Thanks, Chris ________________________________ From: Jeremy Linton Sent: Monday, October 18, 2021 5:33 PM To: devel@edk2.groups.io ; Christopher Jones Cc: michael.d.kinney@intel.com ; gaoliming@byos= oft.com.cn ; zhiguang.liu@intel.com ; ray.ni@intel.com ; zhichao.gao@intel.com ; Alexei Fedorov ; Sami Mujawar= ; nd Subject: Re: [edk2-devel] [PATCH v1 3/7] ShellPkg: Update Acpiview PPTT par= ser to ACPI 6.4 Hi, On 10/18/21 10:10 AM, Chris Jones via groups.io wrote: > Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3697) > > 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/UefiShellAcpiViewCommandLi= b.c | 2 +- > 2 files changed, 12 insertions(+), 51 deletions(-) > > diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/Pp= ttParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/Pptt= Parser.c > index acd2b81bb3258c7322aa10d2c0e0d842d89e358b..bce9edcedde50e53035059e6d= a57b9449209a674 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParse= r.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParse= r.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) Speci= fication > - // 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 =3D *(UINT8*)Ptr; > > @@ -222,22 +222,6 @@ STATIC CONST ACPI_PARSER CacheTypeStructureParser[] = =3D { > {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[] =3D { > - {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}, > -}; > - Don't people compile shellpkg for out of tree machines? Are we 100% sure that there aren't any machines in the wild with older PPTT's using this structure? Although, this is less of a problem than below.. > /** > 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: I suspect this breaks every single other edk2-platforms machine in this tree not using the dynamic table generator. AKA all the hardcoded PPTTs used on synquacer/rpi/etc. I suspect this code path should be able to deal with multiple versions of the spec. Thanks, > 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/UefiShellAcpiVi= ewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpi= ViewCommandLib.c > index d725cad14c5d018e2004eb8e33c845aa9c719429..ab9e6c619d70df4f79d782416= 037d7bef62c92d5 100644 > --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComma= ndLib.c > +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewComma= ndLib.c > @@ -62,7 +62,7 @@ ACPI_TABLE_PARSER ParserList[] =3D { > 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, ParseAcpiS= lit}, > --_000_VE1PR08MB5758F64C570808B4820DC972EF8C9VE1PR08MB5758eurp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
Hi Jeremy,
While we have had some discussions internally, I thought I would share= these with the rest of the list for those interested.

No, this patch series does not break either build or runtime compatibi= lity. If anyone tries to build an old table with PPTT ID type (type 2) stru= ctures then Acpiview will flag an error and not parse the structure however= this only affects Acpiview and DynamicTablesPkg. Normally we would want a version check to ensure that ol= d systems using the feature can still run and pass Acpiview validations how= ever in this case that is not what we want. The type 2 structures were depr= ecated in an errata (ACPI 6.3A) and subsequently removed in ACPI 6.4. The original bugzilla ticket for rem= oving the structure (https://bugzilla.tianocore.org/show_bug.cgi?id=3D2492)= shows that the structure should not have been added in the first place hen= ce it being removed before anyone had a chance to use it.

If anyone is using PPTT type 2 structures then they are doing so mista= kenly and should replace those structures with the alternative SMCCC API ar= chitectural call (SMCCC_ARCH_SOC_ID).


Thanks,
Chris

From: Jeremy Linton <jer= emy.linton@arm.com>
Sent: Monday, October 18, 2021 5:33 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>; Christopher J= ones <Christopher.Jones@arm.com>
Cc: michael.d.kinney@intel.com <michael.d.kinney@intel.com>; g= aoliming@byosoft.com.cn <gaoliming@byosoft.com.cn>; zhiguang.liu@inte= l.com <zhiguang.liu@intel.com>; ray.ni@intel.com <ray.ni@intel.com= >; zhichao.gao@intel.com <zhichao.gao@intel.com>; Alexei Fedorov <Alexei.Fedorov@arm.com>; Sami Mujawar <Sami.Mujawar@arm.= com>; nd <nd@arm.com>
Subject: Re: [edk2-devel] [PATCH v1 3/7] ShellPkg: Update Acpiview P= PTT parser to ACPI 6.4
 
Hi,

On 10/18/21 10:10 AM, Chris Jones via groups.io wrote:
> Bugzilla: 3697 (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3697)
>
> Update the Acpiview PPTT parser to use Acpi64.h. As part of the change= s,
> remove support for parsing PPTT type 2 ID structure.
>
> Signed-off-by: Chris Jones <christopher.jones@arm.com>
> ---
>   ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/= PpttParser.c     | 61 ++++----------------
>   ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpi= ViewCommandLib.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/P= pttParser.c
> index acd2b81bb3258c7322aa10d2c0e0d842d89e358b..bce9edcedde50e53035059= e6da57b9449209a674 100644
> --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttPa= rser.c
> +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttPa= rser.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 Manua= l 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 =3D *(UINT8*)Ptr;
>  
> @@ -222,22 +222,6 @@ STATIC CONST ACPI_PARSER CacheTypeStructureParser= [] =3D {
>     {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[] =3D {
> -  {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, N= ULL, NULL},
> -
> -  {L"VENDOR_ID", 4, 4, NULL, Dump4Chars, NULL, NULL, N= ULL},
> -  {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},
> -};
> -

Don't people compile shellpkg for out of tree machines? Are we 100% sure that there aren't any machines in the wild with older PPTT's using this structure?

Although, this is less of a problem than below..

>   /**
>     This function parses the Processor Hierarchy N= ode Structure (Type 0).
>  
> @@ -335,29 +319,6 @@ DumpCacheTypeStructure (
>       );
>   }
>  
> -/**
> -  This function parses the ID Structure (Type 2).
> -
> -  @param [in] Ptr     Pointer to the start o= f 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 t= opology structures:
>       - Processor hierarchy node structu= re (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 (*ProcessorTopologyStructur= eType) {
> -      case EFI_ACPI_6_2_PPTT_TYPE_PROCESSOR:=
> +      case EFI_ACPI_6_4_PPTT_TYPE_PROCESSOR:=

I suspect this breaks every single other edk2-platforms machine in this tree not using the dynamic table generator. AKA all the hardcoded PPTTs used on synquacer/rpi/etc. I suspect this code path should be able to
deal with multiple versions of the spec.


Thanks,

>           DumpProces= sorHierarchyNodeStructure (
>            = ; ProcessorTopologyStructurePtr,
>            = ; *ProcessorTopologyStructureLength
>            = ; );
>           break;
> -      case EFI_ACPI_6_2_PPTT_TYPE_CACHE:
> +      case EFI_ACPI_6_4_PPTT_TYPE_CACHE:
>           DumpCacheT= ypeStructure (
>            = ; ProcessorTopologyStructurePtr,
>            = ; *ProcessorTopologyStructureLength
>            = ; );
>           break;
> -      case EFI_ACPI_6_2_PPTT_TYPE_ID:
> -        DumpIDStructure (
> -          ProcessorTopol= ogyStructurePtr,
> -          *ProcessorTopo= logyStructureLength
> +      case EFI_ACPI_6_3_PPTT_TYPE_ID:
> +        IncrementErrorCount (); > +        Print (
> +          L"ERROR: = PPTT Type 2 - Processor ID is deprecated and must not be"
> +            L&= quot;used.\n"
>            = ; );
>           break;
>         default:
> diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcp= iViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellA= cpiViewCommandLib.c
> index d725cad14c5d018e2004eb8e33c845aa9c719429..ab9e6c619d70df4f79d782= 416037d7bef62c92d5 100644
> --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCo= mmandLib.c
> +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCo= mmandLib.c
> @@ -62,7 +62,7 @@ ACPI_TABLE_PARSER ParserList[] =3D {
>      ParseAcpiMcfg},
>     {EFI_ACPI_6_4_PLATFORM_COMMUNICATIONS_CHANNEL_= TABLE_SIGNATURE,
>      ParseAcpiPcct},
> -  {EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SI= GNATURE,
> +  {EFI_ACPI_6_4_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SI= GNATURE,
>      ParseAcpiPptt},
>     {RSDP_TABLE_INFO, ParseAcpiRsdp},
>     {EFI_ACPI_6_2_SYSTEM_LOCALITY_INFORMATION_TABL= E_SIGNATURE, ParseAcpiSlit},
>

--_000_VE1PR08MB5758F64C570808B4820DC972EF8C9VE1PR08MB5758eurp_--