summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/x86/include/arch/acpi.h27
-rw-r--r--src/arch/x86/include/arch/acpi_ivrs.h33
2 files changed, 60 insertions, 0 deletions
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index d5040adb24..644f52f2ce 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -290,6 +290,33 @@ typedef struct acpi_ivrs {
struct acpi_ivrs_ivhd ivhd;
} __packed acpi_ivrs_t;
+/* IVHD Type 11h IOMMU Attributes */
+typedef struct ivhd11_iommu_attr {
+ uint32_t reserved1 : 13;
+ uint32_t perf_counters : 4;
+ uint32_t perf_counter_banks : 6;
+ uint32_t msi_num_ppr : 5;
+ uint32_t reserved2 : 4;
+} __packed ivhd11_iommu_attr_t;
+
+/* IVRS IVHD (I/O Virtualization Hardware Definition Block) Type 11h */
+typedef struct acpi_ivrs_ivhd_11 {
+ uint8_t type;
+ uint8_t flags;
+ uint16_t length;
+ uint16_t device_id;
+ uint16_t capability_offset;
+ uint32_t iommu_base_low;
+ uint32_t iommu_base_high;
+ uint16_t pci_segment_group;
+ uint16_t iommu_info;
+ struct ivhd11_iommu_attr iommu_attributes;
+ uint32_t efr_reg_image_low;
+ uint32_t efr_reg_image_high;
+ uint32_t reserved[2];
+ uint8_t entry[0];
+} __packed acpi_ivrs_ivhd11_t;
+
enum dev_scope_type {
SCOPE_PCI_ENDPOINT = 1,
SCOPE_PCI_SUB = 2,
diff --git a/src/arch/x86/include/arch/acpi_ivrs.h b/src/arch/x86/include/arch/acpi_ivrs.h
index d8d62d47b5..83abfb63dc 100644
--- a/src/arch/x86/include/arch/acpi_ivrs.h
+++ b/src/arch/x86/include/arch/acpi_ivrs.h
@@ -107,4 +107,37 @@
#define IVHD_UID_INT 0x01
#define IVHD_UID_STRING 0x02
+/* IVHD (I/O Virtualization Hardware Definition Block) 4-byte entry */
+typedef struct ivrs_ivhd_generic {
+ uint8_t type;
+ uint16_t dev_id;
+ uint8_t dte_setting;
+} __packed ivrs_ivhd_generic_t;
+
+/* IVHD (I/O Virtualization Hardware Definition Block) 8-byte entries */
+typedef struct ivrs_ivhd_alias {
+ uint8_t type;
+ uint16_t dev_id;
+ uint8_t dte_setting;
+ uint8_t reserved1;
+ uint16_t source_dev_id;
+ uint8_t reserved2;
+} __packed ivrs_ivhd_alias_t;
+
+typedef struct ivrs_ivhd_extended {
+ uint8_t type;
+ uint16_t dev_id;
+ uint8_t dte_setting;
+ uint32_t extended_dte_setting;
+} __packed ivrs_ivhd_extended_t;
+
+typedef struct ivrs_ivhd_special {
+ uint8_t type;
+ uint16_t reserved;
+ uint8_t dte_setting;
+ uint8_t handle;
+ uint16_t source_dev_id;
+ uint8_t variety;
+} __packed ivrs_ivhd_special_t;
+
#endif