From nobody Sat May 4 12:44:45 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+76531+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 1623775052743389.34416213816405; Tue, 15 Jun 2021 09:37:32 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id RuiIYY1788612x2E9yBji6e9; Tue, 15 Jun 2021 09:37:32 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.53]) by mx.groups.io with SMTP id smtpd.web11.98.1623775007782762172 for ; Tue, 15 Jun 2021 09:36:48 -0700 X-Received: from AM6PR05CA0004.eurprd05.prod.outlook.com (2603:10a6:20b:2e::17) by AM0PR08MB5393.eurprd08.prod.outlook.com (2603:10a6:208:18c::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Tue, 15 Jun 2021 16:36:39 +0000 X-Received: from VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:2e:cafe::61) by AM6PR05CA0004.outlook.office365.com (2603:10a6:20b:2e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Tue, 15 Jun 2021 16:36:39 +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+76531+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 VE1EUR03FT040.mail.protection.outlook.com (10.152.18.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:38 +0000 X-Received: ("Tessian outbound 9d3d496fabe8:v93"); Tue, 15 Jun 2021 16:36:38 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0370434387e61e06 X-CR-MTA-TID: 64aa7808 X-Received: from d6effbe790c6.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id CFFC1E3D-3804-4D81-9860-F3466D51E312.1; Tue, 15 Jun 2021 16:36:31 +0000 X-Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id d6effbe790c6.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nMqmDH7wMFdNyG8I6j76lcjmxZoTN0Zo0TLsLGeLNJZVrpv9xcyW+2wGYxznsLc+3OlVPlAY5Hxks7OkZmKTvs3C1rjEyhg2pKBXQf2aKfr+mjxYQZNgd0d1+Pd6Z/4B4u0W0oJdN2FOaaqELANyTm9GbitYN75V2PLRmW+MKkba7+ZmlFuFXoMc0VhxZ4n/ycCNsJJSz5zjzv+fwAfr7CZQ4cmr2SZ1Ati9zmPkdYVoJa+DLrlsxATaDMWJTuB4We8n6vTZ1Ypz/v6etMioz0a5k+GqFC+pYAqn5CuJSrbKNUyGZ9UfgaJsQQTDJPeRFHW9Uep8MMWplSEiR7VRNg== 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=hG5wJPgQ2puOOKF7t428x3y7iW8OTX4u+a7p8xc4bkc=; b=IlgV8INF6xkTtUVRBys8JedOOkIVtEmChDD+HkgVf/yWxbvuLtImJt/E8nDDeuv5V7B4swWQGO7vDjagtlYCjemGo4ko5zCC1f4BfhRBIygcvu5KGRIhiM2H7E5l6e7Mqt/t1bwDvBiraZshKtZTtajdgiKPqC7TR3qVuFG68fRiqbee19FYGVTwCnLTM2YtFiyQBsAPNKQdjnSz9IBK2vB10C/f2wIzaYWL5B2q1f21z2ssIvdgrpRqn/o0ctfduxAeN7R0WK+voqMFwDGItD1x4KuE4YX9lF8jGHUpNBm07Ejfjny79X6TijZRFyRFX11Rd0GRZi3lFdS/j//m3A== 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 DU2PR04CA0008.eurprd04.prod.outlook.com (2603:10a6:10:3b::13) by AS8PR08MB5976.eurprd08.prod.outlook.com (2603:10a6:20b:299::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.24; Tue, 15 Jun 2021 16:36:21 +0000 X-Received: from DB5EUR03FT061.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:3b:cafe::33) by DU2PR04CA0008.outlook.office365.com (2603:10a6:10:3b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:21 +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 DB5EUR03FT061.mail.protection.outlook.com (10.152.21.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:21 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.14; Tue, 15 Jun 2021 16:36:20 +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; Tue, 15 Jun 2021 16:36:19 +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; Tue, 15 Jun 2021 16:36:19 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , Subject: [edk2-devel] [PATCH v1 1/8] MdePkg: Fix IORT header file include guard Date: Tue, 15 Jun 2021 17:36:11 +0100 Message-ID: <20210615163618.85200-2-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3725c3f7-e9e2-4b96-d208-08d9301bbfa4 X-MS-TrafficTypeDiagnostic: AS8PR08MB5976:|AM0PR08MB5393: 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: Qvd/LkqDl+U8gJkEnLu03mMFcxU7kI5G68mp+cKHQwxoE8AIxwvc7RW7uwFFTjjTmUJATjnbrp6FasQ/Scs/t4XI3AVEUN8orjconlhW+PXgNqdXpo+GXtwDi8KR0NDLxNwWsHs2A5AmF7q3XC548OVnLVEb1e6MJvIYBJXlXzhbNYMH/z+PFm8HjwgfeEvodv6r304QZc1NkmD0QZk940ysaMCMNsxI0Q5BV8RWLNeS/A3qNINXSTxu9AdNiPPdiQkPYbR1VT1zc9oxIa4Y7fXtLORV8tNBgggvZpDAFATZVTrVbm7hIPvNWicpZlMM7Ihwm3W9B1jVNKLjKwpZPjb1c1ncIaNrdHADDlq+kPRoHjfaWDKYaZxaFatkT/YEceJ8t57vewvOUukYEEZwv7UJx5G9a2SXNnksZcIZvR48kXRrHXJ5rzxZ4ytrxiY8haV71V28y2PgQ/5Gg1klSWu3Zous4aI+UlZA17Yt/3GSCJWX3z3R/aSIDjNLNL7y/Jak4C/vQiFsfLSFKP3QVr5NCfKir1ZqPAXK3wwedc7uMcMlqlekj9NvDWRB57cOmT8mxxp6DfFsrdy6jIa15o+9sHBexWNzoMz0c0DxJ5bavaxgrXFAYwxG94wwYOnKdXlfiw5JzXSjDxeBBJMOj6suvs9+f4QLX4ge3btOAVH31WkA5rWmaufVEwNuU0qWNUFuGu3F2XZihBjxVk29330D0C1sxitJO3stxL6nGHtgQM5ZiDOGLLKDgW+69UN7UNa4EpYsy0yX9VD7k+x++qSiYIAFrHu3jXmpJXzyVnx/3+dQXEeTXDQzgZYfN0DW 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)(376002)(39850400004)(346002)(136003)(36840700001)(46966006)(4326008)(6916009)(83380400001)(316002)(356005)(478600001)(36756003)(7696005)(6666004)(426003)(336012)(82740400003)(186003)(82310400003)(54906003)(70206006)(36860700001)(70586007)(8676002)(8936002)(26005)(86362001)(1076003)(47076005)(44832011)(2616005)(2906002)(81166007)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB5976 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: fcc9cfcb-74f1-4028-473a-08d9301bb518 X-Microsoft-Antispam-Message-Info: TmrGz9vXjJVF0OaUNLF3eXTMZOJszbwfT4MzikgYhMeRSaCyoDDFh9YgeHWMfFqT4I7atJx47Awcj+NX8D51K2uLf6UmVrW18e/iqr8A5Cv/fiodAKtefdfVTVdu+5Lo6A8TwR9jk5S6s34ZAuMEJOgy1Ajdr/BgOx4HPw/mBMTi2WTFo4u0yP40sNAdPIGg0u1z5dCp+xRyxZ+JO9wW71Lnv2OWDXGzGcfHpeS6r6EndHgOXpCpg87Evh3rRkYh1/T3TnXKwROrMGEHA/hHxBhxssBVCkGK1PymM9yO9a1DDjidf9Kk/LjpqTE15ICG0tr62Yilxv7W6rXEZcu0feUBy0VpTMVtC4UF5dM0S97H2YI3aQt8XT4o9BMCdzKUeFewSvudwxUV3pHy3E5Jap1ZY/K0s89OjyVWY7X5uFswOp0/J5VvTRmg2QiC1tXVzBGSu8vLqUTNXMEGDGf5k28z6djHiSHvIhpMCR88z6ZBsiRmToQePVQyqB34SvUIYv6DY90j3MRud8xkcVx5ggkizhU98XuN0j+Qu+Q15maD9y+czpp3pDdxkDxp9Me8lhrm0LddI4o0CILkMNISS6mY8KjNTokeocS9UEGrYs2A/TWkA5NR72XUBLzdgLGequk7CDjO+ke/d4BQcIdrfjL7thoKKcVlp3crhsGIR0KzKQF9RrkkT6lrnaTEXXoq+h39jrFSFOKsYM+n2+0RohO8u0dLLTLmpHGEPKQzjuwOpcKDRoRdaIT43/LBQYjlBaqWFCZyzH92yoVOM3CDGA== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:38.5326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3725c3f7-e9e2-4b96-d208-08d9301bbfa4 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: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB5393 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: n7pumO0zB3259BxjZEMK1L72x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775052; bh=5V1RFEmFH7AsjCPnPDzrXwjvvMhFj8qaWwX5sPv2PuI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=e4u4v1x2qdjfMMr5r8F3g6JhdQDnM3YSLGW62tI4SW3HzUm9ZRQILe45CUk3UUl11c5 8Qw0kMXhvESIjq3ykeLEYIPgOqavc5Z8jZ8ZoqjGOr7cJ2T2+OMkSGx85764Ue4Bhz/ro S1GajBabFHgIAfPUXKQXX8NDzDlMODPqYVI= 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 --- 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 (#76531): https://edk2.groups.io/g/devel/message/76531 Mute This Topic: https://groups.io/mt/83560203/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 Sat May 4 12:44:45 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+76535+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 1623775060399506.0137104470624; Tue, 15 Jun 2021 09:37:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 48u8YY1788612xzEbImLRVhx; Tue, 15 Jun 2021 09:37:39 -0700 X-Received: from EUR02-VE1-obe.outbound.protection.outlook.com (EUR02-VE1-obe.outbound.protection.outlook.com [40.107.2.41]) by mx.groups.io with SMTP id smtpd.web08.90.1623775020106890153 for ; Tue, 15 Jun 2021 09:37:00 -0700 X-Received: from AM6PR0502CA0052.eurprd05.prod.outlook.com (2603:10a6:20b:56::29) by DB7PR08MB2988.eurprd08.prod.outlook.com (2603:10a6:5:18::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Tue, 15 Jun 2021 16:36:51 +0000 X-Received: from AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:56:cafe::75) by AM6PR0502CA0052.outlook.office365.com (2603:10a6:20b:56::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 15 Jun 2021 16:36: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+76535+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 AM5EUR03FT013.mail.protection.outlook.com (10.152.16.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:50 +0000 X-Received: ("Tessian outbound a65d687b17e4:v93"); Tue, 15 Jun 2021 16:36:50 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: c0bd41acfede0a33 X-CR-MTA-TID: 64aa7808 X-Received: from 514dc50da9ea.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 958EC744-66DA-4EF2-AC7D-C298C8818359.1; Tue, 15 Jun 2021 16:36:44 +0000 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 514dc50da9ea.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ABdg7y/JBEoAACMy/9VGTSjSaRN2MmKgcXQVT3PTSnjdXxponVo+SP7CiIbbh5rp6PHM6XXTWMddrbrcTGOSeWrHLHIZGlf6XN4KVjMlPJZfxOdL3Jf9GzR/WW+bbNJvoM5jEKBNfmtiE4AFn1KY3bNLsWSmHpSmFljqAe7qDf2UQfBqkfia5elrLmOtf5Wt2E88PBc+xuo8yXDtl58ihhrd2W58wPDcU7h2tO9nrWgfOMA/Xg8zaFQWl20tvCkqX7K1YnqRflNfHDGcRhFly/zaXQK2Lq8r+gq1nGyTd5lVppoa7NXarZ5edE/Dhkgbnerv+gMssLPJr55YC1Ni0A== 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=+iGL4nkIs9cfw9xNJ9JxwkJQEHJDtmNBHo8JwmP+2ck=; b=UDjDXu8VzVgrjiE4Nuppq63zPogCnZ7HeQRu0GJ2SehiML52wBrqa/ZAfWCeN7PwcQcE/Tacdkbp3fpzZIKUmdGAqL9YEfJHCYyKMhOeTbquRip+0h2OsrfwoYb7uclAUCD8WPLcgY+PPhfasDpWU6RaLvuQaPb0x+PzICfGd6ZRaFmArXTb57rrcW+5CdZb8tdiC1daOr+C65WJV8jVAJJXF3t7HM08wlTo6SElok9G6gLMpBcE0BYOFdKwbVYiOyYweSU7ix4Plxupg6vuC/wovvqKPJpBHfKylTklniqY8pep7SUT6HP1llxd5wIwd88bU4nKIgOIpo/ILKZXkw== 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 AM6P193CA0048.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::25) by AM9PR08MB5921.eurprd08.prod.outlook.com (2603:10a6:20b:2d4::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 16:36:38 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::15) by AM6P193CA0048.outlook.office365.com (2603:10a6:209:8e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Tue, 15 Jun 2021 16:36:38 +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 AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:38 +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; Tue, 15 Jun 2021 16:36:20 +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; Tue, 15 Jun 2021 16:36:20 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , Subject: [edk2-devel] [PATCH v1 2/8] MdePkg: IORT header update for IORT Rev E.b spec Date: Tue, 15 Jun 2021 17:36:12 +0100 Message-ID: <20210615163618.85200-3-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 605bf9f3-0684-4542-00d9-08d9301bc6f6 X-MS-TrafficTypeDiagnostic: AM9PR08MB5921:|DB7PR08MB2988: 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: xCEDf4dPZ9xS3FR21S6jsruo6sCSZlDGBVcZLgoRQydUJ4joPrp3CqIbQwAPPIj8tMXPF7Xpjb1Bo4zBng01jamHevc90h7t08dpbQmyG1V2C+Yv5aJexZmAQTVB9hmRPjBdoIkrtrDhinu4UJSujAd9c58lzGZOpCka/0UuLeyVUx7VW0PM1Qug2l5byI72c+SqP+kr1aja5J+TIC7mpTvMrfWeFZEEBCOWOqVouvo6RGR7OHxzo9rF3gzJVmqnNQR/u49THsex8Y8LkhrrcVYISOBYtn61H4E8o2q+CYKJR3sXwNWjia6gRmePIordLPFZJ8sIjGYGmXNb0VyPn//KjF+en63CK+tSi3yuRCMohaFuKKAwVCE3TKsKd1CXQot/Ljs9G8q4qKMfpyaKMl6uuESQqhMi1u3D2PU3VXcgMWv1GzWvhDRXzV8YNVh0qIdAwwle5zUw92/N3DWVZScY2dRaRnSUmzZFwia679qyTfsaWbl+cF60hFWFEYUpPSS/UKsWccchTCcyqxv3HfTMy52U39VjfdHZwajQrUl3kqUmoJkryyJnyJt1sZke5FFtZtEB6qMTja0EoDd9URvSvUHbZjT/sgwMBnuJus3lYrApyP1tLZZeSf3Uo4YO5sRnFL5BJYkNp+Gr2bMzxcZenpT1DJ/o3wFXHwgKEDQSJg4f3UfKilxVoAZf4kGO/SeEwfW2khKzrDia65Dfp32QkVsqqdIDia1wk8cs59wr+M8bdR0TuoAGZi+e2T7wekb6CmUYMZ7ERU3h+STICCO6eDVNgTVB6L4GmLG571tm7tF5koJfSTvAg/LS1+TLOtEtTsU4p4p0GMjXO899sw== 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)(396003)(39850400004)(376002)(36840700001)(46966006)(15650500001)(8676002)(5660300002)(2906002)(82740400003)(86362001)(8936002)(6666004)(44832011)(47076005)(966005)(36860700001)(70586007)(4326008)(82310400003)(70206006)(356005)(81166007)(83380400001)(2616005)(186003)(26005)(426003)(1076003)(6916009)(478600001)(336012)(7696005)(316002)(36756003)(54906003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB5921 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 8c15bdc2-c85c-487c-e775-08d9301bbf61 X-Microsoft-Antispam-Message-Info: 0xdYGPJwjRsnUFNqTfFhsOIiNynyK0ZSismWdCaRn4neEm3VJcIE91W5tTZXnLKNheYzJl2SrGreyDXEOGwaudUyhR411mrW1bMgtwOMnc916tKU8tDX9h4OnKPkVpN/0T0cq804a5PiZzWhQu84TiJ0HJLq7LFaGb9Mb6gHOd9zCG03BdVHBBQ6oLbcWUcKqk1m6u3nbjZGphdZDTZhUj+VjfuThL5hVft3/ecPZ7BYBTgJ9V3DPks3NURPBTn1fInUw7CgBp4yCfZEMppZ3SYvWWIYT3qzYCWmj3ATW5xWcOqdHym/xR+bChNel+5JJnt9jzKyw/BfgIWiWsPXdLJs5cOZoGOq1mpi1eIENA51NgzYthwTIy5xuvPcPvmqlC5kBQSYz5vWJgc6dEKvrCEGOWLTzxjVltzFoE1rpACx94shMRqQiO+gaU2gLp+4Wh9XgiGqul+L3o4e+t/1OZWd7BIJIb2MdRfwW3QuPFH5VTdDNSPpCdXJ5qP6tI/hzpXr1vAWfM+N5lzcQdnRMZDbcAyCiHhuFN3Z8aWPMonoYIip2AevMwyOIy8QFGP0EWJvSGIKRNaN7jKLBZEcuFN9Rs0WXfKytv/bu8152qjB/fOTconowbtWuCcuTvWd/PEMnLrLVOgtbQQ3XUMS5xhnjztHJA3imiVRBANwqbY2DJTcbFcJYbl0Lu6ZNCTPhpyiJ5F0fwQaA2uAJk19fcLvgguGl01Au+eYzHWjsqsWTSee0WcP1HRBjpU/8TNG3NonM9gc9OnbO8JjLI+unwu1hHCI2oslD08rNAyvqT1Yg6rdHPcMliguEYSPgIXQ X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:50.9277 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 605bf9f3-0684-4542-00d9-08d9301bc6f6 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: AM5EUR03FT013.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB2988 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: J1G9KucLpsju4f4X4vA0NiKsx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775059; bh=OkR03P3VFJjlSqZ2rOVTk5oqyEFEwulZ2CEnvrwL+XI=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=Mrrjn0t8ZEQf1Dnfb26TOI7obaftSmS/R5O/jt2iI/mUHymQXWRAUXtWF+Xq5YkC4sh sn8Rb62LNztjcDt/OGfush47zsfbEqrNCkENSp1yOaGwzkxX+QRiAn0l7VX+zGCk1qoK0 RH+Tr+H6eQHHksNcRURerGy3n7dr9JRszAY= 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 --- 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..c6f3e7bc321ea7d85e576b2fe3c= 2889422477506 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_= REV3 =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 (#76535): https://edk2.groups.io/g/devel/message/76535 Mute This Topic: https://groups.io/mt/83560210/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 Sat May 4 12:44:45 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+76536+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 162377505887533.759921132264935; Tue, 15 Jun 2021 09:37:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id EJ39YY1788612xUIAdcjTlu9; Tue, 15 Jun 2021 09:37:38 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.50]) by mx.groups.io with SMTP id smtpd.web10.83.1623775023726271603 for ; Tue, 15 Jun 2021 09:37:04 -0700 X-Received: from AM6P192CA0061.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::38) by AS8PR08MB7096.eurprd08.prod.outlook.com (2603:10a6:20b:403::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Tue, 15 Jun 2021 16:36:57 +0000 X-Received: from AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:82:cafe::f1) by AM6P192CA0061.outlook.office365.com (2603:10a6:209:82::38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 15 Jun 2021 16:36:57 +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+76536+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 AM5EUR03FT041.mail.protection.outlook.com (10.152.17.186) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:56 +0000 X-Received: ("Tessian outbound d8701fbbf774:v93"); Tue, 15 Jun 2021 16:36:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 512fe48de656f85f X-CR-MTA-TID: 64aa7808 X-Received: from 6ebc3b6efd0b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 3629FC83-E9B2-4E56-8AB1-988B7EA37F7F.1; Tue, 15 Jun 2021 16:36:50 +0000 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 6ebc3b6efd0b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:50 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l0Z4rxPLYEGDR5vuenjnHiSoqrCyheRRx4J+kuANkS6hedmGxK9eqm4bTnzOGhf2C2CtOtPghUt5JS+ewZu6t9DSvY+jl2BERbUwmpTikyyJff103A5uYoL+FIdnthaDcOf0fO85KI3WExeOW0aKLZ6zDr4zoHzpz72XCyNBLoKsAXQ5tgNvcFPUTUWG60BmPU0OUjwlBAl5BDWz5+yWuHIuZigs0xpXwgLfz+OhY04MOd1UbetxZ6N4PCFc228eE9/06RY1TU6Wist2biYX7ZUAtdZkK7/C9OHhRTHOFTs8Td/FG/EaguNirVubtLrlokLQe3xHW0Ajx20ye/7Afw== 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=K3VgWs+9/qGbaXEE4OFRk7gKhJFmlKZKD294lP2+QIA=; b=nJnH02q67CUKylNanPA7ZGpa8DjjNSc8Ytf/C+gaKx1QoMvBS5tW991l1SSUa4AZBmhMFSPbQ6R6L7pJ+OsWm3vqO/MIujwLk0Rz0sTTmKQxTXXMkQHFyAIfp/khOZXLY8diI09VKOGV9LZbIre6+R2zi0iPFTpWXpMdAZjji5kD3iQxBKsWqBuHNhRMcFfL9MpwYcchZGckj+D6JFC27/QxRWvkLZWBGj6buwb+nQy1m/C4Ud6ZW8JSbuubv52sxic/k7+bPkb3prJsve4WD0vXYkoJFb+kivfr/9UZ6sGR6vznSgaeaAY3ykIQ9Avx+dbqX0QXefAkPQ6c5BYe2g== 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 AM6P193CA0070.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::47) by AM4PR0802MB2291.eurprd08.prod.outlook.com (2603:10a6:200:5e::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Tue, 15 Jun 2021 16:36:39 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::4b) by AM6P193CA0070.outlook.office365.com (2603:10a6:209:8e::47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:39 +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 AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:39 +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; Tue, 15 Jun 2021 16:36:21 +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; Tue, 15 Jun 2021 16:36:20 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v1 3/8] ShellPkg: Acpiview: Abbreviate field names to preserve alignment Date: Tue, 15 Jun 2021 17:36:13 +0100 Message-ID: <20210615163618.85200-4-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 86fee542-633e-40b6-ccaf-08d9301bca85 X-MS-TrafficTypeDiagnostic: AM4PR0802MB2291:|AS8PR08MB7096: 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: 7mcWdluvnTClsecqgkRbdiups2HgpssUgGef2I8nMaCf3fmJcOZAJkgVOaq1ntMSUin93wkdPFYr4hpwBC92in7kjcdPtyfK9orwKPjlmCfQJJnHcC/gbhE9IJaglOT1baaAUI4CH2oRHSHGdxqcJs2wtM7WyymSJE1ypTsWQ3wIulAEXFhGt5IhcuS4VK6WLgEh5lpxZgeU7iTdA6vQ4hFOSz+VigcvpD1dp46Xa9GXHlbXda/4hPX5LLliEIeWJLA6j3FcGfjcV4NQtUVb53E+BmMjGpXUpPppR1ODR2q6ADFy1vc7Qq7ScUBEmBq5IAC8bq2kbgCYdXIHabx54XFIxNuUtMyAFm9hnKfskMBXqmSWuNi33U8rB9Gad5Rhsh27nW5bdjYCG8Eak1YIPnrbrn1arO0wxeoR1bfxTqCRYb+9AppJX2ufFJyxat+Fr1EULP9CE/VzRfa5cRAQhUmWLaqWT2s6aHk5fDlQOhEKRSuGH+OzRXSd9IercyBQOftsx4dHV+NO1uvUfO5WwxfeJgd3O2IWZED1GqmSiGKgx/cHCFveLDk4Mv2cnUnnGhVZa+gYLSNuxmMgF8vGhLoPpCqxkvGe2PjoUPOSk7SawwWUSZcomilKDWk+jXNk5LAz604zG+SvONejPVZptyo+lweZKhUiV1CH9Ccg/cZcWmH1vP1QjGxgEZXQYg/9 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)(39850400004)(376002)(36840700001)(46966006)(6916009)(70586007)(82740400003)(47076005)(81166007)(5660300002)(2616005)(356005)(86362001)(70206006)(44832011)(82310400003)(4326008)(2906002)(316002)(7696005)(8936002)(36756003)(1076003)(36860700001)(186003)(426003)(83380400001)(336012)(8676002)(26005)(6666004)(54906003)(478600001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2291 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 021c49e4-c59b-489d-ddc6-08d9301bbfea X-Microsoft-Antispam-Message-Info: 6MSS2RIpVmYbV1wMBr1JiBz2p15l99HN/aV/xfo2oPBC2irt8Ke7JluvMdhsbztqPzBNHhJdm8o7lSp7mEht/GCmASfbgDC1qJ3kp33/E3d6Qs2ANP8yg7820Wbx5aeiJtVkWns5tCLxWxBRJNzPbhjHrle8Fpz2T28cjUW+Da20Z6hYm36uLltfxMfiRPN3Mg1MjaIK7WZ4gUQdO5uNYEzaRm9dT0pT5jGiMNFyN2hzbFcB164xg2baS/fieEdR9JtWkAYVoMg6bhfXBsQarjSHkwwCl6ncPmVzbuU/x5R6lWecTtSqd6scUNEGG1+tvz0/UTwnfIoZwH6yUMe9WxDVzz/Oy2v4aFraiHNryeW3dzWP2udQmwqz3TF5lV7l9kYg6QSMoivAZArzFQlQwXdOU9rB/IpcL0UiATbcr+gfTx7+C58A8FJmvgNopwzy5a/mkS/ctORuzVJo5TMpTml1BPdDr2xPsVMCT/nw0Cz0OhMK/J+OfFZ8Wx2r+LC+bC/QCv9psVBEqmgZnHgd9YOWRyJG4oIWtzgN8RgkhYaMwHAlTrlvQCMED/WFyz0U2cw8YJGQJalm47oB+yuUQt8YR819TqLr8D032H5cPiKhJh8CozhRIxWw/vWDsdp4LIiv/MjGmktLnVD0PsvkRAVG+X0gkbigJTmUhTW5jog= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:56.9102 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 86fee542-633e-40b6-ccaf-08d9301bca85 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: AM5EUR03FT041.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7096 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: 2cTtytkTKC7Qe86Kt1IATZkZx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775058; bh=LNt0M1sB03STaNarL5JOFnp2fM30xP5TxaTyGJSNzbg=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=cAHnFQYg70AoQ1HP5+XgNu/s9Mj+LM5b+nZPPXIAcuu8of0iZwPbUij2ktOsDep1W2v seU0bPuRjSTwCZvhymqEmYCLNid7e4icbGDiqjZc5vA4YWUnT2dkCJA3YD65QiHSeFOW6 QcA2Cx5LiNbLgh01fmw4flolQClaVgkRuZU= 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 --- 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 (#76536): https://edk2.groups.io/g/devel/message/76536 Mute This Topic: https://groups.io/mt/83560215/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 Sat May 4 12:44:45 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+76534+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 1623775056668827.1490803215156; Tue, 15 Jun 2021 09:37:36 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id D2SMYY1788612xSzVZW8mjRA; Tue, 15 Jun 2021 09:37:36 -0700 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.60]) by mx.groups.io with SMTP id smtpd.web11.103.1623775019093560669 for ; Tue, 15 Jun 2021 09:36:59 -0700 X-Received: from DBBPR09CA0013.eurprd09.prod.outlook.com (2603:10a6:10:c0::25) by VI1PR08MB4526.eurprd08.prod.outlook.com (2603:10a6:803:f1::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22; Tue, 15 Jun 2021 16:36:51 +0000 X-Received: from DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:c0:cafe::41) by DBBPR09CA0013.outlook.office365.com (2603:10a6:10:c0::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36: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+76534+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 DB5EUR03FT018.mail.protection.outlook.com (10.152.20.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:51 +0000 X-Received: ("Tessian outbound d8701fbbf774:v93"); Tue, 15 Jun 2021 16:36:51 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 537e5978dfd74c61 X-CR-MTA-TID: 64aa7808 X-Received: from 5ea5fa8d145b.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 5207DF84-AF1E-4B13-9732-D6C199C24846.1; Tue, 15 Jun 2021 16:36:45 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5ea5fa8d145b.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PH+k9ZZU7jA4PghfZ7ouqCbDFprCVcMmok3aterqqyAJTWhDSi6OGM7QAOYmovQwabbmvVcCzr6YvVhKdXor5iUw1jqCHQ41NTt60L5fWLkE+Lp5nLoCF8i2GvE+HYUugPQNPZf4q20BROhNXRWSFQwSc711J5XhxtyvdK6vXBrUFza6IOKFwfnSglb+396wFF3Zf7RgqBK2reAmJvqYyb4Fq32dWia8PCXqXi3hyvuRf2FJqBJZ7lVhQMR0hxAA3IEiDe8Qv3VKLbzTsZWolw9hZy49Ytq8rpOy3T2AEsus/t0vuEX2Fd4bchw4J0ew1Q4nWynZjBYA8m0am6f9aA== 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=ELya97LG2ETg1FIoHwPcGbqI2qqhJZ9v2MAgWcbP0Pc=; b=Wr0xVcpcNj3C4/txp9OOquMV0zQcELW4mn+yh1c1jdTuO+jDiXZ++e9X/0LCM/qvP4SnuO8VcHtS836QI6G+0oUMVAHTX8WF6XdhyMKj0RACaVZYmozqX8CLaTwsc9PDwY5DGEpCvP0zGiKXt5/+29fpBrRn/5UT+lzb9ef5LITB9Pgt0m4z5eAamPGlUKlBG3CBluqpH7rWhZTwIEJQyTRWYXkgR6G1ckGepqK+2SWLo7Nf26um4H4yEU3nzbTJX0N2nSv9BBaPizWIT/hbGXPnxCGQ9yDRBWfza+ojU5iz7HgoyR92kKQ6dFZpTkN94BLqSo9kQktG1kS3xsSGzQ== 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 AM6P192CA0099.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::40) by VI1PR08MB3968.eurprd08.prod.outlook.com (2603:10a6:803:e5::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.23; Tue, 15 Jun 2021 16:36:42 +0000 X-Received: from AM5EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8d:cafe::c2) by AM6P192CA0099.outlook.office365.com (2603:10a6:209:8d::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36: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 AM5EUR03FT010.mail.protection.outlook.com (10.152.16.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:41 +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; Tue, 15 Jun 2021 16:36:21 +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; Tue, 15 Jun 2021 16:36:21 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , Subject: [edk2-devel] [PATCH v1 4/8] ShellPkg: Acpiview: IORT parser update for IORT Rev E.b spec Date: Tue, 15 Jun 2021 17:36:14 +0100 Message-ID: <20210615163618.85200-5-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b76cb9d6-bc67-45bc-958c-08d9301bc72c X-MS-TrafficTypeDiagnostic: VI1PR08MB3968:|VI1PR08MB4526: 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: SOnDOL8piUjhXnVGAG33uCU152yEEyEnk/V7Scua8Q4troExPx6m0+568JcCYCK7SgP5xUxF44jHDjUQs051GJ3geCn6ZpPAqLxb+WLFaZWp/Pc1LD23O57bXRoJE+wbOYMLis4/cMHWvSi7WjKTWGN3AV+C76IG9bfidF8/NgXJzlsBEvRIVFZ0YnmenHHczsPxXBEsaIXoRI09Wo8Hbesx4/C9Ywfd9Ze7k3+HX55Pi3Wbr2zXVEGjI/wDPmcr0NwSfAVzCUr0rPyw/958ezCjZniSeRAfRmlA+prrtIcYNOufpk9HO1SToB2+4O3RVKBu5DZcJ6fWv8ohF9ijOkfjqbpdbqYen3lXX05eNFvOGvQEEREItvhla0s6Cpx7neE6zuqi6r02OjF4k6qgSAw7UNRxxHQI4MUn9bbS3CkSsa6FwJOOSGPmBthevl1sfuLM1iFmllrOmSWWkUvePC4ipqT9XsrwWRJlqZs4wmao7xcl7h5ETAmZVf+J3nbGgpdF7mK6TneJBp5YiGjZRnToOxzdzESlkGhSfV+/SvuLpslajbnVQJVjtmB7KBZg2eI17BVvX2NZjBR4RvmF3nf0EiNdSTqXZof+6vEwnKbLqdj+s7/VWCbgif/43bTEjpYUX7uVYuXXNkPFDs03b4N7GrxHJB4GqxDHG4xk6uYoqM5kfJz26FT3mdT9aJUHfLTM7aLwHrvbwHzSHCWwpKTx79hZxjKJWPyQMqQrMAknMqTwBjInDoorjzmvFJEUK+a6QK3r6TfED9M8Ve9WgXGNM6Ovcp+3o9ewaGUS3B0yrQDBVtifMZ7kKO+Pi3BZB4AYp732ETWmBtOOfvZIBIZN3G+59dXISqn+dZB86js= 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)(396003)(39850400004)(36840700001)(46966006)(1076003)(82310400003)(70206006)(2906002)(86362001)(82740400003)(44832011)(356005)(70586007)(426003)(4326008)(83380400001)(336012)(81166007)(26005)(2616005)(7696005)(5660300002)(8936002)(47076005)(6666004)(6916009)(186003)(316002)(15650500001)(36860700001)(54906003)(478600001)(8676002)(36756003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3968 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 6c97b14f-7c92-4808-b95e-08d9301bc184 X-Microsoft-Antispam-Message-Info: 8+OhChfFkHhUYYoZli/M8d31QZCIuUT5rLowE1Q+5uIQ1baVWeAOjePlHr9SBlCJou0ahjVRQF1f9hSwAP5zIZLsWfInDOeNrkHcaVpuBFP1ImgJoK4quAbixX+MfWZcmocssEN0bQEE4K4jskVXLfI8nuZ4xLZ2qvus8U4Gj2sJ0Wwa7mqfmzVhPL75CdrtNS1VTKZqlwT5QAV8eU2d1pmu7nqO3oZUA9jVHRH5/aFarGZDpm1NYziChnUtqBXjZivoYwpufcfK0K6pt8/Rc/ZoTmvJhlBZj5TdfL3qy+C4CrgSoHOmjhJmYj+162sLmPefOVi03qPAkB76FyotxuyKp/dso7iFGkRiLx2ew0erJj5g/P+7ZF0O1pOVc5ZJWag/a1j/2iGKI2BcOswJv9QmKuQwX7LBvbLlZ1ImH+UXJyKEjIsxAz2bl8oFNE7EtaOpI3eDBwsG79tDlFEtW7T8uusoYOMMSwrTzZupb/WhHmCd4LYi+JeIpCTplvhI3d3zNBv0HJ8zFCCdLzrKHunn/ZUsNVQSB048J4ryu2bOleFZnZxPpSwCmKuMx3EWMPfZ7Ssa/XZ5AAuuFbZo0fWCzlrxvKIzSFgchH/PBE/wb0Tan0GpYCyxYnHZqBCmgHYSJtrs5kjjQbHo7ImR58aqWvlYhQW3JHznnRp1v3EtPg4LcOTpx+SV7O2FFBIHK5sEl8gSHqNQtREA1C5WHfDCyqzcdUOJNpfIPlAGtX50pMPFlwC7Ywzrah3SRWAlAGLO86hRmXLzXeZ4sqyaW3DDUn+0k5s0iloFifFhtQCsHhvn3Oyolb7LUYpxhPEM X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:51.3393 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b76cb9d6-bc67-45bc-958c-08d9301bc72c 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: DB5EUR03FT018.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB4526 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: KeATzGeDHCIzBq1XNyW2g9MDx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775056; bh=XpqgreL3+IIC8vnpJPjoeYOH2bEBMiBmLCf+3gKGrgk=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=SJU7v4yf2dmVyBy+GcZ4xYAxf9NDyoslXyA5EsWiZAbe4exBUVuOepLDl73xEC0FFHC /mR/cuYrzSff9phFB8MQJUujh9DMZJ1ja2CQT5dZ97s4yrEDdVX+rLsXmFAseNjoilEQ6 b1+KAR71vQ+svEeS3zgOQ21bcb0MUAlWSn0= 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 --- 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 (#76534): https://edk2.groups.io/g/devel/message/76534 Mute This Topic: https://groups.io/mt/83560208/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 Sat May 4 12:44:45 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+76537+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 1623775060885781.7588950914519; Tue, 15 Jun 2021 09:37:40 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id BWzhYY1788612xUmtsL6BG8q; Tue, 15 Jun 2021 09:37:40 -0700 X-Received: from EUR02-HE1-obe.outbound.protection.outlook.com (EUR02-HE1-obe.outbound.protection.outlook.com [40.107.1.72]) by mx.groups.io with SMTP id smtpd.web08.93.1623775024115801509 for ; Tue, 15 Jun 2021 09:37:04 -0700 X-Received: from PR3P251CA0017.EURP251.PROD.OUTLOOK.COM (2603:10a6:102:b5::15) by PAXPR08MB6701.eurprd08.prod.outlook.com (2603:10a6:102:132::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 16:36:56 +0000 X-Received: from VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com (2603:10a6:102:b5:cafe::45) by PR3P251CA0017.outlook.office365.com (2603:10a6:102:b5::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.16 via Frontend Transport; Tue, 15 Jun 2021 16:36:56 +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+76537+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 VE1EUR03FT040.mail.protection.outlook.com (10.152.18.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:55 +0000 X-Received: ("Tessian outbound a65d687b17e4:v93"); Tue, 15 Jun 2021 16:36:55 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 2602545f0bdac044 X-CR-MTA-TID: 64aa7808 X-Received: from 501ffb91a300.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id F43FB858-629B-447A-A250-20A9B20BECF3.1; Tue, 15 Jun 2021 16:36:49 +0000 X-Received: from FRA01-MR2-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 501ffb91a300.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PUfD5JI2HQ4i7QnhAoUrRsRoeXjQYlYJmU1Fs9X33+tCY+LvpBArMZ6NfP5MbRUum7n76MwANHSJJWM0UdGNkWdHaRLXmWkNpvKtwwd5ah8nMWpnc1ynuMILqyhvhif1BQntmENrSH5pjwa3Rsr+Z1LJ7Qjab9yTkEvntOYSBVpZtHhZEvENU0iSlwfDlQuxNiAlrPUyxKTGZTGpep9ChKuZObVBA2DJSWwQB53BFcRO7ULTPbkAVtM7sFG/LU9+DPYdQQUe0IrnSUR7Roh4MI4pn6zPd8uPZaPK9QVTq9E3PifKNovW//bm5/IzHExCTUdsqJpN41I779PTscJBXw== 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=lA95Ius7tOpFMqu0tSKKFJ5wwM40SwZkHub7i/tej3k=; b=GxucMek7Z+6gjJNadrHsuN5bxerUJ177TNEBQpYgkrJxuXJkjv06zAc6wasUlzv1odPsQ3nkhHgOz52WfdsHPC9NbsjRJGKXsn95KRXq6XPysKroIjNDkqd8wO9fbxSeOQFWPMf6wU8yhqqtcG64IJqLfDewyTtT3SdkGiay8n31tVusxurdiGMgNzZ5ATgabA8KIBGYhENQO+FFO2Ep2VexiIIg1dmKvv6P38HWByRoQDDbVYrKjOaK1wvlt21lEO5nN6VjlUGeTlNaiYLMJKi7FCbN1N714d657JyCnn7FNpgQoqV1skeXL6V52emWn10RH8E2Hy4Kl29sNWwWXA== 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 AM6P192CA0088.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::29) by PR2PR08MB4748.eurprd08.prod.outlook.com (2603:10a6:101:1f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Tue, 15 Jun 2021 16:36:43 +0000 X-Received: from AM5EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8d:cafe::99) by AM6P192CA0088.outlook.office365.com (2603:10a6:209:8d::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.22 via Frontend Transport; Tue, 15 Jun 2021 16:36: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 AM5EUR03FT010.mail.protection.outlook.com (10.152.16.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36: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; Tue, 15 Jun 2021 16:36:22 +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; Tue, 15 Jun 2021 16:36:22 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 5/8] DynamicTablesPkg: IORT set reference to Id array only if present Date: Tue, 15 Jun 2021 17:36:15 +0100 Message-ID: <20210615163618.85200-6-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2ef7ee87-2be2-4798-2447-08d9301bc9f1 X-MS-TrafficTypeDiagnostic: PR2PR08MB4748:|PAXPR08MB6701: 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: zAH/V32KPCVl2bQVDxObcgioZHc7D1tapXJkqX+6s/MiIieP0IW6Og6NicBNzNTKea56Q9lJLggw4LwlKGcCWOhP4ysWDtJeRNsjvCNO9OPvwLeiXBKDFANbtYzgUAj/HBWw9h4jiCcJ1+N3ZfVPS7s/8yn5Utt8KlbPBUyyiYOfRGhugqpxiVDSTf2afYMCwXtDLKp4UTnS+NUzFCVFJWomMeSnIcM07j8SLcQM1OlllmVO4lUddLzV7PWsDIS6BbNsO6YW2xyJO4EFZeYDHM/vAW8W/guEx4gXDGnFgsNps+GRAtP+idkDUmTgigJbRdrEN9sIALQmqGx2+7VmislwmZ13lLXJa7dEokC7cDePDoMgJ+yfjn8TraYFPFMmHVw9M6rA1DvV+hMYKP22GdOYn1hf1itx4wivpEgKAaTs5UzkPti+E+aI7OxFVT7xUHw5MAb+PF0R96yIkrW0BDeaGh1DlwrjBfmNB0BPWgA9DpyennusFkrmHs+M3rx+gb19OYhJguK5WmH5PiWvQbe5/bn4sOCx61oorUiXPHaygRXrprZHsnyMKRbednh8j7GmTTaq92B6R5TinQYLRGynpvJzr7wd6Ctf5STGMcR+VJNrdu2Q1P0sWTAL+cMtHkwiHHjR8wpqvyIkdfrJt5vM2knpBUFjPnK41KSbVHgDIHKp78xexm7VM4EKb/5S 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)(39850400004)(136003)(376002)(346002)(36840700001)(46966006)(47076005)(6916009)(81166007)(6666004)(54906003)(70206006)(36860700001)(4326008)(316002)(70586007)(83380400001)(1076003)(26005)(2616005)(478600001)(36756003)(336012)(7696005)(82310400003)(86362001)(44832011)(2906002)(426003)(186003)(5660300002)(8936002)(82740400003)(8676002)(356005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR2PR08MB4748 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: f966e6b3-acb3-4088-7a80-08d9301bc213 X-Microsoft-Antispam-Message-Info: ONRs+UzBZK6WZp5C9gRBDCGqspaTYxuYtodiyAzRcUKy6Desy76+s2mq+uBxV50CNtQouRvMhc/yrpmo0SmIGHI1D4G/NWFafj0uO19VTl5hVOvaLZgJiGWBdNAv6XZd7cnzz/Etw+vs5UWYfVrJIQtYNvPb70Ng+Y/YnXtBhTtf6RlzQ3KJzWga5pavoIdGanGdPbbKL/xTqaq8elzEki038FTfG3n3MpDIrqFIh4smchTgcbBXXSoFNkheSuhRwpBbyMHhV3y5wXMKmu5+9BUrFaAnEmFwpSkznk2mKObVQuEVX3OCCR4SFPz7GtyBSt2ELnEBnXhunD0ot2jHKfy5C857zbP+94UJ/Qh6RE61146BH9xyipkjH7y3XUw6T7yckr3sCurFc0yXb4HUxHddpftQcujGVri/OslG0B+bJlXX8StW5rdNyK54EIenfF6bjgp4IYuK+nS4amHA64s2ebAGZNaxVisMHHcxCDqlnY0j/PAADz0JHeyptNeNPqcR//FVxIcqXgMUBrenSSA2lr07lnUAPWcsESoqI9lMyxGvjjufir8mIgY+jb+1rVGHkVvWVXSPXo76DnSvYjtgH+zBupNp+JoD8F7a5Xpul05jLwfuWMtFctgUl87nEi0giNqaRQnqU0wa/LW1xhXQm+HqWJBct9T+HuQEK+o= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:55.8710 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2ef7ee87-2be2-4798-2447-08d9301bc9f1 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: VE1EUR03FT040.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB6701 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: 3qQoh4JZ8Sz4YIima24Px8RUx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775060; bh=SiOqd0HD/xS9aXPLir+YP24gRHmji9TvtdCtzc4IhDM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=UzQk9e9yC5Y0lcK2qzN/tr5PNm9BYZDACdXaOtHAVzDW7TNORQMDkxaeVe49Vc+I5jU 8IeqmQD/1+fOEc05z1cKey2mfj/dKpkHieHYQQa1DyCmhToEjq3JMjtBzX2Mlqe8xtl1c 4NhxGOUn5YJ3He3KThLZ5DVMdb4j08D8UwU= 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 --- 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 (#76537): https://edk2.groups.io/g/devel/message/76537 Mute This Topic: https://groups.io/mt/83560216/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 Sat May 4 12:44:45 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+76538+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 1623775061627452.13465713121843; Tue, 15 Jun 2021 09:37:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id gDeGYY1788612xLKllzIWgIB; Tue, 15 Jun 2021 09:37:41 -0700 X-Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.83]) by mx.groups.io with SMTP id smtpd.web08.94.1623775024316479191 for ; Tue, 15 Jun 2021 09:37:04 -0700 X-Received: from AM5PR0502CA0005.eurprd05.prod.outlook.com (2603:10a6:203:91::15) by VI1PR08MB2861.eurprd08.prod.outlook.com (2603:10a6:802:19::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.25; Tue, 15 Jun 2021 16:36:58 +0000 X-Received: from AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:91:cafe::97) by AM5PR0502CA0005.outlook.office365.com (2603:10a6:203:91::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20 via Frontend Transport; Tue, 15 Jun 2021 16:36:58 +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+76538+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 AM5EUR03FT052.mail.protection.outlook.com (10.152.17.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:58 +0000 X-Received: ("Tessian outbound 94919dbe50f5:v93"); Tue, 15 Jun 2021 16:36:58 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: f14ab648bafc56cf X-CR-MTA-TID: 64aa7808 X-Received: from ed5f106e5125.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7601D713-3022-4BA5-8913-79573EE0E38D.1; Tue, 15 Jun 2021 16:36:48 +0000 X-Received: from EUR02-AM5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ed5f106e5125.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CQ51cYghWtIIdjJehySr0KoiQuTL5MMHbDtfQOwpqC+bOg73AVmzsQxNfhOvEWGZt3qveBRawOmxnwaxljS69lrfpxvWiXpEq8aroFNde9K7cbdEwkPdsPpkf94AmQakhGsT/wg9PIxtTlhVoMnm6rE7wdbrmkZ9U8Q7fojrokADnyzqQTue6bjLSzGC6fUjXKILqvnQa/91Ja4RfKvMY44lzP9FTCtYFBPL945Ashy/e3S1W4SJYakBcW9ntX5El+nRC95/gSvk7itzAT4UFH15U7uHuQri4s4sDsrEGMj9Py3fT/WgNWiDUEFytBnSe/6lbv/A1bJh5AzSwMsnUg== 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=z6qe/VvbYdSButKUgOXgTMKXyUYo/ktKe5R2mKHF1aM=; b=K9dVJ+vicAA7rscZ9ndpLFwMK36fDDbjdXa/xDNII/PVovdXPnNjIJ6LeL6CaFfZT2X2mLNgwsbIiAqp/55djhm0Und4t01NmGFbMqXAXWRmshn/R+a53WqDraoUuNcuOQsO5QyJ3y/++5I4BgHv5tjIuAn1p99DXKl2LHQluM27zJUlmISrA7AWGmg5KzJ+G9R+4D2SIA6D/zDmNqIikTbPbzwMJbQpnXvvWq59s6+394sTG3R1cgFedKyZeQNieWE1KfIU79QjAPaGQBX8WivnesTaiiAABr8UXevA4P88BKEM0tfZ+T4W6ZCH8DvUo1i4Ong1t9bvkf+tU6t2pw== 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 AM6P192CA0099.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:8d::40) by DB6PR08MB2935.eurprd08.prod.outlook.com (2603:10a6:6:1f::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 16:36:44 +0000 X-Received: from AM5EUR03FT010.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8d:cafe::c2) by AM6P192CA0099.outlook.office365.com (2603:10a6:209:8d::40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36: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 AM5EUR03FT010.mail.protection.outlook.com (10.152.16.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:43 +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; Tue, 15 Jun 2021 16:36:23 +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; Tue, 15 Jun 2021 16:36:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , Subject: [edk2-devel] [PATCH v1 6/8] DynamicTablesPkg: IORT set reference to interrupt array if present Date: Tue, 15 Jun 2021 17:36:16 +0100 Message-ID: <20210615163618.85200-7-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c7c818c3-2082-4919-450e-08d9301bcb52 X-MS-TrafficTypeDiagnostic: DB6PR08MB2935:|VI1PR08MB2861: 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: DUNA+SIfRWLMBJjPM51TogDQtVqoKznOgYSD9TaMTNzOfzBFOeKzk+hi5Ea72jxeBW3kqjGdUfoXREXec3W14YmLXUGiyJnufJHMT1ati05fuVDQ10AOKAsU7OjpjH/nEa+1yaJwGDz2EdtAk5RHFxBIgBKJs5pdFot+3vahIRx+bSDmHyh7P7uXkAe1iX/R/szS+UhrczlYq6WqTaOBDU23PvoPrE8j3kTgy2hoKECczU6y9TtGupgyv1OFjs20Do5vVeeabGCdP5wlbfXDR9qAiDCIlKsfLEr1y9uFjiaJ7H3lQVAFnMBLp/iEkvmF/EIC6akAvZ5pBj+5dvfR8V4bmo9YQvB+3vfJvlNlrMUigEPCo/Drt+ev7lMriTIpMc9/h0aFEwuqz6ZisAVnNrtBHm6njaQRrtnTBUhl4BZ4bu0ppEVtQiPdrc3i+D1UDiYr1trZamqREvweDjtY7EQNCsCjCxn6vOmmcQb5h/tyk05jDibThRsdSFku68cuZTtJ1BRAqX/Y2BelMj8UGsPR7tjK3/fOp77HqJrqHEXp6MxBIAcYys7ed+N4hEBag72JhXqiswaf09/Ap9QjcUu1RSbJ8t7OPi8KcM+KUAlL4if2OHbMhICfDYMHhdYvpLtNf2mQWiLM5EOOEtgMNK8W+EsoBQvs7AlYkjwSzUzuWrAwEt8yAodqkq9k6QM1 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)(346002)(39850400004)(376002)(36840700001)(46966006)(7696005)(86362001)(44832011)(478600001)(83380400001)(6916009)(8936002)(5660300002)(70206006)(36756003)(336012)(47076005)(81166007)(70586007)(1076003)(316002)(82740400003)(36860700001)(26005)(8676002)(6666004)(4326008)(356005)(54906003)(2616005)(426003)(2906002)(82310400003)(186003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR08MB2935 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 383f1685-e149-4dfd-81b0-08d9301bc294 X-Microsoft-Antispam-Message-Info: XYejtYQ0wpw1oXddTsS/iLZeBZY/lyF/VEwM8faEdR7EbqDeq2uhk4blKx3ADM5FLxNgzflIyYNV1O+yV4xI7AA19IGDp3QFTDmUEGU6V6HkfMjsmQAIU1jnGoQJhlaod3Zv7FcfObnyySvkvibfnTd/aNAK/DFBj/Ir1i3lIL7VbqqzCM4Js7nmkPELEK1JzL6Fs6Xr2dB7+G3S+nJcCQMkooxw3QubYjlgxRrJgCTb8QXqQlgF2ok1BrSRxntWVmSlgkSz0SD0WloTTGa0GAmsgvZpS3pNYH/6f3TdtQQ0fB3Khv0m9c9hF1CXX54UYlp0KTar64ORWa15itzDg8/JkIj134AKCK7wYSFc66S1HTpRfmN13gonR7lkXHzoATwgnftLkeFBp8kNmaJ2S9jOP4WZrvFLe6h98d2qn+vFQJbsDqW+IEgJFPJd98v3r5KknXRc8rmMCNVWB50xKFvAOvCJvUtYTcXLRvD/VoUS2K2yPoCrxZOU2L9ZCt8vAyszeWqqvTM2SMpfWE99fdYQSE6ZBLI2Fgacd74GefBLIgCiHNPZMfbNnta12Gg6w8jzHZbK91kyLF0quC1ogNGSTOS55mH1FMrQAAl1nE30NyijX2so85h+gmi9zR6b7MOSdZkDpbML+yYG3VQ4Vg== X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:58.2512 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c7c818c3-2082-4919-450e-08d9301bcb52 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: AM5EUR03FT052.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB2861 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: 91mvvzdG0ZSgLKkaoLxAiCGmx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775061; bh=fBDOaY0gFXuiFMOWox1lWMSTZGgCE/ZhopqTUCeSZ+w=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vB1pC0LZTDFaLyKxs34UKogLcnsSNSpzG9yUX4rg4v3+ECnT3+S461P5Do6BsDmuMIx xkhUXusVPqXXcG/qr1gUHRpbRQAqQsuFjT2J27jo7qa/vNyobTvx9Nx93fxuY7WuWhjxU 6MyYL0jeB2xdMgA6kw4uIR9dsfHGMh02d/s= 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 --- 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 (#76538): https://edk2.groups.io/g/devel/message/76538 Mute This Topic: https://groups.io/mt/83560217/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 Sat May 4 12:44:45 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+76539+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 1623775062377676.8728618100893; Tue, 15 Jun 2021 09:37:42 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id P1hwYY1788612xMsB38lxsAO; Tue, 15 Jun 2021 09:37:41 -0700 X-Received: from EUR04-DB3-obe.outbound.protection.outlook.com (EUR04-DB3-obe.outbound.protection.outlook.com [40.107.6.77]) by mx.groups.io with SMTP id smtpd.web12.86.1623775026750523844 for ; Tue, 15 Jun 2021 09:37:07 -0700 X-Received: from DU2P251CA0011.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::6) by AM6PR08MB5207.eurprd08.prod.outlook.com (2603:10a6:20b:ea::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.25; Tue, 15 Jun 2021 16:37:04 +0000 X-Received: from DB5EUR03FT060.eop-EUR03.prod.protection.outlook.com (2603:10a6:10:230:cafe::9b) by DU2P251CA0011.outlook.office365.com (2603:10a6:10:230::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Tue, 15 Jun 2021 16:37:04 +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+76539+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 DB5EUR03FT060.mail.protection.outlook.com (10.152.21.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:37:04 +0000 X-Received: ("Tessian outbound 596959d6512a:v93"); Tue, 15 Jun 2021 16:37:04 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 545cc09c498c9de9 X-CR-MTA-TID: 64aa7808 X-Received: from e96f734b0f87.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 9B814D51-326C-48F4-BFD6-44E35BAEA769.1; Tue, 15 Jun 2021 16:36:57 +0000 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id e96f734b0f87.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CH0RaV9MfSjVdWmrDA/qVg8NWXKpnXRb9uqIrBttrKaCjXkpuKFp+k1AswYerJMp1ZdFsT2jgZGhFAcqYcIl2NfKXgCiDwZ++p2DH4mc2yNR5lnN9sN2D+f3I8i5UWudjb8JOx+kOT3qPWZbjQcqYja3n5D8PLKL4XDWacwxegBlB/pKTqtgiPkEKXzDu2huYRiUBB3os9T2IriKEWre/m0OfZ1HRxRo4bafWzGRCvrI3Nku9AY3FQqp5wcX7QXq+dIPmlK2G8KKszLmXn6ZDX+FpTn9O+Mcz5MCeFpMBMZEbUs4dn3PS6EPzWuBoCwTSz0OAEuIkUo+SHYkJb+9nQ== 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=/CmI67eo3cWo5iDQAQZAPfkUZ0RWaE8Dz0ptV37TLpI=; b=cWarcopWxpJDWKgPtwWj1pnjmqFt9ew8h6yNDCr6VUao+zvxJSboYxJHb0HoE53M16slaRFc4z8x4nDGKQ7mJcKzh7xk6wiD66BHGhjzG4RRqYoXBGY6rlYH9fEX66xW1yYpusJ73E8dmnkMvOSGsMrNU0KzWlO32S7DH0v9iMeYNoxLsvUY70ZdfRxV9nppSuMjmtdmWEh4UtBYnH/WV4B5qWprC3fEgPbw799nwYOxr1ZMERGnXWvpIjc8fqkaK7u+LD3fnXlj0nUYs6B4IW9oJD9l4Y8FdGmFfR/fo4YxHe+Nwcs2Y8IAbyMWiXvhqd5tmzqortaFtVOj5glxEg== 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 AM6P193CA0047.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::24) by AM4PR0802MB2129.eurprd08.prod.outlook.com (2603:10a6:200:5d::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.25; Tue, 15 Jun 2021 16:36:44 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::29) by AM6P193CA0047.outlook.office365.com (2603:10a6:209:8e::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4242.15 via Frontend Transport; Tue, 15 Jun 2021 16:36: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 AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:44 +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; Tue, 15 Jun 2021 16:36:24 +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; Tue, 15 Jun 2021 16:36:23 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v1 7/8] DynamicTablesPkg: Update ArmNameSpaceObjects for IORT Rev E.b Date: Tue, 15 Jun 2021 17:36:17 +0100 Message-ID: <20210615163618.85200-8-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bef3dcde-a082-4cf7-e132-08d9301bceef X-MS-TrafficTypeDiagnostic: AM4PR0802MB2129:|AM6PR08MB5207: 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: aQodJSGAo5E4GEG4yskuBVQjumGvzPxFTPpE2L8ARZfXDdAd2YX4pJSV5hp144jzKYStgazSh0bA+Q3P1IIwgs6pQayWdGM5xFllASLd5VLITWgwxArDBK7ipkyZIGErCozkBoE8rEsuvhAVlSyErSSSOIvoDF5X0KYHZtJafNZSgHEBwWEM851BsdpMBdLVxj1QtAvFeNNS9o73e5hlCeYGxzMnElGlqphYwJoQPIWS/yXuAWEZ7QJVVreH1e52flLaNyxRMsgkhB10Ngz5N9gHA7QqWhEAIw3FrliaR5Gc6nlLIuuRpIcth6MzMCx51q4Im4vqUX9lNgU9YOdJBlRGsmrKZYukY68LsUMOoSY5KY9vORCnQxXml+5Gpc5dJ8sC9+22a5hyOYhGnHutlVwiktjSmzafBeWaFopRDoe/u0JIosPFw6vxXEy2+EyLCC+P7LS8v9d0Yp2ixevgOyV/qnk17Ggoxm0HRAwciy4UpnOXjG8+5DnXrREM+pnI0bzhQ6rdxzEVeEde2SWynO2h6ay8M+OFUt+DNuK7T3KZXYH3UnC6PYAHiCyVMjhXXqCKWKuZAbf6EKlMdTyK3u/3E9gnUaYQVF4S5m1B3YgSlUWwcrJQpbS+YKp7zBGK7eEW9YV8KBK2NTWvh5Qylm1ftasqiDSNUVka/XUA8xNLSNLUvSQre86HsrjgAVYJVF6vaRBp+bbJMAZiZ0tdI0ZFZzufEA3m3jcaTkhKl9tmrl9IpHyoO1zjIFMAgx34+6TFVhqweTeiIehccBDwaImJo8nFPYYsV3kvl14KOrtwdXo2NoACKqhSSx8wh2vWxw2JWn29bdQkThtkwxHNBLpCt4GITQzHgQQo3FqJ+Xc= 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)(39850400004)(36840700001)(46966006)(336012)(4326008)(44832011)(15650500001)(426003)(316002)(81166007)(47076005)(356005)(6916009)(82740400003)(26005)(36756003)(36860700001)(83380400001)(2616005)(86362001)(82310400003)(70586007)(54906003)(70206006)(2906002)(19627235002)(6666004)(186003)(8676002)(1076003)(8936002)(5660300002)(478600001)(7696005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0802MB2129 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5EUR03FT060.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: ed6586c1-742e-4421-e071-08d9301bc31f X-Microsoft-Antispam-Message-Info: g+wLZby5FvY3BuKlLBwiZ2fhcnRct3+SzuZ69gwEaCIyOzo+yaejkASCXSW7jYzKLJj7UOBF1FUg2UJ8GELMnqB92Aq7wd3r+nDQYDyDgcVcj8NJdYHc3fvTqEhb0byj0l42LW4rShRKTpSfC+X2NY5ms9t/3dDsnIIIpXjvgcuVXvc6IHjKP/A3020PNW7QUmDQsTjDhvMql5YpLLyfPg5ccsI4v1Met4d3KwRJY48juHoiM5rIamjTfizNxJyH9ufggN/zunqlyL+nzbCWG/uzvFJZYDAkYmq2n+/wikFLoqGIcRe351uNQpQmjcN/5qYdYpNkxWeOxqir/icNM3vselz/dRQA/ehrLYLp3dIC5TZR6FZguG73orhDzPTvI+0UvJ5Mi8+fwnOXKgFFvr0E1bOmJ5l0dUhAoPB8nUaUuV5HhaTGOJWgAuqyNbCgbpKrJWGcQPXUPykfhEGySW9nQNy+Al2y+58pzBpKCKuabp7WtKAZQSC8JD0wF3j8e99tM23Xaps5yiaPoBlFxzjkvwGxFXDo9JGV1myIOcPAz7O889fYAvPr5MFd9bn/Vi0wbFRBadl1PoYZ3qK7GxKtu3fTm1Yw8qwYYR6aS6boTEMKBXC9Dxw7HkfnBXOnjwwFBSGRMSV35Whv02V5vFWAC56pQSXHbwL2RsqFJ5hXLoIDYixZg5k0Cg6yzfTbYneulRPwyvhrDmDCptR79nCogyasNGNIIefri5HRqBFKjXzBsONJgOxtsowIhkdGeRZt2u4u3De0KVuBB239qmIkuRp0GqfRkx56RBvX2e7sN78mYeJzs942wxAuxZQm X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:37:04.3593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bef3dcde-a082-4cf7-e132-08d9301bceef 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: DB5EUR03FT060.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB5207 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: xma2N1SlgzedfPoFjisPBNHXx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775061; bh=C7XdjYqIwTCHLLd08pryCzYTy3licll6gYIZ3ToCJNM=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=UABirQD6PoLWBaey2K6vtgJMf406nGxMlhyNeHt+x7AiuSE0MN8vFeZed3q0Zs+gG+Z gl6FDIk4PONN+xDQ8zVQlVA4z8pfhRkujmdXWaznbEu8l7PUKp3+W3Iz3MimRKMx7k1bE 99N4q4Eq1+mbuAKFWK5v/nhXCH0vUrNxht8= 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 --- 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 (#76539): https://edk2.groups.io/g/devel/message/76539 Mute This Topic: https://groups.io/mt/83560220/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 Sat May 4 12:44:45 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+76532+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 1623775051527249.60465840426446; Tue, 15 Jun 2021 09:37:31 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id C3c7YY1788612xOIgUQr6sxk; Tue, 15 Jun 2021 09:37:29 -0700 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.52]) by mx.groups.io with SMTP id smtpd.web12.80.1623775008218112987 for ; Tue, 15 Jun 2021 09:36:48 -0700 X-Received: from AM6P193CA0062.EURP193.PROD.OUTLOOK.COM (2603:10a6:209:8e::39) by AM9PR08MB6179.eurprd08.prod.outlook.com (2603:10a6:20b:2da::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21; Tue, 15 Jun 2021 16:36:45 +0000 X-Received: from AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com (2603:10a6:209:8e:cafe::bd) by AM6P193CA0062.outlook.office365.com (2603:10a6:209:8e::39) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:45 +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+76532+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 AM5EUR03FT005.mail.protection.outlook.com (10.152.16.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:45 +0000 X-Received: ("Tessian outbound 94919dbe50f5:v93"); Tue, 15 Jun 2021 16:36:45 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 8a639bd4afda105b X-CR-MTA-TID: 64aa7808 X-Received: from 5e6a83b3d0bc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 62AA4853-A899-426E-9C49-17E052C45E36.1; Tue, 15 Jun 2021 16:36:38 +0000 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5e6a83b3d0bc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 15 Jun 2021 16:36:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MJj9ICzPaAToPU9czblxBsQ8yi9bQQFkCNHPxICavOeuZFV6h7E8VMIgyZjnOb/EdtejONEyd6vm5ZQr+RG7wRdu2WLVu+bBwDS5IN11Smwf52iuV287yLptd9/t9R+kbULYANshgAFOoNit5djBYWRp8qLXqKpKzK5LVQwTajMZ9oFxKwJqnZ6PpxBwuYYRoba75tvtv55WetTLtF1yC8jFX6uaDbLevB1Yr8CLNyEGb66XUDqrUi864N1BnN8Zf6RvkOKNdGJUSg1mnJz3gf5Gqht+UzyxVhZU5S0Sz1lV2QorcqJKtUFMB6f6OvmcZUjIZq49AB48givtoNzxHw== 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=NyM89onTPC8CkUDlwVODFJ58Xu+n+bohMZKZnkCG1d4=; b=j7qkO6mz+IjL2zUdwGkzhDzgGb9snkxLpHoVLr1B9o7OdGA9/3QVavQ2U+9JOxwpD6dAQPymnteOoPUQwMOrU7bQSAq6Rzc/SenDda0uWRvDMLDFKrirDUuuymQrIXBKmatRe/fpJCUpzhCMUtRLZCVwcl/kZvpVHJvZTiQAmwih79aixZqWXOS+bbUTB9FE1WcCmbFwenU0789ESErWNuU/Z6SdlDUx+4cbjfvbq9nBhHMxB30etfLf5Zz5v6T57IVAylsxBVguLvywqEunFnomAzs8ipjWnUy5fjfkrDquRWsmCOb2RKeSYdA0rgHsbYQPtGT+He06AkM5DW1L9g== 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 DB6PR0301CA0036.eurprd03.prod.outlook.com (2603:10a6:4:3e::46) by DBBPR08MB4284.eurprd08.prod.outlook.com (2603:10a6:10:d0::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.20; Tue, 15 Jun 2021 16:36:33 +0000 X-Received: from DB5EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:4:3e:cafe::6a) by DB6PR0301CA0036.outlook.office365.com (2603:10a6:4:3e::46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:33 +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 DB5EUR03FT039.mail.protection.outlook.com (10.152.21.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.4219.21 via Frontend Transport; Tue, 15 Jun 2021 16:36:33 +0000 X-Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.14; Tue, 15 Jun 2021 16:36:27 +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; Tue, 15 Jun 2021 16:36:24 +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; Tue, 15 Jun 2021 16:36:24 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [edk2-devel] [PATCH v1 8/8] DynamicTablesPkg: IORT generator updates for Rev E.b spec Date: Tue, 15 Jun 2021 17:36:18 +0100 Message-ID: <20210615163618.85200-9-sami.mujawar@arm.com> In-Reply-To: <20210615163618.85200-1-sami.mujawar@arm.com> References: <20210615163618.85200-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1e9e907e-8cef-4dce-b53d-08d9301bc38b X-MS-TrafficTypeDiagnostic: DBBPR08MB4284:|AM9PR08MB6179: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:6430;OLM:6430; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: 4QX6CJ76s1o/5dgNUOR2j5MiWpxf6/i+NPcjVFposNGjwqCTswKXci7E8AAXPqajU4eAzcJPLr46NKR5AIWuTwGe4NCpORTcpOvxr3fhWluxoXMmLTLY6a9Se4iwdi5qj1nJEHaf0ym4MKloxXoqV6ODvYexy0lpiMUfxPSXApOCOKBT0hgkNUIx26hqZLrHo3gtThsZUjL+J6wkORVoDgRoyZtV9vO0aC5gxUalC/ZUSbqGYDTjLKC5TUj8IhNX1H0G4TTZZZCfgHK4eNVQC1GrMrufmQZNf4Em+ytRNyRksPwgMWYAEdhaR4OB5Y+ew2HDSsp1JDWg6WPUas7Nujth2GFvE2wF/92HTAFoZjSxlsPQOQWBYf0IjqJ/VXiA2QHa1e5Qllce+qvXSFoon94ZBfS5/P+0GWD1WXLpodApOWXWJjLL2oFldDPsKJiCfT6ZdKE9m19xU1/MKe9QsBnpiD+j93Q3f0+3GPf1dADhPfKXvTQhb3VkU2FmHzmZJug3v27eElEyv6tgjo217fc+90CFP4VF5ow+843FUj0CzAHQXRxdlTLwG6CCk7V4ebXOVsEjDsYs4Iwd2YejMZh09uLAQBQoCrvppZipI13Xn6GsEdLs6EM6Di5/6paGmxEWcNT1J9s4ulHG5Ii7SBiheu96kE0jQW2LMParkusDQIdJZ8IXJ1Q76SsMRmDIUczv8guU0p+WYC8/bcE9COyDORofHlUpICZB/xHynwvC6EiBZTAlxbw8tkwxZp5kixRGAe7JkYYWG8AQxzvMO73kABGWpHazIgVS2cF52qdfGFMT+ztgnLN2Q40kpezTlKv+s8VSWhrlgpnql1J5k6PiOYeMWFkLWpyND6AJV0g= 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)(39850400004)(46966006)(36840700001)(26005)(36756003)(54906003)(36860700001)(2906002)(47076005)(81166007)(478600001)(316002)(19627235002)(82310400003)(83380400001)(336012)(8676002)(186003)(8936002)(1076003)(7696005)(44832011)(4326008)(70586007)(70206006)(6916009)(5660300002)(356005)(82740400003)(426003)(2616005)(6666004)(86362001)(15650500001)(30864003)(36900700001)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB4284 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: dbd53c05-7884-4ee1-37e8-08d9301bbc86 X-Microsoft-Antispam-Message-Info: nIh5pL2HcpuIDzk0jaXZe4GVe2xYUc1oN0Gn6ZSFbVKwVFFLXSRoV9ERkkYY40Lg/NQ/JA8cguirU5uzZ4bWi9RHvdx43e0o5AuxnP8F0GE+0wmfXYpIs06QXKNEghJQc1MqOOK6uUKwTetd+w8FRgC97o1HCbOKVWGJ0GYh+JL2WgCvCGYCUtc7BBDqCTA4CHnFZf5PtGTcJdFaaJCjaS/Po+JVMD8Fb719q5ydFRdOQoDrXaa+5ALsRD0S0nFIBxqhLoUBOTG474wGvrCe1vNaaKGa0xM6rXPmF1fYJzPnMnyCcALnlMMKE4J3PSkpCUGbqJ5nMUuSm5b8YxHRjvXJwLEuoxLu1pAuG+bCHBFHSyg/h51XyqQgSjA2QSNOgkhMPEd14AzeDYK7GxAC3jLxSRFSNZgHcY9iA9f5Mk2RB/Uk9xwduEK1yZ41QJr18k3InCDQ+95DUodAUfm9V9qHwuGRnRV/TIzPZgo2UiY//9rTOe6xxcuQ2EhG4zRr4hOQ2ZH5AQEMNeFzosXBgzk7xDEjeC5xHjH84bJCLqR3wZhTKEOycsthFBYi6jcT+c9r8tST1drcszK4cHse/Z+Ue5GHhgsDXD89/dIGa69rQyMLenTW0PVoXrE5HC9eJp50N+gz6B2piddzDd0j9UMRx2hicdNe00DpQ0bn+vCcHjZGxVcYgB4XS/z68hvmQORmsAnmG2slXu/Z0H7ul1tG6x1FEjizuYcn1g8LzwpDLQqNW2r4IH9RGnd3k9Ktiek8pvMieNCBrPY+2o2nfG8bN9/b7KAgR4yXXVUdXaaMgB0t1sXFbr6QfHbaQH78 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jun 2021 16:36:45.1879 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1e9e907e-8cef-4dce-b53d-08d9301bc38b 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: AM5EUR03FT005.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR08MB6179 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: h014Hsu2ClnZCZHfSslwvBG7x1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623775049; bh=gD2ozaQa7RHgf2PNPHaI7gqxmWE/Zt3UXn0KOKsX7zo=; h=CC:Content-Type:Date:From:Reply-To:Subject:To; b=vE4xQBss/IaB4bOlD7aqo7Is7FZkfNxKR3CzjCJ5cU3WuKZCnn5buLLAhmnqjG2iaSR qOZmv8iVMSamXDBTA3jkVr/wcVPvYEWx2xc9WWtdObjqnd6xDChco7Qg2qltx6hGTFP4b WimPaT5EohcS2ZbCg0pvLzBq3dFI/AddPSc= 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 --- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 659 +++= +++++++++++++++-- DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.h | 5 +- 2 files changed, 623 insertions(+), 41 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator= .c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index 9ccf72594db378878d4e3abbafe98e749d9963da..5124c767c41b8f6d8fae314c31c= 4772d28e44276 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, // 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 (#76532): https://edk2.groups.io/g/devel/message/76532 Mute This Topic: https://groups.io/mt/83560204/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-