From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (EUR04-HE1-obe.outbound.protection.outlook.com [40.107.7.74]) by mx.groups.io with SMTP id smtpd.web08.9946.1657636321655913706 for ; Tue, 12 Jul 2022 07:32:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=xGLzNZYm; spf=pass (domain: arm.com, ip: 40.107.7.74, mailfrom: sami.mujawar@arm.com) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=nXOiSdmo8Hb+OkJR8A98UltBL3Rdty7rLIxUON6oNXrV6CkZIcJ2epz5z8iaNrrZWhc6bLPQDaAYXI+Ce9XaJcp8xJD24Z4nruC+jbwPSzY+Mn550C+XkQQQwrw2Ud7DX0pcwmghtsJIDjalzBbsjvae0lcpFph7pRn/8HKC2HROnYuiVNVgTO9xOdArc8sJpgG/dKmmXgHTwt6FpufjOtd4FcXuYNGqTryyf5nmOGAwlPAwPqwjCFkn0FbNWtcHUnwxSy35Y1YyNyPPRTL9XCQ2s/UcP203Q5offkTnEhYHgiN74S8kEulQ2ZqVq+z7IVnRnjC6zEy5hH/RltOZJw== 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=Pp9hVwmPqIoDtpE9rllpbQeFkr08m59aN9oUpqWMF1U=; b=N2nxMqQCpB+6AsGYANqNg1lAneKLvOGNRvM1bViWOJA0s/O4sA+ptyHIZ6BDpdqcQGONUTKZhQ6YR7HOqLmhwatO2xHzbI35IyxDMTtcFxzxnAdrubQdCD7e6743H3b1bHM734ARxqm1EQqy0gTXSHe5zTm59abkb2fHUlHzQTAo79hns+QlTZDExPiJCuCNjqBUIUj6p0NPrSv7JLaRb1Q8RCzR6pQjkiVrzLnjWu6wcOmfD6YI5YYBkVdcdTfNSIrhbWk0PaCtU2ggQaXxjkP5YOcYJc+ztZO8TZ7MFTKJBZBKSCLj8NYqsOt6JcGkm+pLon7FPIn/I9uiOVmUlQ== 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=Pp9hVwmPqIoDtpE9rllpbQeFkr08m59aN9oUpqWMF1U=; b=xGLzNZYm8nOYJeC0SnI0hQfwrRXePLgeTTzrm7x99HuJTxamrAhk/qgKbMa8HLXYN/yxuUeglIhaNd1nS1maXcAg/mqQovH6prQHVUNhevCHpJ/XJDtTc/dUCW4iRnUGTU10//HdCQ5SDyq6oBToajh6f/VcTzjIpl/WNo6VBxQ= Received: from AS9PR06CA0239.eurprd06.prod.outlook.com (2603:10a6:20b:45e::35) by AS8PR08MB7322.eurprd08.prod.outlook.com (2603:10a6:20b:441::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.17; Tue, 12 Jul 2022 14:31:57 +0000 Received: from AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:45e:cafe::61) by AS9PR06CA0239.outlook.office365.com (2603:10a6:20b:45e::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.15 via Frontend Transport; Tue, 12 Jul 2022 14:31:57 +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 AM5EUR03FT042.mail.protection.outlook.com (10.152.17.168) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.15 via Frontend Transport; Tue, 12 Jul 2022 14:31:56 +0000 Received: ("Tessian outbound e5f49c5d38f9:v122"); Tue, 12 Jul 2022 14:31:56 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: e23744bb4f7dba17 X-CR-MTA-TID: 64aa7808 Received: from be03177f6af2.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id FB586912-3FFC-42E2-B203-58882204CB6D.1; Tue, 12 Jul 2022 14:31:49 +0000 Received: from EUR05-AM6-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id be03177f6af2.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 12 Jul 2022 14:31:49 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I5GYDfS9jDUmqAIzJBcBsWRFQx+D0axL1z2vKK1yTO++AbqxjhJHFxYcMQIW0gM5doHt+/7usuvavSZMIcK8OvbhW2hF8gRXY3xfqr5jaxUkpDNXS092vmGI2wkT02xMd8qBWUbHQ9Epp82fJjKIVHSkKzhTi40VlovmMvXt0e/RYqbHYjr9Mu3xgGio5S42jPB8+qcRIBloZzqgGAgUK6/hOh8/QHyJ794Ont2FviRzh7/p+tHBX3VC/jGq5Qz/GL2D/migmeGL5TIN5aP/EbZlEscXDZ8wxazV5OvmrTjwKqdt7ObXF1mMH7dRQlxUGRw6o8XOj4DbqovVyifefw== 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=Pp9hVwmPqIoDtpE9rllpbQeFkr08m59aN9oUpqWMF1U=; b=Hdy4EU7FiBc3EWcN83vrga+phlRGNUIN9pokGkdkP2t6sJXYfRTkSdlaQ5XFRN18CHiNSDnqEDXC576lv85pZHxtKIL2+iDQ5pu4Y0kHVdumPGyo7VRyU2s0mN77LILWOtgUotqDq2hk9MQwqcqpYJNnaDDA8paypobw9xeSIxNKhWgOIPLr+IYgBIMaAfwzF6mvZQPbPF3PMcqqoRetFpwePw8ro+UfQ5fXBO7mRPoIuqVmtDXmq2KnqIxFMNVuFJAkRIUFH4wyee3mY7iAzUWMalPk93hDFXdHhu2DvBauPtGwADvomBFjImo6B2XBh1x8zjB5Y94eArzgHB0KiA== 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=Pp9hVwmPqIoDtpE9rllpbQeFkr08m59aN9oUpqWMF1U=; b=xGLzNZYm8nOYJeC0SnI0hQfwrRXePLgeTTzrm7x99HuJTxamrAhk/qgKbMa8HLXYN/yxuUeglIhaNd1nS1maXcAg/mqQovH6prQHVUNhevCHpJ/XJDtTc/dUCW4iRnUGTU10//HdCQ5SDyq6oBToajh6f/VcTzjIpl/WNo6VBxQ= Received: from AS9PR06CA0406.eurprd06.prod.outlook.com (2603:10a6:20b:461::16) by AS8PR08MB6343.eurprd08.prod.outlook.com (2603:10a6:20b:337::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.17; Tue, 12 Jul 2022 14:31:47 +0000 Received: from AM5EUR03FT025.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:461:cafe::60) by AS9PR06CA0406.outlook.office365.com (2603:10a6:20b:461::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5417.20 via Frontend Transport; Tue, 12 Jul 2022 14:31:47 +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 AM5EUR03FT025.mail.protection.outlook.com (10.152.16.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5417.15 via Frontend Transport; Tue, 12 Jul 2022 14:31:47 +0000 Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) 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.2507.9; Tue, 12 Jul 2022 14:31:45 +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; Tue, 12 Jul 2022 14:31:45 +0000 From: "Sami Mujawar" To: CC: Sami Mujawar , , , , , , , , , , , , , , , Subject: [PATCH v5 5/8] MdePkg: IORT header update for IORT Rev E.d spec Date: Tue, 12 Jul 2022 15:31:38 +0100 Message-ID: <20220712143141.18516-6-sami.mujawar@arm.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20220712143141.18516-1-sami.mujawar@arm.com> References: <20220712143141.18516-1-sami.mujawar@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 7831ac1e-393f-4f88-4b6a-08da64134605 X-MS-TrafficTypeDiagnostic: AS8PR08MB6343:EE_|AM5EUR03FT042:EE_|AS8PR08MB7322: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: 6UM1lsHElBlzBCx7T+Qwozb9uKsh/34SE5iFzxSmWLJP3XWGr/8It0Y9M5kfw+2H1EIGYdJ+61Lm6OVqMIiByipoKAVZbv9SRwxI/SuFJf+zJ1C28zH1bAFncx6GauR7Mnbu+84T/A0UmlXETscmbMo59nxR0zj5DCSSZIUJI37joei7GdZRuX9KUhKBYdlDZpulybxx+4iPKW4ziyAmpHAStDPJJL8TVgA41lfa04IamtyPVG363ZFmRDScp173eZSxIZx98D2tuIXiYWqtB49+nYmSBasnsLXPkkR7SrX24U+z4JCq7jbFRd8HRk5JzvgGZ1Q0ah2e9+H/+lO80cwOleFHAu33Ki1/OmreuM0x/qWbKJ1hT25rtz1drwNnE+2AFCcMILW0NwQtYNCZ9M27z8EOaNk7L4S1xeDj/fnhN0CWeIresBHCS5JPiuNazAU7ysIqKsdB9n7n2BjKz3JaUvueUyMLZRTVaVz/yY7slI5ed2JziI1XBevf6KQs16VBcOWvZiVhAkjssb9MVzxGbuIV11nQloT/0z7frP0fvMgy9vTrYRpSiPqS7L0xE6Mu2Um4mMZQJwWkXFwwp8RhVTBHo8NSM/8UlTniIDx9ybuQ30vfrA0E3SkuB7Hss3REKiJVRmUsDjsVpsLKDxPJse6j0Kfgz2HFtd+a6lSLouygdpdqQv4pCS5kPgNKAb7MPpRe7uFt05mFlGGUXbTAfbf03HZTgB2hUALofLUa4gpL+6DeTwTICC+bI3bze52SZultDoxKZBbxjWOA8COtGGcuNHzf0gDyvyT5ulOjy+RnUKK/6PnfGrHsDTEN85NvHFyzt1rNffVMRTICYlrJZ/4FDq6zkDbvNTa01HZ/oVJ4nugljukdQzd8aUI3SAb8T4mJGMLcyMo7nGR0n40m4zHI0Iw6ibb3IyMt9rs= 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)(36840700001)(46966006)(40470700004)(2616005)(82740400003)(356005)(81166007)(426003)(36860700001)(83380400001)(8936002)(30864003)(5660300002)(336012)(40460700003)(1076003)(44832011)(2906002)(4326008)(82310400005)(15650500001)(6916009)(478600001)(47076005)(40480700001)(41300700001)(6666004)(54906003)(70206006)(7696005)(70586007)(86362001)(316002)(36756003)(26005)(8676002)(186003)(966005)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6343 Return-Path: Sami.Mujawar@arm.com X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: a9b5c173-3164-41b5-3dba-08da64134099 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: NwpakbzNxIS1i8LAA9c1igtHqT+y9bmy4cOW6buKTGvHOLvjA2Ai3RhTEII1iaqafqw7mq5aYNYuAyKAbxgLEIiyP0vZBSFMRumUttM0PeM2Wb/cYxRMMVFhYZkf1EEg9oiERT+C8mU0fpI1Pp3Q29NCIsxlLlu31A31W+s7aTdOBF9lBPMMVr7mOT4m+D1uNL1NVqSo5crnMUa9Z0IfbL8HvklNF1sJm7xfe21DwEVqVZID3UevMPIN+sw4fyxgkks1/AcxSXQd+66Il9OAv7jPDpPVRp69M8grXIX1phgQ5VotKcQpVRVmf/mXAfOMI4Q1XqCF7C+Z3p1jkz+jB+roMoRNX6FtTqri9VZ7wZCKLDlT2QcOLCzD9DWIWj2OL5p2j/QJP1pBRNO/2YG53XYKnzsof3yxfMDVPoADslzIk7hC3sh8kVrlzdiUz5aMPGPwpqbs15BT0SHxZMmE0p36ggfFK1S0EQ9kBC+ZwxNm4UAA1i9XwF0XjISBIpKrbru7bNQ/BxeeskKo8mMwwvqzG0DxxXWAM/8H9VQWlLZtl4nE2F9gaiUJjsr0Ix6rfVLlmt3gBZtzoKCEuH5MUXQSd1YsaFCVMTNNcDWVSCB2VOwTYLrAaCnQPzXAXmkase7DCZ5nTM3k85cUq060Oy/NPoYnCGpshj3F30WJwO4ZJDrQNOjl57B9Ya2lWdlvuzUVMmWmetYjfefwdfhzXA9khWJD8fcTET0oFBr9bct72hPp7l0Yxt0HgErSAEN3eeDrfkMJDIG2NzGB+n0CWn7lOKUaH/Y4C/r3ixBjSqx5YtJ1w8aOA7qSY79xz8QwenCOj+WPbLUnY/dhdVC8s3DM6dLvVlhDIy/u1XR3UiQhu2aYJy7/1rlg0xnMgMBB 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)(136003)(346002)(396003)(46966006)(36840700001)(40470700004)(478600001)(54906003)(81166007)(966005)(36756003)(6916009)(6666004)(426003)(2616005)(186003)(41300700001)(4326008)(7696005)(70206006)(316002)(1076003)(70586007)(8676002)(82310400005)(40460700003)(40480700001)(86362001)(30864003)(15650500001)(5660300002)(8936002)(44832011)(47076005)(336012)(2906002)(83380400001)(36860700001)(82740400003)(26005);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2022 14:31:56.7473 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7831ac1e-393f-4f88-4b6a-08da64134605 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: AM5EUR03FT042.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB7322 Content-Type: text/plain Bugzilla: 3458 - Add support IORT Rev E.d specification updates (https://bugzilla.tianocore.org/show_bug.cgi?id=3458) The IO Remapping Table, Platform Design Document, Revision E.d, Feb 2022 (https://developer.arm.com/documentation/den0049/) introduces the following updates, collectively including the updates and errata fixes to Rev E, Rev E.a, Rev E.b, Rev E.c: - increments the IORT table revision to 5. - 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. - adds flag to indicate if the root complex supports PASID. - adds flags to define access privilege and attributes for the memory ranges. Therefore, update the IORT header file to reflect these changes, and also rename the EFI_ACPI_IO_REMAPPING_TABLE_REVISION macro to EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00. Also update the IORT generator in DynamicTablesPkg to fix the compilation errors so that Git Bisect can work. Signed-off-by: Sami Mujawar --- Notes: v5: - Change IORT revision macro name to make it similar to [THOMAS] macro names for other ACPI tables. - Updated IORT revision macros from [SAMI] EFI_ACPI_IO_REMAPPING_TABLE_REVx to EFI_ACPI_IO_REMAPPING_TABLE_REVISION_0x Ref: https://edk2.groups.io/g/devel/message/91119 - Keep EFI_ACPI_IO_REMAPPING_TABLE_REVISION and set to [LIMING] EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05. Ref: https://edk2.groups.io/g/devel/message/91137 - Added EFI_ACPI_IO_REMAPPING_TABLE_REVISION and set it [SAMI] to the latest IORT revision. - Updated IORT generator in DynamicTablesPkg and included [SAMI] in this patch so that Git bisect does not break. v4: - Updated patch series to IORT specification revision E.d. [SAMI] - Add flag to indicate if the root complex supports PASID. [SAMI] - Add flags to define access privilege and attributes for [SAMI] the memory ranges. v3: - Submit patch series to update platform code to use the [LIMING] EFI_ACPI_IO_REMAPPING_TABLE_REV0 macro. Ref: https://edk2.groups.io/g/devel/topic/83618423#76799 - Removed definition of EFI_ACPI_IO_REMAPPING_TABLE_REVISION [SAMI] as EFI_ACPI_IO_REMAPPING_TABLE_REV0 has been provided for representing Rev 0. Also, a corresponding patch series for updating the platforms in edk2-platforms repository shall be submitted to the edk2 mailing list. - Include r-b received from v2 series. [SAMI] Ref: https://edk2.groups.io/g/devel/topic/83600724#76660 v2: - Set EFI_ACPI_IO_REMAPPING_TABLE_REVISION to Rev 0 as [SAMI] setting to Rev 3 will break existing platforms. The problem is that existing code would not be populating the Identifier field in the nodes. This can lead to non-unique values in the Identifier field. DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c | 19 +++-- MdePkg/Include/IndustryStandard/IoRemappingTable.h | 83 ++++++++++++++++++-- 2 files changed, 84 insertions(+), 18 deletions(-) diff --git a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c index abef9e5a7f90a38e1d697227d3cd2c110db364a4..63381441e2d6515a7cc9731c89b9739a12c65599 100644 --- a/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c +++ b/DynamicTablesPkg/Library/Acpi/Arm/AcpiIortLibArm/IortGenerator.c @@ -766,7 +766,7 @@ AddItsGroupNodes ( ItsGroupNode->Node.Type = EFI_ACPI_IORT_TYPE_ITS_GROUP; ItsGroupNode->Node.Length = (UINT16)NodeLength; ItsGroupNode->Node.Revision = 0; - ItsGroupNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + ItsGroupNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD; ItsGroupNode->Node.NumIdMappings = 0; ItsGroupNode->Node.IdReference = 0; @@ -872,7 +872,7 @@ AddNamedComponentNodes ( NcNode->Node.Type = EFI_ACPI_IORT_TYPE_NAMED_COMP; NcNode->Node.Length = (UINT16)NodeLength; NcNode->Node.Revision = 2; - NcNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + NcNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD; NcNode->Node.NumIdMappings = NodeList->IdMappingCount; ObjectNameLength = AsciiStrLen (NodeList->ObjectName) + 1; @@ -1005,7 +1005,7 @@ AddRootComplexNodes ( RcNode->Node.Type = EFI_ACPI_IORT_TYPE_ROOT_COMPLEX; RcNode->Node.Length = (UINT16)NodeLength; RcNode->Node.Revision = 1; - RcNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + RcNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD; RcNode->Node.NumIdMappings = NodeList->IdMappingCount; RcNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_RC_NODE); @@ -1018,9 +1018,8 @@ AddRootComplexNodes ( RcNode->AtsAttribute = NodeList->AtsAttribute; RcNode->PciSegmentNumber = NodeList->PciSegmentNumber; RcNode->MemoryAddressSize = NodeList->MemoryAddressSize; + RcNode->PasidCapabilities = EFI_ACPI_RESERVED_WORD; RcNode->Reserved1[0] = EFI_ACPI_RESERVED_BYTE; - RcNode->Reserved1[1] = EFI_ACPI_RESERVED_BYTE; - RcNode->Reserved1[2] = EFI_ACPI_RESERVED_BYTE; if (NodeList->IdMappingCount > 0) { if (NodeList->IdMappingToken == CM_NULL_TOKEN) { @@ -1188,7 +1187,7 @@ AddSmmuV1V2Nodes ( SmmuNode->Node.Type = EFI_ACPI_IORT_TYPE_SMMUv1v2; SmmuNode->Node.Length = (UINT16)NodeLength; SmmuNode->Node.Revision = 0; - SmmuNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + SmmuNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD; SmmuNode->Node.NumIdMappings = NodeList->IdMappingCount; SmmuNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? 0 : (sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU_NODE) + @@ -1387,7 +1386,7 @@ AddSmmuV3Nodes ( SmmuV3Node->Node.Type = EFI_ACPI_IORT_TYPE_SMMUv3; SmmuV3Node->Node.Length = (UINT16)NodeLength; SmmuV3Node->Node.Revision = 2; - SmmuV3Node->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + SmmuV3Node->Node.Identifier = EFI_ACPI_RESERVED_DWORD; SmmuV3Node->Node.NumIdMappings = NodeList->IdMappingCount; SmmuV3Node->Node.IdReference = (NodeList->IdMappingCount == 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_SMMU3_NODE); @@ -1518,7 +1517,7 @@ AddPmcgNodes ( PmcgNode->Node.Type = EFI_ACPI_IORT_TYPE_PMCG; PmcgNode->Node.Length = (UINT16)NodeLength; PmcgNode->Node.Revision = 1; - PmcgNode->Node.Reserved = EFI_ACPI_RESERVED_DWORD; + PmcgNode->Node.Identifier = EFI_ACPI_RESERVED_DWORD; PmcgNode->Node.NumIdMappings = NodeList->IdMappingCount; PmcgNode->Node.IdReference = (NodeList->IdMappingCount == 0) ? 0 : sizeof (EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE); @@ -2258,9 +2257,9 @@ ACPI_IORT_GENERATOR IortGenerator = { // ACPI Table Signature EFI_ACPI_6_2_IO_REMAPPING_TABLE_SIGNATURE, // ACPI Table Revision supported by this Generator - EFI_ACPI_IO_REMAPPING_TABLE_REVISION, + EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00, // Minimum supported ACPI Table Revision - EFI_ACPI_IO_REMAPPING_TABLE_REVISION, + EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00, // Creator ID TABLE_GENERATOR_CREATOR_ID_ARM, // Creator Revision diff --git a/MdePkg/Include/IndustryStandard/IoRemappingTable.h b/MdePkg/Include/IndustryStandard/IoRemappingTable.h index 79a34678681d45b2982dc8573db6bd447f42e429..ba8349ca8deb39b7ae9a86b0ff30c531bbd8ddf9 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_Remapping_Table.pdf + ACPI IO Remapping Table (IORT) definitions. Copyright (c) 2017, Linaro Limited. All rights reserved.
- Copyright (c) 2018, ARM Limited. All rights reserved.
+ Copyright (c) 2018 - 2022, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Reference(s): + - IO Remapping Table, Platform Design Document, Revision E.d, Feb 2022 + (https://developer.arm.com/documentation/den0049/) + + @par Glossary: + - Ref : Reference + - Mem : Memory + - Desc : Descriptor **/ #ifndef __IO_REMAPPING_TABLE_H__ @@ -14,7 +21,8 @@ #include -#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION 0x0 +#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00 0x0 +#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05 0x5 #define EFI_ACPI_IORT_TYPE_ITS_GROUP 0x0 #define EFI_ACPI_IORT_TYPE_NAMED_COMP 0x1 @@ -22,6 +30,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 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA BIT0 @@ -55,7 +64,29 @@ #define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX 0x2 #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_ROOT_COMPLEX_PASID_UNSUPPORTED 0x0 +#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_SUPPORTED BIT1 + +#define EFI_ACPI_IORT_RMR_REMAP_NOT_PERMITTED 0x0 +#define EFI_ACPI_IORT_RMR_REMAP_PERMITTED BIT0 + +#define EFI_ACPI_IORT_RMR_ACCESS_REQ_NOT_PRIVILEGED 0x0 +#define EFI_ACPI_IORT_RMR_ACCESS_REQ_PRIVILEGED BIT1 + +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRNE 0x0 +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRE 0x1 +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGRE 0x2 +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_GRE 0x3 +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_NC_OUT_NC 0x4 +#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_WB_OUT_WB_ISH 0x5 #define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE BIT0 @@ -89,7 +120,7 @@ typedef struct { UINT8 Type; UINT16 Length; UINT8 Revision; - UINT32 Reserved; + UINT32 Identifier; UINT32 NumIdMappings; UINT32 IdReference; } EFI_ACPI_6_0_IO_REMAPPING_NODE; @@ -118,7 +149,9 @@ typedef struct { UINT32 AtsAttribute; UINT32 PciSegmentNumber; UINT8 MemoryAddressSize; - UINT8 Reserved1[3]; + UINT16 PasidCapabilities; + UINT8 Reserved1[1]; + UINT32 Flags; } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE; /// @@ -198,6 +231,40 @@ typedef struct { // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE OverflowInterruptMsiMapping[1]; } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE; +/// +/// 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() #endif -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'