From nobody Fri Oct 18 08:32:34 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+108590+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1694609406242648.0434845699881; Wed, 13 Sep 2023 05:50:06 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=utlVF1fNz8V/U+uuATSAQGGVt+O6gJuASq2LXMD7eu4=; c=relaxed/simple; d=groups.io; h=Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1694609405; v=1; b=b+GKYUUlKTaI1jCdo8WKPrBId2i3OWBaiEbGraWO76pUtMhFItJDYtFh4aVyf0sEo+mKSz18 Jy6B8xV1WBsUFyChkDLreaZ9aWlG2bfvqGPXoBBFs+wZz9ivxwaxpWxXcjUGWsN3kpF7uZCqZz6 C4Am1jCjGzpyDTw6tNk3hLik= X-Received: by 127.0.0.2 with SMTP id SgnpYY1788612xEcna0EmUmU; Wed, 13 Sep 2023 05:50:05 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.50]) by mx.groups.io with SMTP id smtpd.web10.10971.1694609405024968615 for ; Wed, 13 Sep 2023 05:50:05 -0700 X-Received: from AS4P192CA0015.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:5da::10) by DU0PR08MB7690.eurprd08.prod.outlook.com (2603:10a6:10:3a6::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.30; Wed, 13 Sep 2023 12:49:57 +0000 X-Received: from AM7EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:5da:cafe::8f) by AS4P192CA0015.outlook.office365.com (2603:10a6:20b:5da::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.37 via Frontend Transport; Wed, 13 Sep 2023 12:49:57 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+108590+1787277+3901457@groups.io; helo=mail02.groups.io; 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; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM7EUR03FT055.mail.protection.outlook.com (100.127.141.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:49:57 +0000 X-Received: ("Tessian outbound d084e965c4eb:v175"); Wed, 13 Sep 2023 12:49:57 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0f0641ff7f569d4c X-CR-MTA-TID: 64aa7808 X-Received: from f5111b510c6b.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id C68B7F32-A546-487E-92CC-650A82BD2E6A.1; Wed, 13 Sep 2023 12:49:49 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id f5111b510c6b.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 13 Sep 2023 12:49:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fUmwJMWZ2HCfO2qclY4I+06k0QAAsBTX4gs1f08S1j87YMJMo6OznDsxxR5Huue7FvBSgMaJe8BDjy76G19zc9kF9demWXjmM56g/W7tZ/MGJuJXDTjEfslw9B1MYx1MdIqFvPajpOa54hJBfTeB7EYif0zoDGPzF/q/v19WnkLOB06NesyRtJeklAzhHOwnTKHrkcmkylN32Z5SXIwJepVutJmQifK2+X6yTPU0/BzmrUdZEjpcQgLV7JMDejFmHdOeHLtttqTLGFLnx6AZ0PeQ+8bPiEV25yQScvuoumijVkrZdx2XNxINVDWimPqR1zyLQXgZUye9gNQPmLwEVw== 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=zJ9OTT0c9GA7ClPKynnzNP/msFNzJCwroR49asyQ1ko=; b=fpsvV5RhtMMGDcmPfJODbxxFnb1X9i/qDPjHZdENCtGUjFlolDq+PCATbCbO0KGu+4whAeCfNOqechI6nHOiw0s3i+Ps67G9kLMmVwN9gEOx1JKRZZUNndmCqOeDgyHgRZuzVhXdj//c12dAOp7FU9usplrQXQxNvYknla20FdLkKj4qwgdS5EMVlNvOj9uj7zsDItF4DTffCnpq8DG1U6kPVSjjNXrMLjdqTnkk3Vnvm/1cYrdVgA/ye3CpN63BcfmOoAsnzUUGkbQfZshFnbobwLZ+M0kb6b7pkKOnCdKGkxJu4QAR8EdqZQL0dm0+Fhscgmduixfpgdvqt7gliQ== 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 X-Received: from DUZPR01CA0085.eurprd01.prod.exchangelabs.com (2603:10a6:10:46a::17) by DU0PR08MB8836.eurprd08.prod.outlook.com (2603:10a6:10:47d::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6768.35; Wed, 13 Sep 2023 12:49:43 +0000 X-Received: from DBAEUR03FT016.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:46a:cafe::f5) by DUZPR01CA0085.outlook.office365.com (2603:10a6:10:46a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.19 via Frontend Transport; Wed, 13 Sep 2023 12:49:43 +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; pr=C X-Received: from nebula.arm.com (40.67.248.234) by DBAEUR03FT016.mail.protection.outlook.com (100.127.142.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6792.20 via Frontend Transport; Wed, 13 Sep 2023 12:49:43 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2507.27; Wed, 13 Sep 2023 12:49:39 +0000 X-Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Wed, 13 Sep 2023 12:49:39 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v2 07/11] ShellPkg: Acpiview: Update MADT parser for TRBE interrupt Date: Wed, 13 Sep 2023 13:49:31 +0100 Message-ID: <20230913124935.38768-8-sami.mujawar@arm.com> In-Reply-To: <20230913124935.38768-1-sami.mujawar@arm.com> References: <20230913124935.38768-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT016:EE_|DU0PR08MB8836:EE_|AM7EUR03FT055:EE_|DU0PR08MB7690:EE_ X-MS-Office365-Filtering-Correlation-Id: fec635c3-ba89-4bc2-8a5b-08dbb457ef6e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: XvtbpKjqyeKcYHUkF22lSVGF5dyuw4Yb8UT0YI4tTmTmY2GJ0NdWEaizO7DKZnaBoKAxVEEZL+i72M6ufqVb449PXEPBnlGR5mKufuUHy7AADAV3mbsAVq38odcqW1JvXxwa01OUlWkDW9EFh7za5sZdWZCDOkXH8bdKPx6Mvu5Ym0YZQl0mDb3jKU9jboZimAQOCgWCgqLqTWQwH7tAy2itwpInWVYLsbASzYU4BtNePFiIEm/b6r8Xy5Zw/8jA97I2UGVsl0/DAF2xNFJjEQzbGP3sgyovWlJvYMCYzGHeTVtN8vFpoSqass8ZkNAcfbsqd0XotpWG54oQFzH/iJV6yhBzwPkzpRXcN7vefGT6raiW34dR0Vy4Qj5o96IIChZ/jtho1KDt5dJC7rtwOuDGAQeAM1E0ef1VNKog8JnZcP521/1SLrwloH7pOIurDqlTuiy7X+n46wE2K8wFblBSrT96/cZrWMRHuHgnvdV1Wqa2wXux8HUk0y3Tx8Lj7zdnudLiYaBcE4UJdmZXm5jdsCMTyc62bHROem5DUI1ELhA7Sf8TQlNAmzPA4OwX+5T+gC+HumWuvxVIjmlcf3HgLfZp9PZVvBJMxxZsRy6J0FbKluPwUxxdAGkNsUWwXd6kJFMB3ep8z3ahf8C81xxaIB3DN1Ls5WhwWKc2rlzOc7PRercG4IVqICBNDfPqQCAXzUg39OPAJZD8xMVvL4Zs2gEQjI82tt55epsbaABbkBia2DIgLJnSL9DWNmfxiGiHhORpyQshIqLcAkF3yg== 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:(13230031)(4636009)(39860400002)(396003)(346002)(136003)(376002)(82310400011)(451199024)(186009)(1800799009)(36840700001)(46966006)(40470700004)(44832011)(40480700001)(26005)(70206006)(336012)(1076003)(41300700001)(15650500001)(70586007)(6916009)(2906002)(316002)(54906003)(478600001)(8936002)(426003)(4326008)(8676002)(5660300002)(6666004)(7696005)(40460700003)(47076005)(36756003)(36860700001)(2616005)(83380400001)(86362001)(81166007)(82740400003)(356005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8836 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 0c93c0f5-384c-44bc-c072-08dbb457e6f5 X-Microsoft-Antispam-Message-Info: z/SBLmuCNoRY4PBsYiW0tG4NHqsxM4jA1ZsH/MCV7FEv3nz+ytNGFAHxUlTc027MeWrrMRXzF4AGq+WIO6sE+oyo94jAoAD6M/ETwlOQmHpLJaGvOBVyHYw4GGu4GYPIe8qCaGI1wvIfoYJ1ZeSmNyGRrxWc2DtQB720F9cbLocNz6E2AzTN5a2GjWgPm8G1W86U3UmyMi+9vQq7HD4eUF0gl+yrScEBj2ajnJet0wQZVagU80bXUETwgZjoX6BWO1zfwfqO3w96g4iGSztXQHBy1XJZ5LaXXuUr1T8FUBRWkUczU2kYLeW8wDfetNJQ6+TW4Gy/tT9YbrG2MTTRRS7rbWwsnXIoUPwmoCsCrgar79kGviFBtnmcBznVKuPXR/ND3YmjqsyOdxXBg71BWhf7gToJxgvJxiDQI3fIP+4OReIHYyxDQbS1x9Rd5LfzHTEgxLf3IxeMWi1FwHyPwcuiG23pYcx4eRfGf/o5LWZs1DQh/1tBVkhAlQ+n4p5mDeARuiR0rHt1rk4kqlp4kVK4CblTmDgs7ub3K9qL7Pku38Nr6WdvP7haCgeToIJhF9gYZYxchncHDGYXFv37uipBHj/nNqbW05E/2Tcz2CbunuO4yixOf3GibG6LjLKnB8cZteuPDrCWESXUtQOd2wmcsgLxM9nEawBAqxWDgT0/NssXrtyWtdUYTW/qfY+Qbk9MoZviqfHZSJ8CCF9Pq1SGItwKZCzB02inSWuOv/Ip6yWCBiG5Ks5ldg1t8QKM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2023 12:49:57.4585 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fec635c3-ba89-4bc2-8a5b-08dbb457ef6e 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: AM7EUR03FT055.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB7690 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: npwpa772amSdyaGowvrgQLGox1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1694609407271100003 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" ACPI 6.5 introduces a new filed to the MADT GICC structure to specify the TRBE interrupt. The TRBE interrupt is a Processor Private interrupt (PPI) and is used to specify a platform-specific interrupt to signal TRBE events. Therefore, update the MADT GICC structure parser to parse the new TRBE interrupt field. Also, add validations to check that the TRBE interrupt is within the PPI interrupt range. Signed-off-by: Sami Mujawar Reviewed-by: Zhichao Gao --- Notes: v2: - No code change from v1 patch series. [SAMI] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c | 4= 8 +++++++++++++++++++- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/Madt= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtPa= rser.c index 41edcb9ffd1da90893c04e8284ea3317a9e3b45a..3a4f246347f8ad3489fda083e32= 68e73baa9bc92 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c @@ -1,7 +1,7 @@ /** @file MADT table parser =20 - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -97,6 +97,48 @@ ValidateSpeOverflowInterrupt ( } } =20 +/** + This function validates the TRBE Interrupt in the GICC. + + @param [in] Ptr Pointer to the start of the field data. + @param [in] Context Pointer to context specific information e.g. this + could be a pointer to the ACPI table header. +**/ +STATIC +VOID +EFIAPI +ValidateTrbeInterrupt ( + IN UINT8 *Ptr, + IN VOID *Context + ) +{ + UINT16 TrbeInterrupt; + + TrbeInterrupt =3D *(UINT16 *)Ptr; + + // SPE not supported by this processor + if (TrbeInterrupt =3D=3D 0) { + return; + } + + if ((TrbeInterrupt < ARM_PPI_ID_MIN) || + ((TrbeInterrupt > ARM_PPI_ID_MAX) && + (TrbeInterrupt < ARM_PPI_ID_EXTENDED_MIN)) || + (TrbeInterrupt > ARM_PPI_ID_EXTENDED_MAX)) + { + IncrementErrorCount (); + Print ( + L"\nERROR: TRBE Interrupt ID of %d is not in the allowed PPI ID " + L"ranges of %d-%d or %d-%d (for GICv3.1 or later).", + TrbeInterrupt, + ARM_PPI_ID_MIN, + ARM_PPI_ID_MAX, + ARM_PPI_ID_EXTENDED_MIN, + ARM_PPI_ID_EXTENDED_MAX + ); + } +} + /** An ACPI_PARSER array describing the GICC Interrupt Controller Structure. **/ @@ -122,7 +164,9 @@ STATIC CONST ACPI_PARSER GicCParser[] =3D { NULL }, { L"Reserved", 1, 77, L"0x%x", NULL, NULL, NULL= , NULL }, { L"SPE overflow Interrupt", 2, 78, L"0x%x", NULL, NULL, - ValidateSpeOverflowInterrupt, NULL } + ValidateSpeOverflowInterrupt, NULL }, + { L"TRBE Interrupt", 2, 80, L"0x%x", NULL, NULL, + ValidateTrbeInterrupt, NULL } }; =20 /** --=20 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108590): https://edk2.groups.io/g/devel/message/108590 Mute This Topic: https://groups.io/mt/101335842/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-