summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShameer Kolothum <shameerali.kolothum.thodi@huawei.com>2022-03-28 08:52:55 +0100
committerShameer Kolothum <shameerali.kolothum.thodi@huawei.com>2022-03-28 08:52:55 +0100
commit87a2e39b8abdfedfb86b0a105708e37e895becd9 (patch)
tree244e737b98a9fe3e2b2c32308e1e66a8b2e3bdbf
parent0914618b553d6f3366e568409cebf2656891ca69 (diff)
downloadacpica-87a2e39b8abdfedfb86b0a105708e37e895becd9.tar.gz
IORT: Updates for revision E.d
IORT revision is now updated to E.d (ARM DEN 0049E.d) and contains a few additions like, -Added descriptor in the root complex node for specifying PASID width supported by the root complex. -Updated RMR node Flags field. -Introduced memory access attributes in the RMR node. Please note that IORT Rev E.c is deprecated and not supported. Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
-rw-r--r--source/common/dmtable.c7
-rw-r--r--source/common/dmtbdump2.c4
-rw-r--r--source/common/dmtbinfo2.c5
-rw-r--r--source/compiler/dtfield.c6
-rw-r--r--source/compiler/dttable1.c4
-rw-r--r--source/compiler/dttemplate.h12
-rw-r--r--source/compiler/dtutils.c2
-rw-r--r--source/include/acdisasm.h1
-rw-r--r--source/include/actbl2.h26
9 files changed, 53 insertions, 14 deletions
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
index 081f50975..e0b2eb787 100644
--- a/source/common/dmtable.c
+++ b/source/common/dmtable.c
@@ -1361,7 +1361,12 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%1.1X\n", (*Target >> 2) & 0x03);
break;
- case ACPI_DMT_FLAGS4:
+ case ACPI_DMT_FLAGS8_2:
+
+ AcpiOsPrintf ("%2.2X\n", (*Target >> 2) & 0xFF);
+ break;
+
+ case ACPI_DMT_FLAGS4:
AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
break;
diff --git a/source/common/dmtbdump2.c b/source/common/dmtbdump2.c
index d6c7411dc..23434780e 100644
--- a/source/common/dmtbdump2.c
+++ b/source/common/dmtbdump2.c
@@ -203,9 +203,9 @@ AcpiDmDumpIort (
Revision = Table->Revision;
- /* Both IORT Rev E and E.a have known issues and are not supported */
+ /* IORT Revisions E, E.a and E.c have known issues and are not supported */
- if (Revision == 1 || Revision == 2)
+ if (Revision == 1 || Revision == 2 || Revision == 4)
{
AcpiOsPrintf ("\n**** Unsupported IORT revision 0x%X\n",
Revision);
diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c
index aa4de68a4..82dea4c55 100644
--- a/source/common/dmtbinfo2.c
+++ b/source/common/dmtbinfo2.c
@@ -323,7 +323,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort2[] =
{ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (AtsAttribute), "ATS Attribute", 0},
{ACPI_DMT_UINT32, ACPI_IORT2_OFFSET (PciSegmentNumber), "PCI Segment Number", 0},
{ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (MemoryAddressLimit), "Memory Size Limit", 0},
- {ACPI_DMT_UINT24, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_IORT2_OFFSET (PasidCapabilities), "PASID Capabilities", 0},
+ {ACPI_DMT_UINT8, ACPI_IORT2_OFFSET (Reserved[0]), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
@@ -407,6 +408,8 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoIort6[] =
{
{ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (Flags), "Flags (decoded below)", 0},
{ACPI_DMT_FLAG0, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Remapping Permitted", 0},
+ {ACPI_DMT_FLAG1, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Access Privileged", 0},
+ {ACPI_DMT_FLAGS8_2, ACPI_IORT6_FLAG_OFFSET (Flags, 0), "Access Attributes", 0},
{ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (RmrCount), "Number of RMR Descriptors", 0},
{ACPI_DMT_UINT32, ACPI_IORT6_OFFSET (RmrOffset), "RMR Descriptor Offset", 0},
ACPI_DMT_TERMINATOR
diff --git a/source/compiler/dtfield.c b/source/compiler/dtfield.c
index 7e4e6b4d9..f93163195 100644
--- a/source/compiler/dtfield.c
+++ b/source/compiler/dtfield.c
@@ -676,6 +676,12 @@ DtCompileFlag (
BitLength = 2;
break;
+ case ACPI_DMT_FLAGS8_2:
+
+ BitPosition = 2;
+ BitLength = 8;
+ break;
+
case ACPI_DMT_FLAGS4:
BitPosition = 4;
diff --git a/source/compiler/dttable1.c b/source/compiler/dttable1.c
index 66348535e..f5765749b 100644
--- a/source/compiler/dttable1.c
+++ b/source/compiler/dttable1.c
@@ -1953,9 +1953,9 @@ DtCompileIort (
Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
Revision = Table->Revision;
- /* Both IORT Rev E and E.a have known issues and are not supported */
+ /* IORT Revisions E, E.a & E.c have known issues and are not supported */
- if (Revision == 1 || Revision == 2)
+ if (Revision == 1 || Revision == 2 || Revision == 4)
{
DtError (ASL_ERROR, ASL_MSG_UNSUPPORTED, NULL, "IORT table revision");
return (AE_ERROR);
diff --git a/source/compiler/dttemplate.h b/source/compiler/dttemplate.h
index 08c76f6cb..45c12b453 100644
--- a/source/compiler/dttemplate.h
+++ b/source/compiler/dttemplate.h
@@ -868,10 +868,10 @@ const unsigned char TemplateHpet[] =
const unsigned char TemplateIort[] =
{
0x49,0x4F,0x52,0x54,0x3C,0x02,0x00,0x00, /* 00000000 "IORT<..." */
- 0x03,0xF1,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x05,0xCB,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x05,0x01,0x21,0x20,0x07,0x00,0x00,0x00, /* 00000020 "..! ...." */
+ 0x17,0x12,0x21,0x20,0x07,0x00,0x00,0x00, /* 00000020 "..! ...." */
0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "4......." */
0x49,0x4F,0x52,0x54,0x00,0x18,0x00,0x01, /* 00000030 "IORT...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -883,7 +883,7 @@ const unsigned char TemplateIort[] =
0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43, /* 00000068 ".\_SB.PC" */
0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00, /* 00000070 "I0.DEV0." */
0x49,0x4F,0x52,0x54,0x3C,0x02,0x00,0x00, /* 00000078 "IORT<..." */
- 0x03,0xF2,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000080 "..INTEL " */
+ 0x03,0xF1,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000080 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000088 "Template" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000090 "....INTL" */
0x05,0x01,0x21,0x20,0x07,0x00,0x00,0x00, /* 00000098 "..! ...." */
@@ -892,7 +892,7 @@ const unsigned char TemplateIort[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
- 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x03, /* 000000C8 ".....8.." */
+ 0x00,0x00,0x00,0x00,0x02,0x38,0x00,0x04, /* 000000C8 ".....8.." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000D0 "........" */
0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "$......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000E0 "........" */
@@ -930,7 +930,7 @@ const unsigned char TemplateIort[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001F0 "........" */
- 0x06,0x44,0x00,0x01,0x00,0x00,0x00,0x00, /* 000001F8 ".D......" */
+ 0x06,0x44,0x00,0x03,0x00,0x00,0x00,0x00, /* 000001F8 ".D......" */
0x01,0x00,0x00,0x00,0x30,0x00,0x00,0x00, /* 00000200 "....0..." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000208 "........" */
0x1C,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000210 "........" */
@@ -938,7 +938,7 @@ const unsigned char TemplateIort[] =
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000220 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000228 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000230 "........" */
- 0x01,0x00,0x00,0x00 /* 00000238 "...." */
+ 0x00,0x00,0x00,0x00 /* 00000238 "...." */
};
const unsigned char TemplateIvrs[] =
diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c
index 8405df814..e950763e7 100644
--- a/source/compiler/dtutils.c
+++ b/source/compiler/dtutils.c
@@ -411,6 +411,7 @@ DtGetFieldType (
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
+ case ACPI_DMT_FLAGS8_2:
case ACPI_DMT_FLAGS4:
case ACPI_DMT_FLAGS4_0:
case ACPI_DMT_FLAGS4_4:
@@ -561,6 +562,7 @@ DtGetFieldLength (
case ACPI_DMT_FLAGS0:
case ACPI_DMT_FLAGS1:
case ACPI_DMT_FLAGS2:
+ case ACPI_DMT_FLAGS8_2:
case ACPI_DMT_FLAGS4:
case ACPI_DMT_FLAGS4_0:
case ACPI_DMT_FLAGS4_4:
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index 08565d56c..aa12db9e7 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -206,6 +206,7 @@ typedef enum
ACPI_DMT_FLAGS0,
ACPI_DMT_FLAGS1,
ACPI_DMT_FLAGS2,
+ ACPI_DMT_FLAGS8_2,
ACPI_DMT_FLAGS4,
ACPI_DMT_FLAGS4_0,
ACPI_DMT_FLAGS4_4,
diff --git a/source/include/actbl2.h b/source/include/actbl2.h
index 2fa2bb4e2..220b0f745 100644
--- a/source/include/actbl2.h
+++ b/source/include/actbl2.h
@@ -446,7 +446,7 @@ typedef struct acpi_table_bdat
* IORT - IO Remapping Table
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049E.b, Feb 2021
+ * Document number: ARM DEN 0049E.d, Feb 2022
*
******************************************************************************/
@@ -562,7 +562,8 @@ typedef struct acpi_iort_root_complex
UINT32 AtsAttribute;
UINT32 PciSegmentNumber;
UINT8 MemoryAddressLimit; /* Memory address size limit */
- UINT8 Reserved[3]; /* Reserved, must be zero */
+ UINT16 PasidCapabilities; /* PASID Capabilities */
+ UINT8 Reserved[1]; /* Reserved, must be zero */
} ACPI_IORT_ROOT_COMPLEX;
@@ -572,6 +573,8 @@ typedef struct acpi_iort_root_complex
#define ACPI_IORT_PRI_SUPPORTED (1<<1) /* The root complex PRI support */
#define ACPI_IORT_PASID_FWD_SUPPORTED (1<<2) /* The root complex PASID forward support */
+/* Masks for PasidCapabilities field above */
+#define ACPI_IORT_PASID_MAX_WIDTH (0x1F) /* Bits 0-4 */
typedef struct acpi_iort_smmu
{
@@ -658,6 +661,25 @@ typedef struct acpi_iort_rmr {
} ACPI_IORT_RMR;
+/* Masks for Flags field above */
+#define ACPI_IORT_RMR_REMAP_PERMITTED (1)
+#define ACPI_IORT_RMR_ACCESS_PRIVILEGE (1<<1)
+
+/*
+ * Macro to access the Access Attributes in flags field above:
+ * Access Attributes is encoded in bits 9:2
+ */
+#define ACPI_IORT_RMR_ACCESS_ATTRIBUTES(flags) (((flags) >> 2) & 0xFF)
+
+/* Values for above Access Attributes */
+
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGNRNE 0x00
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGNRE 0x01
+#define ACPI_IORT_RMR_ATTR_DEVICE_NGRE 0x02
+#define ACPI_IORT_RMR_ATTR_DEVICE_GRE 0x03
+#define ACPI_IORT_RMR_ATTR_NORMAL_NC 0x04
+#define ACPI_IORT_RMR_ATTR_NORMAL_IWB_OWB 0x05
+
typedef struct acpi_iort_rmr_desc {
UINT64 BaseAddress;
UINT64 Length;