From nobody Fri Oct 18 05:21:55 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+109000+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 1695393342832594.6172582475895; Fri, 22 Sep 2023 07:35:42 -0700 (PDT) Return-Path: DKIM-Signature: a=rsa-sha256; bh=Lv3tAgnO8119XDSRlu6znnLdMgYxko9aO7ON3jy9vlc=; 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=1695393342; v=1; b=rlxeuMazRdDwM1Azq5jq/ANWelxaCDIIYzBghhJo1v3iLaCnGsEIE1CwQzyh5TR4wdnFb4po Jb6nZmoJ8j6fiCdm0uY5ULwyzoK1SQDkOAW/+M/U+8oSDnstTqbtR3Hxrf2Mc6tnv8MXzgq4YKH 2f7POmDmeQGhmnM5Vqb6pYKE= X-Received: by 127.0.0.2 with SMTP id LmjEYY1788612xGKvBAKi0aJ; Fri, 22 Sep 2023 07:35:42 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.44]) by mx.groups.io with SMTP id smtpd.web11.23367.1695393340392795438 for ; Fri, 22 Sep 2023 07:35:40 -0700 X-Received: from AM7PR04CA0019.eurprd04.prod.outlook.com (2603:10a6:20b:110::29) by DB9PR08MB6537.eurprd08.prod.outlook.com (2603:10a6:10:250::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.23; Fri, 22 Sep 2023 14:35:33 +0000 X-Received: from AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::11) by AM7PR04CA0019.outlook.office365.com (2603:10a6:20b:110::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.32 via Frontend Transport; Fri, 22 Sep 2023 14:35:33 +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+109000+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 AM7EUR03FT037.mail.protection.outlook.com (100.127.140.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20 via Frontend Transport; Fri, 22 Sep 2023 14:35:33 +0000 X-Received: ("Tessian outbound d084e965c4eb:v175"); Fri, 22 Sep 2023 14:35:33 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 4236b8e3ff82862d X-CR-MTA-TID: 64aa7808 X-Received: from e9c324b20885.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8C2CEF81-F773-4BC6-BE75-F800CED43C98.1; Fri, 22 Sep 2023 14:35:26 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e9c324b20885.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 22 Sep 2023 14:35:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IlAp4USG4WdAWgxZszxseHZRF4SoCH2Oe8BEXep7W5JlRUvCTmNlCFC3X4ffIZZvHbRBmU7qb5282eCJODvmzDaRZMC13yBdhDrM6KHpRb3ktR4R9KExEN6jUoul5VfuVIP9ZRo4mZ8p0oLqIagMpwGECTW0Omr23/wndIJtWkW0GYrHzIpSdHtTkUKwFM00rBEnsRmtS8SfpBP0hXXd0nrieMsNSk7FpPNcg2KGqIFEpjDm6jp4ef1BLPMQuSprPW9TQhxp5CilMnm2D//AuFOnorUHEDu4JczhfCOtPfe+SyiC7Ghw+m/wslBuv7QEzObfKv0S4og8MdN3+VNajw== 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=w/UNYaDlrcKMalsTMzg8LYa9eFNG4xZclqr0IhD1s5M=; b=D7an6lya8SHJ7KsfYLd7z4lWFYx25bhmLXZQM6RlHb/e/aOifhvxJCSN0pYzrX6zIBqG1+RYZvnlwxc8/Jda7WuqbiMSw6cT+h4Yr7FXxoQOxKqAqYl26AqvxJgn0ZyFakry8ADVAuPMMH8lD5XfTqIk3J2rdL9g7Lk4T61Gs4LAr5ex5NYezRha0DTsXSla7kktIzLJqa/8CJgW3L+cPIfsN2usOGvRehVTt+hDxntkcegoERUeycjNwNe40xrpug32jXvneaU0Wy5w3z42THf1h6TynT36AAJgrHGXQh8iQ2qD4x9R/LKHN4LpyAYOzq5binzPbZmvKD3y5yOq9w== 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 DUZPR01CA0305.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b7::26) by DU0PR08MB8139.eurprd08.prod.outlook.com (2603:10a6:10:3ee::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.23; Fri, 22 Sep 2023 14:35:23 +0000 X-Received: from DBAEUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:4b7:cafe::2f) by DUZPR01CA0305.outlook.office365.com (2603:10a6:10:4b7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.32 via Frontend Transport; Fri, 22 Sep 2023 14:35:23 +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 DBAEUR03FT043.mail.protection.outlook.com (100.127.143.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.14 via Frontend Transport; Fri, 22 Sep 2023 14:35:23 +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; Fri, 22 Sep 2023 14:35:21 +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; Fri, 22 Sep 2023 14:35:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v3 07/13] ShellPkg: Acpiview: Update MADT parser for TRBE interrupt Date: Fri, 22 Sep 2023 15:35:10 +0100 Message-ID: <20230922143516.4764-8-sami.mujawar@arm.com> In-Reply-To: <20230922143516.4764-1-sami.mujawar@arm.com> References: <20230922143516.4764-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DBAEUR03FT043:EE_|DU0PR08MB8139:EE_|AM7EUR03FT037:EE_|DB9PR08MB6537:EE_ X-MS-Office365-Filtering-Correlation-Id: 9fdfc1e1-b794-4e7c-da71-08dbbb792d93 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: y9/I5/D/DDza0IAXuVqR28zc5grkzEEUoWqYQ6roeMkmm61ySAXdx7fijQ9jEq2GFzmuqcfG1I7PkrOwJpi7HsBmE5uU3GolFBbe1FqetkfJqdy9iIYGfzo3b8973MDFO7Hqxyh4mp0kujjZVn0fYXGYVePIMxC5F2R5WXcnNmOA3G8CR72CedctyWM4sAnRbNZTJ73IfqlsI+TUiEh1c2dOvocWeojmOKT4KFjxZjvtWhQDlqiLsA+FCNJhU8YYN+Ap06FO2i8Sy1fvsToVftNXUrljfLpIcaWBQ81m3e0FJ6tM7SFBBu1zz1WHsc5orv0tRvoe4kRHnkeP2ellOaJI1airsvNAwIrt+LNujrE54mUmqBsbQNil8lq+t3nbI7LppsZ96WL0yTvwUa1zCQtvh0+VEevmUtqBA8Bgpp+/IuP/JKX23LFR/9yYjbnh/2QaBgqi20uQMQR2xIaC5mVBzSS3en2vRZ6g/YnzYi17J5nrBTJyI7+h1XALlrrImqRToc1NRmc32Qy+KAX0fwrfJGnSeB00KFhWyUZIMbpxSnIcshuNWBa/MLeSBI524nGEuCT9KGVZYkIWkGx5gFMTLCRE3wwzAPxyoZ7Jqpi5gMbRdYAS6EPjwBBMQoYoKtqSu2diiSxtAvNhMiGwUH71mO4UYgQ/qfkcfVaSwOtTYyD4bNJqCSU4xnNnjuq0whY3vW+TcYe6TJQsAI0hFkml93UtRcGCBNs04FmkDZJx/+F9kziNjNxMJ1tdLfIcARafe1QCA9vU5udZWOWPUY2RZGiUXHR2OxqJqi+T4d6pY8Qgo7L3mrqDj2ARA9Ff 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)(136003)(376002)(346002)(396003)(451199024)(230921699003)(1800799009)(186009)(82310400011)(36840700001)(46966006)(40470700004)(36860700001)(478600001)(356005)(81166007)(40460700003)(40480700001)(15650500001)(36756003)(82740400003)(47076005)(70206006)(54906003)(41300700001)(6916009)(316002)(7696005)(6666004)(70586007)(2616005)(1076003)(26005)(336012)(426003)(4326008)(83380400001)(2906002)(86362001)(8676002)(44832011)(5660300002)(8936002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8139 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 88ca4fce-90e8-47af-71b7-08dbbb7927eb X-Microsoft-Antispam-Message-Info: E3VKuGyowfp/PwXnqnTv4vWZJm68yVZS7zQ2nk7oeBSAGJP7K8TJHLfdJxVVTzugLRPWjG8AUhtMyWAcxp3HTuDCoVYb2t+MHE2xOhn74qQzTCM5+YUVXQI4HJ3sXEB7No4DHMQinHdyBnWE+f22HmLee35o4jS/z1Iv2PeZPrpBn3YtW3xDPfo2CAJxSG9awd3ycGKoptphbyIKWAUYZbv8hFJoMwJYi+pgk/C3tUuix2V7aYQ/ms1EYitMb8hyEWioSZP64ymZ6mg5JEVhyUnwUnhU+as97JcjtHgTc8b9LGHF5LKZ4UCruTHRADTuMUxVCwQgm8sJp/4btP/pHZaWoIdEW151cjPAZZ65jL3QpMaBDbIiLC13b3d2hzSOZuJKYUepl3gwaAEOBTmwlPYrKS6dcupZFD/ep8RSPOYN6XQmcG6qhM+Y/VbVai1TlfKVHSuRCj0Yhl+3Pzvta6bQ1K6YwJt48cCZHZCssI5uKNwQiiTRsttCJM/eJzyX3pf7ULkbI96vnfSiJxwKtVWMLuxKh1sAUgdjyehBNdYwjH4IatmW7VM+UJbM9U5GYGe81W27HDKnrvtPOnjDnCr86Av/FPDZSqJ4dfywdLC8bAIrfoeYEFc30QlWPnRk0R1Fbd/aydu+gUN/f37A+dK9+20JAYjBz64MyfgQK+xn9+WvP72uiG3F7/NQ8n0El8GMLM3zMDuPG6dYUOLzHgriwft3DNcUlgH3WdXhQFde8FllL/iCkWeElxS1Q7NQXcd90TPQLFPXuL8cat3moA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2023 14:35:33.2533 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9fdfc1e1-b794-4e7c-da71-08dbbb792d93 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: AM7EUR03FT037.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB6537 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: XuFVF7o7suZ19svnrLzzXubBx1787277AA= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1695393343643100030 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 Reviewed-by: Pierre Gondois --- Notes: v3: - No code change from v2 patch series. [SAMI] - Added rb tag from Zhichao [SAMI] =20 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 (#109000): https://edk2.groups.io/g/devel/message/109000 Mute This Topic: https://groups.io/mt/101522266/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-