]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/IndustryStandard/IoRemappingTable.h
MdePkg: IORT header update for IORT Rev E.d spec
[mirror_edk2.git] / MdePkg / Include / IndustryStandard / IoRemappingTable.h
index 79a34678681d45b2982dc8573db6bd447f42e429..f48a4a95cd71a147098dff33eff3096b52021990 100644 (file)
@@ -1,12 +1,19 @@
 /** @file\r
-  ACPI IO Remapping Table (IORT) as specified in ARM spec DEN0049D\r
-\r
-  http://infocenter.arm.com/help/topic/com.arm.doc.den0049d/DEN0049D_IO_Remapping_Table.pdf\r
+  ACPI IO Remapping Table (IORT) definitions.\r
 \r
   Copyright (c) 2017, Linaro Limited. All rights reserved.<BR>\r
-  Copyright (c) 2018, ARM Limited. All rights reserved.<BR>\r
+  Copyright (c) 2018 - 2022, Arm Limited. All rights reserved.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
+\r
+  @par Reference(s):\r
+  - IO Remapping Table, Platform Design Document, Revision E.d, Feb 2022\r
+    (https://developer.arm.com/documentation/den0049/)\r
+\r
+  @par Glossary:\r
+  - Ref  : Reference\r
+  - Mem  : Memory\r
+  - Desc : Descriptor\r
 **/\r
 \r
 #ifndef __IO_REMAPPING_TABLE_H__\r
@@ -14,7 +21,9 @@
 \r
 #include <IndustryStandard/Acpi.h>\r
 \r
-#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION  0x0\r
+#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_00  0x0\r
+#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_04  0x4   // Deprecated\r
+#define EFI_ACPI_IO_REMAPPING_TABLE_REVISION_05  0x5\r
 \r
 #define EFI_ACPI_IORT_TYPE_ITS_GROUP     0x0\r
 #define EFI_ACPI_IORT_TYPE_NAMED_COMP    0x1\r
@@ -22,6 +31,7 @@
 #define EFI_ACPI_IORT_TYPE_SMMUv1v2      0x3\r
 #define EFI_ACPI_IORT_TYPE_SMMUv3        0x4\r
 #define EFI_ACPI_IORT_TYPE_PMCG          0x5\r
+#define EFI_ACPI_IORT_TYPE_RMR           0x6\r
 \r
 #define EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA  BIT0\r
 \r
 #define EFI_ACPI_IORT_SMMUv3_MODEL_CAVIUM_CN99XX     0x2\r
 \r
 #define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED  0x0\r
-#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED    0x1\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_ATS_SUPPORTED    BIT0\r
+\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_UNSUPPORTED  0x0\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PRI_SUPPORTED    BIT1\r
+\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_UNSUPPORTED  0x0\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_FWD_SUPPORTED    BIT2\r
+\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_UNSUPPORTED  0x0\r
+#define EFI_ACPI_IORT_ROOT_COMPLEX_PASID_SUPPORTED    BIT1\r
+\r
+#define EFI_ACPI_IORT_RMR_REMAP_NOT_PERMITTED  0x0\r
+#define EFI_ACPI_IORT_RMR_REMAP_PERMITTED      BIT0\r
+\r
+#define EFI_ACPI_IORT_RMR_ACCESS_REQ_NOT_PRIVILEGED  0x0\r
+#define EFI_ACPI_IORT_RMR_ACCESS_REQ_PRIVILEGED      BIT1\r
+\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRNE             0x0\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGNRE              0x1\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_NGRE               0x2\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_DEV_GRE                0x3\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_NC_OUT_NC      0x4\r
+#define EFI_ACPI_IORT_RMR_ACCESS_ATTRIB_NORM_IN_WB_OUT_WB_ISH  0x5\r
 \r
 #define EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE  BIT0\r
 \r
+#define EFI_ACPI_IORT_RMR_NODE_REVISION_02  0x2    // Deprecated\r
+\r
 #pragma pack(1)\r
 \r
 ///\r
@@ -89,7 +123,7 @@ typedef struct {
   UINT8     Type;\r
   UINT16    Length;\r
   UINT8     Revision;\r
-  UINT32    Reserved;\r
+  UINT32    Identifier;\r
   UINT32    NumIdMappings;\r
   UINT32    IdReference;\r
 } EFI_ACPI_6_0_IO_REMAPPING_NODE;\r
@@ -118,7 +152,9 @@ typedef struct {
   UINT32                            AtsAttribute;\r
   UINT32                            PciSegmentNumber;\r
   UINT8                             MemoryAddressSize;\r
-  UINT8                             Reserved1[3];\r
+  UINT16                            PasidCapabilities;\r
+  UINT8                             Reserved1[1];\r
+  UINT32                            Flags;\r
 } EFI_ACPI_6_0_IO_REMAPPING_RC_NODE;\r
 \r
 ///\r
@@ -198,6 +234,40 @@ typedef struct {
   // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE      OverflowInterruptMsiMapping[1];\r
 } EFI_ACPI_6_0_IO_REMAPPING_PMCG_NODE;\r
 \r
+///\r
+/// Memory Range Descriptor.\r
+///\r
+typedef struct {\r
+  /// Base address of Reserved Memory Range,\r
+  /// aligned to a page size of 64K.\r
+  UINT64    Base;\r
+\r
+  /// Length of the Reserved Memory range.\r
+  /// Must be a multiple of the page size of 64K.\r
+  UINT64    Length;\r
+\r
+  /// Reserved, must be zero.\r
+  UINT32    Reserved;\r
+} EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC;\r
+\r
+///\r
+/// Node type 6: Reserved Memory Range (RMR) node\r
+///\r
+typedef struct {\r
+  EFI_ACPI_6_0_IO_REMAPPING_NODE    Node;\r
+\r
+  /// RMR flags\r
+  UINT32                            Flags;\r
+\r
+  /// Memory range descriptor count.\r
+  UINT32                            NumMemRangeDesc;\r
+\r
+  /// Offset of the memory range descriptor array.\r
+  UINT32                            MemRangeDescRef;\r
+  // EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE         IdMapping[1];\r
+  // EFI_ACPI_6_0_IO_REMAPPING_MEM_RANGE_DESC   MemRangeDesc[1];\r
+} EFI_ACPI_6_0_IO_REMAPPING_RMR_NODE;\r
+\r
 #pragma pack()\r
 \r
 #endif\r