]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdePkg/include: Update DMAR definitions to Intel VT-d spec ver4.0
authorRobert Kowalewski <robert.kowalewski@intel.com>
Wed, 6 Jul 2022 13:47:36 +0000 (21:47 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 11 Jul 2022 07:46:10 +0000 (07:46 +0000)
Updated DMAR definitions accordingly to changes in Intel(R) Virtualization
Technology for Directed I/O (VT-D) Architecture Specification ver4.0.

Added new definition of remapping structure - SIDP. The SoC Integrated
Device Property (SIDP) reporting structure identifies devices that have
special properties and that may put restrictions on how system software
must configure remapping structures that govern such devices in a platform
where remapping hardware is enabled.

Updated DRHD definition - field 'reserved' is replaced with 'Size'.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3978

Signed-off-by: Robert Kowalewski <robert.kowalewski@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Sheng Wei <w.sheng@intel.com>
Reviewed-by: Sheng Wei <w.sheng@intel.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
MdePkg/Include/IndustryStandard/DmaRemappingReportingTable.h

index 193e4bced530148c1c4797513430abc785e0fe0a..00588ff2342f245c0be3eb94faff84b470ddb6cf 100644 (file)
@@ -2,12 +2,12 @@
   DMA Remapping Reporting (DMAR) ACPI table definition from Intel(R)\r
   Virtualization Technology for Directed I/O (VT-D) Architecture Specification.\r
 \r
-  Copyright (c) 2016 - 2020, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2016 - 2022, Intel Corporation. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Revision Reference:\r
     - Intel(R) Virtualization Technology for Directed I/O (VT-D) Architecture\r
-      Specification v3.2, Dated October 2020.\r
+      Specification v4.0, Dated June 2022.\r
       https://software.intel.com/content/dam/develop/external/us/en/documents/vt-directed-io-spec.pdf\r
 \r
   @par Glossary:\r
@@ -41,6 +41,7 @@
 #define EFI_ACPI_DMAR_TYPE_RHSA  0x03\r
 #define EFI_ACPI_DMAR_TYPE_ANDD  0x04\r
 #define EFI_ACPI_DMAR_TYPE_SATC  0x05\r
+#define EFI_ACPI_DMAR_TYPE_SIDP  0x06\r
 ///@}\r
 \r
 ///\r
 #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_IOAPIC                 0x03\r
 #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_MSI_CAPABLE_HPET       0x04\r
 #define EFI_ACPI_DEVICE_SCOPE_ENTRY_TYPE_ACPI_NAMESPACE_DEVICE  0x05\r
+\r
+#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_NESTED_NOTALLOWED  BIT0\r
+#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_PWSNP_NOTALLOWED   BIT1\r
+#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_PGSNP_NOTALLOWED   BIT2\r
+#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_ATC_HARDENED       BIT3\r
+#define EFI_ACPI_DEVICE_SCOPE_REQ_WO_PASID_ATC_REQUIRED       BIT4\r
 ///@}\r
 \r
 ///\r
@@ -83,11 +90,12 @@ typedef struct {
 /// Device Scope Structure is defined in section 8.3.1\r
 ///\r
 typedef struct {\r
-  UINT8     Type;\r
-  UINT8     Length;\r
-  UINT16    Reserved2;\r
-  UINT8     EnumerationId;\r
-  UINT8     StartBusNumber;\r
+  UINT8    Type;\r
+  UINT8    Length;\r
+  UINT8    Flags;\r
+  UINT8    Reserved;\r
+  UINT8    EnumerationId;\r
+  UINT8    StartBusNumber;\r
 } EFI_ACPI_DMAR_DEVICE_SCOPE_STRUCTURE_HEADER;\r
 \r
 /**\r
@@ -111,7 +119,14 @@ typedef struct {
     - Bits[7:1] Reserved.\r
   **/\r
   UINT8     Flags;\r
-  UINT8     Reserved;\r
+\r
+  /**\r
+    - Bits[3:0]: Indicates the size of the remapping hardware register set for\r
+                 this remapping unit. If the value in this field is N, the size\r
+                 of the register set is 2^N 4 KB pages\r
+    - Bits[7:4]: Reserved.\r
+  **/\r
+  UINT8     Size;\r
   ///\r
   /// The PCI Segment associated with this unit.\r
   ///\r
@@ -249,6 +264,20 @@ typedef struct {
   UINT16    SegmentNumber;\r
 } EFI_ACPI_DMAR_SATC_HEADER;\r
 \r
+/**\r
+  SoC Integrated Device Property (SIDP) Reporting Structure is defined in\r
+  section 8.9.\r
+**/\r
+typedef struct {\r
+  EFI_ACPI_DMAR_STRUCTURE_HEADER    Header;\r
+\r
+  UINT16                            Reserved;\r
+  ///\r
+  /// The PCI Segment associated with this SIDP structure.\r
+  ///\r
+  UINT16                            SegmentNumber;\r
+} EFI_ACPI_DMAR_SIDP_HEADER;\r
+\r
 /**\r
   DMA Remapping Reporting Structure Header as defined in section 8.1\r
   This header will be followed by list of Remapping Structures listed below\r
@@ -258,6 +287,7 @@ typedef struct {
     - Remapping Hardware Static Affinity (RHSA)\r
     - ACPI Name-space Device Declaration (ANDD)\r
     - SoC Integrated Address Translation Cache reporting (SATC)\r
+    - SoC Integrated Device Property reporting (SIDP)\r
   These structure types must by reported in numerical order.\r
   i.e., All remapping structures of type 0 (DRHD) enumerated before remapping\r
   structures of type 1 (RMRR), and so forth.\r