2 * Initial LinuxBIOS ACPI Support - headers and defines.
4 * written by Stefan Reinauer <stepan@openbios.org>
5 * (C) 2004 SUSE LINUX AG
7 * The ACPI table structs are based on the Linux kernel sources.
10 /* ACPI FADT & FACS added by Nick Barker <nick.barker9@btinternet.com>
11 * those parts (C) 2004 Nick Barker
18 #if HAVE_ACPI_TABLES==1
20 typedef unsigned char u8;
21 typedef unsigned short u16;
22 typedef unsigned int u32;
23 typedef unsigned long long u64;
25 #define RSDP_NAME "RSDP"
26 #define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */
28 /* ACPI 2.0 table RSDP */
30 typedef struct acpi_rsdp {
40 } __attribute__((packed)) acpi_rsdp_t;
42 /* Generic Address Container */
44 typedef struct acpi_gen_regaddr {
51 } __attribute__ ((packed)) acpi_addr_t;
53 /* Generic ACPI Header, provided by (almost) all tables */
55 typedef struct acpi_table_header /* ACPI common table header */
57 char signature [4]; /* ACPI signature (4 ASCII characters) */\
58 u32 length; /* Length of table, in bytes, including header */\
59 u8 revision; /* ACPI Specification minor version # */\
60 u8 checksum; /* To make sum of entire table == 0 */\
61 char oem_id [6]; /* OEM identification */\
62 char oem_table_id [8]; /* OEM table identification */\
63 u32 oem_revision; /* OEM revision number */\
64 char asl_compiler_id [4]; /* ASL compiler vendor ID */\
65 u32 asl_compiler_revision; /* ASL compiler revision number */
66 } __attribute__ ((packed)) acpi_header_t;
70 typedef struct acpi_rsdt {
71 struct acpi_table_header header;
73 } __attribute__ ((packed)) acpi_rsdt_t;
77 typedef struct acpi_hpet {
78 struct acpi_table_header header;
80 struct acpi_gen_regaddr addr;
84 } __attribute__ ((packed)) acpi_hpet_t;
86 typedef struct acpi_madt {
87 struct acpi_table_header header;
90 } __attribute__ ((packed)) acpi_madt_t;
92 enum acpi_apic_types {
95 IRQSourceOverride = 2,
98 LApicAddressOverride = 5,
101 PlatformIRQSources = 8
104 typedef struct acpi_madt_lapic {
110 } __attribute__ ((packed)) acpi_madt_lapic_t;
112 typedef struct acpi_madt_lapic_nmi {
118 } __attribute__ ((packed)) acpi_madt_lapic_nmi_t;
121 typedef struct acpi_madt_ioapic {
128 } __attribute__ ((packed)) acpi_madt_ioapic_t;
130 typedef struct acpi_madt_irqoverride {
137 } __attribute__ ((packed)) acpi_madt_irqoverride_t;
140 typedef struct acpi_fadt {
141 struct acpi_table_header header;
145 u8 preferred_pm_profile;
180 struct acpi_gen_regaddr reset_reg;
185 u32 x_firmware_ctl_l;
186 u32 x_firmware_ctl_h;
189 struct acpi_gen_regaddr x_pm1a_evt_blk;
190 struct acpi_gen_regaddr x_pm1b_evt_blk;
191 struct acpi_gen_regaddr x_pm1a_cnt_blk;
192 struct acpi_gen_regaddr x_pm1b_cnt_blk;
193 struct acpi_gen_regaddr x_pm2_cnt_blk;
194 struct acpi_gen_regaddr x_pm_tmr_blk;
195 struct acpi_gen_regaddr x_gpe0_blk;
196 struct acpi_gen_regaddr x_gpe1_blk;
197 } __attribute__ ((packed)) acpi_fadt_t;
199 typedef struct acpi_facs {
202 u32 hardware_signature;
203 u32 firmware_waking_vector;
206 u32 x_firmware_waking_vector_l;
207 u32 x_firmware_waking_vector_h;
210 } __attribute__ ((packed)) acpi_facs_t;
213 unsigned long write_acpi_tables(unsigned long addr);
215 #else // HAVE_ACPI_TABLES
217 #define write_acpi_tables(start) (start)