From nobody Mon May 6 08:05:14 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+76656+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 1623923771340924.2888202594658; Thu, 17 Jun 2021 02:56:11 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id C4ZcYY1788612xrjEFjSdSBE; Thu, 17 Jun 2021 02:56:11 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.70]) by mx.groups.io with SMTP id smtpd.web12.5527.1623923755097173182 for ; Thu, 17 Jun 2021 02:55:55 -0700 X-Received: from AM6P193CA0144.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::49) by AM6PR08MB4375.eurprd08.prod.outlook.com (2603:10a6:20b:b8::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 09:55:52 +0000 X-Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::f2) by AM6P193CA0144.outlook.office365.com (2603:10a6:209:85::49) 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:55:52 +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+76656+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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) 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:55:51 +0000 X-Received: ("Tessian outbound 9d3d496fabe8:v93"); Thu, 17 Jun 2021 09:55:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7ac498230ac13171 X-CR-MTA-TID: 64aa7808 X-Received: from a03a30715662.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 1370E6C5-7514-4DB2-84DF-EC84E31D0FF4.1; Thu, 17 Jun 2021 09:55:45 +0000 X-Received: from EUR03-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a03a30715662.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DXLxl49Q7v/kXTacyWZU3OGgwn2lPnXKUIGvSwZPj/lHwZBcD2Yvqo2jS9DbCcXKB8ZjGqyVvKrkHXfcboqBJMhqw2d3xhN3hjW94Ff3DaXJtQLryrYwWHNixfxia98fTwtFFu+ZBe64MmKmZZ5soQ5GZD15wXgPvzrqcOEVRzWoJHRCBlpaWAkQXSeK9ZgaxFe3MJq2/N2hHI3S72HpZEhzDZ7jlD/vxSeJJsglnzlfS0hL/2bM6FB1goRAY263KrlNNv1l1Re851SYf9cPIS9J6MfKcjPgW9Lty7vEWaX+2OiIJMfOr5aXsOaROAOyOLp6Y95ZjgwKbmrYQJW2DQ== 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=pEWWE2u6UBI6xzRBxzS/59XJOLHohyZrv/yYYAolHsg=; b=a7thqH2paAGFTGuWH4JZSxDRKKCnBdcHjrrbwvwQ6+17CYHQPxto16oJ5rsvDugazDz9hqz9t588O9W0rMStw3ro0eggwEceKo+LNEq1HXDOWoAa5btvGCIFKtiotgwwvzZk+qqnm+zrJzeBlaqBZ7gev7Ed/tNyIYx5cJjp5jvYIb8vN5qZf5xQcrdw56+6GjtUQNF3fvqQkKuOAklKFxZPB0cepusczwTRYE4tt9cuvMUHmEHNYgD6C2go6eGpVeM83DMSKXf9IPssGrxYkW5mBBuP0ykdAwyt0P3aL6MViO+WsNFcCSNfuei4y/MN9iQ9iN+uuGUgmmRy5KtHMw== 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 AM5PR0701CA0002.eurprd07.prod.outlook.com (2603:10a6:203:51::12) by DB8PR08MB5515.eurprd08.prod.outlook.com (2603:10a6:10:11f::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Thu, 17 Jun 2021 09:55:42 +0000 X-Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::ca) by AM5PR0701CA0002.outlook.office365.com (2603:10a6:203:51::12) 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:42 +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:42 +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:39 +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 1/8] MdePkg: Fix IORT header file include guard Date: Thu, 17 Jun 2021 10:55:30 +0100 Message-ID: <20210617095538.93280-2-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: adf1b0b2-f638-4927-e7ff-08d931761738 X-MS-TrafficTypeDiagnostic: DB8PR08MB5515:|AM6PR08MB4375: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5516;OLM:5516; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: MO7W9DtXB51WcxNGUaLY6Jku48yqTeI7PNAHopd4pCH4KGdfZeKN30+DYGRdyNuoq/NTEYWy0llGLVKghFr1qzbcxcUPpr1fakvD9aXgRJ18bJhTalBrHsuRnTlcYh8zkxKN1bFO95MJaoueASmeYovIY5p2i1/PW02flxvl6PU04JsCh0MJVbC3I2q94Nicu/tx/CG1seZdeFHpXhQIYJ8ZBblpOvpcOUxMj8lR9JBHNBh4Mb9aaB7ttuXDIUEyqBpzrP5IZ0Lz/XIpJq8tsCqbsE6cI2dQJSivTHNdaCusTKG8fbPh4Nu2bQ6ArJV5wls+/nk5b12SnaKZBTtH7H+Ts1JcQldtGbiNX2mX7KOLewvbRP4PYa78y7egKqdc4gIBfMHpl3Pjcz+ime/dmB59fzk42+f9QrM1oGJXS2oAcAT2yiR8jK8H2G6DTEF3o+YjlmBaZ/DyED6XDWuhe22e6YcBroc0PhqqWoHAgMjXOJ8yY2uHe6xWNGtAm2O9oOVb6DaM9gJMQjjF2i6PeFuZrMOIxkNzURb8X/wWToRbWv7K0VrZX9Y7dBOuVyHMC7prb+Fm3YfdHJ3ZJBknOONzU/tov8AWjD2JbnDdCluQi4Ak0szSS37x5Gc+2KK4jtYVH1AJznAXYPuxMVJeGrSBSzB1Y9ixm+aRLiJgEwQyZCooRj4zU2T4mcFr1659EKaxyZpc1pl4sy5iUPXN7v8XzfMNtgqh8bSWq46UWQoeJeGC4dHnILcw8eRsIt9hMgTN6A/c0XubMbODE4Y/1XwalUSwnCyEoI5TAkv3fCj1bOmi+eyO+iqqq2l46/oS 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)(39860400002)(346002)(396003)(136003)(376002)(46966006)(36840700001)(82310400003)(83380400001)(2906002)(36756003)(2616005)(47076005)(8936002)(478600001)(81166007)(8676002)(7696005)(1076003)(54906003)(6666004)(86362001)(316002)(336012)(356005)(36860700001)(5660300002)(70206006)(44832011)(186003)(6916009)(26005)(70586007)(82740400003)(426003)(4326008)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5515 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: d856147a-e28f-4739-d08f-08d9317611c5 X-Microsoft-Antispam-Message-Info: +Sw7Yaci1TBT9yu93ckvM3YLDjqtXn986nLZHBFh2ngL+bm8swUke2au3OCTzpIPAyBXJb9BDmSb5eK20g4hyyMZcRvoJz/GilPmzuU65BRml64G+FOb8wdznpaKjZv3K3C3Wt5xYhEOU3C0HEOlH0ETDij7LcBMnwRqx5Q//3G1Wh72T4vfm+0GhJkUsEJ6970A4Mi2rlFLhQZDXYKUDYlIo1wePSG3/L+qM8Uz1mITFOKSSbJq13LBhGMaFREy2wTw/e3r9mInOFJXN2ypIeYY3nO0soRUfc1XZMyLMpX9HnfrPzIs2ElrBWaZupNMAcXm7uai6E+aRILDP0IybRdVJJeBiVp5kWS8qyGoCmtuQrDUVPHd5g1gFMSCUpFPvfz8rrPoHQFDwm4OKe67mFguQS/rap0GzLKFZHmkqMcFHyRHm6fXUj/u5XVsGaXaTy8F7gCIv5iF36gbCfbQR1iibLmjrFfWVMZjeLTC7K+UnhcLjHCHWMyq+Xy+ALNIxS+JyOe4ZM/MGO3E3ubqx8YlgPUBbo8yDe3iknJFNq34xnOjoUBQ093HGZw6dKSN4/m/tz5HAdfkZ3Q44QGc/IPFwuyXG6zMOfdrKL7ZYgV+K/tWwVrlHTaI27DAX9H4xF4Nh2dQd2M43VPAEe0FpEA9B/+S5R6NxY4AWjj9zOsvFyA88DnqcUVwVqZA1S/j0YSSEhrJlTmPZpUb2khIPxuyTnTnP4SqLymBxNJq+yAV7jyTdKEKVoDdJmRKBSFgYSh5XayNFDW0nyJB2q28LA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:55:51.4473 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: adf1b0b2-f638-4927-e7ff-08d931761738 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: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB4375 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: e5oQxWG2sea7rQunbWLZkYy8x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923771; bh=91GxCuk6tPpdsSgQoT497VB9wet5RUiHluRw80qIgiE=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=LGxWYd5+8YtytowdKHqkcoijaIkDxWlngN6YJr1XzSR8ORr30rKF9pNca88DiaBri4/ 1PYKpF+riP/VqKAYqSluUgccTn9nxW8QVK1hYwI7aTuK8ESSv+oXGcConjQ5k7UQvNH+3 TFri8vz8+/5C7B0PNJfzzjy6te6oGt3NfaA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" According to section 5.3.5, EDK II C Coding Standards Specification (https://edk2-docs.gitbook.io/edk-ii-c-coding-standards-specification) the header file guard names must not be prefixed with underscores as they are reserved for compiler implementation. Therefore, fix the header file include guard as per the specification guidelines. Signed-off-by: Sami Mujawar --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] MdePkg/Include/IndustryStandard/IoRemappingTable.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/In= clude/IndustryStandard/IoRemappingTable.h index 90504e3a6715be7facc6450c6ff0e1eab92cd3c7..731217441438a00dd5ff0bedf20= 10598d48d6dbf 100644 --- a/MdePkg/Include/IndustryStandard/IoRemappingTable.h +++ b/MdePkg/Include/IndustryStandard/IoRemappingTable.h @@ -9,8 +9,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent **/ =20 -#ifndef __IO_REMAPPING_TABLE_H__ -#define __IO_REMAPPING_TABLE_H__ +#ifndef IO_REMAPPING_TABLE_H_ +#define IO_REMAPPING_TABLE_H_ =20 #include =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 (#76656): https://edk2.groups.io/g/devel/message/76656 Mute This Topic: https://groups.io/mt/83600718/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- From nobody Mon May 6 08:05:14 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+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- From nobody Mon May 6 08:05:14 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+76655+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 1623923757334936.1663321644979; Thu, 17 Jun 2021 02:55:57 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DuMJYY1788612xaOZ184u5zZ; Thu, 17 Jun 2021 02:55:55 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.72]) by mx.groups.io with SMTP id smtpd.web12.5526.1623923754790292309 for ; Thu, 17 Jun 2021 02:55:55 -0700 X-Received: from AM6P193CA0107.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::48) by AM9PR08MB6756.eurprd08.prod.outlook.com (2603:10a6:20b:30d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4195.22; Thu, 17 Jun 2021 09:55:51 +0000 X-Received: from AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:88:cafe::85) by AM6P193CA0107.outlook.office365.com (2603:10a6:209:88::48) 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:55:51 +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+76655+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 AM5EUR03FT059.mail.protection.outlook.com (10.152.17.193) 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:55:51 +0000 X-Received: ("Tessian outbound 94919dbe50f5:v93"); Thu, 17 Jun 2021 09:55:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 140a86991df35b61 X-CR-MTA-TID: 64aa7808 X-Received: from 49a42f60dc55.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 930F9E8E-8C85-46FE-B640-6929D81EC274.1; Thu, 17 Jun 2021 09:55:44 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 49a42f60dc55.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MV/u+7KXKHl3LfPMZu9Cr9pTCqMHflX2xLPQsiEyRYMTUOepO9Vqy4LHa29FB7KGsI/Hhgl09d+Vwams5qeXWWE+pXPkRPQKvsjnyY4WYlHue7Q7HHbiQ5v+ryqAf5ikaU5x+Hi4AdfSJllsoU+G1Ybx+jTe60QQ9pQsT1vT5SpnlDfBioGCP2mwK5SO7b6mtFOaeqzi7RiYijU4GGc8VgMzazbHY2slv781bT5S3UvXlEO0RDu8oxPUETlX7oqvMKzyQH1kjNJkwU3NSTVwwjRciBFFQ8ZfkZsq8A7OLJWRSq/VVP4w8c0SJn2FiydIoSY7r0ye8j3zWa+wet2xkw== 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=0LmHuFCkGB6tsquJyXEpAC+8WLORR5Id/e2hDTCWOR4=; b=GR6njdC68tzQh+8aAb8t5FZKfGyQhzAJzVWoX4kTIpsTbnctZyZgqTolVINjhKjkRFtrCKMLSAcF6KsEFcgPJY+bJ/m/SeQcrTF0/UoV8F+pkm8FH7I5rNf8EY/jcwZwkMislqzXNjGzh3D5ytLNp2yP9DT0YB0YYGttNNrb/ikQEN6kjQLS6/tEUy53f8/R9JO/w+9HBHB+Wvz7N18zxfCK8lE+F2UvnYvdjyY1sEEf6ELA1pbyyzs/F7nions5c9UETD3aRTPA/KstG1zDGzqmwiUf+S45j4ziFMzfiFdTTs8rlXY0aXFMDLIaH3kdO11uZahrJPQWsY6uZVuXQg== 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 AM6PR08CA0041.eurprd08.prod.outlook.com (2603:10a6:20b:c0::29) by AS8PR08MB7126.eurprd08.prod.outlook.com (2603:10a6:20b:401::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 09:55:43 +0000 X-Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::66) by AM6PR08CA0041.outlook.office365.com (2603:10a6:20b:c0::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:55:43 +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 VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) 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:43 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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:41 +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:40 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v2 3/8] ShellPkg: Acpiview: Abbreviate field names to preserve alignment Date: Thu, 17 Jun 2021 10:55:32 +0100 Message-ID: <20210617095538.93280-4-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: d7edcb55-e175-4c79-db7d-08d93176171f X-MS-TrafficTypeDiagnostic: AS8PR08MB7126:|AM9PR08MB6756: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:5236;OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: CQqBO1CEUMhjGeSaenTZ170IPvdUVb18m1/kVfCnHEJ7z486YCuXLCgbFfdnj9pouVlzOdlHM/FmUzlIcV3NoUW9G91WXc8aV8QZ7jQx5IpPTiuk2GmGGFAlrVxvKgVahm2gc1xTymR5qgYtj1SPyQh54EEFxARuSJZIniXQQ3O+CN6CTIg3T6YY4DASs3zAZvdpTrWkJnH5dt1IVGI2WXzC5KnmCeTGwtQtQWcJyS7eLkCLbYB9QEiwOWZVirCOZSppmSf1Lpbx6+c+8qCGoWCWPa2R5NVfCjL1skKqxAEQMaBNFgz+tfPMtN9Bg7OKY8KwIYdXl/kiogHmhOrECvIrdrlG7xMKqLb+fLOnTYygltnTT71iu5EZo8IVHGBbpkBOFdmt9m9cs+PavroS6ivur9+naMQDtLheqpdnAOZcOSaR7qWJqTlJbPAQmaJ7oXN509PVMjKNct6YZNiD0nscrH39i+d72sN7gWhrhV1VsiveRsyoDm1Yc+4tcZUNm+gpsnLlR/6JnqA6nMdu9Kn2wvHpA2dfv96Yt3W3fUsxC151mCIX7/vNmOcCoibeF2p596s7NckZco8WPrk2ic0nppyi8d0VRGNtvCH1g1jCJxtLmiqKmyuWYvzBcgjPtLckd2DiOxeHNsLmEoOLkc+nKW4/3Y1bVvBCxwE2DpFArw9rNG8EpvyF1idmvrwe 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)(346002)(39850400004)(136003)(396003)(376002)(36840700001)(46966006)(47076005)(54906003)(82740400003)(186003)(44832011)(2906002)(26005)(81166007)(336012)(356005)(316002)(36756003)(7696005)(83380400001)(70206006)(4326008)(70586007)(426003)(6916009)(8936002)(5660300002)(8676002)(6666004)(1076003)(478600001)(2616005)(36860700001)(82310400003)(86362001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7126 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 74cf3d29-ebd9-4afa-3052-08d93176123f X-Microsoft-Antispam-Message-Info: bo7BUg/RWrJfnszkGk/f2v/SDFK/rZe2eQyRNEdwoaqgPLbCQAznoxlKhSGsle8kE9IuNIGc4EZFuf+UtPlr95FD1RUxrhMFUy/Hf9VPKjChZtvuXsTe438D8Pmhc8h8zIhdi5mo+/RTt0YtuqRVKFtB4qn1UfkPOvm59GuzPvAm3SiIz2LwDDXQetLBGAFr6y8izulf8x7wwwXLN/PRiYEoGfighAO0OiKJzINz5H6tQMuY9NHu3bXDKCfM8NBc+jmuTVy+WzkuZMFCKzAkZ37vtJliXf9a82nm1Lg2TbdTzs9j6NxbGOgA2IgyJQ6KsVeQjoaWLbDGQ6QMmRAleKamjmqkZd7h922qEKOreLV1iSYxf4sogsqqYzgaoo6p/bzUux48DYhdtQwimUPROCBjrDQrTnV8zGBnUgacd5fBIYPcIwnzOgtX4NGXKzEsanuCfn5giLAwN7OPWTiKu+ibM/K16N7W2QUp2KgPP9ZHcCUJbjmnXlA5DrUof7m1zTsp2CMPuH982WKLSKXBku0cVy8fNL6zqoDeomFPpuy81ilPT/c/6CCs+nszU/+muMehFbiPXzaLTz46xLySOt0yhX+QNDcyfLHLj2U4wJjAzIqxKX3pxVYdgfZ39ern2w3gIELjXZjwrdnlRCR51IbugHVFJ8MaQd+eWnsqMZo= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:55:51.2871 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7edcb55-e175-4c79-db7d-08d93176171f 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: AM5EUR03FT059.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6756 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: s8MTKMQR6dNA0fiIWluqzOshx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923755; bh=HYSaBTgyikHG15eiTCZx3Ln33CY22sFEjM8YP4GfQu4=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=i1ENYeLx9sNrjYKQSGWkICNjV9W3cgLmiXaWyIdpCkfCARNPlPEqVLXLCOPnh0ckMU2 WZm9z4aLUcNKwC6C1fO8/5JpkCdf9D6hM+iekfOJftnZlg5j12Geeeih9S+lpPVAcfV5i 8Fjw2Nuoozy4QI33DYDO9VUG8yjVlCo1CKQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Some field names in the IORT table parser were longer than the OUTPUT_FIELD_COLUMN_WIDTH plus indentation, resulting in loss of the output print alignment. Therefore, abbreviate the field names. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois Reviewed-by: Zhichao Gao --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 1= 3 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Iort= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortPa= rser.c index f7447947b2308d35d4d2890373778f0fd2f97f9e..fcecaff5134256497bda87241f3= 39076897c3ece 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c @@ -1,11 +1,14 @@ /** @file IORT table parser =20 - Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): - - IO Remapping Table, Platform Design Document, Revision D, March 2018 + - IO Remapping Table, Platform Design Document, Revision D, March 2018 + + @par Glossary: + - Ref - Reference **/ =20 #include @@ -144,15 +147,15 @@ STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] =3D= { {L"Span", 8, 24, L"0x%lx", NULL, NULL, NULL, NULL}, {L"Model", 4, 32, L"%d", NULL, NULL, NULL, NULL}, {L"Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL}, - {L"Reference to Global Interrupt Array", 4, 40, L"0x%x", NULL, NULL, NUL= L, + {L"Global Interrupt Array Ref", 4, 40, L"0x%x", NULL, NULL, NULL, NULL}, {L"Number of context interrupts", 4, 44, L"%d", NULL, (VOID**)&InterruptContextCount, NULL, NULL}, - {L"Reference to Context Interrupt Array", 4, 48, L"0x%x", NULL, + {L"Context Interrupt Array Ref", 4, 48, L"0x%x", NULL, (VOID**)&InterruptContextOffset, NULL, NULL}, {L"Number of PMU Interrupts", 4, 52, L"%d", NULL, (VOID**)&PmuInterruptCount, NULL, NULL}, - {L"Reference to PMU Interrupt Array", 4, 56, L"0x%x", NULL, + {L"PMU Interrupt Array Ref", 4, 56, L"0x%x", NULL, (VOID**)&PmuInterruptOffset, NULL, NULL}, =20 // Interrupt Array --=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 (#76655): https://edk2.groups.io/g/devel/message/76655 Mute This Topic: https://groups.io/mt/83600717/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- From nobody Mon May 6 08:05:14 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+76658+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 1623923765064774.5192349460284; Thu, 17 Jun 2021 02:56:05 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id B2GKYY1788612xp1UTpQsvxu; Thu, 17 Jun 2021 02:56:04 -0700 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.58]) by mx.groups.io with SMTP id smtpd.web08.5537.1623923758114873117 for ; Thu, 17 Jun 2021 02:55:58 -0700 X-Received: from AM6P193CA0109.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::14) by VI1PR08MB5552.eurprd08.prod.outlook.com (2603:10a6:803:ff::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Thu, 17 Jun 2021 09:55:54 +0000 X-Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::11) by AM6P193CA0109.outlook.office365.com (2603:10a6:209:85::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Thu, 17 Jun 2021 09:55:53 +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+76658+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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) 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:55:53 +0000 X-Received: ("Tessian outbound 9d3d496fabe8:v93"); Thu, 17 Jun 2021 09:55:53 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f64af449d231979f X-CR-MTA-TID: 64aa7808 X-Received: from c0cf15c0c5fb.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 37FC3DA3-BD8E-4487-A123-E9EAA871C86F.1; Thu, 17 Jun 2021 09:55:47 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c0cf15c0c5fb.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aU+8YGa8+wzsKUS0OJo9r7rmX6bv0y5qCyXJzsIBywbmgNZuTuhwrm/k3iBTonDStvXQNb+/I4Nyc9wjfY/8th9sG0L5tAyOGzIcmCpEjVcAlOmEKkIXsB6FJzNtmTvmAAjP4jZeFltIzb3KPVby78QO0yWoSV/vlg9eFTcSeRMese8W0xxQpDVVBjuj8phQaGviLzP+046hKj1tg7I6hBKcg0JY74Z5VOV1IYOOBLxa/VfdTqwqvc1ZACGTgL81CMKv+zq7BkEljRLVgGol/GhyiSkqhB7PJD4wViICTWxVtW4UhUf19a5eRjYzmLxK5mnCuTIlr8nh7mvo85blqg== 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=KiTB1vJEpb/QbW0Krm6hP7YAJDl1+TRvNvq76WgeVOQ=; b=EGwE00yjfiqpBhHs6eYkvGDpDpYF57DgbRbWpiJw/7mFbCR7xYpGiBwEVI2op5fiJ+Y/jHxiZkcgDtKkjA7rro9o6skUBW4KRE2QiBzsk0eiY4i/Y4AdII/F4kpHomwGklauR4YUxndNOKMRiGBxDz9nRpTh9UZoZTuF2gWd3SkMK5KLn1vLLULLlmv9Cf6Xb258ixzlR3ZmGNCu9RPlL200uHTGz0KTEmup9XxYO4AMSBrWKw4gDxu8AoJvpW1DhYdQ3TqW2rgOEea+sMogxJav9SMh99utbu9mHaAWugSttfHQ8/L20ExmSrZqIRIZeRcbZN6OCCb/k6da5DiuUw== 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 AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) by VI1PR08MB4608.eurprd08.prod.outlook.com (2603:10a6:803:c0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Thu, 17 Jun 2021 09:55:44 +0000 X-Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::d5) by AM6PR08CA0035.outlook.office365.com (2603:10a6:20b:c0::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Thu, 17 Jun 2021 09:55:44 +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 VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) 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:44 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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:41 +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:41 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v2 4/8] ShellPkg: Acpiview: IORT parser update for IORT Rev E.b spec Date: Thu, 17 Jun 2021 10:55:33 +0100 Message-ID: <20210617095538.93280-5-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: a39c53b2-5a07-4bec-8f17-08d93176187a X-MS-TrafficTypeDiagnostic: VI1PR08MB4608:|VI1PR08MB5552: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8273;OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: fGyqpK7HLqSD6sWDJzXDi+VrPailuRUT1zhoC3F6OqYezq4oni8ZxCZysnxid4VG8axzVA7bKeHOdNElzDKgUcafYkzLBWjXwibCnuU9RWOUR/XmEvVEJeFbDQYKCWvEWFSXa3rI5+T+uqbk4QEgrSgxpGmYl9rf41Lw5+6R8TInxw4sWExqDVwf9LHumsX88R5IbRrn03NuXGZgYEBDszBI105LvTnCQ8vy58gJpkb0+dBTiMeaO6MWuio/3OhXSSXximvB34hyoCZzAb1ca/+w9f/2ExudGnKM7Fx9+pi1OomLMqD7ygQ8YGs38n/3nlwM6N+o5xJwPeTTt6nJ/n1Bo136hM/8wHg2hQerJ50h/7HU/P6O9Rs2JH6xw+X9eEvqftHR/8Rzudsow3vmUz2dpAE+0z2zRPv3N2qdRPKL132/QiTVqtfqlq5hsu47vDF35ji+hxHQgowD2tokv+j/XSTKe+v0EmtICKd/2sr1d9UYcKJwfpgO5X6ZkClEIIykdC9ra1Rpu0vfJeykXmjOpComtvRD+e5I0cTjMYYUW4Og7afrowNnIzRDoA9F5Y3mIES8cfLUcbhFGCeDdybXcm/S1/JgqU2OsifOF1YVQsMD9P4jMeVyJ8nkLDih++YqRbZGXOK3zNuMzrKH4oSBYGp7CzMsa30UQ9oxcz95c+DhMi5fJURJL4+z9/Xt9odNqbo+rSTWYLanABeGnxN84WCgq2wvbA4sLH5doZOEmlw7JjGEIKSEy4JJxqGuwlz+1td1+qPq1LrAL2vFtjZi6ZQhdDF4LiIZP2NCimMBsOFOj/7J321TVfisRBe0cIlH0FUUaI64xbqGeJRVqza5H9jjmAB05K7hWMzjacA= 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)(346002)(376002)(136003)(39850400004)(46966006)(36840700001)(356005)(6666004)(478600001)(70206006)(7696005)(2616005)(2906002)(81166007)(8936002)(82310400003)(70586007)(5660300002)(336012)(47076005)(83380400001)(82740400003)(86362001)(1076003)(186003)(6916009)(26005)(54906003)(8676002)(44832011)(426003)(4326008)(36860700001)(36756003)(15650500001)(316002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4608 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 0b828a4c-d58d-4f55-82cd-08d9317612f6 X-Microsoft-Antispam-Message-Info: HDP8hr0yREPupemyYdLjLpD8k8hW7lma1hUrKUHfAtT6E2mlpCUEUf7RoZ2RwqM7tzU5UqNu/YJsWyU4xhqS8DQB8AJOC9lMg1/3zgVtBixjDbIehR9S/TTBlZkxb/6cVpd1PFkEoDm9C8A3gV/OK8JAksiYipsn4lfbv7A3ziLQvwtCh5RuN7ckIqv5IIsCcrD2BmKysFf8oMbvwwPXD0jRFFtKlG12cQnACWu8ZAQZ/jU0V5B4imjdGk7IpSusgeA9eI0O+i/sLLK9RZzOXPAKPfWFdmjWle3opVJbC3eadNG6mnTMmTvJ0FuQVE8S3i1V/8V0K0xiEShQDicFUl7aRFU4FUPi7kWeruXF40SMMz8Fcqq1lAOt/NIoPZIh6nBYIN+YZkfmv7eEohKDlHYm9UjEZ5yqvAwuvb92sNtYE1pfZ9sua2YT3/6DS9NamOeklMoUAfyPC1oZunJ2gOmWtK6TqxQRxHcEa2cdN79lcXdZUkErx2WkZ0iT16nG4rE/SNfwYV8ZSMiSk/0480dmStxA/G1pXoDcoAEabinpjXK05sdUssVUJcC/8jyE+dHY6IKzDLG/j5X9dEQvBUmwZiiksZn8H/qqQcyKVY7qKZCIwUUzeZtg9/eiC8nGwHtIIpFpjIAmRJQj7b3fA2MX7WCzvdBdAR4ScU7NDQJYCDddCRYklo03MdawDYjGUTCg6WtnFRjcbxOaYq5p3iu5K5K7Sr+ZJQMiHgxFCbYRESZkGhYVjkZN8GEEZ/c9PC50y27OTwEHYmR6lyFuqSyK+jyiKnIBcae3pVDAPYgn27IFUhVkkRF/lhNm9Lbh X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:55:53.5533 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a39c53b2-5a07-4bec-8f17-08d93176187a 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: AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB5552 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: Osu6NXXLM5YA9BMYYnhBtC2Ux1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923764; bh=N2XTKn7m74yJmsihZxSYziaOycSLATfQzeLcE7vJzMU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=SoqKyo8jSJ0oGhSS2iv/Wfp4FjUtre4EPiXtrXr80qvQYLhE/ZTURekiV2KlsmSbQrF +/UWyu7NLM6QxbLNKaBlO6fn1vrzv7C17JJBwoelcjmXlqu8k+rFK9AjF2cCa97X58+oq TcepKMMGUwRyROoRnozu3AIanWGaHf18jGs= 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 parser to: - parse the Identifier field. - parse Reserved Memory Range node. - parse Memory Range Descriptors. - add validations to check that the physical range base and size of the Memory Range Descriptor is 64KB aligned. - add validation to check that the ID mapping count is set to 1. Signed-off-by: Sami Mujawar Reviewed-by: Zhichao Gao --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c | 1= 96 +++++++++++++++++++- 1 file changed, 191 insertions(+), 5 deletions(-) diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/Iort= Parser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortPa= rser.c index fcecaff5134256497bda87241f339076897c3ece..1507dd3a4d79e61024b0c5526e2= 1ffdacb782251 100644 --- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c +++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c @@ -5,10 +5,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): - - IO Remapping Table, Platform Design Document, Revision D, March 2018 + - IO Remapping Table, Platform Design Document, Revision E.b, Feb 2021 + (https://developer.arm.com/documentation/den0049/) =20 @par Glossary: - Ref - Reference + - Desc - Descriptor **/ =20 #include @@ -36,6 +38,9 @@ STATIC CONST UINT32* PmuInterruptOffset; =20 STATIC CONST UINT32* ItsCount; =20 +STATIC CONST UINT32* RmrMemDescCount; +STATIC CONST UINT32* RmrMemDescOffset; + /** This function validates the ID Mapping array count for the ITS node. =20 @@ -100,6 +105,72 @@ ValidateItsIdArrayReference ( } } =20 +/** + This function validates that the address or length is 64K aligned. + + @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 +Validate64KAlignment ( + IN UINT8* Ptr, + IN VOID* Context + ) +{ + UINT64 Address; + Address =3D *(UINT64*)Ptr; + if ((Address & (SIZE_64KB - 1)) !=3D 0) { + IncrementErrorCount (); + Print (L"\nERROR: Value must be 64K aligned."); + } +} + +/** + This function validates that the RMR memory range descriptor count. + + @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 +ValidateRmrMemDescCount ( + IN UINT8* Ptr, + IN VOID* Context + ) +{ + if (*(UINT32*)Ptr =3D=3D 0) { + IncrementErrorCount (); + Print (L"\nERROR: Memory Range Descriptor count must be >=3D1."); + } +} + +/** + This function validates the ID Mapping array count for the Reserved + Memory Range (RMR) node. + + @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 +ValidateRmrIdMappingCount ( + IN UINT8* Ptr, + IN VOID* Context + ) +{ + if (*(UINT32*)Ptr !=3D 1) { + IncrementErrorCount (); + Print (L"\nERROR: IORT ID Mapping count must be set to 1."); + } +} + /** Helper Macro for populating the IORT Node header in the ACPI_PARSER arra= y. =20 @@ -113,7 +184,7 @@ ValidateItsIdArrayReference ( { L"Type", 1, 0, L"%d", NULL, (VOID**)&IortNodeType, NULL, NULL }, \ { L"Length", 2, 1, L"%d", NULL, (VOID**)&IortNodeLength, NULL, NULL }, \ { L"Revision", 1, 3, L"%d", NULL, NULL, NULL, NULL }, \ - { L"Reserved", 4, 4, L"0x%x", NULL, NULL, NULL, NULL }, \ + { L"Identifier", 4, 4, L"0x%x", NULL, NULL, NULL, NULL }, \ { L"Number of ID mappings", 4, 8, L"%d", NULL, \ (VOID**)&IortIdMappingCount, ValidateIdMappingCount, NULL }, \ { L"Reference to ID Array", 4, 12, L"0x%x", NULL, \ @@ -253,6 +324,29 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] =3D { {L"Page 1 Base Address", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL} }; =20 +/** + An ACPI_PARSER array describing the IORT RMR node. +**/ +STATIC CONST ACPI_PARSER IortNodeRmrParser[] =3D { + PARSE_IORT_NODE_HEADER (ValidateRmrIdMappingCount, NULL), + {L"Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}, + {L"Memory Range Desc count", 4, 20, L"%d", NULL, + (VOID**)&RmrMemDescCount, ValidateRmrMemDescCount, NULL}, + {L"Memory Range Desc Ref", 4, 24, L"0x%x", NULL, + (VOID**)&RmrMemDescOffset, NULL, NULL} +}; + +/** + An ACPI_PARSER array describing the IORT RMR Memory Range Descriptor. +**/ +STATIC CONST ACPI_PARSER IortNodeRmrMemRangeDescParser[] =3D { + {L"Physical Range offset", 8, 0, L"0x%lx", NULL, NULL, Validate64KAlignm= ent, + NULL}, + {L"Physical Range length", 8, 8, L"0x%lx", NULL, NULL, Validate64KAlignm= ent, + NULL}, + {L"Reserved", 4, 16, L"0x%x", NULL, NULL, NULL, NULL} +}; + /** This function parses the IORT Node Id Mapping array. =20 @@ -601,9 +695,93 @@ DumpIortNodePmcg ( ); } =20 +/** + This function parses the IORT RMR Node Memory Range Descriptor array. + + @param [in] Ptr Pointer to the start of the Memory Range Descrip= tor + array. + @param [in] Length Length of the buffer. + @param [in] DescCount Memory Range Descriptor count. +**/ +STATIC +VOID +DumpIortNodeRmrMemRangeDesc ( + IN UINT8* Ptr, + IN UINT32 Length, + IN UINT32 DescCount + ) +{ + UINT32 Index; + UINT32 Offset; + CHAR8 Buffer[40]; // Used for AsciiName param of ParseAcpi + + Index =3D 0; + Offset =3D 0; + + while ((Index < DescCount) && + (Offset < Length)) { + AsciiSPrint ( + Buffer, + sizeof (Buffer), + "Mem range Descriptor [%d]", + Index + ); + Offset +=3D ParseAcpi ( + TRUE, + 4, + Buffer, + Ptr + Offset, + Length - Offset, + PARSER_PARAMS (IortNodeRmrMemRangeDescParser) + ); + Index++; + } +} + +/** + This function parses the IORT RMR node. + + @param [in] Ptr Pointer to the start of the buffer. + @param [in] Length Length of the buffer. + @param [in] MappingCount The ID Mapping count. + @param [in] MappingOffset The offset of the ID Mapping array + from the start of the IORT table. +**/ +STATIC +VOID +DumpIortNodeRmr ( + IN UINT8* Ptr, + IN UINT16 Length, + IN UINT32 MappingCount, + IN UINT32 MappingOffset +) +{ + ParseAcpi ( + TRUE, + 2, + "RMR Node", + Ptr, + Length, + PARSER_PARAMS (IortNodeRmrParser) + ); + + DumpIortNodeIdMappings ( + Ptr + MappingOffset, + Length - MappingOffset, + MappingCount + ); + + DumpIortNodeRmrMemRangeDesc ( + Ptr + (*RmrMemDescOffset), + Length - (*RmrMemDescOffset), + *RmrMemDescCount + ); +} + /** This function parses the ACPI IORT table. - When trace is enabled this function parses the IORT table and traces the= ACPI fields. + When trace is enabled this function parses the IORT table and traces the= ACPI + fields. =20 This function also parses the following nodes: - ITS Group @@ -612,6 +790,7 @@ DumpIortNodePmcg ( - SMMUv1/2 - SMMUv3 - PMCG + - RMR =20 This function also performs validation of the ACPI table fields. =20 @@ -753,9 +932,16 @@ ParseAcpiIort ( *IortNodeLength, *IortIdMappingCount, *IortIdMappingOffset - ); + ); + break; + case EFI_ACPI_IORT_TYPE_RMR: + DumpIortNodeRmr ( + NodePtr, + *IortNodeLength, + *IortIdMappingCount, + *IortIdMappingOffset + ); break; - default: IncrementErrorCount (); Print (L"ERROR: Unsupported IORT Node type =3D %d\n", *IortNodeTyp= e); --=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 (#76658): https://edk2.groups.io/g/devel/message/76658 Mute This Topic: https://groups.io/mt/83600720/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- From nobody Mon May 6 08:05:14 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+76657+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 1623923764480223.62909445831724; Thu, 17 Jun 2021 02:56:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BJGwYY1788612xpr3SbpHE5a; Thu, 17 Jun 2021 02:55:59 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.57]) by mx.groups.io with SMTP id smtpd.web12.5528.1623923758154249150 for ; Thu, 17 Jun 2021 02:55:58 -0700 X-Received: from AM6P194CA0068.EURP194.PROD.OUTLOOK.COM (2603:10a6:209:84::45) by AM5PR0801MB2116.eurprd08.prod.outlook.com (2603:10a6:203:31::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19; Thu, 17 Jun 2021 09:55:55 +0000 X-Received: from AM5EUR03FT004.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:84:cafe::a0) by AM6P194CA0068.outlook.office365.com (2603:10a6:209:84::45) 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:55:55 +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+76657+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 AM5EUR03FT004.mail.protection.outlook.com (10.152.16.163) 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:55:55 +0000 X-Received: ("Tessian outbound a65d687b17e4:v93"); Thu, 17 Jun 2021 09:55:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 15944fd2211b4291 X-CR-MTA-TID: 64aa7808 X-Received: from 6a85e6621913.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 8493A664-9371-43FE-9765-11ABAAB1195F.1; Thu, 17 Jun 2021 09:55:48 +0000 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6a85e6621913.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cKdmqedsGRb4If5VALbDFpl5FBjHemekYFVzJef9n9P5gA2k/YyPZNrSc87WWbkvWqRaHxKCcrtR0oaGsyP2Kt9XWW4jpe6QAUl12vmzu9WrEt4b76SVlKMTlbHaoDybf3FAqnMG8S75p5I9vk7Mt7m+pIwOBwdYZaqd8iqe7284pzsxjiFOszTAJp8Uvze+QSEL9N03XSkhaedQsHz/9Jtr/6XOp4/hl/dx+K/1iq6w6BQISPQsGIJcJpdtzFN80If4KuUjnVNLzc4qzRTHKUy8AM1aKii2HrxVlLGf/1sPWMY+MufBgzDK13VosqGAwEVJUM98LpwA3VUU5Qkppw== 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=I3ArkeyI0xG7GpdK2wftSsZvOYcRlbctWrZ2sr3Lefc=; b=g0bpmy+krNJ1fHJKZX8qam8S8uON7cL0AdmM663GxObEEAM75iYUXmmlwZAeZRCNq1RsuBsRKGlCpH/zYGngtEbZ6LL9/THd47V2gaqCkeH8GjU51EydpdPQrXTSFh2ki6aFkhMIKVFLQVZMUcd9t1ES/8T/Tc5he/RkL6jE/mkfwOYrPId9O8MG8Yf9FZsr1vWRJQ5jUpmhDEB7OZeER1WmIStYnfDYZGEA05oIIv3qlUkN582brr+YWDQb/oGAGYogeNXW0cmI9jHpEowZsfhNssQvZ7tGzBNJPeCHDEI/PG3ceFMRMjzeWJejjpeI9w0dLudzyRLiGhAf8/y8CQ== 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 AM6PR08CA0046.eurprd08.prod.outlook.com (2603:10a6:20b:c0::34) by AM6PR08MB3720.eurprd08.prod.outlook.com (2603:10a6:20b:8f::29) 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:46 +0000 X-Received: from VE1EUR03FT055.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:c0:cafe::2e) by AM6PR08CA0046.outlook.office365.com (2603:10a6:20b:c0::34) 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:55:46 +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 VE1EUR03FT055.mail.protection.outlook.com (10.152.19.158) 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:46 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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:43 +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:42 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v2 5/8] DynamicTablesPkg: IORT set reference to Id array only if present Date: Thu, 17 Jun 2021 10:55:34 +0100 Message-ID: <20210617095538.93280-6-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: c39724b4-bdc1-4750-ec37-08d931761967 X-MS-TrafficTypeDiagnostic: AM6PR08MB3720:|AM5PR0801MB2116: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:7691;OLM:7691; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: g+BlhEWs9/Ve0+CYylCDcp0uRlQ+kd4G+mlM0y7EK0hn6DbEo7uTvwbDzZz4nulA4Vctv3lOkyC7xMERPGUrOdrbq3MXtrsxd80bAWjRxOxLqhxKcXd7tlAwUBTixqYDlfjdLkewIoF7KI6wdd4ZpsMhS3qxR2Hli/VQTt02lTbljbwBZpy4tR0oQYHwLdx5eK1icZYhaiVoBwbnW4BbBl2ACc7FNgrhe7fvVlz7irqyPLN7jpV1q3WiyqA2PKyIPRkNA2lFjL5oQfMgjUELkqCw1MhAKQOqyszlO0zMOwcZbqpUNW+5soJv1JTXONSnCy6V2Pk2vtHUHAKAxJfojg2yttCsc06YwhaWqRgWNIGUSMUx1UuAujL0Fk8LitzVm6QoAoE1kx8wg94wwrqwyQZXwa/EytbUEw25evws2vyz4XB+tbTRwx09VChe/gjZWK0yTVBJ9LoFRY6TK2gmXpaAwdekTdCJ13PP0nOhEuNq5KTPvjTLKVXzhnUVYg9NvNfL3iyCz/j5+LMeocqf42rsIAJD8OdtI2zAeRiYSn7+iEhUESEuNQzeCHcauMBMsO5a2ykTH1Ub/f6gmnyNv7TSq3bPXP/81Y5NxkHfT5iNWHSCNYmOvvSdPr/74D+6vdw7WYgiI8TPNJdLV+AfnzIH+1TLT+g5zzzMt1anNuElIBxXUBIBe2VbTjC7l/Gi 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)(346002)(136003)(376002)(39860400002)(46966006)(36840700001)(47076005)(336012)(8936002)(4326008)(5660300002)(26005)(2616005)(2906002)(54906003)(186003)(6916009)(478600001)(316002)(36860700001)(81166007)(82740400003)(44832011)(426003)(356005)(70206006)(86362001)(7696005)(83380400001)(70586007)(6666004)(36756003)(82310400003)(8676002)(1076003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3720 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: b1c372ca-df5f-4bf1-aaee-08d93176144d X-Microsoft-Antispam-Message-Info: 3j4oAuDX5MzmCXpIAdmqYMmDszXGkQmbRULOr5BWqhkxYdeRQ02uV98xjQC25Oq6pFE6RbyGse+6bbh9OMHvyc7CD7bJau60yHtLV1CR6B299EMWcgP1d1VPINh60x/XzuSWl2QBhc+/I0u3CDNCkd+BkhRm9EFQP6CNiuB0KymfItsi0O3/N14WmgaS7/a90PavGwSgxSqtPsTJl4Kb1Rn8ROwIMvOe+v7drN7aW/zdQBeOaKRKjhYcvadU8L3gS5vEWe68u2gsBPWvtmlF1zAgI1hCBj0+xMAbX2RWbnUHdAX9YDKG9Q8VN15AI5a4ZUJo/b7t0usHRSv8o7VM7cabxsaHpzanKLmwfEGg1nY4183eahO9A8k7NrGvXpbaYzcQb9+pRUVE0XaQlFxjv1MtI3ZQAOyZN21l9Tsd7Yrw7NukZY1rutzFqqfD48tjGfgPC2o27NJoPGTkWNCHxrb9dERLih2k29Q6+Atlnj0oQM8DQMVUJNV0bn9F947oBwOZM0emOZoPKlRofEbMA3lcGQhSy2JO+uPPfyPHK398hWQ6CQVxrgEJ7mQtRNkQOuRcSgPgJ1/i9xDCv0fkSJl/KloMqs9UQYvMkwMYbxeavbnYajpmLzlcK//pVPn885oINcDGsORy+MYDHTSWOA0W6zmEqBukp4BlpdZoDuA= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:55:55.0939 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c39724b4-bdc1-4750-ec37-08d931761967 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: AM5EUR03FT004.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB2116 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: gVeqndJxCHc2FFnXQ0tHUWMgx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923759; bh=Ji92pojRD589upD2+pumhWDzltlbRW5QC3raQmrBga0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=JXnBU2Wzn1a2CUcd3LjeNC0vpe5RVFxxXSmxYctzLSSBN67su66ACgDGD/U682D6Ckm zPx8BCVRe0R8JQ1Ks9JpiyktosH/eAc5TsswM0Or/SlN0YzO4RfMQKBBHPIOBDDlbMYtR 7tONRyiqH8av1R0Ut7Uqc6wnsLRFYr+/nEQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IORT table generator is setting up a reference to ID array for nodes even when the ID Mapping count is zero. This is not an issue as an OS would only access the ID Reference if the ID mapping count is not zero. However, it would be good to set the reference to ID array to zero when the ID Mapping count is zero rather than populating it with an incorrect value. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 29 ++++= +++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index 349caa8006bc34ca789cb3e321a0f87c0cd4ff0d..bdf839eab25e2b84b40c50da38f= 2bf961cdc5f42 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -1,7 +1,7 @@ /** @file IORT Table Generator =20 - Copyright (c) 2017 - 2020, ARM Limited. All rights reserved. + Copyright (c) 2017 - 2021, Arm Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): @@ -870,9 +870,9 @@ AddNamedComponentNodes ( NcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; =20 ObjectNameLength =3D AsciiStrLen (NodeList->ObjectName) + 1; - NcNode->Node.IdReference =3D - (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + - (ALIGN_VALUE (ObjectNameLength, 4))); + NcNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : ((UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + + (ALIGN_VALUE (ObjectNameLength, 4)))); =20 // Named Component specific data NcNode->Flags =3D NodeList->Flags; @@ -990,7 +990,8 @@ AddRootComplexNodes ( RcNode->Node.Revision =3D 1; RcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; - RcNode->Node.IdReference =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE= ); + RcNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE); =20 // Root Complex specific data RcNode->CacheCoherent =3D NodeList->CacheCoherent; @@ -1160,11 +1161,12 @@ AddSmmuV1V2Nodes ( SmmuNode->Node.Revision =3D 0; SmmuNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuNode->Node.NumIdMappings =3D NodeList->IdMappingCount; - SmmuNode->Node.IdReference =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_= NODE) + - (NodeList->ContextInterruptCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)) + - (NodeList->PmuInterruptCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)); + SmmuNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : (sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) + + (NodeList->ContextInterruptCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)) + + (NodeList->PmuInterruptCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT))); =20 // SMMU v1/v2 specific data SmmuNode->Base =3D NodeList->BaseAddress; @@ -1319,8 +1321,8 @@ AddSmmuV3Nodes ( SmmuV3Node->Node.Revision =3D 2; SmmuV3Node->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings =3D NodeList->IdMappingCount; - SmmuV3Node->Node.IdReference =3D - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); + SmmuV3Node->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); =20 // SMMUv3 specific data SmmuV3Node->Base =3D NodeList->BaseAddress; @@ -1438,7 +1440,8 @@ AddPmcgNodes ( PmcgNode->Node.Revision =3D 1; PmcgNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings =3D NodeList->IdMappingCount; - PmcgNode->Node.IdReference =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_= NODE); + PmcgNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE); =20 // PMCG specific data PmcgNode->Base =3D NodeList->BaseAddress; --=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 (#76657): https://edk2.groups.io/g/devel/message/76657 Mute This Topic: https://groups.io/mt/83600719/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- From nobody Mon May 6 08:05:14 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+76662+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 1623923793275117.93253116340918; Thu, 17 Jun 2021 02:56:33 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id YqztYY1788612xoQmhVgSLmL; Thu, 17 Jun 2021 02:56:32 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.65]) by mx.groups.io with SMTP id smtpd.web08.5545.1623923786910128744 for ; Thu, 17 Jun 2021 02:56:27 -0700 X-Received: from AM6P191CA0010.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::23) by HE1PR0802MB2268.eurprd08.prod.outlook.com (2603:10a6:3:c4::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:56:19 +0000 X-Received: from AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8b:cafe::a7) by AM6P191CA0010.outlook.office365.com (2603:10a6:209:8b::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Thu, 17 Jun 2021 09:56:18 +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+76662+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 AM5EUR03FT007.mail.protection.outlook.com (10.152.16.145) 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:18 +0000 X-Received: ("Tessian outbound d8701fbbf774:v93"); Thu, 17 Jun 2021 09:56:18 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: a183082c5ad24878 X-CR-MTA-TID: 64aa7808 X-Received: from 49929eafc69a.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0F4B32C2-BD6B-42F3-BDAD-BC8070AFE973.1; Thu, 17 Jun 2021 09:56:11 +0000 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 49929eafc69a.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:56:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bkkec5h1HrI1+quPnvTiPEKEI8nCj1/NWROvRif8iqMpcB+N5rpCpKg1Nr2t065sh5iq47J9nxxl/aA1ytjEq7+ZZ0OTicqllZHBbBbj0wf1yEcb81iZDlIw3g9Uq+NgMx/dsV58A3iGCjGNoZ2ziwPKlhRD+fsc8nF/sJlxj9kCrFIhSU1gLx4e+GpkqA8AtgSuLcOnY3z15+MOCGgEme8j9aVumcMM2q4kf0jDJIX6XipgYmsCQTO0lTTKSGCLewfzUnecFsKe1eN5NKOYiRC6+Wy3ioTfGp33ox0REMuvqPycVH2gl2g5wN0l2H3eGBgH1DVEf8k+yYCHNJahRA== 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=OJ3cgcRSnkDkf2cIYYkkKe+E15IXX//RINYOuvYDmPw=; b=Jq+/6xpHxa6MUri+eUtNmi6NbzX6sQqEYB4rmAJggUUW/FP9dW8YvlBVx27cXf9eaIWCJaFmKnBHqxCk8rxuMdF2qJPowGtMSVejY9zlC4vV8wZayXZ/VgHJL9kUFtmsBG60WLapD9un2488rfnUHJKQaROeJPc8bEnUYbR0eKjylcwGTi7BC6Pc/hDqxdL6ZUrCznOt2pZBRpEP6+Q1jbfNEEAMyRMmj52fTKsc8NfCtLN4DjX/gQ2KpM+slaCng8W4bDTMTBgZsM0Avc87vFxTDYanMrygcbqlJbKZk2wmiXKpaluddWkvyA2+ekKyxQ+F3yQDGMe3JSRlGVjANQ== 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 AM5PR0601CA0035.eurprd06.prod.outlook.com (2603:10a6:203:68::21) by VI1PR0802MB2560.eurprd08.prod.outlook.com (2603:10a6:800:ad::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16; Thu, 17 Jun 2021 09:56:10 +0000 X-Received: from VE1EUR03FT038.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:68:cafe::1b) by AM5PR0601CA0035.outlook.office365.com (2603:10a6:203:68::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Thu, 17 Jun 2021 09:56:10 +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 VE1EUR03FT038.mail.protection.outlook.com (10.152.19.112) 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:56:10 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX03.Arm.com (10.251.24.31) 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:43 +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:43 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v2 6/8] DynamicTablesPkg: IORT set reference to interrupt array if present Date: Thu, 17 Jun 2021 10:55:35 +0100 Message-ID: <20210617095538.93280-7-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: 5b737163-5daa-4de7-1b4d-08d93176277e X-MS-TrafficTypeDiagnostic: VI1PR0802MB2560:|HE1PR0802MB2268: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:4502;OLM:4502; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: UfUpbPm5YacahAJ5j7kFDTrIZH39WdsALZjWIBSBxp3ucCI6doyhlvu2NaACJheMC6K0tDx70PM1RQtoc6TNXGzyqj6sojAdv/YI1uyeLqPT2cMIBE8tDDYYgArpC3PPkkDQY+hL2VfaM7Q21u4OjMUc0KYANSPz3oA/I3LH0dZdIvHz/1VRNdL+MZvkReK2oAMYhQLTJz90vj6tiJZ+rV0dI6Em5yNUxIVSiWy3Il8QpSHy8Wh8Us8DuAEG3xexFeGlLWdCwQ09VIlnZBtZgmmLw8G9SoPelEOU/9te/LbMD5jmsm/HnfYJjFc5uxU3JrpPwzwkk/QLzpwl95olAaMpjHC1DXv9bsn4yrkLoiKdQ3MirEboF70xuotQMSx65/YYgZ5d5J9V5MKmC6LMf29aWokMI35i8NRzvqnpR1ptweubif2SnzTXuP2V6oItA0sIqIs/zUwx1O96u+5FmWfUNvwtOGDH+79vYPDqQHv9NQO/ZhyRKE4hp0sOx2SV7aaLKS6tQ7ci7rP3uRFewc+QoAr+7WlVSSQhDukLAew1WymNEeXBxgqBUjFQh+Wqb2Ow/YhPItFbon6pgiCiFwfgBp6xz+Jq5UWt51n0+Ttv/8U0ueAadKKD4jecuJz/1HCYUDyoUqNoCeJZ9RUMGmPEThvvxSyN+0O7ighMaDB7pwOtDmq+gQIw+pFEVenL 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)(376002)(39850400004)(346002)(396003)(136003)(36840700001)(46966006)(86362001)(8676002)(356005)(26005)(7696005)(5660300002)(81166007)(6666004)(8936002)(186003)(82310400003)(47076005)(2906002)(83380400001)(36756003)(316002)(478600001)(426003)(1076003)(54906003)(44832011)(4326008)(36860700001)(2616005)(6916009)(70586007)(336012)(70206006)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0802MB2560 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 58264900-78c5-4bae-081b-08d931762254 X-Microsoft-Antispam-Message-Info: xqdR8rjAzCxAIDy7xPW1Qrj/7rq9WrJBqfy0wDFJCSix52jnSLcoyHnPLPyH+blZoeRT8FDqY+l2iFUaNjTzK6nw+e9plZgnl8KbVpbS4oA2Ass7oupPyYyzoVX+AYO0UdsTDJ6OUTW2lNYNilt9nWaEELZctJhGTn+sQoxxGXgMAICH/Qvvhx/SI9KbqNokA7icQZIVu7MjVw/evIfHTunKiTxbtQ13WnMudu09/XGTqPr63oN9H135p3VhlcQT6tFGV9kpLohwnLSMH6We0P8Ed8xVpmmJu1ToEwtIee72++LA2xEHlEOiPaKik3CC0dSWu/oBiCMWN5Gvjx40Pfv7LDgsSFvZZxaZdL1ZPGE/1V2fYNtxUkmNljf9mK/Aosd39DuJk5+9nD8EfkV5cql2raHiVs/3edYdqS5zalNw5i0e4iTMQKsCsdL8T3TI2K/8JWoHc0ALzlj41oommMFut3r1nwM7/4y/qbVDdKLUdkoT9igZvt585Fu5uO/MmpDy0rDHnXwbKX9NV6IQd+GeD1l0ORlM61ePFnzRggL8fml9cc0qqh+MLKb31GzIe+ip2I2GGtDoijlOPzhBP2qOQ2vGIUofESviIBEx0LL+zjcdkBOmneUI6Nc+R1RqMCVrNI/FKCBkdncPV8QI7Q== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:56:18.7543 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5b737163-5daa-4de7-1b4d-08d93176277e 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: AM5EUR03FT007.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2268 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: ePIGBo8OLOTEhY5H4N75O1Etx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923792; bh=Mk/oCsldSlTaw+PHwgiXCaARpWRie4SMzsn8iqcHUs0=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=elNh+Nvk7VzOuQP1tKkkDylX/ZuG0LfI7j53m3DhG5cKn7UT3MNNemFlNyft1dI2+ju 9pYGvF/upf2zcDXCfsRD+KmGT0Mn9VVFOrHyp4oiPMU/z3DNXvfZBuOZFMnpWz3/PKKNw lp8UnFXytFPhKMP/3BhUPLN3Cwv0Hk4rlVs= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The IORT generator is populating the reference field for Context and PMU interrupts even if their count is zero. Update the IORT generator to set the references only if the interrupt count is not 0. Also add checks to ensure a valid reference token has been provided. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 82 ++++= +++++++++------- 1 file changed, 55 insertions(+), 27 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index bdf839eab25e2b84b40c50da38f2bf961cdc5f42..9ccf72594db378878d4e3abbafe= 98e749d9963da 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -1136,6 +1136,7 @@ AddSmmuV1V2Nodes ( EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT * ContextInterruptArray; EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT * PmuInterruptArray; UINT64 NodeLength; + UINT32 Offset; =20 ASSERT (Iort !=3D NULL); =20 @@ -1178,47 +1179,74 @@ AddSmmuV1V2Nodes ( SmmuNode->GlobalInterruptArrayRef =3D OFFSET_OF (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE, SMMU_NSgIrpt); =20 + Offset =3D sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE); // Context Interrupt SmmuNode->NumContextInterrupts =3D NodeList->ContextInterruptCount; - SmmuNode->ContextInterruptArrayRef =3D - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE); - ContextInterruptArray =3D - (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT*)((UINT8*)SmmuNode + - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE)); + if (NodeList->ContextInterruptCount !=3D 0) { + SmmuNode->ContextInterruptArrayRef =3D Offset; + ContextInterruptArray =3D + (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT*)((UINT8*)SmmuNode + Offset); + Offset +=3D (NodeList->ContextInterruptCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)); + } =20 // PMU Interrupt SmmuNode->NumPmuInterrupts =3D NodeList->PmuInterruptCount; - SmmuNode->PmuInterruptArrayRef =3D SmmuNode->ContextInterruptArrayRef + - (NodeList->ContextInterruptCount * - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT)); - PmuInterruptArray =3D - (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT*)((UINT8*)SmmuNode + - SmmuNode->PmuInterruptArrayRef); + if (NodeList->PmuInterruptCount !=3D 0) { + SmmuNode->PmuInterruptArrayRef =3D Offset; + PmuInterruptArray =3D + (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT*)((UINT8*)SmmuNode + Offset); + } =20 SmmuNode->SMMU_NSgIrpt =3D NodeList->SMMU_NSgIrpt; SmmuNode->SMMU_NSgIrptFlags =3D NodeList->SMMU_NSgIrptFlags; SmmuNode->SMMU_NSgCfgIrpt =3D NodeList->SMMU_NSgCfgIrpt; SmmuNode->SMMU_NSgCfgIrptFlags =3D NodeList->SMMU_NSgCfgIrptFlags; =20 - // Add Context Interrupt Array - Status =3D AddSmmuInterruptArray ( - CfgMgrProtocol, - ContextInterruptArray, - SmmuNode->NumContextInterrupts, - NodeList->ContextInterruptToken - ); - if (EFI_ERROR (Status)) { - DEBUG (( - DEBUG_ERROR, - "ERROR: IORT: Failed to Context Interrupt Array. Status =3D %r\n", - Status - )); - return Status; + if (NodeList->ContextInterruptCount !=3D 0) { + if (NodeList->ContextInterruptToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Context Interrupt token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->ContextInterruptToken, + Status + )); + return Status; + } + + // Add Context Interrupt Array + Status =3D AddSmmuInterruptArray ( + CfgMgrProtocol, + ContextInterruptArray, + SmmuNode->NumContextInterrupts, + NodeList->ContextInterruptToken + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to Context Interrupt Array. Status =3D %r\n= ", + Status + )); + return Status; + } } =20 // Add PMU Interrupt Array - if ((SmmuNode->NumPmuInterrupts > 0) && - (NodeList->PmuInterruptToken !=3D CM_NULL_TOKEN)) { + if (SmmuNode->NumPmuInterrupts !=3D 0) { + if (NodeList->PmuInterruptToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid PMU Interrupt token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->PmuInterruptToken, + Status + )); + return Status; + } + Status =3D AddSmmuInterruptArray ( CfgMgrProtocol, PmuInterruptArray, --=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 (#76662): https://edk2.groups.io/g/devel/message/76662 Mute This Topic: https://groups.io/mt/83600728/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- From nobody Mon May 6 08:05:14 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+76659+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 1623923773706115.79508114461339; Thu, 17 Jun 2021 02:56:13 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3OMVYY1788612xjdhPffPkik; 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.87]) by mx.groups.io with SMTP id smtpd.web10.5649.1623923767286982620 for ; Thu, 17 Jun 2021 02:56:07 -0700 X-Received: from AM6P193CA0082.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:88::23) by DB8PR08MB5052.eurprd08.prod.outlook.com (2603:10a6:10:e8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15; Thu, 17 Jun 2021 09:56:01 +0000 X-Received: from VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:88:cafe::38) by AM6P193CA0082.outlook.office365.com (2603:10a6:209:88::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Thu, 17 Jun 2021 09:56:01 +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+76659+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 VE1EUR03FT039.mail.protection.outlook.com (10.152.19.196) 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:00 +0000 X-Received: ("Tessian outbound d8701fbbf774:v93"); Thu, 17 Jun 2021 09:56:00 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 1de7b9ccd148266d X-CR-MTA-TID: 64aa7808 X-Received: from d247b08d9d20.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 20368E46-D213-41D3-88CE-EAF48FD17206.1; Thu, 17 Jun 2021 09:55:53 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d247b08d9d20.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:55:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lkPEMfqqfF+GVr4cND62M1Bt1LBuj2yHXp/aCJ8L4XJ/VjY7xKUiO9+uKnv7PEipAz0rHULz1hrRfErw+I/JBFha/pk2eIyNPIDUhoR5nbIURZECAk2xGfQ6c661139yXYAXFMJH8MNscaxY57FNwg2r3+YgfsBN6NWGUeLWMUFh1CXPIPJYVA0zMU1aXPwXAeC+fq9XsmQlWozaxIiLEK0mYIto4p6Vd8jCAT33xoaXw17phZLWUUWzIM9NNUJgU83AH9DersHPKH4O9JgFO3HYYIgqBu9Plw66WXcQgQadUF0LmTiCDs067sS5h0y7DYrhwOQPMAWf15vbK7PO6g== 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=3KWqEbqC/dYd8VSGBIpynCGhD+18/G0/gIkiGaeDh0Y=; b=OcprdyHXgATp5RLWI+b8houlEMXiWD68+sKdUBnLdo2YPweeSORyCMZwXbUnIQg2WUy4AHti5FPcFBO9cJTCuAPhe6Rxj/iYXT7o3JyNaJYZdwRJ1csC0OigVZFGH9K5Y03SdOaaGuP5z3OUfoJ4Xi2qfpp2cY3mAa4LTOj+anrScxcY9exZJrXZhIm24QCvpUwDP+TG36vYY481qa1GJeAXkUgmiFREvqkutvZl5sgyB3Fla1GeRkSG9Ix4YoozRC4XzmqsLhbLq2PFpTOKDxXePfct6UnzvMZFOW5KLOaoNPGN0g7N7HUm+JYNMXt+Mf07tUgStFBj0TWfB27c8w== 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 AM0PR08MB3857.eurprd08.prod.outlook.com (2603:10a6:208:104::15) 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:55:51 +0000 X-Received: from AM5EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::ef) 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:51 +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:51 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.14; Thu, 17 Jun 2021 09:55:45 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.14; Thu, 17 Jun 2021 09:55:44 +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:44 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v2 7/8] DynamicTablesPkg: Update ArmNameSpaceObjects for IORT Rev E.b Date: Thu, 17 Jun 2021 10:55:36 +0100 Message-ID: <20210617095538.93280-8-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: ff200aac-61c3-425c-2f9a-08d931761cca X-MS-TrafficTypeDiagnostic: AM0PR08MB3857:|DB8PR08MB5052: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 54wLry9nZVvLKVALwAmMt/QD/TdlYieE/FQVIISrxM9VWUfIq4xhGgEqxmoVuVk7G4Am6x6hETlrrECljGu0XfUIz0uEG6/EwCLTayi9OBI4TWxYu25kCl0sC6HC8CL7iPcOrChu5InBiRa5Ib+HKorQvNc+6PLBdbbsspHjd5co1tyQ9mowKZA0PkpOrWO5jbJpz+0QjoWQguaH5bUkNa/S2oNAnqsnLTYHuVJ1YAWAXAiKrCLz8FPW036CTVxLkMjiZcu0Q2p3iBGsQfjfzdleDbuqKujHqoqE+E/Jh7vFhm4aTlpN8YGk5N0J8fk4j5ydhVMLwMAiE/qhEGh6u98Nm0JLVY60Eil8knxFzHX3PkPjeSL6UXyYKAE2ZpYq/37wkpfzuKb1EI1p6No2DFpad9CkbXzrv8rU/vxiYOS+kcUMZ9BQ8vWUjbMniR24Un8e88hipdtYxAjihLEM6MzwnDoMthMFDBg9QNfujGet2mXuSpI9Ac0NfcFv5dqn1mDNCXV0cvHmfDnPHKOfiw4ai7ITjq4ajmzkCqGwg4UdKInn5utiZ0eTPmuu3XMabPCOe+I+FGKisE1OtIuUdoOdIHpQKVuK7H3q226i+l4JZBfchIhVxWug8C5x86ZbegQCyVIzncPGKgvztgPEyrFhMRjMEa2OugR8I47Ba/P813kFX+IjPuqIo8GRrRUGUnEQF4EFM90gSetvZEgHssyrMoruzMYVmxXA4I8Z69i2qrXAFC7E8XxRpdZF48MQNOT3PH0q3yaH3e9TrNNMMmBqfXFKfYFZRClcAnLtxOPsTcptJmPcmZFZGgmSqDjZMbDYZ5nDE0qz+52ejJ9PS+7UG7bgv2DUyPc4W0I9ksY= 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)(136003)(396003)(376002)(346002)(39860400002)(46966006)(36840700001)(44832011)(2906002)(15650500001)(82310400003)(6916009)(6666004)(70206006)(8936002)(8676002)(47076005)(86362001)(70586007)(2616005)(316002)(336012)(54906003)(4326008)(426003)(26005)(1076003)(7696005)(36756003)(5660300002)(82740400003)(19627235002)(356005)(83380400001)(36860700001)(81166007)(478600001)(186003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3857 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 5eff4f7d-2557-4cfb-dfe3-08d931761702 X-Microsoft-Antispam-Message-Info: VmA9OA54G2WogT3B6GWiIr3CKknGYtLtgQ/RhiCWVzHGIfbMudniPPPX+9WkxTqpJfVGilV5+73WGrxW9zdFI+Q/h0tbTJ/x5VGl3ECaAj3cbAr5tfYMSMpLqq+teYswhjPj9FkM/NjMUELrk84naFFqc7W5Sqpx0s/VOL/+WK6XVZCRX16GbAjiRNt4YbAZBIEOjcd4+xwjM7R+R4deysvalWiHiPlNVcHCjQ2VvmeIQY7CCyTQRJW/pT53v2BQSrl3mmQ/A/pBwPNZLt1xVRWpEWhTZdUDgMBJ6fK43jwHOwILhG4W0okHIfTUouKT99NH/degJtfrk8a4J2IuuzbC4sH1HcMCqonFRmh8xxZu8IqdHsNQIV9KUYVxhtOqpnG8Sr2juukIAVM1TErskhFbRdWKImmOsx1rvJIlTT/L4uP7iOHqFkoAT0Y6TcsMvCg1U2Q3BygnRATh5WQ7/rHNMETtbGOmb9/9Hr5SqjP6we8zn1U3HIScRbYcPkB7w8NDzpxCYjkSkDXe1K78JbziWiLqb02jQEk3EVfEnDTz+dEXimu8YSsrNEZyecBFYaRNkeHe7t+ljf5NUElE0tBBHtUHGFy1RdPBwl4/NeiNXcPPOma1tv9eealg8Baa4jU9AnikWTVzG+tJLS9mZEnLZmL/UQDCNmppQZql3Y6WYZ/F708JPPqonjtfNJEq X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:56:00.7380 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ff200aac-61c3-425c-2f9a-08d931761cca 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: VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR08MB5052 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: LvJ9qv5ayQJWJHaMVv1JULT4x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923773; bh=32kI8YKrAlos5Xu1xoRXrFj9xj5y2yYBym8LMjxHyDU=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=LX3C7kTiYHoeA01dV4T8CQkgt05ZQbaX2FEKzp8pwqzcK+KuJpuCMbLB60iyLlBur3F u45gXZyf1Qmw4OIYhwTUdoJ+WOKMG9+4G4j8rYCIJw5Tsan5278f2ZFZ/5uBU2gGOkb6D MLbnTuotr/OSYm8gf3mViJq0gvoefYzrsZ8= 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 Arm namespace objects to: - add Identifier field to IORT nodes. - introduce enums to represent RMR nodes and Memory Range descriptors. - add definition of node type 6 - Reserved Memory Range node. - add definition for Memory Range Descriptors. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v2: - No code change since v1. Re-sending with v2 series. [SAMI] DynamicTablesPkg/Include/ArmNameSpaceObjects.h | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h b/DynamicTables= Pkg/Include/ArmNameSpaceObjects.h index 19dcae13b2191e5f0b03ea85edec1191d2a406bf..98143cb5df127273cdd75452170= fa651372b3896 100644 --- a/DynamicTablesPkg/Include/ArmNameSpaceObjects.h +++ b/DynamicTablesPkg/Include/ArmNameSpaceObjects.h @@ -58,6 +58,8 @@ typedef enum ArmObjectID { EArmObjGenericInitiatorAffinityInfo, ///< 34 - Generic Initiator Affinity EArmObjSerialPortInfo, ///< 35 - Generic Serial Port Info EArmObjCmn600Info, ///< 36 - CMN-600 Info + EArmObjRmr, ///< 37 - Reserved Memory Range Node + EArmObjMemoryRangeDescriptor, ///< 38 - Memory Range Descriptor EArmObjMax } EARM_OBJECT_ID; =20 @@ -466,6 +468,9 @@ typedef struct CmArmItsGroupNode { UINT32 ItsIdCount; /// Reference token for the ITS identifier array CM_OBJECT_TOKEN ItsIdToken; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_ITS_GROUP_NODE; =20 /** A structure that describes the @@ -497,6 +502,9 @@ typedef struct CmArmNamedComponentNode { the entry in the namespace for this object. */ CHAR8* ObjectName; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_NAMED_COMPONENT_NODE; =20 /** A structure that describes the @@ -525,6 +533,9 @@ typedef struct CmArmRootComplexNode { UINT32 PciSegmentNumber; /// Memory address size limit UINT8 MemoryAddressSize; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_ROOT_COMPLEX_NODE; =20 /** A structure that describes the @@ -567,6 +578,9 @@ typedef struct CmArmSmmuV1SmmuV2Node { UINT32 SMMU_NSgCfgIrpt; /// SMMU_NSgCfgIrpt interrupt flags UINT32 SMMU_NSgCfgIrptFlags; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_SMMUV1_SMMUV2_NODE; =20 /** A structure that describes the @@ -603,6 +617,9 @@ typedef struct CmArmSmmuV3Node { UINT32 ProximityDomain; /// Index into the array of ID mapping UINT32 DeviceIdMappingIndex; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_SMMUV3_NODE; =20 /** A structure that describes the @@ -627,6 +644,9 @@ typedef struct CmArmPmcgNode { =20 /// Reference token for the IORT node associated with this node CM_OBJECT_TOKEN ReferenceToken; + + /// Unique identifier for this node. + UINT32 Identifier; } CM_ARM_PMCG_NODE; =20 /** A structure that describes the @@ -878,6 +898,44 @@ typedef struct CmArmCmn600Info { CM_ARM_EXTENDED_INTERRUPT DtcInterrupt[4]; } CM_ARM_CMN_600_INFO; =20 +/** A structure that describes the + RMR node for the Platform. + + ID: EArmObjRmr +*/ +typedef struct CmArmRmrNode { + /// An unique token used to identify this object + CM_OBJECT_TOKEN Token; + /// Number of ID mappings + UINT32 IdMappingCount; + /// Reference token for the ID mapping array + CM_OBJECT_TOKEN IdMappingToken; + + /// Reserved Memory Range flags. + UINT32 Flags; + + /// Memory range descriptor count. + UINT32 MemRangeDescCount; + /// Reference token for the Memory Range descriptor array + CM_OBJECT_TOKEN MemRangeDescToken; + + /// Unique identifier for this node. + UINT32 Identifier; +} CM_ARM_RMR_NODE; + +/** A structure that describes the + Memory Range descriptor. + + ID: EArmObjMemoryRangeDescriptor +*/ +typedef struct CmArmRmrDescriptor { + /// Base address. + UINT64 BaseAddress; + + /// Length. + UINT64 Length; +} CM_ARM_MEMORY_RANGE_DESCRIPTOR; + #pragma pack() =20 #endif // ARM_NAMESPACE_OBJECTS_H_ --=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 (#76659): https://edk2.groups.io/g/devel/message/76659 Mute This Topic: https://groups.io/mt/83600723/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- From nobody Mon May 6 08:05:14 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+76661+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 1623923777353824.9227749636125; Thu, 17 Jun 2021 02:56:17 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id ZJCOYY1788612xx1thzs2wt0; Thu, 17 Jun 2021 02:56:17 -0700 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com (EUR05-DB8-obe.outbound.protection.outlook.com [40.107.20.42]) by mx.groups.io with SMTP id smtpd.web11.5403.1623923770839980278 for ; Thu, 17 Jun 2021 02:56:11 -0700 X-Received: from AM5PR0201CA0018.eurprd02.prod.outlook.com (2603:10a6:203:3d::28) by VI1PR08MB3536.eurprd08.prod.outlook.com (2603:10a6:803:79::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Thu, 17 Jun 2021 09:56:07 +0000 X-Received: from AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:3d:cafe::8a) by AM5PR0201CA0018.outlook.office365.com (2603:10a6:203:3d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.19 via Frontend Transport; Thu, 17 Jun 2021 09:56:07 +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+76661+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 AM5EUR03FT053.mail.protection.outlook.com (10.152.16.210) 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:06 +0000 X-Received: ("Tessian outbound 9d3d496fabe8:v93"); Thu, 17 Jun 2021 09:56:06 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: de599094081c67a4 X-CR-MTA-TID: 64aa7808 X-Received: from 1dbd225ac4df.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id DE767668-8837-4D1E-8864-F73986919F16.1; Thu, 17 Jun 2021 09:56:00 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 1dbd225ac4df.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 17 Jun 2021 09:56:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NHUcQ2N0NTAZN4SeRA+UjUMMmdgoAZOpYsLsefmo+fB2VQKHzOV9KZFKUxHqsaRbu42lPhORsKUWEg/HucEylL7lDqcgNAJ5GUoUTvXvSyF4ZX5t/UKJT3Eb2BlcQzdj45PRBCiTjBsVQd3Rdpafwq+O0VRBafi+DY8Uu+XIK0RlOfk9XGjI26e6epIFCtKxWqId2+E3K2JS4QkKFG1v9FgCxMA+pbVRESh9156HYFqeUI2rozvYFVOlFwUObXyppcfBNE7o6knZFB0LrYKmK0U0ePPO9EYC93a45Hf4UJzxhr26gVaO1CiQqF/qq9kkKdqRw9GyZnIVUesNGaA69Q== 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=KRNZ7KjU2LQXcUfNqTvxNTLbN+5MUPZWYW6WpXEAajs=; b=JY3wFvj3OXHdO8Ve/N6C6vQjNsYSguDjHxK6zTHYx4rnmYiG82E9iBJRMZX96adaGoUukAZOu7vqcJtFLmhzkIqwW8OepXVXDe/7WtQLrJz4+71LYUkqWLfmJmT+ho/cygG7POib15Zp+4XsALenpU/8FedcqTJkvYMQcnmwLgAy15/HjMFoAnjHT3MFdXMi1oDuvI4QNuNfmFPxDgpMn/pTjTwDswrUwJI/gor713GhvY0Ms+bc/X1La8/z30MUwxE4HnY0o3rZOR6e1oWN6PppvVBLbd0I/9khgT3oZyZ9HI2HaOly3AynMRFwfL+bK+ABtXA7Mwybzy/8l82FkQ== 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 AM6P193CA0138.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:85::43) by DB6PR0802MB2565.eurprd08.prod.outlook.com (2603:10a6:4:a1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Thu, 17 Jun 2021 09:55:54 +0000 X-Received: from AM5EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:85:cafe::3c) by AM6P193CA0138.outlook.office365.com (2603:10a6:209:85::43) 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:55:54 +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 AM5EUR03FT014.mail.protection.outlook.com (10.152.16.130) 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:54 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.14; Thu, 17 Jun 2021 09:55:47 +0000 X-Received: from AZ-NEU-EX03.Arm.com (10.251.24.31) by AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.14; Thu, 17 Jun 2021 09:55:45 +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:45 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v2 8/8] DynamicTablesPkg: IORT generator updates for Rev E.b spec Date: Thu, 17 Jun 2021 10:55:37 +0100 Message-ID: <20210617095538.93280-9-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: d0402f1f-339b-47b7-f8f3-08d931762066 X-MS-TrafficTypeDiagnostic: DB6PR0802MB2565:|VI1PR08MB3536: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6790;OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: F0bu2RncwaJg7rQA7CWtDzI+qfnkucENP4skqcOhvfY7uYfXeKYBtbcOKUWKJhyDJPCelRbYdScQIuohju+yXyzMKAk1FrPr3DpqS7IGhBjzAPtyi0FluqBkbfyrgQOEj8tMW6dPeceHlIkI+0MX0Ga7ubztOaptdRNWw2WfRLQ+M9NbznybraCP+xAnephZfJm995Gj9/2iPH8P2eAdYG4Ic350rZBgZdRTGJo3f7cKI73G5vT0yYpOI++2hAw9oTcRGxbiuVqzxByFknFxSJk1qITU72Ec0KqKKZJG4T2SG/s7P5KAB4VnrDNfWDXNRRFe3dzzJ4Um9QBE4T+y48g+nnZ8iLsesTt7WtJpVSWIkYxO9VBvKr/FmLNqVjMIEPofUnv2GuLbXccvsxkN7I04At7DBv4E5Epp8fyVA0Rtc7ggbVzzu2HkZVoBNDGgovVsx5cZqLtlmKchPreT+LLoJw644s4xQklri3qKvlNcX9P467YfE1CO2KjbmZ++ADV1G3jVUqWS+pXmV/ZGLyZEGyQ6NS75ekC85ve+Mi8k9I4uOXy3a6w1Kd6dkmycyodXnIvLF7PpwZdyEq8GmKbvpDrYxEz3zmRyStbMM3+UlWkFec/n7iCWN/d2RyVLRM3QWKsFpCZYaiZT2wYb23iEW/jAeNm4eNBBBLYrzTSmOole0o4Kf2rSK2sRQ8tRZHQOdD9VroCY/vxEzwpYjfqf0fa3nNC1JL1lr0vxRnHr5xIg8UIKpUFE5X+WpY4G1DNZCj+bqhr7n+g7nte6JLWTMSSdUeJtdbCLOCf5sqAGCy5tp51X5ZbDxpIfx6tCeN1hib60jp7OGLeFbgG2qrQ1SIWV7mQQTyDJ2Q+FcrE= 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)(346002)(136003)(376002)(39850400004)(396003)(46966006)(36840700001)(5660300002)(336012)(426003)(1076003)(36756003)(83380400001)(4326008)(82310400003)(86362001)(36860700001)(6916009)(19627235002)(15650500001)(2906002)(30864003)(316002)(82740400003)(2616005)(7696005)(81166007)(6666004)(356005)(8676002)(8936002)(70206006)(26005)(186003)(54906003)(47076005)(478600001)(70586007)(44832011)(36900700001)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0802MB2565 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6b414ce2-3724-49dd-09b2-08d9317618bf X-Microsoft-Antispam-Message-Info: 4mdwf2GauJmEDnQJOKqJlaBXNDZ9RTCwY0NCpSYnlx97/UCHe3dxBajX05wNcggnjLwZTYk3aY0E1DbaW6AuNk8Y5W4aTKxcNT+0nUKEb9vAxTNAzxFj8vXzCr04/s73l0DSeDN5/r3HbHtTFvEChZtkpzUzV7ar51C80eOgAspCInczSqxHqmHUa6SER2Fp7Bu4o5NPEC43PK/X7xi6qUSElKrLm00n21+vkFYrKZRu3+zO+feZfCEtcwnPjlYZOYMIftfLAjIhp6ynDPQ/0kCY/d/6SBTg51w2yw9wvdbJXhXyQ+A3OtomA1QQxEXg3HM2AAe3fv8R1Z18T4nf5Wb+6qRIC2lBBvxQamNAzl/TuHiyUpqD37fVkZ/MVU+dn7AsU/u+r8iUtj3fB8gczBnoojjDCeuLUX3vvzFTO2cs/Q0YyI6UKEwVpk1e6g5+iWZOIEN5stLrdYCXaEM6tEEU2sqsRBCrti4o9w4Rn36fzejZm6eqBWwv3b1mriWjKi8Kf0o7sxLesIGZWaZcbzi+Hf6Xu+tfHVUnlHr9S2dIncVpDGEB5GlbBF5EwhbA7QTadH1g2JHD+hvS8RipfydgpA3KwwOgZylgr0IQtLQcz2g85WTY/wQcx+O6ba+g2kmoKs/0vcTLNLAVZKv4h/Wykd05BolNNymWCOIWFrXrWnmUxaqi0ZVpfLiGBi4LZTUkRyQ4DcGmLYbFnnS7+WwV62dS06qYleMOz49jrPPhWqnVK+70micT8nYtcyGvWkWBmRRjetBcauvT9JQ7QHIX6jqG/eBaeOPAvDTBN/SsKLnQU1u/SSfBLRJs/xds X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2021 09:56:06.8457 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0402f1f-339b-47b7-f8f3-08d931762066 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: AM5EUR03FT053.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3536 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: EwLwadykBc6AN0OnFWKlxuHrx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623923777; bh=0cDYoZXHreMBan5gAlk4FU8uDLqF/aW4X56qo9NMGUo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=QIoFAUq5U6v91beOVYKFCBZtS7cbEZdPFm8LkCTeJxFScapE8EHBoZXAAPRA63r+pG3 nv+TSf9po3t0AoR87GB7NGrsF14Hkrce6qJHZtRVlknNumlaLMmvU/Xbg8RGB0mtPaBHr KDluTWKg46H8IvJs7n91/sxIFQnEKseB5+Q= 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 generator to: - increment IORT table revision count to 3. - populate Identifier filed if revision is greater than 2. - add support to populate Reserved Memory Range nodes and the Memory range descriptors. - add validation to check that the Identifier field is unique. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v2: - The macro EFI_ACPI_IO_REMAPPING_TABLE_REVISION was set to [SAMI] Rev 0 as setting to Rev 3 will break existing platforms. Therefore, set the max supported IORT generator revision to 3. DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 661 +++= +++++++++++++++-- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.h | 5 +- 2 files changed, 624 insertions(+), 42 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index 9ccf72594db378878d4e3abbafe98e749d9963da..9b687f0165e6136f2f24749d27d= ee27edaff1b31 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -5,8 +5,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Reference(s): - - IO Remapping Table, Platform Design Document, - Document number: ARM DEN 0049D, Issue D, March 2018 + - IO Remapping Table, Platform Design Document, Revision E.b, Feb 2021 + (https://developer.arm.com/documentation/den0049/) =20 **/ =20 @@ -37,9 +37,11 @@ Requirements: - EArmObjSmmuV1SmmuV2 - EArmObjSmmuV3 - EArmObjPmcg + - EArmObjRmr - EArmObjGicItsIdentifierArray - EArmObjIdMappingArray - - EArmObjGicItsIdentifierArray + - EArmObjSmmuInterruptArray + - EArmObjMemoryRangeDescriptor */ =20 /** This macro expands to a function that retrieves the ITS @@ -96,6 +98,24 @@ GET_OBJECT_LIST ( CM_ARM_PMCG_NODE ); =20 +/** This macro expands to a function that retrieves the + RMR node information from the Configuration Manager. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjRmr, + CM_ARM_RMR_NODE + ); + +/** This macro expands to a function that retrieves the + Memory Range Descriptor Array information from the Configuration Manag= er. +*/ +GET_OBJECT_LIST ( + EObjNameSpaceArm, + EArmObjMemoryRangeDescriptor, + CM_ARM_MEMORY_RANGE_DESCRIPTOR + ); + /** This macro expands to a function that retrieves the ITS Identifier Array information from the Configuration Manager. */ @@ -177,13 +197,16 @@ GetSizeofItsGroupNodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetItsGroupNodeSize (NodeList); @@ -250,13 +273,16 @@ GetSizeofNamedComponentNodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetNamedComponentNodeSize (NodeList); @@ -322,13 +348,16 @@ GetSizeofRootComplexNodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetRootComplexNodeSize (NodeList); @@ -400,13 +429,16 @@ GetSizeofSmmuV1V2Nodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetSmmuV1V2NodeSize (NodeList); @@ -471,13 +503,16 @@ GetSizeofSmmuV3Nodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetSmmuV3NodeSize (NodeList); @@ -542,13 +577,16 @@ GetSizeofPmcgNodes ( (*NodeIndexer)->Token =3D NodeList->Token; (*NodeIndexer)->Object =3D (VOID*)NodeList; (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; DEBUG (( DEBUG_INFO, - "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p, Offset =3D = 0x%x\n", + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", *NodeIndexer, (*NodeIndexer)->Token, (*NodeIndexer)->Object, - (*NodeIndexer)->Offset + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier )); =20 Size +=3D GetPmcgNodeSize (NodeList); @@ -558,6 +596,83 @@ GetSizeofPmcgNodes ( return Size; } =20 +/** Returns the size of the RMR node. + + @param [in] Node Pointer to RMR node. + + @retval Size of the RMR node. +**/ +STATIC +UINT32 +GetRmrNodeSize ( + IN CONST CM_ARM_RMR_NODE * Node + ) +{ + ASSERT (Node !=3D NULL); + + /* Size of RMR node + + Size of ID mapping array + + Size of Memory Range Descriptor array + */ + return (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE) + + (Node->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE)) + + (Node->MemRangeDescCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC))); +} + +/** Returns the total size required for the RMR nodes and + updates the Node Indexer. + + This function calculates the size required for the node group + and also populates the Node Indexer array with offsets for the + individual nodes. + + @param [in] NodeStartOffset Offset from the start of the + IORT where this node group starts. + @param [in] NodeList Pointer to RMR node list. + @param [in] NodeCount Count of the RMR nodes. + @param [in, out] NodeIndexer Pointer to the next Node Indexer. + + @retval Total size of the RMR nodes. +**/ +STATIC +UINT64 +GetSizeofRmrNodes ( + IN CONST UINT32 NodeStartOffset, + IN CONST CM_ARM_RMR_NODE * NodeList, + IN UINT32 NodeCount, + IN OUT IORT_NODE_INDEXER ** CONST NodeIndexer + ) +{ + UINT64 Size; + + ASSERT (NodeList !=3D NULL); + + Size =3D 0; + while (NodeCount-- !=3D 0) { + (*NodeIndexer)->Token =3D NodeList->Token; + (*NodeIndexer)->Object =3D (VOID*)NodeList; + (*NodeIndexer)->Offset =3D (UINT32)(Size + NodeStartOffset); + (*NodeIndexer)->Identifier =3D NodeList->Identifier; + DEBUG (( + DEBUG_INFO, + "IORT: Node Indexer =3D %p, Token =3D %p, Object =3D %p," + " Offset =3D 0x%x, Identifier =3D 0x%x\n", + *NodeIndexer, + (*NodeIndexer)->Token, + (*NodeIndexer)->Object, + (*NodeIndexer)->Offset, + (*NodeIndexer)->Identifier + )); + + Size +=3D GetRmrNodeSize (NodeList); + (*NodeIndexer)++; + NodeList++; + } + return Size; +} + /** Returns the offset of the Node referenced by the Token. =20 @param [in] NodeIndexer Pointer to node indexer array. @@ -707,6 +822,7 @@ AddIdMappingArray ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the ITS Group Nodes. @@ -723,6 +839,7 @@ EFI_STATUS AddItsGroupNodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtocol, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableInfo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartOffset, IN CONST CM_ARM_ITS_GROUP_NODE * NodeList, @@ -759,11 +876,17 @@ AddItsGroupNodes ( // Populate the node header ItsGroupNode->Node.Type =3D EFI_ACPI_IORT_TYPE_ITS_GROUP; ItsGroupNode->Node.Length =3D (UINT16)NodeLength; - ItsGroupNode->Node.Revision =3D 0; - ItsGroupNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; ItsGroupNode->Node.NumIdMappings =3D 0; ItsGroupNode->Node.IdReference =3D 0; =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + ItsGroupNode->Node.Revision =3D 0; + ItsGroupNode->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + ItsGroupNode->Node.Revision =3D 1; + ItsGroupNode->Node.Identifier =3D NodeList->Identifier; + } + // IORT specific data ItsGroupNode->NumItsIdentifiers =3D NodeList->ItsIdCount; ItsIds =3D (UINT32*)((UINT8*)ItsGroupNode + @@ -814,6 +937,7 @@ AddItsGroupNodes ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the Named Component Nodes. @@ -830,6 +954,7 @@ EFI_STATUS AddNamedComponentNodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProto= col, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableIn= fo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartO= ffset, IN CONST CM_ARM_NAMED_COMPONENT_NODE * NodeList, @@ -865,10 +990,16 @@ AddNamedComponentNodes ( // Populate the node header NcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_NAMED_COMP; NcNode->Node.Length =3D (UINT16)NodeLength; - NcNode->Node.Revision =3D 2; - NcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; NcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + NcNode->Node.Revision =3D 2; + NcNode->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + NcNode->Node.Revision =3D 4; + NcNode->Node.Identifier =3D NodeList->Identifier; + } + ObjectNameLength =3D AsciiStrLen (NodeList->ObjectName) + 1; NcNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? 0 : ((UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + @@ -899,8 +1030,19 @@ AddNamedComponentNodes ( return Status; } =20 - if ((NodeList->IdMappingCount > 0) && - (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + // Ids for Named Component IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)NcNode + NcNode->Node.IdReference); @@ -938,6 +1080,7 @@ AddNamedComponentNodes ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the Root Comp= lex Nodes. @@ -954,6 +1097,7 @@ EFI_STATUS AddRootComplexNodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProto= col, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableIn= fo, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartO= ffset, IN CONST CM_ARM_ROOT_COMPLEX_NODE * NodeList, @@ -987,12 +1131,18 @@ AddRootComplexNodes ( // Populate the node header RcNode->Node.Type =3D EFI_ACPI_IORT_TYPE_ROOT_COMPLEX; RcNode->Node.Length =3D (UINT16)NodeLength; - RcNode->Node.Revision =3D 1; - RcNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings =3D NodeList->IdMappingCount; RcNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE); =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + RcNode->Node.Revision =3D 1; + RcNode->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + RcNode->Node.Revision =3D 3; + RcNode->Node.Identifier =3D NodeList->Identifier; + } + // Root Complex specific data RcNode->CacheCoherent =3D NodeList->CacheCoherent; RcNode->AllocationHints =3D NodeList->AllocationHints; @@ -1005,8 +1155,19 @@ AddRootComplexNodes ( RcNode->Reserved1[1] =3D EFI_ACPI_RESERVED_BYTE; RcNode->Reserved1[2] =3D EFI_ACPI_RESERVED_BYTE; =20 - if ((NodeList->IdMappingCount > 0) && - (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + // Ids for Root Complex IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)RcNode + RcNode->Node.IdReference); @@ -1107,6 +1268,7 @@ AddSmmuInterruptArray ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the SMMU v1/v2 Nodes. @@ -1123,6 +1285,7 @@ EFI_STATUS AddSmmuV1V2Nodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoc= ol, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableInf= o, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartOf= fset, IN CONST CM_ARM_SMMUV1_SMMUV2_NODE * NodeList, @@ -1159,8 +1322,6 @@ AddSmmuV1V2Nodes ( // Populate the node header SmmuNode->Node.Type =3D EFI_ACPI_IORT_TYPE_SMMUv1v2; SmmuNode->Node.Length =3D (UINT16)NodeLength; - SmmuNode->Node.Revision =3D 0; - SmmuNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuNode->Node.NumIdMappings =3D NodeList->IdMappingCount; SmmuNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? 0 : (sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) + @@ -1169,6 +1330,14 @@ AddSmmuV1V2Nodes ( (NodeList->PmuInterruptCount * sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_INT))); =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + SmmuNode->Node.Revision =3D 1; + SmmuNode->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + SmmuNode->Node.Revision =3D 3; + SmmuNode->Node.Identifier =3D NodeList->Identifier; + } + // SMMU v1/v2 specific data SmmuNode->Base =3D NodeList->BaseAddress; SmmuNode->Span =3D NodeList->Span; @@ -1263,8 +1432,19 @@ AddSmmuV1V2Nodes ( } } =20 - if ((NodeList->IdMappingCount > 0) && - (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + // Ids for SMMU v1/v2 Node IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)SmmuNod= e + SmmuNode->Node.IdReference); @@ -1300,6 +1480,7 @@ AddSmmuV1V2Nodes ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the SMMUv3 No= des. @param [in] NodeList Pointer to an array of SMMUv3 Node Ob= jects. @@ -1314,6 +1495,7 @@ EFI_STATUS AddSmmuV3Nodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoc= ol, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableInf= o, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartOf= fset, IN CONST CM_ARM_SMMUV3_NODE * NodeList, @@ -1346,12 +1528,18 @@ AddSmmuV3Nodes ( // Populate the node header SmmuV3Node->Node.Type =3D EFI_ACPI_IORT_TYPE_SMMUv3; SmmuV3Node->Node.Length =3D (UINT16)NodeLength; - SmmuV3Node->Node.Revision =3D 2; - SmmuV3Node->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings =3D NodeList->IdMappingCount; SmmuV3Node->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + SmmuV3Node->Node.Revision =3D 2; + SmmuV3Node->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + SmmuV3Node->Node.Revision =3D 4; + SmmuV3Node->Node.Identifier =3D NodeList->Identifier; + } + // SMMUv3 specific data SmmuV3Node->Base =3D NodeList->BaseAddress; SmmuV3Node->Flags =3D NodeList->Flags; @@ -1379,8 +1567,19 @@ AddSmmuV3Nodes ( SmmuV3Node->DeviceIdMappingIndex =3D NodeList->DeviceIdMappingIndex; } =20 - if ((NodeList->IdMappingCount > 0) && - (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + // Ids for SMMUv3 node IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)SmmuV3N= ode + SmmuV3Node->Node.IdReference); @@ -1417,6 +1616,7 @@ AddSmmuV3Nodes ( @param [in] This Pointer to the table Generator. @param [in] CfgMgrProtocol Pointer to the Configuration Manager Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. @param [in] Iort Pointer to IORT table structure. @param [in] NodesStartOffset Offset for the start of the PMCG Node= s. @param [in] NodeList Pointer to an array of PMCG Node Obje= cts. @@ -1431,6 +1631,7 @@ EFI_STATUS AddPmcgNodes ( IN CONST ACPI_TABLE_GENERATOR * CONST This, IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoc= ol, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableInf= o, IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, IN CONST UINT32 NodesStartOf= fset, IN CONST CM_ARM_PMCG_NODE * NodeList, @@ -1465,12 +1666,18 @@ AddPmcgNodes ( // Populate the node header PmcgNode->Node.Type =3D EFI_ACPI_IORT_TYPE_PMCG; PmcgNode->Node.Length =3D (UINT16)NodeLength; - PmcgNode->Node.Revision =3D 1; - PmcgNode->Node.Reserved =3D EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings =3D NodeList->IdMappingCount; PmcgNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE); =20 + if (AcpiTableInfo->AcpiTableRevision < EFI_ACPI_IO_REMAPPING_TABLE_REV= 3) { + PmcgNode->Node.Revision =3D 1; + PmcgNode->Node.Identifier =3D EFI_ACPI_RESERVED_DWORD; + } else { + PmcgNode->Node.Revision =3D 2; + PmcgNode->Node.Identifier =3D NodeList->Identifier; + } + // PMCG specific data PmcgNode->Base =3D NodeList->BaseAddress; PmcgNode->OverflowInterruptGsiv =3D NodeList->OverflowInterrupt; @@ -1494,8 +1701,19 @@ AddPmcgNodes ( return Status; } =20 - if ((NodeList->IdMappingCount > 0) && - (NodeList->IdMappingToken !=3D CM_NULL_TOKEN)) { + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + // Ids for PMCG node IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)PmcgNod= e + PmcgNode->Node.IdReference); @@ -1526,6 +1744,273 @@ AddPmcgNodes ( return EFI_SUCCESS; } =20 +/** Update the Memory Range Descriptor Array. + + This function retrieves the Memory Range Descriptor objects referenced= by + MemRangeDescToken and updates the Memory Range Descriptor array. + + @param [in] This Pointer to the table Generator. + @param [in] CfgMgrProtocol Pointer to the Configuration Manager + Protocol Interface. + @param [in] DescArray Pointer to an array of Memory Range + Descriptors. + @param [in] DescCount Number of Id Descriptors. + @param [in] DescToken Reference Token for retrieving the + Memory Range Descriptor Array. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object was not found. +**/ +STATIC +EFI_STATUS +AddMemRangeDescArray ( + IN CONST ACPI_TABLE_GENERATOR * CONST This, + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoc= ol, + IN EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC * DescArray, + IN UINT32 DescCount, + IN CONST CM_OBJECT_TOKEN DescToken + ) +{ + EFI_STATUS Status; + CM_ARM_MEMORY_RANGE_DESCRIPTOR * MemRangeDesc; + UINT32 MemRangeDescCount; + + ASSERT (DescArray !=3D NULL); + + // Get the Id Mapping Array + Status =3D GetEArmObjMemoryRangeDescriptor ( + CfgMgrProtocol, + DescToken, + &MemRangeDesc, + &MemRangeDescCount + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to get Memory Range Descriptor array. Status = =3D %r\n", + Status + )); + return Status; + } + + if (MemRangeDescCount < DescCount) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to get the required number of Memory" + " Range Descriptors.\n" + )); + return EFI_NOT_FOUND; + } + + // Populate the Memory Range Descriptor array + while (DescCount-- !=3D 0) { + + DescArray->Base =3D MemRangeDesc->BaseAddress; + DescArray->Length =3D MemRangeDesc->Length; + DescArray->Reserved =3D EFI_ACPI_RESERVED_DWORD; + + DescArray++; + MemRangeDesc++; + } + + return EFI_SUCCESS; +} + +/** Update the RMR Node Information. + + This function updates the RMR node information in the IORT table. + + @param [in] This Pointer to the table Generator. + @param [in] CfgMgrProtocol Pointer to the Configuration Manager + Protocol Interface. + @param [in] AcpiTableInfo Pointer to the ACPI table info struct= ure. + @param [in] Iort Pointer to IORT table structure. + @param [in] NodesStartOffset Offset for the start of the PMCG Node= s. + @param [in] NodeList Pointer to an array of PMCG Node Obje= cts. + @param [in] NodeCount Number of PMCG Node Objects. + + @retval EFI_SUCCESS Table generated successfully. + @retval EFI_INVALID_PARAMETER A parameter is invalid. + @retval EFI_NOT_FOUND The required object was not found. +**/ +STATIC +EFI_STATUS +AddRmrNodes ( + IN CONST ACPI_TABLE_GENERATOR * CONST This, + IN CONST EDKII_CONFIGURATION_MANAGER_PROTOCOL * CONST CfgMgrProtoc= ol, + IN CONST CM_STD_OBJ_ACPI_TABLE_INFO * CONST AcpiTableInf= o, + IN CONST EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort, + IN CONST UINT32 NodesStartOf= fset, + IN CONST CM_ARM_RMR_NODE * NodeList, + IN UINT32 NodeCount + ) +{ + EFI_STATUS Status; + EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE * RmrNode; + EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE * IdMapArray; + EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC * MemRangeDescArray; + UINT64 NodeLength; + + ASSERT (Iort !=3D NULL); + + RmrNode =3D (EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE*)((UINT8*)Iort + + NodesStartOffset); + + while (NodeCount-- !=3D 0) { + NodeLength =3D GetRmrNodeSize (NodeList); + if (NodeLength > MAX_UINT16) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: RMR Node length 0x%lx > MAX_UINT16. Status =3D %r\n", + NodeLength, + Status + )); + return Status; + } + + if (NodeList->MemRangeDescCount =3D=3D 0) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Memory Range Desc count =3D %d. Status =3D %r\n", + NodeList->MemRangeDescCount, + Status + )); + return Status; + } + + if (NodeList->MemRangeDescToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Memory Range Descriptor token," + " Token =3D 0x%x. Status =3D %r\n", + NodeList->MemRangeDescToken, + Status + )); + return Status; + } + + // Populate the node header + RmrNode->Node.Type =3D EFI_ACPI_IORT_TYPE_RMR; + RmrNode->Node.Length =3D (UINT16)NodeLength; + RmrNode->Node.Revision =3D 1; + RmrNode->Node.Identifier =3D NodeList->Identifier; + RmrNode->Node.NumIdMappings =3D NodeList->IdMappingCount; + RmrNode->Node.IdReference =3D (NodeList->IdMappingCount =3D=3D 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE); + + // RMR specific data + RmrNode->Flags =3D NodeList->Flags; + RmrNode->NumMemRangeDesc =3D NodeList->MemRangeDescCount; + RmrNode->MemRangeDescRef =3D (NodeList->MemRangeDescCount =3D=3D 0) ? + 0 : (sizeof (EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE) + + (NodeList->IdMappingCount * + sizeof (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE))); + + if (NodeList->IdMappingCount > 0) { + if (NodeList->IdMappingToken =3D=3D CM_NULL_TOKEN) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Id Mapping token," + " Token =3D 0x%x, Status =3D%r\n", + NodeList->IdMappingToken, + Status + )); + return Status; + } + + // Ids for RMR node + IdMapArray =3D (EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE*)((UINT8*)RmrNode= + + RmrNode->Node.IdReference); + + Status =3D AddIdMappingArray ( + This, + CfgMgrProtocol, + IdMapArray, + NodeList->IdMappingCount, + NodeList->IdMappingToken + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to add Id Mapping Array. Status =3D %r\n", + Status + )); + return Status; + } + } + + // Memory Range Descriptors for RMR node + MemRangeDescArray =3D (EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC*)( + (UINT8*)RmrNode + + RmrNode->MemRangeDescRef + ); + + Status =3D AddMemRangeDescArray ( + This, + CfgMgrProtocol, + MemRangeDescArray, + NodeList->MemRangeDescCount, + NodeList->MemRangeDescToken + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to Memory Range Descriptor Array. Status =3D = %r\n", + Status + )); + return Status; + } + + // Next RMR Node + RmrNode =3D (EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE*)((UINT8*)RmrNode + + RmrNode->Node.Length); + NodeList++; + } // RMR Node + + return EFI_SUCCESS; +} + +/** Validates that the IORT nodes Identifier are unique. + + @param [in] NodeIndexer Pointer to the Node Indexer. + @param [in] NodeCount Number of IORT Nodes. + + @retval EFI_SUCCESS Success. + @retval EFI_INVALID_PARAMETER Identifier field not unique. +**/ +STATIC +EFI_STATUS +ValidateNodeIdentifiers ( + IN CONST IORT_NODE_INDEXER * CONST NodeIndexer, + IN UINT32 NodeCount + ) +{ + UINT32 IndexI; + UINT32 IndexJ; + + for (IndexI =3D 0; IndexI < NodeCount; IndexI++) { + for (IndexJ =3D 0; IndexJ < NodeCount; IndexJ++) { + if ((IndexI !=3D IndexJ) && + (NodeIndexer[IndexI].Identifier =3D=3D NodeIndexer[IndexJ].Ident= ifier)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: UID %d of Token %p matches with that of Token %p.\= n", + NodeIndexer[IndexI].Identifier, + NodeIndexer[IndexI].Token, + NodeIndexer[IndexJ].Token + )); + return EFI_INVALID_PARAMETER; + } + }// IndexJ + } // IndexI + return EFI_SUCCESS; +} + /** Construct the IORT ACPI table. =20 This function invokes the Configuration Manager protocol interface @@ -1570,6 +2055,7 @@ BuildIortTable ( UINT32 SmmuV1V2NodeCount; UINT32 SmmuV3NodeCount; UINT32 PmcgNodeCount; + UINT32 RmrNodeCount; =20 UINT32 ItsGroupOffset; UINT32 NamedComponentOffset; @@ -1577,6 +2063,7 @@ BuildIortTable ( UINT32 SmmuV1V2Offset; UINT32 SmmuV3Offset; UINT32 PmcgOffset; + UINT32 RmrOffset; =20 CM_ARM_ITS_GROUP_NODE * ItsGroupNodeList; CM_ARM_NAMED_COMPONENT_NODE * NamedComponentNodeList; @@ -1584,6 +2071,7 @@ BuildIortTable ( CM_ARM_SMMUV1_SMMUV2_NODE * SmmuV1V2NodeList; CM_ARM_SMMUV3_NODE * SmmuV3NodeList; CM_ARM_PMCG_NODE * PmcgNodeList; + CM_ARM_RMR_NODE * RmrNodeList; =20 EFI_ACPI_6_0_IO_REMAPPING_TABLE * Iort; IORT_NODE_INDEXER * NodeIndexer; @@ -1726,6 +2214,27 @@ BuildIortTable ( // Add the PMCG node count IortNodeCount +=3D PmcgNodeCount; =20 + if (AcpiTableInfo->AcpiTableRevision >=3D EFI_ACPI_IO_REMAPPING_TABLE_RE= V3) { + // Get the RMR node info + Status =3D GetEArmObjRmr ( + CfgMgrProtocol, + CM_NULL_TOKEN, + &RmrNodeList, + &RmrNodeCount + ); + if (EFI_ERROR (Status) && (Status !=3D EFI_NOT_FOUND)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to get RMR Node Info. Status =3D %r\n", + Status + )); + goto error_handler; + } + + // Add the RMR node count + IortNodeCount +=3D RmrNodeCount; + } + // Allocate Node Indexer array NodeIndexer =3D (IORT_NODE_INDEXER*)AllocateZeroPool ( (sizeof (IORT_NODE_INDEXER) * @@ -1929,6 +2438,37 @@ BuildIortTable ( )); } =20 + // RMR Nodes + if ((AcpiTableInfo->AcpiTableRevision >=3D EFI_ACPI_IO_REMAPPING_TABLE_R= EV3) && + (RmrNodeCount > 0)) { + RmrOffset =3D (UINT32)TableSize; + // Size of RMR node list. + NodeSize =3D GetSizeofRmrNodes ( + RmrOffset, + RmrNodeList, + RmrNodeCount, + &NodeIndexer + ); + if (NodeSize > MAX_UINT32) { + Status =3D EFI_INVALID_PARAMETER; + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Invalid Size of RMR Nodes. Status =3D %r\n", + Status + )); + goto error_handler; + } + TableSize +=3D NodeSize; + + DEBUG (( + DEBUG_INFO, + " RmrNodeCount =3D %d\n" \ + " RmrOffset =3D %d\n", + RmrNodeCount, + RmrOffset + )); + } + DEBUG (( DEBUG_INFO, "INFO: IORT:\n" \ @@ -1950,6 +2490,19 @@ BuildIortTable ( goto error_handler; } =20 + // Validate that the identifiers for the nodes are unique + if (AcpiTableInfo->AcpiTableRevision >=3D EFI_ACPI_IO_REMAPPING_TABLE_RE= V3) { + Status =3D ValidateNodeIdentifiers (Generator->NodeIndexer, IortNodeCo= unt); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Node Identifier not unique. Status =3D %r\n", + Status + )); + goto error_handler; + } + } + // Allocate the Buffer for IORT table *Table =3D (EFI_ACPI_DESCRIPTION_HEADER*)AllocateZeroPool (TableSize); if (*Table =3D=3D NULL) { @@ -1998,6 +2551,7 @@ BuildIortTable ( Status =3D AddItsGroupNodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, ItsGroupOffset, ItsGroupNodeList, @@ -2017,6 +2571,7 @@ BuildIortTable ( Status =3D AddNamedComponentNodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, NamedComponentOffset, NamedComponentNodeList, @@ -2036,6 +2591,7 @@ BuildIortTable ( Status =3D AddRootComplexNodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, RootComplexOffset, RootComplexNodeList, @@ -2055,6 +2611,7 @@ BuildIortTable ( Status =3D AddSmmuV1V2Nodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, SmmuV1V2Offset, SmmuV1V2NodeList, @@ -2074,6 +2631,7 @@ BuildIortTable ( Status =3D AddSmmuV3Nodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, SmmuV3Offset, SmmuV3NodeList, @@ -2093,6 +2651,7 @@ BuildIortTable ( Status =3D AddPmcgNodes ( This, CfgMgrProtocol, + AcpiTableInfo, Iort, PmcgOffset, PmcgNodeList, @@ -2101,7 +2660,27 @@ BuildIortTable ( if (EFI_ERROR (Status)) { DEBUG (( DEBUG_ERROR, - "ERROR: IORT: Failed to add SMMUv3 Node. Status =3D %r\n", + "ERROR: IORT: Failed to add PMCG Node. Status =3D %r\n", + Status + )); + goto error_handler; + } + } + + if (RmrNodeCount > 0) { + Status =3D AddRmrNodes ( + This, + CfgMgrProtocol, + AcpiTableInfo, + Iort, + RmrOffset, + RmrNodeList, + RmrNodeCount + ); + if (EFI_ERROR (Status)) { + DEBUG (( + DEBUG_ERROR, + "ERROR: IORT: Failed to add RMR Node. Status =3D %r\n", Status )); goto error_handler; @@ -2184,11 +2763,11 @@ ACPI_IORT_GENERATOR IortGenerator =3D { // Generator Description L"ACPI.STD.IORT.GENERATOR", // ACPI Table Signature - EFI_ACPI_6_2_IO_REMAPPING_TABLE_SIGNATURE, + EFI_ACPI_6_3_IO_REMAPPING_TABLE_SIGNATURE, // ACPI Table Revision supported by this Generator - EFI_ACPI_IO_REMAPPING_TABLE_REVISION, + EFI_ACPI_IO_REMAPPING_TABLE_REV3, // Minimum supported ACPI Table Revision - EFI_ACPI_IO_REMAPPING_TABLE_REVISION, + EFI_ACPI_IO_REMAPPING_TABLE_REV0, // Creator ID TABLE_GENERATOR_CREATOR_ID_ARM, // Creator Revision diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .h b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.h index bbf8aaf9efa38a75626a49af6f380b1c8c1a0629..afe2089b1dc20ed671583e2a309= cc1a46c3404c6 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.h +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.h @@ -1,6 +1,6 @@ /** @file =20 - 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 =20 @@ -25,6 +25,9 @@ typedef struct IortNodeIndexer { VOID * Object; /// Node offset from the start of the IORT table UINT32 Offset; + + /// Unique identifier for the Node + UINT32 Identifier; } IORT_NODE_INDEXER; =20 typedef struct AcpiIortGenerator { --=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 (#76661): https://edk2.groups.io/g/devel/message/76661 Mute This Topic: https://groups.io/mt/83600726/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-