summaryrefslogtreecommitdiff
path: root/sys/include/dev/acpi/tables.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include/dev/acpi/tables.h')
-rw-r--r--sys/include/dev/acpi/tables.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/sys/include/dev/acpi/tables.h b/sys/include/dev/acpi/tables.h
index 5215c86..d31cbe0 100644
--- a/sys/include/dev/acpi/tables.h
+++ b/sys/include/dev/acpi/tables.h
@@ -118,6 +118,43 @@ struct __packed acpi_gas {
uint64_t address;
};
+/*
+ * ACPI Address Space ID definitions for GAS
+ *
+ * See section 5.2.3.2 of the ACPI software programming
+ * manual.
+ *
+ * XXX: 0x0B->0x7E is reserved as well as 0x80->0xBF
+ * and 0xC0->0xFF is OEM defined. Values other than
+ * the ones specified below are either garbage or
+ * OEM specific values.
+ */
+#define ACPI_GAS_SYSMEM 0x00 /* System memory space */
+#define ACPI_GAS_SYSIO 0x01 /* System I/O space */
+#define ACPI_GAS_PCICONF 0x02 /* PCI configuration space */
+#define ACPI_GAS_EC 0x03 /* Embedded controller */
+#define ACPI_GAS_SMBUS 0x04 /* System management bus */
+#define ACPI_GAS_CMOS 0x05 /* System CMOS */
+#define ACPI_GAS_PCIBAR 0x06 /* PCI BAR target */
+#define ACPI_GAS_IPMI 0x07 /* IPMI (sensor monitoring) */
+#define ACPI_GAS_GPIO 0x08 /* General Purpose I/O */
+#define ACPI_GAS_GSBUS 0x09 /* GenericSerialBus */
+#define ACPI_GAS_PLATCOM 0x0A /* Platform Communications Channel */
+
+/*
+ * ACPI address size definitions for GAS
+ *
+ * See section 5.2.3.2 of the ACPI software programming
+ * manual.
+ *
+ * This is really retarded Intel and Microsoft, thank you.
+ */
+#define ACPI_GAS_UNDEF 0 /* Undefined (legacy reasons) */
+#define ACPI_GAS_BYTE 1 /* Byte access */
+#define ACPI_GAS_WORD 2 /* Word access */
+#define ACPI_GAS_DWORD 3 /* Dword access */
+#define ACPI_GAS_QWORD 4 /* Qword access */
+
struct __packed acpi_hpet {
struct acpi_header hdr;
uint8_t hardware_rev_id;
@@ -132,4 +169,65 @@ struct __packed acpi_hpet {
uint8_t page_protection;
};
+/*
+ * PCIe / ACPI MCFG base address description
+ * table.
+ *
+ * @base_pa: Enhanced configuration base [physical]
+ * @seg_grpno: PCI segment group number
+ * @bus_start: Host bridge bus start
+ * @bus_end: Host bridge bus end
+ */
+struct __packed acpi_mcfg_base {
+ uint64_t base_pa;
+ uint16_t seg_grpno;
+ uint8_t bus_start;
+ uint8_t bus_end;
+ uint32_t reserved;
+};
+
+/*
+ * PCIe / ACPI MCFG structure
+ *
+ * @hdr: ACPI header
+ * @reserved: Do not use
+ * @base: ECAM MMIO address list
+ */
+struct __packed acpi_mcfg {
+ struct acpi_header hdr;
+ uint32_t reserved[2];
+ struct acpi_mcfg_base base[1];
+};
+
+struct __packed dmi_entry32 {
+ char signature[4]; /* _SM_ */
+ uint8_t checksum; /* Sum of table bytes */
+ uint8_t length; /* Length of entry table */
+ uint8_t major; /* DMI major */
+ uint8_t minor; /* DMI minor */
+ uint16_t max_size; /* Max structure size */
+ uint8_t rev; /* Entry revision */
+ char fmt_area[5]; /* Formatted area */
+ char isignature[5]; /* Intermediate signature */
+ uint8_t ichecksum; /* Intermediate checksum */
+ uint16_t table_len; /* Length of SMBIOS structure table */
+ uint32_t addr; /* 32-bit physical start of SMBIOS structure table */
+ uint16_t nstruct; /* Total number of structures */
+ uint8_t bcd_rev;
+};
+
+struct __packed dmi_entry64 {
+ char signature[5]; /* _SM_ */
+ uint8_t checksum; /* Sum of table bytes */
+ uint8_t length; /* Length of entry table */
+ uint8_t major; /* DMI major */
+ uint8_t minor; /* DMI minor */
+ uint8_t docrev;
+ uint8_t entry_rev;
+ uint8_t reserved;
+ uint16_t max_size; /* Max structure size */
+ uint16_t padding;
+ uint64_t addr; /* 64-bit physical address */
+};
+
#endif /* _ACPI_TABLES_H_ */