acpi.h (1388B)
1 // References: ACPI 5.0 Errata A 2 // http://acpi.info/spec.htm 3 4 // 5.2.5.3 5 #define SIG_RDSP "RSD PTR " 6 struct acpi_rdsp { 7 uchar signature[8]; 8 uchar checksum; 9 uchar oem_id[6]; 10 uchar revision; 11 uint32 rsdt_addr_phys; 12 uint32 length; 13 uint64 xsdt_addr_phys; 14 uchar xchecksum; 15 uchar reserved[3]; 16 } __attribute__((__packed__)); 17 18 // 5.2.6 19 struct acpi_desc_header { 20 uchar signature[4]; 21 uint32 length; 22 uchar revision; 23 uchar checksum; 24 uchar oem_id[6]; 25 uchar oem_tableid[8]; 26 uint32 oem_revision; 27 uchar creator_id[4]; 28 uint32 creator_revision; 29 } __attribute__((__packed__)); 30 31 // 5.2.7 32 struct acpi_rsdt { 33 struct acpi_desc_header header; 34 uint32 entry[0]; 35 } __attribute__((__packed__)); 36 37 #define TYPE_LAPIC 0 38 #define TYPE_IOAPIC 1 39 #define TYPE_INT_SRC_OVERRIDE 2 40 #define TYPE_NMI_INT_SRC 3 41 #define TYPE_LAPIC_NMI 4 42 43 // 5.2.12 Multiple APIC Description Table 44 #define SIG_MADT "APIC" 45 struct acpi_madt { 46 struct acpi_desc_header header; 47 uint32 lapic_addr_phys; 48 uint32 flags; 49 uchar table[0]; 50 } __attribute__((__packed__)); 51 52 // 5.2.12.2 53 #define APIC_LAPIC_ENABLED 1 54 struct madt_lapic { 55 uchar type; 56 uchar length; 57 uchar acpi_id; 58 uchar apic_id; 59 uint32 flags; 60 } __attribute__((__packed__)); 61 62 // 5.2.12.3 63 struct madt_ioapic { 64 uchar type; 65 uchar length; 66 uchar id; 67 uchar reserved; 68 uint32 addr; 69 uint32 interrupt_base; 70 } __attribute__((__packed__)); 71 72