2 * acpitable.h - x86-64-specific ACPI boot-time initialization
4 * Copyright (C) 1999 Andrew Henroid
5 * Copyright (C) 2001 Richard Schaal
6 * Copyright (C) 2001 Paul Diefenbaugh <paul.s.diefenbaugh@intel.com>
7 * Copyright (C) 2001 Jun Nakajima <jun.nakajima@intel.com>
8 * Copyright (C) 2001 Arjan van de Ven <arjanv@redhat.com>
9 * Copyright (C) 2002 Vojtech Pavlik <vojtech@suse.cz>
13 * The following codes are cut&pasted from drivers/acpi. Part of the code
14 * there can be not updated or delivered yet.
15 * To avoid conflicts when CONFIG_ACPI is defined, the following codes are
16 * modified so that they are self-contained in this file.
20 #ifndef _HEADER_ACPITABLE_H_
21 #define _HEADER_ACPITABLE_H_
23 struct acpi_table_header { /* ACPI common table header */
24 char signature[4]; /* identifies type of table */
25 u32 length; /* length of table,
26 in bytes, * including header */
27 u8 revision; /* specification minor version # */
28 u8 checksum; /* to make sum of entire table == 0 */
29 char oem_id[6]; /* OEM identification */
30 char oem_table_id[8]; /* OEM table identification */
31 u32 oem_revision; /* OEM revision number */
32 char asl_compiler_id[4]; /* ASL compiler vendor ID */
33 u32 asl_compiler_revision; /* ASL compiler revision number */
34 } __attribute__ ((packed));;
43 static char *acpi_table_signatures[ACPI_TABLE_COUNT] = {
49 struct acpi_table_madt {
50 struct acpi_table_header header;
55 } flags __attribute__ ((packed));
56 } __attribute__ ((packed));;
61 ACPI_MADT_INT_SRC_OVR,
64 ACPI_MADT_LAPIC_ADDR_OVR,
67 ACPI_MADT_PLAT_INT_SRC,
71 #define LO_RSDP_WINDOW_BASE 0 /* Physical Address */
72 #define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */
73 #define LO_RSDP_WINDOW_SIZE 0x400
74 #define HI_RSDP_WINDOW_SIZE 0x20000
75 #define RSDP_SCAN_STEP 16
76 #define RSDP_CHECKSUM_LENGTH 20
77 #define RSDP2_CHECKSUM_LENGTH 36
79 typedef int (*acpi_table_handler) (struct acpi_table_header *header, unsigned long);
81 struct acpi_table_rsdp {
91 } __attribute__ ((packed));
93 struct acpi_table_rsdt {
94 struct acpi_table_header header;
96 } __attribute__ ((packed));
98 struct acpi_table_xsdt {
99 struct acpi_table_header header;
101 } __attribute__ ((packed));
103 struct acpi_madt_entry_header {
106 } __attribute__ ((packed));
108 struct acpi_madt_int_flags {
112 } __attribute__ ((packed));
114 struct acpi_table_lapic {
115 struct acpi_madt_entry_header header;
121 } flags __attribute__ ((packed));
122 } __attribute__ ((packed));
124 struct acpi_table_ioapic {
125 struct acpi_madt_entry_header header;
130 } __attribute__ ((packed));
132 struct acpi_table_int_src_ovr {
133 struct acpi_madt_entry_header header;
137 struct acpi_madt_int_flags flags;
138 } __attribute__ ((packed));
140 struct acpi_table_nmi_src {
141 struct acpi_madt_entry_header header;
142 struct acpi_madt_int_flags flags;
144 } __attribute__ ((packed));
146 struct acpi_table_lapic_nmi {
147 struct acpi_madt_entry_header header;
149 struct acpi_madt_int_flags flags;
151 } __attribute__ ((packed));
153 struct acpi_table_lapic_addr_ovr {
154 struct acpi_madt_entry_header header;
157 } __attribute__ ((packed));
159 struct acpi_table_iosapic {
160 struct acpi_madt_entry_header header;
165 } __attribute__ ((packed));
167 struct acpi_table_lsapic {
168 struct acpi_madt_entry_header header;
177 } __attribute__ ((packed));
179 struct acpi_table_plat_int_src {
180 struct acpi_madt_entry_header header;
181 struct acpi_madt_int_flags flags;
188 } __attribute__ ((packed));
190 #define ACPI_SPACE_MEM 0
191 #define ACPI_SPACE_IO 1
192 #define ACPI_SPACE_PCICONF 2
194 struct acpi_gen_regaddr {
201 } __attribute__ ((packed));
203 struct acpi_table_hpet {
204 struct acpi_table_header header;
206 struct acpi_gen_regaddr addr;
210 } __attribute__ ((packed));