From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 93DA0D80122 for ; Sat, 23 Sep 2023 06:16:16 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=qs2L3za2HbqX58aKG31cQKZaJyRuEVejkNaXS7gCeAc=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Type; s=20140610; t=1695449775; v=1; b=nwrZmSCsUQ0Is7qZJw1QW0d4+v+WqF0azDySumkWGJjeZS5eHkMB4dfGs/o6nnlHxGQ/rtJs LYkJuoO0oXqOiiG6VXaXUOfK+GyMx0CO32VfR6srt4Ts8NyptX+adpocW0g/ANZu5cSEcgxsJAu 8YWZb02QQ5qBLSGKCp1SPbT8= X-Received: by 127.0.0.2 with SMTP id qw4PYY7687511xilgCijztJy; Fri, 22 Sep 2023 23:16:15 -0700 X-Received: from NAM11-BN8-obe.outbound.protection.outlook.com (NAM11-BN8-obe.outbound.protection.outlook.com [40.107.236.41]) by mx.groups.io with SMTP id smtpd.web10.9351.1695418858625277654 for ; Fri, 22 Sep 2023 14:40:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YfvLntSVxvREHJ6HkZuaNaMczPv6/Yp22g1BDjH8JQNe9nygwONW3cLQ+kIicPGgMhFQ7agS2O17QC4mCBwY8+jKjL2DtP6wX7DP4U6PC42brVIA+GiNCwbgnm/Jlyb+f19Sej4wUyQTGqnQNflVDCKetoYBdn8rTNV5CrdtbwIVGOiGVva/pOpV07G21xqDkomzVgRlRgEeKRGRFiQ38SGDNOmViE7tzXxI5dZ6lu3aXwpqhhrgWz5Opi9OGmleh5ZMwwjWDNYhGzkylHbpRH4MAjbyp1g4XNVqVToQ2up9hhF/kVH7hjZKFq3bxCTdoTRjGMFRvKuIrOCuXWw9Bw== 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=xSuDmjWOrMx0G6Z4XH38mGE+TBAM80ndnlp9IynZ6Ho=; b=FLR2MwDBj38k+3i2wd85iXmCDhNIhecBZn0RUI2plORSLXROv5C1VU2rreWiZoNZ7WdYQUkdP+ZP14x+ITGLdOCaQrOfzogKGvFrmTUfWm44D8g9RahZeCFwiWO3aDVE+9cDESPOLoUvb/nqwyYrUjZnk+uEcse4dx9QlaTxvxM3HtEU0XCt0InI9nGLjER16Ue56dTbOrNTXfzvJoqGjEYR+zMugEq2YD4y9WsOoDmcrCcp+gmD3bwj6mCQsJYwhLVbYzqFhG9hoebu4+fXVvEYGbVsoYfOxyktyZN0f416KFsL4Xg/DYTeX8XRsy2bZaK7Pn2wto3w/S8LXb+sXQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none X-Received: from MW4PR03CA0344.namprd03.prod.outlook.com (2603:10b6:303:dc::19) by SA3PR12MB7922.namprd12.prod.outlook.com (2603:10b6:806:314::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.20; Fri, 22 Sep 2023 21:40:56 +0000 X-Received: from CO1PEPF000044EF.namprd05.prod.outlook.com (2603:10b6:303:dc:cafe::fb) by MW4PR03CA0344.outlook.office365.com (2603:10b6:303:dc::19) 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 21:40:56 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.118.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C X-Received: from mail.nvidia.com (216.228.118.232) by CO1PEPF000044EF.mail.protection.outlook.com (10.167.241.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6838.14 via Frontend Transport; Fri, 22 Sep 2023 21:40:55 +0000 X-Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 22 Sep 2023 14:40:48 -0700 X-Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Fri, 22 Sep 2023 14:40:48 -0700 X-Received: from swatisrik-X299-A.nvidia.com (10.127.8.9) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.986.41 via Frontend Transport; Fri, 22 Sep 2023 14:40:48 -0700 From: "Swatisri Kantamsetti via groups.io" To: , , CC: Swatisri Kantamsetti Subject: [edk2-devel] [PATCH] DynamicTablesPkg: IORT generator updates for Rev E.e spec Date: Fri, 22 Sep 2023 15:40:38 -0600 Message-ID: <273efda2552363dd2ed5794b00b1b4e87b290909.1695418444.git.swatisrik@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000044EF:EE_|SA3PR12MB7922:EE_ X-MS-Office365-Filtering-Correlation-Id: 85e10c4a-05cf-497d-d001-08dbbbb49a51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Message-Info: 8vyAQB6mIDSZ+z67TjZ7CWgJKoHjx5F3FG/y0CKRDMGE3ejYe0mR5HmsRmCDg5SOrqSxzXqU6Gv7e+RGQgaP+n7/z+aYEFxXYNgLts5ocEILAaUdyDwKIJ1TURLo4ROg3kvqbbCGtGsGJvnZMnXx1oe5LqxNgykE8ntRx//K3dfxTiIECZWfOkDgQGe3dEnkqb/AMbPW8dZohstXuJPrR70/t/U1RdOCAwKrUZWKjTFfQeMVuF5rDWsp0b7BKyveIIup73d+Eqs19Eg9udSyCSK5MIhcyy08oiUMG9ziME1Pda19RT7N8t8Ar1JtNU4W6r+Cc4jLuwMCRgMVKsELoe+Q+QVyyQbd8tb4dZCq3m2WnNno9sw9Z8dVjN3oy0/swJN5GjZ3npm1a6iyRXrcUl0wU+GpgRmc2wRDDKn+0eB7R6fobrw+MQwJOLWceci9SJt5XFcN7DLNS85qeLacojW4Fhv3HZyF7Wpjrd39hvNGAz30Dy0xIqMsLoa4MOFJedEET86dI9C8qsNPzIG8k9qqKH/FKsJT3uudfxuYzsUImZxZlSzFZK4U9qAOaJXWG7idE574jIyq9sD1+8EinXwEZg+EXAIx5GT7uN5fPQ1fRw9Co7YCxhE3bdlyySuJKVjpgEEOqPWD3v3kGAg00p6Jo8RKhsk8boRowFCatHmk4R+019NBxVl0BCh1WgEFEd4wP4d9a1Rhe7jDeqY2KqGzX/QAGQ11CTwOvg7fVBXXndMT11pOis82wqCzXEx6ZI7UGIKDpQGFDkZ+Z/5ObkOXLfUn67BZzej63J6F10AztAwmLddznf/SDuZ7KrYE X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Sep 2023 21:40:55.9836 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 85e10c4a-05cf-497d-d001-08dbbbb49a51 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a;Ip=[216.228.118.232];Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000044EF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA3PR12MB7922 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,swatisrik@nvidia.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: 6m5NHxIzARzaV9FXkZpFlfyYx7686176AA= Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=nwrZmSCs; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=none; arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") The IO Remapping Table, Platform Design Document, Revision E.e, Sept 2022 (https://developer.arm.com/documentation/den0049/ee) added flags in SMMUv3 node for validity of ID mappings for MSIs related to control interrupts. It makes one small addition to SMMUv3 nodes to describe MSI support independently of wired GSIV support Therefore, update the IORT generator to: - increment IORT table revision to 6 - increment SMMUV3 node revision to 5 - for SMMUV3 node revision >=5 check the DeviceID mapping index valid flag to populate DeviceIdMappingIndex field Signed-off-by: Swatisri Kantamsetti --- .../Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index f28973c1a8..a6e4b49cb1 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -5,7 +5,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): - - IO Remapping Table, Platform Design Document, Revision E.d, Feb 2022 + - IO Remapping Table, Platform Design Document, Revision E.e, Sept 2022 (https://developer.arm.com/documentation/den0049/) **/ @@ -1554,9 +1554,14 @@ AddSmmuV3Nodes ( { SmmuV3Node->Node.Revision = 2; SmmuV3Node->Node.Identifier = EFI_ACPI_RESERVED_DWORD; - } else { + } else if (AcpiTableInfo->AcpiTableRevision < + EFI_ACPI_IO_REMAPPING_TABLE_REVISION_06) + { SmmuV3Node->Node.Revision = 4; SmmuV3Node->Node.Identifier = NodeList->Identifier; + } else { + SmmuV3Node->Node.Revision = 5; + SmmuV3Node->Node.Identifier = NodeList->Identifier; } // SMMUv3 specific data @@ -1577,11 +1582,27 @@ AddSmmuV3Nodes ( SmmuV3Node->ProximityDomain = 0; } - if ((SmmuV3Node->Event != 0) && (SmmuV3Node->Pri != 0) && - (SmmuV3Node->Gerr != 0) && (SmmuV3Node->Sync != 0)) + /* For older SMMUV3 nodes rev. < 5. + If all the SMMU control interrupts are GSIV based, + the DeviceID mapping index field is ignored. + DeviceID mapping valid flag was introduced in IORT rev E.e + for SMMUV3 nodes rev. > 5. + If the DeviceID mapping index valid flag is set to 0, + DeviceID mapping index field must be ignored. + Where the SMMU uses message signaled interrupts for + its control interrupts, DeviceId Mapping Index contains an + index into the array of ID mapping. + */ + if (((SmmuV3Node->Node.Revision < 5) && + (SmmuV3Node->Event != 0) && + (SmmuV3Node->Pri != 0) && + (SmmuV3Node->Gerr != 0) && + (SmmuV3Node->Sync != 0) + ) || + ((SmmuV3Node->Node.Revision >= 5) && + ((SmmuV3Node->Flags & EFI_ACPI_IORT_SMMUv3_FLAG_DEVICEID_VALID) == 0)) + ) { - // If all the SMMU control interrupts are GSIV based, - // the DeviceID mapping index field is ignored. SmmuV3Node->DeviceIdMappingIndex = 0; } else { SmmuV3Node->DeviceIdMappingIndex = NodeList->DeviceIdMappingIndex; @@ -2819,7 +2840,7 @@ ACPI_IORT_GENERATOR IortGenerator = { // ACPI Table Signature EFI_ACPI_6_4_IO_REMAPPING_TABLE_SIGNATURE, // ACPI Table Revision supported by this Generator - EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05, + EFI_ACPI_IO_REMAPPING_TABLE_REVISION_06, // Minimum supported ACPI Table Revision EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00, // Creator ID -- 2.17.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#109023): https://edk2.groups.io/g/devel/message/109023 Mute This Topic: https://groups.io/mt/101535844/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-