From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.85]) by mx.groups.io with SMTP id smtpd.web10.50311.1675679920075925337 for ; Mon, 06 Feb 2023 02:38:40 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=Zcq/wq62; spf=pass (domain: arm.com, ip: 40.107.22.85, mailfrom: sami.mujawar@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=tatDIpcf4FZ7KvEtgrQWPdO9+hEmIqRdOekyuuJUhVw=; b=Zcq/wq62/d/vRFSLVyRQIc0I6RIiCcHXlp8ZrBHzckLdTOPGs9dBQxNq4hKHNR6SCdlxf1tbD09yJitnlk6J9rIAq+400PyC3juCSajtt71OVz3m27xQasZE7aBmNLI9c4+Aa5GgSmyYiU5Xtvgc5JRm/Z657nc3S4ezU0ssz5c= Received: from DB9PR01CA0007.eurprd01.prod.exchangelabs.com (2603:10a6:10:1d8::12) by AM8PR08MB5586.eurprd08.prod.outlook.com (2603:10a6:20b:1d6::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.32; Mon, 6 Feb 2023 10:38:30 +0000 Received: from DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:1d8:cafe::7c) by DB9PR01CA0007.outlook.office365.com (2603:10a6:10:1d8::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.34 via Frontend Transport; Mon, 6 Feb 2023 10:38:30 +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 (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 Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DBAEUR03FT064.mail.protection.outlook.com (100.127.143.3) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.31 via Frontend Transport; Mon, 6 Feb 2023 10:38:30 +0000 Received: ("Tessian outbound 6e565e48ed4a:v132"); Mon, 06 Feb 2023 10:38:30 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 229b332d852f410f X-CR-MTA-TID: 64aa7808 Received: from 917570f23663.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AEC37DEC-A57B-4741-80DB-88989E26D65C.1; Mon, 06 Feb 2023 10:38:20 +0000 Received: from EUR02-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 917570f23663.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Mon, 06 Feb 2023 10:38:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7BB4BRX9knKylmlgko5WR+zNh9ge9XJwHYr2u6Ywzu3G3M2JHlk8hquJLu5yc3q326OxyZFo+stEfLC7GcKeqtyuNeD4FWsPE0Dmxlo/96Xbgneivjuxnu7VehxtoxW+kviHpha7DZ0+oUVONB4VwGj2KTArR06UbTgez+qxxjCulZhYXg6TusMOY4wx9Zicx16WEitlMafflEGFiav11VejxNreojDTayKU8FYRwtLRFWHIXRI/z12cHcPWE4VSEdjFeTMcZ0B5mEteaZ0ESzwLEQ5JFadkDjGzDQlMjK+BzMRntlv476RvXm4+cTENXFm32A5UZt2IzYtkO2S8Q== 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=tatDIpcf4FZ7KvEtgrQWPdO9+hEmIqRdOekyuuJUhVw=; b=aQ4kG86w+80q0rTIO6ay8lsR2hK8l+MPKQtHW2mPTQjZkGaiNIs77jYU7WTsR1gRejoSW07L+brGCngjlPkg3IXvgaGeqAuRN8a47EnYZR/trJvx4Cdrd1852Uelgt2M382mCb++RN8l1ZLB+FLOqvxkyvqAYVqzJu9bA+1+qbkjhu4ZWeuvlL2ndL1T9TY6ra9E/Fvbu9w6InGnusFsv3OSVcgEuALcBHydBDPHobdtVFxIGRmyJCcUfgLzT28Fj6Gxn67ZMKH7mnRlZC5BLfM0iCzh0I4rW0ppLteYC9lkUEHMq2nw5OKzbi34X6bpBx1LxwZuctp7xMbYpuzWyg== 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=tatDIpcf4FZ7KvEtgrQWPdO9+hEmIqRdOekyuuJUhVw=; b=Zcq/wq62/d/vRFSLVyRQIc0I6RIiCcHXlp8ZrBHzckLdTOPGs9dBQxNq4hKHNR6SCdlxf1tbD09yJitnlk6J9rIAq+400PyC3juCSajtt71OVz3m27xQasZE7aBmNLI9c4+Aa5GgSmyYiU5Xtvgc5JRm/Z657nc3S4ezU0ssz5c= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AS8PR08MB9551.eurprd08.prod.outlook.com (2603:10a6:20b:61c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6064.31; Mon, 6 Feb 2023 10:38:16 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::22bf:7afd:6f9a:9066]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::22bf:7afd:6f9a:9066%5]) with mapi id 15.20.6064.034; Mon, 6 Feb 2023 10:38:16 +0000 Message-ID: Date: Mon, 6 Feb 2023 10:38:14 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH 1/2] DynamicTablesPkg: IORT generator updates for Rev E.e spec To: Name , devel@edk2.groups.io, Alexei.Fedorov@arm.com, pierre.gondois@arm.com, michael.d.kinney@intel.com, gaoliming@byosoft.com.cn, zhiguang.liu@intel.com Cc: Swatisri Kantamsetti , "nd@arm.com" References: <13bc39429583f0129b2935970df6489191004ad2.1674671138.git.swatisrik@nvidia.com> From: "Sami Mujawar" In-Reply-To: <13bc39429583f0129b2935970df6489191004ad2.1674671138.git.swatisrik@nvidia.com> X-ClientProxiedBy: LO4P123CA0327.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18c::8) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|AS8PR08MB9551:EE_|DBAEUR03FT064:EE_|AM8PR08MB5586:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b635052-f9d7-4a7a-7040-08db082e49d6 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: SokyMZB7HW+LtX8L96sObxQ0uyap12WKYDCYyAaMAbP5lo69OeXarfOMf189BRoqSn1ybANC3Tj6o0/dqM1hgdXQ+jsERgRNeOfSOeuSDxNm4g1t7YNZxG4e5SGeGUyM+1fzOCGt5cJhCH17mQlgsBRaFmIauf4Nev0M7Xz9/dVBuwm1v2AKL0fdWUd5dgiEWlFIFOLyPm3sHEFT/PlbUGkjB5+wXx2td2czc1G6/c8CSUreLNz0tQX59UvSE8H8jItt2wU8nWJW3PbdLir/TR8y51uhIe1FwwYEw+wP38Zwbj46jE5ROV01DsJib1yxBzqSy6mcJBOeP5N9TLhw1lRnGn0VAx61WVZ2rmCuAblDNT+Zyy/rIJdNQZUtkQBRSZWjfn1Ijvz+p9hemXvKehCdGkboSjd8WzDN8zI45wHCVfaDAvlsNJ4EfYip/+KnQkd4Hg7T7zKgLiTrp3p+s29G8TDSxYghUQxOydtGa1HGcrbuztMKfe2nKre1XLUq8GZ95YKtlGOY2opoL3SbFupI3Ik1F4elpHtg50xkz59kc9rwSQLoO0wxjT55zdaLqC+y1NEQuX5x5121QffQDp2YcPEU0TrvjUM4tpNAsHANtl4r3yqWiRSBuRr6rNqpwSig/zDfNntUtv+dAQe4chRI1SD+XXWiJH6iflbvJT7oQHdpV89HPJezksygi7M20wf62ac2DCPciFxmpswORhLTP9SCmHNk2PDYYrbb7oXfffz4ot0dWUHnDM/ehXIYJEIxXw9fCHcKgJJfbC7oiw== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(39860400002)(346002)(376002)(396003)(366004)(451199018)(31696002)(2906002)(36756003)(2616005)(186003)(478600001)(26005)(6512007)(66476007)(83380400001)(33964004)(66556008)(54906003)(41300700001)(53546011)(166002)(6506007)(44832011)(86362001)(15650500001)(8936002)(5660300002)(316002)(4326008)(6486002)(38100700002)(8676002)(66946007)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB9551 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 52313b5a-d94c-45c1-ea44-08db082e4198 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Is+j7g/VUQ1fFRy1O1gxQo5Hs2uuCh1lwYK9C82Fn5dvoBBJ6UV2kkhld7gO+OUDoIvAyNCvehtJJlSnz7s/wliTMPEp7qjMuK33rrcxlwRXorq7ZcRBIvP26rVSS1jpry6bA8iR/y2H3PGUIUt8sRJXAB723kYKGXisJ2NKfxP3krkc1Ea/2MOnlBycp4EsOB8of6bs9jztDAfa10DREqW/1EWEMSsW82LeTCSBNtyvFLPKqasz18dvRke5tHIKuq9HDr+UVrex6pWdvNFukM23QecOzikmJXnckXvRAiHTIlbV6zqqc/shgHvcKfoWINzTqwugOArWexRmtQBQRyjucSlC2cxnERF0T3thxYt6j4874Vvcpzl1LquuChuPcBayWagFTnLT/2a1ninvqN9tjTupICInfTdVAlMxrMSr59TSRJstQLG4GX2tyTRJSiyMPmqn+L3oXD8UcYxhMs2PZGDaHXoqXY5SkKHujYoMO6HKcKV5jHrbPMPRS92jFhmUUQzPZA6sa6biAIEyDFAp4W7zq4J74fXcyWSFMRnB4YMICRXaoRT0x3ZSk/cwFaV2/E3K88S6sogWGPmz3p0C94/yxlnb8nYyAcXnGas8WHIStrHAPzboBhj6rLHR09maM99t0RrC+sQu1jiuJlDTNF4tbAfs53oApil1uk3P2U6X27cmnzMn5FrER+M9dzQeB4biJGc6/WXsR81bFRSNPJss9Y3UzIEbZpWJZh7hGHkiyK+se+GqynjCxF/mWS8G2kdyMvmHy326yIbpaw== 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:(13230025)(4636009)(136003)(346002)(396003)(39860400002)(376002)(451199018)(46966006)(40470700004)(36840700001)(86362001)(41300700001)(70206006)(54906003)(316002)(70586007)(8936002)(40480700001)(15650500001)(5660300002)(44832011)(8676002)(4326008)(2906002)(31686004)(40460700003)(47076005)(336012)(83380400001)(82740400003)(31696002)(36756003)(82310400005)(36860700001)(26005)(53546011)(186003)(6512007)(166002)(356005)(6506007)(33964004)(81166007)(478600001)(2616005)(6486002)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Feb 2023 10:38:30.3365 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b635052-f9d7-4a7a-7040-08db082e49d6 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: DBAEUR03FT064.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR08MB5586 Content-Type: multipart/alternative; boundary="------------6mMGCeA5t6HL708Ob04RGlB0" --------------6mMGCeA5t6HL708Ob04RGlB0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Hi Swatisri, Thank you for this patch, I have some suggestions marked inline as [SAMI]. Regards, Sami Mujawar On 25/01/2023 06:40 pm, Name wrote: > From: Swatisri Kantamsetti > > 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 > - preserve backward compatibility. > > Signed-off-by: Swatisri Kantamsetti > --- > .../Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 36 ++++++++++++++----- > 1 file changed, 28 insertions(+), 8 deletions(-) > > diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c > index f28973c1a8..235a475629 100644 > --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c > +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c [SAMI] Can you update the file header with the IORT Spec revision, please? > @@ -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,12 +1582,27 @@ AddSmmuV3Nodes ( > SmmuV3Node->ProximityDomain = 0; > } > > - if ((SmmuV3Node->Event != 0) && (SmmuV3Node->Pri != 0) && > - (SmmuV3Node->Gerr != 0) && (SmmuV3Node->Sync != 0)) > - { > - // If all the SMMU control interrupts are GSIV based, > - // the DeviceID mapping index field is ignored. > - SmmuV3Node->DeviceIdMappingIndex = 0; > + /* DeviceID mapping valid flag was introduced in IORT rev E.e > + * for SMMUV3 nodes rev. > 5. > + * For older revisions, if all the SMMU control interrupts are GSIV > + * based, DeviceID mapping index field is ignored. > + * 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->Flags & EFI_ACPI_IORT_SMMUv3_FLAG_DEVICEID_VALID))) { > + if ((SmmuV3Node->Event != 0) && (SmmuV3Node->Pri != 0) && > + (SmmuV3Node->Gerr != 0) && (SmmuV3Node->Sync != 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; > + } > } else { > SmmuV3Node->DeviceIdMappingIndex = NodeList->DeviceIdMappingIndex; > } [SAMI] I think the above code should be changed to the following: /* 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)) ) { SmmuV3Node->DeviceIdMappingIndex = 0; } else { SmmuV3Node->DeviceIdMappingIndex = NodeList->DeviceIdMappingIndex; } Can you check, please? [/SAMI] > @@ -2819,7 +2839,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 --------------6mMGCeA5t6HL708Ob04RGlB0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Swatisri,

Thank you for this patch,

I have some suggestions marked inline as [SAMI].

Regards,

Sami Mujawar

On 25/01/2023 06:40 pm, Name wrote:
From: Swatisri Kantamsetti <sw=
atisrik@nvidia.com>

The IO Remapping Table, Platform Design Document, Revision E.e,
Sept 2022 (https://developer.arm.com/documentation/den0=
049/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 >=3D5 check the DeviceID mapping index
  valid flag to populate DeviceIdMappingIndex field
- preserve backward compatibility.

Signed-off-by: Swatisri Kantamsetti <swatisrik@nvidia.com>
---
 .../Acpi/Arm/AcpiIortLibArm/IortGenerator.c   | 36 ++++++++++++++-----
 1 file changed, 28 insertions(+), 8 deletions(-)

diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator=
.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
index f28973c1a8..235a475629 100644
--- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
+++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c
    
[SAMI] Can you update the file header with the IORT Spec revision, please?
@@ -1554,9 +1554,14 @@ AddSmmuV3Nodes (
     {
       SmmuV3Node->Node.Revision   =3D 2;
       SmmuV3Node->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD;
-    } else {
+    } else if (AcpiTableInfo->AcpiTableRevision <
+               EFI_ACPI_IO_REMAPPING_TABLE_REVISION_06)
+    {
       SmmuV3Node->Node.Revision   =3D 4;
       SmmuV3Node->Node.Identifier =3D NodeList->Identifier;
+    } else {
+      SmmuV3Node->Node.Revision   =3D 5;
+      SmmuV3Node->Node.Identifier =3D NodeList->Identifier;
     }
=20
     // SMMUv3 specific data
@@ -1577,12 +1582,27 @@ AddSmmuV3Nodes (
       SmmuV3Node->ProximityDomain =3D 0;
     }

<SNIP>
-    if ((SmmuV3Node->Event !=3D 0) && (SmmuV3Node->Pri !=3D =
0) &&
-        (SmmuV3Node->Gerr !=3D 0) && (SmmuV3Node->Sync !=3D =
0))
-    {
-      // If all the SMMU control interrupts are GSIV based,
-      // the DeviceID mapping index field is ignored.
-      SmmuV3Node->DeviceIdMappingIndex =3D 0;
+    /* DeviceID mapping valid flag was introduced in IORT rev E.e
+     * for SMMUV3 nodes rev. > 5.
+     * For older revisions, if all the SMMU control interrupts are GSIV
+     * based, DeviceID mapping index field is ignored.
+     * 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->Flags &=
amp; EFI_ACPI_IORT_SMMUv3_FLAG_DEVICEID_VALID))) {
+      if ((SmmuV3Node->Event !=3D 0) && (SmmuV3Node->Pri !=
=3D 0) &&
+          (SmmuV3Node->Gerr !=3D 0) && (SmmuV3Node->Sync !=
=3D 0))
+      {
+        // If all the SMMU control interrupts are GSIV based,
+        // the DeviceID mapping index field is ignored.
+        SmmuV3Node->DeviceIdMappingIndex =3D 0;
+      } else {
+        SmmuV3Node->DeviceIdMappingIndex =3D NodeList->DeviceIdMappi=
ngIndex;
+      }
     } else {
       SmmuV3Node->DeviceIdMappingIndex =3D NodeList->DeviceIdMapping=
Index;
     }

</SNIP>

[SAMI] I think the above code should be changed to the following:

=
    /* 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 !=3D 0)        &&
         (SmmuV3Node->Pri !=3D 0)          &&
         (SmmuV3Node->Gerr !=3D 0)         &&
         (SmmuV3Node->Sync !=3D 0)
        ) ||=20
        ((SmmuV3Node->Node.Revision >=3D 5) &&
         ((SmmuV3Node->Flags & EFI_ACPI_IORT_SMMUv3_FLAG_DEVICEID_VA=
LID) =3D=3D 0))
       ) {
      SmmuV3Node->DeviceIdMappingIndex =3D 0;
    } else {
      SmmuV3Node->DeviceIdMappingIndex =3D NodeList->DeviceIdMappingI=
ndex;
    }

Can you check, please?

[/SAMI]

@@ -2819,7 +2839,7 @@ ACPI_IORT_GENERATOR  IortGenerator =3D {
     // 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
--------------6mMGCeA5t6HL708Ob04RGlB0--