From nobody Mon Feb 9 20:10:33 2026 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+76660+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 1623923774131722.5964096096452; Thu, 17 Jun 2021 02:56:14 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id dxaJYY1788612xFdikTfK54i; Thu, 17 Jun 2021 02:56:13 -0700 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.43]) by mx.groups.io with SMTP id smtpd.web12.5530.1623923766834840371 for ; Thu, 17 Jun 2021 02:56:08 -0700 X-Received: from AM5PR1001CA0052.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:206:15::29) by AM0PR08MB3682.eurprd08.prod.outlook.com (2603:10a6:208:fb::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.23; Thu, 17 Jun 2021 09:56:02 +0000 X-Received: from AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com (2603:10a6:206:15:cafe::88) by AM5PR1001CA0052.outlook.office365.com (2603:10a6:206:15::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18 via Frontend Transport; Thu, 17 Jun 2021 09:56:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; 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+76660+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; X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM5EUR03FT048.mail.protection.outlook.com (10.152.17.177) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 09:56:02 +0000 X-Received: ("Tessian outbound cdfb4109116c:v93"); Thu, 17 Jun 2021 09:56:02 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 63e80c887effccbb X-CR-MTA-TID: 64aa7808 X-Received: from 48c8d4de09cd.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8BDB2C59-E17F-4139-9EB7-EFC3FD4B8850.1; Thu, 17 Jun 2021 09:55:55 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 48c8d4de09cd.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:55 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c7YEQlvdAwJyxcLlJmIT5SCRiQ12xuX5/V8UEOM2a+dreuhbYcb9cquomw8gn6IuYdKMjI5Iw4CWHRT7cBPVuAgjGjMzqnPAZ9bPVi7BK+mT45cBi1VnXf3zwP3YvRkHpd1YZZDE/vwCsOpAmHfPlxO8G/z6lxVG5mgaFY/0t9RQto8pSXJ/0EvwHRqqzy8ozdMPM61TzFEv0Iygzblm9hS0hhYQOL9AZRW+HEZNIcf29Lu5PoNOz4Jx3AqRE/aUQFXZsk0tWSgtFt9vBJqNOKyt02ZGZAYKYdePrXHEPoP9mFfODFTEJd9Rcq3RfLA5W4b1xfrVC21gX+6rNNtFQg== 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-SenderADCheck; bh=iKdAbF4NT1Onl/TptPtKWbbZwAQF9xCb3V1TAW/tfzA=; b=mQE1qqbCcvIibtv53Secg0A0pR4rj46eJ6n9gcPaSrNrGgMbJGv+2YiCnm0zCvE9u9qT+eW0P/aqIXegaIKAxv5HI5GmjuajwD3BdLZfj+uOYm1TMrhCVvqDdHqK7Gr/IXZOQNB5D8tc8ZhTiSGYdb6gc+FN/0N5lz+/QVatxFrc697sZ/XIMoGeIkHo7p+YiMiOURg+LQ4I6aC/vLBTz+E4+PO2CkfKmTWmROxakng9jJWLsIWZm7V3A9mYbPjb1rxl02uahRp4lWDW+KZH9tOfIp/iq5/GgefxQ0XMupv5HLhOpgYUGhN8ObSrX218H5x/TS5ebIK3ew1T2l2VQw== 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 AM5PR0701CA0003.eurprd07.prod.outlook.com (2603:10a6:203:51::13) by AM6PR08MB4518.eurprd08.prod.outlook.com (2603:10a6:20b:b4::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.18; Thu, 17 Jun 2021 09:55:49 +0000 X-Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::e) by AM5PR0701CA0003.outlook.office365.com (2603:10a6:203:51::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4264.7 via Frontend Transport; Thu, 17 Jun 2021 09:55:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; 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; X-Received: from nebula.arm.com (40.67.248.234) by AM5EUR03FT040.mail.protection.outlook.com (10.152.17.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4242.16 via Frontend Transport; Thu, 17 Jun 2021 09:55:49 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) 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.2176.14; Thu, 17 Jun 2021 09:55:40 +0000 X-Received: from E114225.Arm.com (10.1.196.43) by mail.arm.com (10.251.24.31) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Thu, 17 Jun 2021 09:55:39 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , , Subject: [edk2-devel] [PATCH v2 2/8] MdePkg: IORT header update for IORT Rev E.b spec Date: Thu, 17 Jun 2021 10:55:31 +0100 Message-ID: <20210617095538.93280-3-sami.mujawar@arm.com> In-Reply-To: <20210617095538.93280-1-sami.mujawar@arm.com> References: <20210617095538.93280-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1215149f-aefe-47f4-4c71-08d931761ddf X-MS-TrafficTypeDiagnostic: AM6PR08MB4518:|AM0PR08MB3682: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qv1NdYGJ2d3ZSdIGTZsDMZjgxTJyN9pMfvPZQsrGlj+UxEZrOmu5ChZWeGrcYtRe1U6FITrofnenaPAwwC0mhl0KqiAiSdpv1LcXkkLqbbZrUMwQ8Kp904qNBgq1PO+ysSCc064QjJWxtKM4opHfNpfoN/XW+uav06oTVRxZ/WWbyaG00cTelqddBdT0VjXDW7haKxa7FtR6PfDxhX3B2ldQIlTyngps3bfB/6KDKAaS5Anr5ABLEMi4zRZcbpCqMHPFs89hmLVlzMbTjt6L2L0ssifH2QzPYolpVhA9p9dSLrTiRLVhPnmcMgrFg+QIwaa55TwRQVpOR18KBHIY2+tzF2du5x6ceO5TI0rqJ+2Pnkt9Inz7EKvh1W3xUt+Yc8zFNI62ig+DuGbwXFEtBQRbZwuEY6AG7VN5PEGdijanoOttACgDt1XDd5K9fF8v6v+5rg9ZseGdEUAjTpm4EAUvmQgaqBaqYzy4jJT9w5LD8K3QAN3/39zu6BprD5h3TUoJZ0CHSetayIh86fnPyDd5Ebpt276XkxvOrF6Zb09keuQrV/Ya6hKNXwaNX8RXZcnwJzEnER85LpelQgDQnZnyJ0/Ulu0dtwYbWLywBgkzU5UlXtne2UbFOHPbP8YpgWJhq8j+Ml0AmYx68qlVL2UF6dJI9G/aThO+/5vbenz1re4ANKVxm4ouWecUvMtRXA/kRF8wL3JmhQc/AfTruIrCXvmH6HMrZ2OpVO9KdRAz994abo+i27m4lLOTr/WePs3xxMwAvi2c8Kf2wjc+QTjjZcCYzzjvINh2DNNbST4KoBeaI03wQTdSNmOe7jneLCdZydS+KGLdvwly3wai/w== 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:(4636009)(396003)(136003)(376002)(346002)(39850400004)(46966006)(36840700001)(83380400001)(86362001)(4326008)(8936002)(478600001)(81166007)(15650500001)(5660300002)(316002)(356005)(426003)(8676002)(36860700001)(44832011)(966005)(336012)(6916009)(2616005)(82310400003)(54906003)(1076003)(6666004)(82740400003)(26005)(70586007)(47076005)(186003)(7696005)(36756003)(70206006)(2906002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4518 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 39ab7f75-65b3-4f7b-fdd9-08d9317615f5 X-Microsoft-Antispam-Message-Info: H/7cMritU3/M5VgdNfjSdsuulm/WpEy6nnSWk4fL6JjStMclBl/MtcmKHpI3rOjlCJyhsVSzDdDmpliSQk5NKFxxzGKt2bjHjLqKaxSMdMelmbgEz6f+/VmJnUzor2fzHAdIgz7zQYLyijA7uucc2lBCcpL46VsthgSbR4xSVkPJTx/FIfXibrQCwQPMZJl6A5FuDayPLVF7AjqaNnjRmvoIhV88pfJnRK2F1LeXxrSUzxQEjRZfgfyyTPZrkb1srafsbOcbMSTJ6HnlcbptFC/n63KPfJq+VD867Tbe+hPfKVif6i1rdbqG0znxjgoAyv/p2w4HtWzlekawjTfxuVtrFeBtESc5LfPtlpIYTYGbAkf4dgENsEVOzj0V9tuBWLp6hwaZ1DWB2jZ8Aj+Rxc5l5RyU4glJ51jbKTPcESvFsUbO26yq0V0dxfXlwMADkkWamwdxjoKpOJvrhiD4qpRG/OuKPn7vc3/wDKAe3bB5IJj2aOjxl2Ns3sYGU7YVIrJrHM1UR/MTTRr+ODn7O5z2pfxAt8Srqrr5ALd+M54FIa5KUApLAEuP2HaAxt8dYgDVv8psX1AFFO00VI3b6p4Eg7t7TN4q520FhEQcyfavGKH7xTsMoN/Y1jCaFjk3FzJx/d9pKLcIsza0JHGJYF1Iuns6tiCOD1P0Wff+lZMej3nVV0ZKL97zlePV9rKBOX+7Qkzw4NzVPUWpBRmzfwSK+8OeZ/WkKseSdyoVEISYap3ROmVIFVViXdJQhT3YKr1MGDerI6niaF5qb//BbyWx6W/jdalDTJQ2e7iSyKfznbNz4qU99FBmSkIgk0zg X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:56:02.6201 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1215149f-aefe-47f4-4c71-08d931761ddf 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: AM5EUR03FT048.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3682 Precedence: Bulk List-Unsubscribe: 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 X-Gm-Message-State: mx8Oqjz2eFrjUFQ6frqsbLadx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923773; bh=tJkU2pyhMOJs7T/TnDe7bOCduDDkHU5xlS5EeJ7UaQQ=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=hFDnzJpuKjvHCSeJYsFzNwQyigFnYobD6Hlq+jG4dyuNcC1S3u9exT8n1oINf7LOATb 7QVvA3gBqAA4GIqBMrivmCKa4fJ06IM8DOusViAx/Lq6Be2FFIu8YGZaHclfFRHJ3UpZh LkabGNDnfr1ZunEfAjsZG+BSunzOdToylSw= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Bugzilla: 3458 - Add support IORT Rev E.b specification updates (https://bugzilla.tianocore.org/show_bug.cgi?id=3D3458) The IO Remapping Table, Platform Design Document, Revision E.b, Feb 2021 (https://developer.arm.com/documentation/den0049/) introduces the following updates, collectively including the updates and errata fixes to Rev E and Rev E.a: - increments the IORT table revision to 3. - updates the node definition to add an 'Identifier' field. - adds definition of node type 6 - Reserved Memory Range node. - adds definition for Memory Range Descriptors. - adds flag to indicate PRI support for root complexes. - adds flag to indicate if the root complex supports forwarding of PASID information on translated transactions to the SMMU. Therefore, update the IORT header file to reflect these changes. Signed-off-by: Sami Mujawar Reviewed-by: Zhichao Gao --- Notes: v2: - Set EFI_ACPI_IO_REMAPPING_TABLE_REVISION to Rev 0 as [SAMI] setting to Rev 3 will break existing platforms. The problem is that existing code would not be populating the Identifier field in the nodes. This can lead to non-unique values in the Identifier field. MdePkg/Include/IndustryStandard/IoRemappingTable.h | 67 ++++++++++++++++++= -- 1 file changed, 60 insertions(+), 7 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/In= clude/IndustryStandard/IoRemappingTable.h index 731217441438a00dd5ff0bedf2010598d48d6dbf..a9817252d8cec17f82cb1a4ced1= 2186cdf58713a 100644 --- a/MdePkg/Include/IndustryStandard/IoRemappingTable.h +++ b/MdePkg/Include/IndustryStandard/IoRemappingTable.h @@ -1,12 +1,19 @@ /** @file - ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049D - - http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Re= mapping_Table.pdf + ACPI IO Remapping Table (IORT) definitions. =20 Copyright (c) 2017, Linaro Limited. All rights reserved.
- Copyright (c) 2018, ARM Limited. All rights reserved.
+ Copyright (c) 2018 - 2021, Arm Limited. All rights reserved.
=20 SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - IO Remapping Table, Platform Design Document, Revision E.b, Feb 2021 + (https://developer.arm.com/documentation/den0049/) + + @par Glossary: + - Ref : Reference + - Mem : Memory + - Desc : Descriptor **/ =20 #ifndef IO_REMAPPING_TABLE_H_ @@ -14,7 +21,9 @@ =20 #include =20 -#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0 +#define EFI_ACPI_IO_REMAPPING_TABLE_REV0 0x0 +#define EFI_ACPI_IO_REMAPPING_TABLE_REV3 0x3 +#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION EFI_ACPI_IO_REMAPPING_TABLE_= REV0 =20 #define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0 #define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1 @@ -22,6 +31,7 @@ #define EFI_ACPI_IORT_TYPE_SMMUv1v2 0x3 #define EFI_ACPI_IORT_TYPE_SMMUv3 0x4 #define EFI_ACPI_IORT_TYPE_PMCG 0x5 +#define EFI_ACPI_IORT_TYPE_RMR 0x6 =20 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0 =20 @@ -55,7 +65,16 @@ #define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2 =20 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED 0x0 -#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED 0x1 +#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED BIT0 + +#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_UNSUPPORTED 0x0 +#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_SUPPORTED BIT1 + +#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_UNSUPPORTED 0x0 +#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_SUPPORTED BIT2 + +#define EFI_ACPI_IORT_RMR_REMAP_NOT_PERMITTED 0x0 +#define EFI_ACPI_IORT_RMR_REMAP_PERMITTED BIT0 =20 #define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0 =20 @@ -89,7 +108,7 @@ typedef struct { UINT8 Type; UINT16 Length; UINT8 Revision; - UINT32 Reserved; + UINT32 Identifier; UINT32 NumIdMappings; UINT32 IdReference; } EFI_ACPI_6_0_IO_REMAPPING_NODE; @@ -198,6 +217,40 @@ typedef struct { //EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1]; } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE; =20 +/// +/// Memory Range Descriptor. +/// +typedef struct { + /// Base address of Reserved Memory Range, + /// aligned to a page size of 64K. + UINT64 Base; + + /// Length of the Reserved Memory range. + /// Must be a multiple of the page size of 64K. + UINT64 Length; + + /// Reserved, must be zero. + UINT32 Reserved; +} EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC; + +/// +/// Node type 6: Reserved Memory Range (RMR) node +/// +typedef struct { + EFI_ACPI_6_0_IO_REMAPPING_NODE Node; + + /// RMR flags + UINT32 Flags; + + /// Memory range descriptor count. + UINT32 NumMemRangeDesc; + + /// Offset of the memory range descriptor array. + UINT32 MemRangeDescRef; +// EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE IdMapping[1]; +// EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC MemRangeDesc[1]; +} EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE; + #pragma pack() =20 #endif --=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 (#76660): https://edk2.groups.io/g/devel/message/76660 Mute This Topic: https://groups.io/mt/83600724/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-