]> err.no Git - linux-2.6/commitdiff
ACPICA: Add support for DMAR table
authorBob Moore <robert.moore@intel.com>
Fri, 2 Feb 2007 16:48:19 +0000 (19:48 +0300)
committerLen Brown <len.brown@intel.com>
Sat, 3 Feb 2007 02:14:22 +0000 (21:14 -0500)
Implement support for ACPI DMAR table (DMA
Remapping Table) in header files and disassembler.

Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
include/acpi/acdisasm.h
include/acpi/actbl1.h

index 9a7d6921f53424098322b2df79d6ba9b468f90bf..722583af53b91894b54f893886eb1e589db42b55 100644 (file)
@@ -97,9 +97,10 @@ typedef const struct acpi_dmtable_info {
 #define ACPI_DMT_CHKSUM                 20
 #define ACPI_DMT_SPACEID                21
 #define ACPI_DMT_GAS                    22
-#define ACPI_DMT_MADT                   23
-#define ACPI_DMT_SRAT                   24
-#define ACPI_DMT_EXIT                   25
+#define ACPI_DMT_DMAR                   23
+#define ACPI_DMT_MADT                   24
+#define ACPI_DMT_SRAT                   25
+#define ACPI_DMT_EXIT                   26
 
 typedef
 void (*ACPI_TABLE_HANDLER) (struct acpi_table_header * table);
@@ -147,6 +148,11 @@ extern struct acpi_dmtable_info acpi_dm_table_info_boot[];
 extern struct acpi_dmtable_info acpi_dm_table_info_cpep[];
 extern struct acpi_dmtable_info acpi_dm_table_info_cpep0[];
 extern struct acpi_dmtable_info acpi_dm_table_info_dbgp[];
+extern struct acpi_dmtable_info acpi_dm_table_info_dmar[];
+extern struct acpi_dmtable_info acpi_dm_table_info_dmar_hdr[];
+extern struct acpi_dmtable_info acpi_dm_table_info_dmar_scope[];
+extern struct acpi_dmtable_info acpi_dm_table_info_dmar0[];
+extern struct acpi_dmtable_info acpi_dm_table_info_dmar1[];
 extern struct acpi_dmtable_info acpi_dm_table_info_ecdt[];
 extern struct acpi_dmtable_info acpi_dm_table_info_facs[];
 extern struct acpi_dmtable_info acpi_dm_table_info_fadt1[];
@@ -201,6 +207,8 @@ void acpi_dm_dump_asf(struct acpi_table_header *table);
 
 void acpi_dm_dump_cpep(struct acpi_table_header *table);
 
+void acpi_dm_dump_dmar(struct acpi_table_header *table);
+
 void acpi_dm_dump_fadt(struct acpi_table_header *table);
 
 void acpi_dm_dump_srat(struct acpi_table_header *table);
index 8ae30b7ed6523e6f42cf73f465287dc105741e3d..515d82c5ec63e84fb97a836cb1fc332be3e6985c 100644 (file)
@@ -61,6 +61,7 @@
 #define ACPI_SIG_BOOT           "BOOT" /* Simple Boot Flag Table */
 #define ACPI_SIG_CPEP           "CPEP" /* Corrected Platform Error Polling table */
 #define ACPI_SIG_DBGP           "DBGP" /* Debug Port table */
+#define ACPI_SIG_DMAR           "DMAR" /* DMA Remapping table */
 #define ACPI_SIG_ECDT           "ECDT" /* Embedded Controller Boot Resources Table */
 #define ACPI_SIG_HPET           "HPET" /* High Precision Event Timer table */
 #define ACPI_SIG_MADT           "APIC" /* Multiple APIC Description Table */
@@ -226,6 +227,78 @@ struct acpi_table_dbgp {
        struct acpi_generic_address debug_port;
 };
 
+/*******************************************************************************
+ *
+ * DMAR - DMA Remapping table
+ *
+ ******************************************************************************/
+
+struct acpi_table_dmar {
+       struct acpi_table_header header;        /* Common ACPI table header */
+       u8 width;               /* Host Address Width */
+       u8 reserved[11];
+};
+
+/* DMAR subtable header */
+
+struct acpi_dmar_header {
+       u16 type;
+       u16 length;
+       u8 flags;
+       u8 reserved[3];
+};
+
+/* Values for subtable type in struct acpi_dmar_header */
+
+enum acpi_dmar_type {
+       ACPI_DMAR_TYPE_HARDWARE_UNIT = 0,
+       ACPI_DMAR_TYPE_RESERVED_MEMORY = 1,
+       ACPI_DMAR_TYPE_RESERVED = 2     /* 2 and greater are reserved */
+};
+
+struct acpi_dmar_device_scope {
+       u8 entry_type;
+       u8 length;
+       u8 segment;
+       u8 bus;
+};
+
+/* Values for entry_type in struct acpi_dmar_device_scope */
+
+enum acpi_dmar_scope_type {
+       ACPI_DMAR_SCOPE_TYPE_NOT_USED = 0,
+       ACPI_DMAR_SCOPE_TYPE_ENDPOINT = 1,
+       ACPI_DMAR_SCOPE_TYPE_BRIDGE = 2,
+       ACPI_DMAR_SCOPE_TYPE_RESERVED = 3       /* 3 and greater are reserved */
+};
+
+/*
+ * DMAR Sub-tables, correspond to Type in struct acpi_dmar_header
+ */
+
+/* 0: Hardware Unit Definition */
+
+struct acpi_dmar_hardware_unit {
+       struct acpi_dmar_header header;
+       u64 address;            /* Register Base Address */
+};
+
+/* Flags */
+
+#define ACPI_DMAR_INCLUDE_ALL       (1)
+
+/* 1: Reserved Memory Defininition */
+
+struct acpi_dmar_reserved_memory {
+       struct acpi_dmar_header header;
+       u64 address;            /* 4_k aligned base address */
+       u64 end_address;        /* 4_k aligned limit address */
+};
+
+/* Flags */
+
+#define ACPI_DMAR_ALLOW_ALL         (1)
+
 /*******************************************************************************
  *
  * ECDT - Embedded Controller Boot Resources Table