diff mbox

[v3,1/2] ACPI: Add definitions for the DBG2 table

Message ID 1442328281-18039-2-git-send-email-leif.lindholm@linaro.org
State New
Headers show

Commit Message

Leif Lindholm Sept. 15, 2015, 2:44 p.m. UTC
The DBG2 table can be considered a "companion" to SPCR - it points out
debug consoles available in the system.

Also update SPCR comments to reflect DBG2 is now described in this file,
and update the supported SPCR specification revision (no functional
change).

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
---
 include/hw/acpi/acpi-defs.h | 33 +++++++++++++++++++++++++++++++--
 1 file changed, 31 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/include/hw/acpi/acpi-defs.h b/include/hw/acpi/acpi-defs.h
index 2b431e6..3cfc5a6 100644
--- a/include/hw/acpi/acpi-defs.h
+++ b/include/hw/acpi/acpi-defs.h
@@ -197,10 +197,39 @@  enum {
 };
 
 /*
- * Serial Port Console Redirection Table (SPCR), Rev. 1.02
+ * Debug Port Table 2 (DBG2)
  *
  * For .interface_type see Debug Port Table 2 (DBG2) serial port
- * subtypes in Table 3, Rev. May 22, 2012
+ * subtypes in Table 3, Rev. Aug 10, 2015
+ *
+ */
+struct AcpiDebugPort2Header {
+    ACPI_TABLE_HEADER_DEF
+    uint32_t devices_offset;
+    uint32_t devices_count;
+} QEMU_PACKED;
+typedef struct AcpiDebugPort2Header AcpiDebugPort2Header;
+
+struct AcpiDebugPort2Device {
+    uint8_t  revision;
+    uint16_t length;
+    uint8_t  address_count;
+    uint16_t namepath_length;
+    uint16_t namepath_offset;
+    uint16_t oem_data_length;
+    uint16_t oem_data_offset;
+    uint16_t port_type;
+    uint16_t port_subtype;
+    uint8_t  reserved1[2];
+    uint16_t base_address_offset;
+    uint16_t address_size_offset;
+} QEMU_PACKED;
+typedef struct AcpiDebugPort2Device AcpiDebugPort2Device;
+
+/*
+ * Serial Port Console Redirection Table (SPCR), Rev. 1.03
+ *
+ * .interface_type format same as for DBG2.
  */
 struct AcpiSerialPortConsoleRedirection {
     ACPI_TABLE_HEADER_DEF