diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/acpi.h | 106 |
1 files changed, 3 insertions, 103 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 5a2b3633220e..fac7a7b1f5f9 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -58,106 +58,6 @@ typedef struct { | |||
58 | u8 length; | 58 | u8 length; |
59 | } __attribute__ ((packed)) acpi_table_entry_header; | 59 | } __attribute__ ((packed)) acpi_table_entry_header; |
60 | 60 | ||
61 | /* Multiple APIC Description Table (MADT) */ | ||
62 | |||
63 | enum acpi_madt_entry_id { | ||
64 | ACPI_MADT_LAPIC = 0, | ||
65 | ACPI_MADT_IOAPIC, | ||
66 | ACPI_MADT_INT_SRC_OVR, | ||
67 | ACPI_MADT_NMI_SRC, | ||
68 | ACPI_MADT_LAPIC_NMI, | ||
69 | ACPI_MADT_LAPIC_ADDR_OVR, | ||
70 | ACPI_MADT_IOSAPIC, | ||
71 | ACPI_MADT_LSAPIC, | ||
72 | ACPI_MADT_PLAT_INT_SRC, | ||
73 | ACPI_MADT_ENTRY_COUNT | ||
74 | }; | ||
75 | |||
76 | typedef struct { | ||
77 | u16 polarity:2; | ||
78 | u16 trigger:2; | ||
79 | u16 reserved:12; | ||
80 | } __attribute__ ((packed)) acpi_interrupt_flags; | ||
81 | |||
82 | struct acpi_table_lapic { | ||
83 | acpi_table_entry_header header; | ||
84 | u8 acpi_id; | ||
85 | u8 id; | ||
86 | struct { | ||
87 | u32 enabled:1; | ||
88 | u32 reserved:31; | ||
89 | } flags; | ||
90 | } __attribute__ ((packed)); | ||
91 | |||
92 | struct acpi_table_ioapic { | ||
93 | acpi_table_entry_header header; | ||
94 | u8 id; | ||
95 | u8 reserved; | ||
96 | u32 address; | ||
97 | u32 global_irq_base; | ||
98 | } __attribute__ ((packed)); | ||
99 | |||
100 | struct acpi_table_int_src_ovr { | ||
101 | acpi_table_entry_header header; | ||
102 | u8 bus; | ||
103 | u8 bus_irq; | ||
104 | u32 global_irq; | ||
105 | acpi_interrupt_flags flags; | ||
106 | } __attribute__ ((packed)); | ||
107 | |||
108 | struct acpi_table_nmi_src { | ||
109 | acpi_table_entry_header header; | ||
110 | acpi_interrupt_flags flags; | ||
111 | u32 global_irq; | ||
112 | } __attribute__ ((packed)); | ||
113 | |||
114 | struct acpi_table_lapic_nmi { | ||
115 | acpi_table_entry_header header; | ||
116 | u8 acpi_id; | ||
117 | acpi_interrupt_flags flags; | ||
118 | u8 lint; | ||
119 | } __attribute__ ((packed)); | ||
120 | |||
121 | struct acpi_table_lapic_addr_ovr { | ||
122 | acpi_table_entry_header header; | ||
123 | u8 reserved[2]; | ||
124 | u64 address; | ||
125 | } __attribute__ ((packed)); | ||
126 | |||
127 | struct acpi_table_iosapic { | ||
128 | acpi_table_entry_header header; | ||
129 | u8 id; | ||
130 | u8 reserved; | ||
131 | u32 global_irq_base; | ||
132 | u64 address; | ||
133 | } __attribute__ ((packed)); | ||
134 | |||
135 | struct acpi_table_lsapic { | ||
136 | acpi_table_entry_header header; | ||
137 | u8 acpi_id; | ||
138 | u8 id; | ||
139 | u8 eid; | ||
140 | u8 reserved[3]; | ||
141 | struct { | ||
142 | u32 enabled:1; | ||
143 | u32 reserved:31; | ||
144 | } flags; | ||
145 | } __attribute__ ((packed)); | ||
146 | |||
147 | struct acpi_table_plat_int_src { | ||
148 | acpi_table_entry_header header; | ||
149 | acpi_interrupt_flags flags; | ||
150 | u8 type; /* See acpi_interrupt_type */ | ||
151 | u8 id; | ||
152 | u8 eid; | ||
153 | u8 iosapic_vector; | ||
154 | u32 global_irq; | ||
155 | struct { | ||
156 | u32 cpei_override_flag:1; | ||
157 | u32 reserved:31; | ||
158 | } plint_flags; | ||
159 | } __attribute__ ((packed)); | ||
160 | |||
161 | enum acpi_interrupt_id { | 61 | enum acpi_interrupt_id { |
162 | ACPI_INTERRUPT_PMI = 1, | 62 | ACPI_INTERRUPT_PMI = 1, |
163 | ACPI_INTERRUPT_INIT, | 63 | ACPI_INTERRUPT_INIT, |
@@ -285,7 +185,7 @@ typedef int (*acpi_table_handler) (struct acpi_table_header *header); | |||
285 | 185 | ||
286 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; | 186 | extern acpi_table_handler acpi_table_ops[ACPI_TABLE_COUNT]; |
287 | 187 | ||
288 | typedef int (*acpi_madt_entry_handler) (acpi_table_entry_header *header, const unsigned long end); | 188 | typedef int (*acpi_madt_entry_handler) (struct acpi_subtable_header *header, const unsigned long end); |
289 | 189 | ||
290 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); | 190 | char * __acpi_map_table (unsigned long phys_addr, unsigned long size); |
291 | unsigned long acpi_find_rsdp (void); | 191 | unsigned long acpi_find_rsdp (void); |
@@ -295,11 +195,11 @@ int acpi_numa_init (void); | |||
295 | 195 | ||
296 | int acpi_table_init (void); | 196 | int acpi_table_init (void); |
297 | int acpi_table_parse (char *id, acpi_table_handler handler); | 197 | int acpi_table_parse (char *id, acpi_table_handler handler); |
298 | int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 198 | int acpi_table_parse_madt (enum acpi_madt_type id, acpi_madt_entry_handler handler, unsigned int max_entries); |
299 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); | 199 | int acpi_table_parse_srat (enum acpi_srat_entry_id id, acpi_madt_entry_handler handler, unsigned int max_entries); |
300 | int acpi_parse_mcfg (struct acpi_table_header *header); | 200 | int acpi_parse_mcfg (struct acpi_table_header *header); |
301 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); | 201 | void acpi_table_print (struct acpi_table_header *header, unsigned long phys_addr); |
302 | void acpi_table_print_madt_entry (acpi_table_entry_header *madt); | 202 | void acpi_table_print_madt_entry (struct acpi_subtable_header *madt); |
303 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); | 203 | void acpi_table_print_srat_entry (acpi_table_entry_header *srat); |
304 | 204 | ||
305 | /* the following four functions are architecture-dependent */ | 205 | /* the following four functions are architecture-dependent */ |