From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (EUR03-DBA-obe.outbound.protection.outlook.com [40.107.104.70]) by mx.groups.io with SMTP id smtpd.web12.4315.1657101450086766245 for ; Wed, 06 Jul 2022 02:57:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=0sj48USY; spf=pass (domain: arm.com, ip: 40.107.104.70, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=kNniQTe07sNzGc8CKew8vJwPug4aGUCfiHiGhPn1QrwqIbEhRjbWV0U+dZCmnj7Lc3yKSmGeRWLHNK/NgHc/+5TXz2Fuu8bCUzK4LmzAOQyGz8UEYTqE3lw/qAarcW+OVfs+PSLL9h6utWFpKPOo/gxHOYKvAX5pxkk6snzNZYkWrRpwW87ZdEwXs+pbXYCeu6V6X13XCrovR0MTfyoj3SMI278ono6w0/6WwYeupkM38Xn2uv8/5CTMWqmuutPRHDgqTHvyzpikFzd75EyyeeeIQsbRdG0AQlwSCto1f1wuRC35CoLkiwJETxHsZDX0epCry0LpicM0ik9SSxbghw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DzgYBrYn2wW3O5qTnNbMndUInELdvzOUK686Ul0igE8=; b=Ii7j2SHsuspzPVWhRHqOv4XxK42LXFl7GccWkixq8K0L+HrgaEEeGyjNbTez0JBjRxUNYNvCYI6CtjAY3OpRiiwY2umAyzAggh2C0E/M4eIGQKKgZWKpFDHPS0yFF2dq+YMn1qkOYNDmnPsIP4I3HtcPGJdZcXKq9kLtrirIbtSeUmmFihLeO597/8rx/8gwzr+7km4HhXRL9luupRIs7ztj7RWB8w6xmUm53PDCmy4BtKU4XzdbaGfWXsWYe3onfu9S7M5T0uy8kLoJlAe9vLnQGGRh7Q9OjVqnvoGOVGwfgFNir1Ro8+XKBSmDcy3EwVaeQzfH+SEP2PJhEs8mpg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DzgYBrYn2wW3O5qTnNbMndUInELdvzOUK686Ul0igE8=; b=0sj48USY/6l+kOqEcIsJ+cGvEsp7rQYaL4ST89KOcEVe0K+cUONGVqzA7HXxOyxdzfsi5p0VK82OR0lXnd3ium7/O7haDAQQSz8R/0/lwdHn7LTD4RgDXiGWTQ9o1WZSYd6icGweDlQoQOvvUZNrW50NbJ2zy2obWVjPc97lU48= Received: from AS9P194CA0019.EURP194.PROD.OUTLOOK.COM (2603:10a6:20b:46d::23) by AM0PR08MB4162.eurprd08.prod.outlook.com (2603:10a6:208:12a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Wed, 6 Jul 2022 09:57:27 +0000 Received: from VE1EUR03FT058.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:46d:cafe::be) by AS9P194CA0019.outlook.office365.com (2603:10a6:20b:46d::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.15 via Frontend Transport; Wed, 6 Jul 2022 09:57:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT058.mail.protection.outlook.com (10.152.19.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.15 via Frontend Transport; Wed, 6 Jul 2022 09:57:26 +0000 Received: ("Tessian outbound 0ba541f03a2a:v122"); Wed, 06 Jul 2022 09:57:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: aaa98dcff035a2cc X-CR-MTA-TID: 64aa7808 Received: from 24c567f0a516.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id AD3FD780-A57C-4234-B888-78F81FB6CB77.1; Wed, 06 Jul 2022 09:57:19 +0000 Received: from EUR03-VE1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 24c567f0a516.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 06 Jul 2022 09:57:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SNnEDuR02l3J71T/kkBKIzmjrEkIylgxzR0kj+ZdnTUuwJuVVy9nRE45O3X3brc5jgRBzwHpCDvCWynODaXOsLGV2Kz9DCDzT7x+vTWnnqkuaCRr3qp5I8VDEqilcoYRXjteyejCtjIXLIajRDQAFbVwoRoRVHFvpE1J32FX9ACXGt+PO7mKKZX3lJ4J+7ZLov/xoHqwkYPBG4YuKufZUJVzM945CJQKc7Hm0KGshnfhN1NAy7HJ3WJNwlpaD6Sg2M0oEY9g9RY5LrAVD2sra4hS9kP0QtDGoVH5yeBx9Ff9UIWyeNXStpWkgWBc4HKDBzKBi0DO/jhHsYwyZ0EXQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DzgYBrYn2wW3O5qTnNbMndUInELdvzOUK686Ul0igE8=; b=eRGeNDIydtMUiHdOU2dL+0gPRqgy4C36QdFKvm9SSSEVOjj80EIcydxu4dyk1Ta8L+mkovHbp7SrGn3Qi9e3X4RcKmVMRJ5PyIWfEJ+VapRo/Gb4GB+zA/zyOkMfzH38YAqc2SNZhRcC8DtgKNyX782mPEgJh6XUqTlBghpblk3YWRA/2px1ykZpvaL9+L1FCC4NodWHvLPXhISQK0TlgpnqV27yCM//uQ1JY/5yDhj/oqDb0Xe/kzyWHKU16BRGBGcNFqPuuVGerpWHaTQ0wCsU2oINCRXqtP8A/AU/QRz+L58IOBnPa5PYbTWHshbh6YhPnynRjFg1F4r1XgM+Og== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DzgYBrYn2wW3O5qTnNbMndUInELdvzOUK686Ul0igE8=; b=0sj48USY/6l+kOqEcIsJ+cGvEsp7rQYaL4ST89KOcEVe0K+cUONGVqzA7HXxOyxdzfsi5p0VK82OR0lXnd3ium7/O7haDAQQSz8R/0/lwdHn7LTD4RgDXiGWTQ9o1WZSYd6icGweDlQoQOvvUZNrW50NbJ2zy2obWVjPc97lU48= Received: from AM7PR04CA0004.eurprd04.prod.outlook.com (2603:10a6:20b:110::14) by AM0PR08MB3586.eurprd08.prod.outlook.com (2603:10a6:208:e1::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14; Wed, 6 Jul 2022 09:57:17 +0000 Received: from VE1EUR03FT039.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:110:cafe::24) by AM7PR04CA0004.outlook.office365.com (2603:10a6:20b:110::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.21 via Frontend Transport; Wed, 6 Jul 2022 09:57:17 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;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; pr=C Received: from nebula.arm.com (40.67.248.234) by VE1EUR03FT039.mail.protection.outlook.com (10.152.19.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5395.14 via Frontend Transport; Wed, 6 Jul 2022 09:57:17 +0000 Received: from AZ-NEU-EX01.Emea.Arm.com (10.251.26.4) by AZ-NEU-EX04.Arm.com (10.251.24.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2507.9; Wed, 6 Jul 2022 09:56:36 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2507.9; Wed, 6 Jul 2022 09:56:35 +0000 Received: from E114225.Arm.com (10.1.196.36) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.9 via Frontend Transport; Wed, 6 Jul 2022 09:56:35 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , Subject: [PATCH v4 5/8] DynamicTablesPkg: IORT set reference to Id array only if present Date: Wed, 6 Jul 2022 10:56:28 +0100 Message-ID: <20220706095631.27196-6-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20220706095631.27196-1-sami.mujawar@arm.com> References: <20220706095631.27196-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 05d54495-e5d3-40ff-8ed7-08da5f35eea2 X-MS-TrafficTypeDiagnostic: AM0PR08MB3586:EE_|VE1EUR03FT058:EE_|AM0PR08MB4162:EE_ x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: wck8I7Vcx+WIdAKN0hj6/mhbX9pzsVBDDZIMPaiizPFkEerTIdxVjN5CtqSd6n5zTe+YqBTawXpY2eY7PRz9pOXUlwQRILDQKP/Amf/rWnhLOlDwxIOI5mMUGoBPmFBHry9clx6jYpyasBoFdqrGF3tqT/SjtIwZ1X8SawtkFQWiTyNuMUjWitzReK+35tayXONaeXAY0yFpNPifIFwpA/AjriI5bpCf6MyFHRj+kBNyJAhJuRwEUm/691fewCqA7jMalE5tXhzwMnczfklSFxZMtXUum2kq/NJ3SZCDwd5gERMbomSTH8FL0QSlvYnJtlKUdxmWlX2WzeqSBpuT0t8VLF2cYDFaWzFzHky9c+aU6QQBOIxLIm4y1zcot9d/kwkOqHsAKzWwjRZWEyIKRLQno2zHlmjYH1eXf7c4k2tod5xH+c5th7yf+4KPiwm3KicZLoofKXCwIoiTuAI6EiGTGbinmCsUS8tM3fHDtWL2UPuAW3ZCDV8XqbRmGW65Hf4/KstcZUi7Ed4z1pMJ/fsie0s7S1RiLvgMlLeH8jlfOTQLsT+pXZlr6uR3eEwCcsvRQlTOhMJlf4CKptbVNmS0m3segvE1wRwshdG7jzQJ2jRKPkcoNZvoJIeLvozfS3H5k0PXET4IaPNdazK4QT/oSzKR6pmiTeQYhxWXS64L8AgVe/bsxif7kZeVC1a1EQ4NPMpA3jHtGMrKB5aHmz4x5cJ1EGdoh8GkZdgSVQ3Xu/HLrVAvl1SwD3P4oULwL78Ba1ITdEnCmSq+yiF4kU6D+57GpgQSqcy+hLOGrA17v3dGlfqFdfQXX38nILQ62Wrkp7VMvgvdA238RHFHv3pg2gZ6XlGMMfO3wRpAyuk= 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:(13230016)(4636009)(396003)(39860400002)(136003)(376002)(346002)(40470700004)(46966006)(36840700001)(70586007)(70206006)(81166007)(82740400003)(6666004)(8676002)(82310400005)(7696005)(41300700001)(356005)(4326008)(36860700001)(1076003)(86362001)(186003)(36756003)(40460700003)(426003)(336012)(47076005)(8936002)(44832011)(5660300002)(2616005)(316002)(40480700001)(2906002)(478600001)(26005)(83380400001)(6916009)(54906003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB3586 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c3a58525-66df-474c-c898-08da5f35e8ec X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7a58d3mbS6a8iueQ95xyqZz63WW3of3DRxvWLfUl5JhCss9yDmq+FZCXqL+TXBx2uhYsFgSdquZNY2GwgK7rxIVjW7mbDRzCiSaZIVtqZZADrM70kMZpakKm/SKt6CbbMtLzGgk87nOdP8WAGpec2NaHmzv7OJExyEr+J7nQcEsNT1AmyUDs8g3t9X28nGCSdf+cvGeKZEjw5G3ZDvbcSN6EUytzozYbQGF2icju2YYxGZPeIAlBNR32yM8iyuZzxX+y/F/AnMf9qFSq8etyLRtsDYxyttqXd+t6dZV25kg4NpY5YshSSFCzBYomuieaoNJQO4fx6UUSt6e4PF6qpAm8vyQZMv3x6qRVG/0tfh7qybccuervx2yzcnhxxrUGHEZOYhKmIhdi0O5mHRyfYWAGNmkYIpoRWeeGn2SwOE4XZ/gTTi+gyEIgDoPzfuVSigqzNCTrm3kfRAYm1KraQ37CvCwH7llYdNSkk9qaByWU2HfzeRtGYEt4dky3zsAIysk5q1j3jdqib3amEgZfc7VBUSlj50H2u2a6N8SvN9YUeDcW17GH+M24g3OQqiADBb/Pk+lp5eNslxrkkjDrhH/RfoFAJ/jT3iHdV+5M09WXVq6r1R+TL2sv7JKwtoTZh/3S/XuCQiPb09w6msQZxjjLr0ODiqvHSnh4geTR0eJP7bXjSBZ0Gh+9bGJzErFPlAc4UyuiN/MbfvLt73fsI5dhuXVLZt6s8uczlZpU+769rBFA9RRwOX+m0x0K44D9QTFbNfwYmCFCb80J6bOPLTRhxtfhPySXqkYtlE/881F7tXTr+eed7rrvkGHYlWdy X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(13230016)(4636009)(376002)(39860400002)(346002)(396003)(136003)(46966006)(40470700004)(36840700001)(2906002)(36860700001)(41300700001)(2616005)(6666004)(40480700001)(1076003)(82310400005)(316002)(36756003)(426003)(54906003)(6916009)(7696005)(70586007)(70206006)(8676002)(4326008)(86362001)(47076005)(478600001)(186003)(83380400001)(336012)(82740400003)(81166007)(26005)(40460700003)(8936002)(5660300002)(44832011);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2022 09:57:26.6789 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 05d54495-e5d3-40ff-8ed7-08da5f35eea2 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: VE1EUR03FT058.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR08MB4162 Content-Type: text/plain The IORT table generator is setting up a reference to ID array for nodes even when the ID Mapping count is zero. This is not an issue as an OS would only access the ID Reference if the ID mapping count is not zero. However, it would be good to set the reference to ID array to zero when the ID Mapping count is zero rather than populating it with an incorrect value. Signed-off-by: Sami Mujawar Reviewed-by: Pierre Gondois --- Notes: v4: - No code change since v1. Re-sending with v4 series. [SAMI] v3: - No code change since v1. Re-sending with v3 series. [SAMI] v2: - No code change since v1. Re-sending with v2 series. [SAMI] DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 27 +++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index daf9ff00c3deab4005814bbfcf1650469d1e7d92..a4dd3d4a895e0a1ae305c937d9a413665fb8e171 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -876,9 +876,9 @@ AddNamedComponentNodes ( NcNode->Node.NumIdMappings = NodeList->IdMappingCount; ObjectNameLength = AsciiStrLen (NodeList->ObjectName) + 1; - NcNode->Node.IdReference = - (UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + - (ALIGN_VALUE (ObjectNameLength, 4))); + NcNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? + 0 : ((UINT32)(sizeof (EFI_ACPI_6_0_IO_REMAPPING_NAMED_COMP_NODE) + + (ALIGN_VALUE (ObjectNameLength, 4)))); // Named Component specific data NcNode->Flags = NodeList->Flags; @@ -1007,7 +1007,8 @@ AddRootComplexNodes ( RcNode->Node.Revision = 1; RcNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings = NodeList->IdMappingCount; - RcNode->Node.IdReference = sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE); + RcNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE); // Root Complex specific data RcNode->CacheCoherent = NodeList->CacheCoherent; @@ -1188,11 +1189,12 @@ AddSmmuV1V2Nodes ( SmmuNode->Node.Revision = 0; SmmuNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; SmmuNode->Node.NumIdMappings = NodeList->IdMappingCount; - SmmuNode->Node.IdReference = 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 = (NodeList->IdMappingCount == 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))); // SMMU v1/v2 specific data SmmuNode->Base = NodeList->BaseAddress; @@ -1360,8 +1362,8 @@ AddSmmuV3Nodes ( SmmuV3Node->Node.Revision = 2; SmmuV3Node->Node.Reserved = EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings = NodeList->IdMappingCount; - SmmuV3Node->Node.IdReference = - sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); + SmmuV3Node->Node.IdReference = (NodeList->IdMappingCount == 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); // SMMUv3 specific data SmmuV3Node->Base = NodeList->BaseAddress; @@ -1491,7 +1493,8 @@ AddPmcgNodes ( PmcgNode->Node.Revision = 1; PmcgNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings = NodeList->IdMappingCount; - PmcgNode->Node.IdReference = sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE); + PmcgNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? + 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE); // PMCG specific data PmcgNode->Base = NodeList->BaseAddress; -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'