aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpiosxf.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/acpi/acpiosxf.h')
-rw-r--r--include/acpi/acpiosxf.h275
1 files changed, 70 insertions, 205 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 819a53f83cfa..98e0b8cd14ed 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -7,7 +7,6 @@
7 * 7 *
8 *****************************************************************************/ 8 *****************************************************************************/
9 9
10
11/* 10/*
12 * Copyright (C) 2000 - 2005, R. Byron Moore 11 * Copyright (C) 2000 - 2005, R. Byron Moore
13 * All rights reserved. 12 * All rights reserved.
@@ -51,7 +50,6 @@
51#include "platform/acenv.h" 50#include "platform/acenv.h"
52#include "actypes.h" 51#include "actypes.h"
53 52
54
55/* Priorities for acpi_os_queue_for_execution */ 53/* Priorities for acpi_os_queue_for_execution */
56 54
57#define OSD_PRIORITY_GPE 1 55#define OSD_PRIORITY_GPE 1
@@ -62,227 +60,136 @@
62#define ACPI_NO_UNIT_LIMIT ((u32) -1) 60#define ACPI_NO_UNIT_LIMIT ((u32) -1)
63#define ACPI_MUTEX_SEM 1 61#define ACPI_MUTEX_SEM 1
64 62
65
66/* Functions for acpi_os_signal */ 63/* Functions for acpi_os_signal */
67 64
68#define ACPI_SIGNAL_FATAL 0 65#define ACPI_SIGNAL_FATAL 0
69#define ACPI_SIGNAL_BREAKPOINT 1 66#define ACPI_SIGNAL_BREAKPOINT 1
70 67
71struct acpi_signal_fatal_info 68struct acpi_signal_fatal_info {
72{ 69 u32 type;
73 u32 type; 70 u32 code;
74 u32 code; 71 u32 argument;
75 u32 argument;
76}; 72};
77 73
78
79/* 74/*
80 * OSL Initialization and shutdown primitives 75 * OSL Initialization and shutdown primitives
81 */ 76 */
82acpi_status 77acpi_status acpi_os_initialize(void);
83acpi_os_initialize (
84 void);
85
86acpi_status
87acpi_os_terminate (
88 void);
89 78
79acpi_status acpi_os_terminate(void);
90 80
91/* 81/*
92 * ACPI Table interfaces 82 * ACPI Table interfaces
93 */ 83 */
94acpi_status 84acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *address);
95acpi_os_get_root_pointer (
96 u32 flags,
97 struct acpi_pointer *address);
98 85
99acpi_status 86acpi_status
100acpi_os_predefined_override ( 87acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
101 const struct acpi_predefined_names *init_val, 88 acpi_string * new_val);
102 acpi_string *new_val);
103 89
104acpi_status 90acpi_status
105acpi_os_table_override ( 91acpi_os_table_override(struct acpi_table_header *existing_table,
106 struct acpi_table_header *existing_table, 92 struct acpi_table_header **new_table);
107 struct acpi_table_header **new_table);
108
109 93
110/* 94/*
111 * Synchronization primitives 95 * Synchronization primitives
112 */ 96 */
113acpi_status 97acpi_status
114acpi_os_create_semaphore ( 98acpi_os_create_semaphore(u32 max_units,
115 u32 max_units, 99 u32 initial_units, acpi_handle * out_handle);
116 u32 initial_units,
117 acpi_handle *out_handle);
118
119acpi_status
120acpi_os_delete_semaphore (
121 acpi_handle handle);
122 100
123acpi_status 101acpi_status acpi_os_delete_semaphore(acpi_handle handle);
124acpi_os_wait_semaphore (
125 acpi_handle handle,
126 u32 units,
127 u16 timeout);
128 102
129acpi_status 103acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout);
130acpi_os_signal_semaphore (
131 acpi_handle handle,
132 u32 units);
133 104
134acpi_status 105acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units);
135acpi_os_create_lock (
136 acpi_handle *out_handle);
137 106
138void 107acpi_status acpi_os_create_lock(acpi_handle * out_handle);
139acpi_os_delete_lock (
140 acpi_handle handle);
141 108
142unsigned long 109void acpi_os_delete_lock(acpi_handle handle);
143acpi_os_acquire_lock (
144 acpi_handle handle);
145 110
146void 111unsigned long acpi_os_acquire_lock(acpi_handle handle);
147acpi_os_release_lock (
148 acpi_handle handle,
149 unsigned long flags);
150 112
113void acpi_os_release_lock(acpi_handle handle, unsigned long flags);
151 114
152/* 115/*
153 * Memory allocation and mapping 116 * Memory allocation and mapping
154 */ 117 */
155void * 118void *acpi_os_allocate(acpi_size size);
156acpi_os_allocate (
157 acpi_size size);
158 119
159void 120void acpi_os_free(void *memory);
160acpi_os_free (
161 void * memory);
162 121
163acpi_status 122acpi_status
164acpi_os_map_memory ( 123acpi_os_map_memory(acpi_physical_address physical_address,
165 acpi_physical_address physical_address, 124 acpi_size size, void __iomem ** logical_address);
166 acpi_size size,
167 void __iomem **logical_address);
168 125
169void 126void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size);
170acpi_os_unmap_memory (
171 void __iomem *logical_address,
172 acpi_size size);
173 127
174#ifdef ACPI_FUTURE_USAGE 128#ifdef ACPI_FUTURE_USAGE
175acpi_status 129acpi_status
176acpi_os_get_physical_address ( 130acpi_os_get_physical_address(void *logical_address,
177 void *logical_address, 131 acpi_physical_address * physical_address);
178 acpi_physical_address *physical_address);
179#endif 132#endif
180 133
181
182
183/* 134/*
184 * Memory/Object Cache 135 * Memory/Object Cache
185 */ 136 */
186acpi_status 137acpi_status
187acpi_os_create_cache ( 138acpi_os_create_cache(char *cache_name,
188 char *cache_name, 139 u16 object_size,
189 u16 object_size, 140 u16 max_depth, acpi_cache_t ** return_cache);
190 u16 max_depth,
191 acpi_cache_t **return_cache);
192 141
193acpi_status 142acpi_status acpi_os_delete_cache(acpi_cache_t * cache);
194acpi_os_delete_cache (
195 acpi_cache_t *cache);
196 143
197acpi_status 144acpi_status acpi_os_purge_cache(acpi_cache_t * cache);
198acpi_os_purge_cache (
199 acpi_cache_t *cache);
200 145
201void * 146void *acpi_os_acquire_object(acpi_cache_t * cache);
202acpi_os_acquire_object (
203 acpi_cache_t *cache);
204 147
205acpi_status 148acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
206acpi_os_release_object (
207 acpi_cache_t *cache,
208 void *object);
209 149
210/* 150/*
211 * Interrupt handlers 151 * Interrupt handlers
212 */ 152 */
213acpi_status 153acpi_status
214acpi_os_install_interrupt_handler ( 154acpi_os_install_interrupt_handler(u32 gsi,
215 u32 gsi, 155 acpi_osd_handler service_routine,
216 acpi_osd_handler service_routine, 156 void *context);
217 void *context);
218 157
219acpi_status 158acpi_status
220acpi_os_remove_interrupt_handler ( 159acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
221 u32 gsi,
222 acpi_osd_handler service_routine);
223
224 160
225/* 161/*
226 * Threads and Scheduling 162 * Threads and Scheduling
227 */ 163 */
228u32 164u32 acpi_os_get_thread_id(void);
229acpi_os_get_thread_id (
230 void);
231 165
232acpi_status 166acpi_status
233acpi_os_queue_for_execution ( 167acpi_os_queue_for_execution(u32 priority,
234 u32 priority, 168 acpi_osd_exec_callback function, void *context);
235 acpi_osd_exec_callback function,
236 void *context);
237
238void
239acpi_os_wait_events_complete(
240 void * context);
241 169
242void 170void acpi_os_wait_events_complete(void *context);
243acpi_os_wait_events_complete (
244 void *context);
245 171
246void 172void acpi_os_wait_events_complete(void *context);
247acpi_os_sleep (
248 acpi_integer milliseconds);
249 173
250void 174void acpi_os_sleep(acpi_integer milliseconds);
251acpi_os_stall (
252 u32 microseconds);
253 175
176void acpi_os_stall(u32 microseconds);
254 177
255/* 178/*
256 * Platform and hardware-independent I/O interfaces 179 * Platform and hardware-independent I/O interfaces
257 */ 180 */
258acpi_status 181acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width);
259acpi_os_read_port (
260 acpi_io_address address,
261 u32 *value,
262 u32 width);
263
264acpi_status
265acpi_os_write_port (
266 acpi_io_address address,
267 u32 value,
268 u32 width);
269 182
183acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width);
270 184
271/* 185/*
272 * Platform and hardware-independent physical memory interfaces 186 * Platform and hardware-independent physical memory interfaces
273 */ 187 */
274acpi_status 188acpi_status
275acpi_os_read_memory ( 189acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width);
276 acpi_physical_address address,
277 u32 *value,
278 u32 width);
279 190
280acpi_status 191acpi_status
281acpi_os_write_memory ( 192acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width);
282 acpi_physical_address address,
283 u32 value,
284 u32 width);
285
286 193
287/* 194/*
288 * Platform and hardware-independent PCI configuration space access 195 * Platform and hardware-independent PCI configuration space access
@@ -290,111 +197,69 @@ acpi_os_write_memory (
290 * certain compilers complain. 197 * certain compilers complain.
291 */ 198 */
292acpi_status 199acpi_status
293acpi_os_read_pci_configuration ( 200acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
294 struct acpi_pci_id *pci_id, 201 u32 reg, void *value, u32 width);
295 u32 reg,
296 void *value,
297 u32 width);
298 202
299acpi_status 203acpi_status
300acpi_os_write_pci_configuration ( 204acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
301 struct acpi_pci_id *pci_id, 205 u32 reg, acpi_integer value, u32 width);
302 u32 reg,
303 acpi_integer value,
304 u32 width);
305 206
306/* 207/*
307 * Interim function needed for PCI IRQ routing 208 * Interim function needed for PCI IRQ routing
308 */ 209 */
309void 210void
310acpi_os_derive_pci_id( 211acpi_os_derive_pci_id(acpi_handle rhandle,
311 acpi_handle rhandle, 212 acpi_handle chandle, struct acpi_pci_id **pci_id);
312 acpi_handle chandle,
313 struct acpi_pci_id **pci_id);
314 213
315/* 214/*
316 * Miscellaneous 215 * Miscellaneous
317 */ 216 */
318u8 217u8 acpi_os_readable(void *pointer, acpi_size length);
319acpi_os_readable (
320 void *pointer,
321 acpi_size length);
322 218
323#ifdef ACPI_FUTURE_USAGE 219#ifdef ACPI_FUTURE_USAGE
324u8 220u8 acpi_os_writable(void *pointer, acpi_size length);
325acpi_os_writable (
326 void *pointer,
327 acpi_size length);
328#endif 221#endif
329 222
330u64 223u64 acpi_os_get_timer(void);
331acpi_os_get_timer (
332 void);
333 224
334acpi_status 225acpi_status acpi_os_signal(u32 function, void *info);
335acpi_os_signal (
336 u32 function,
337 void *info);
338 226
339/* 227/*
340 * Debug print routines 228 * Debug print routines
341 */ 229 */
342void ACPI_INTERNAL_VAR_XFACE 230void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...);
343acpi_os_printf (
344 const char *format,
345 ...);
346
347void
348acpi_os_vprintf (
349 const char *format,
350 va_list args);
351 231
352void 232void acpi_os_vprintf(const char *format, va_list args);
353acpi_os_redirect_output (
354 void *destination);
355 233
234void acpi_os_redirect_output(void *destination);
356 235
357#ifdef ACPI_FUTURE_USAGE 236#ifdef ACPI_FUTURE_USAGE
358/* 237/*
359 * Debug input 238 * Debug input
360 */ 239 */
361u32 240u32 acpi_os_get_line(char *buffer);
362acpi_os_get_line (
363 char *buffer);
364#endif 241#endif
365 242
366
367/* 243/*
368 * Directory manipulation 244 * Directory manipulation
369 */ 245 */
370void * 246void *acpi_os_open_directory(char *pathname,
371acpi_os_open_directory ( 247 char *wildcard_spec, char requested_file_type);
372 char *pathname,
373 char *wildcard_spec,
374 char requested_file_type);
375 248
376/* requeste_file_type values */ 249/* requeste_file_type values */
377 250
378#define REQUEST_FILE_ONLY 0 251#define REQUEST_FILE_ONLY 0
379#define REQUEST_DIR_ONLY 1 252#define REQUEST_DIR_ONLY 1
380 253
254char *acpi_os_get_next_filename(void *dir_handle);
381 255
382char * 256void acpi_os_close_directory(void *dir_handle);
383acpi_os_get_next_filename (
384 void *dir_handle);
385
386void
387acpi_os_close_directory (
388 void *dir_handle);
389 257
390/* 258/*
391 * Debug 259 * Debug
392 */ 260 */
393void 261void
394acpi_os_dbg_assert( 262acpi_os_dbg_assert(void *failed_assertion,
395 void *failed_assertion, 263 void *file_name, u32 line_number, char *message);
396 void *file_name,
397 u32 line_number,
398 char *message);
399 264
400#endif /* __ACPIOSXF_H__ */ 265#endif /* __ACPIOSXF_H__ */