Blame view

include/acpi/acpiosxf.h 12.5 KB
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
  /******************************************************************************
   *
abf95c362   Bob Moore   ACPICA: Remove ex...
3
   * Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
4
5
6
7
   *                    interfaces must be implemented by OSL to interface the
   *                    ACPI components to the host operating system.
   *
   *****************************************************************************/
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
8
  /*
82a809419   David E. Box   ACPICA: Update Co...
9
   * Copyright (C) 2000 - 2015, Intel Corp.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
   * All rights reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions, and the following disclaimer,
   *    without modification.
   * 2. Redistributions in binary form must reproduce at minimum a disclaimer
   *    substantially similar to the "NO WARRANTY" disclaimer below
   *    ("Disclaimer") and any redistribution must be conditioned upon
   *    including a substantially similar Disclaimer requirement for further
   *    binary redistribution.
   * 3. Neither the names of the above-listed copyright holders nor the names
   *    of any contributors may be used to endorse or promote products derived
   *    from this software without specific prior written permission.
   *
   * Alternatively, this software may be distributed under the terms of the
   * GNU General Public License ("GPL") version 2 as published by the Free
   * Software Foundation.
   *
   * NO WARRANTY
   * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
   * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
   * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
   * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
   * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
   * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   * POSSIBILITY OF SUCH DAMAGES.
   */
  
  #ifndef __ACPIOSXF_H__
  #define __ACPIOSXF_H__
a1ce39288   David Howells   UAPI: (Scripted) ...
47
48
  #include <acpi/platform/acenv.h>
  #include <acpi/actypes.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
49

958dd242b   Bob Moore   ACPI: ACPICA 2006...
50
  /* Types for acpi_os_execute */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
51

958dd242b   Bob Moore   ACPI: ACPICA 2006...
52
53
54
55
  typedef enum {
  	OSL_GLOBAL_LOCK_HANDLER,
  	OSL_NOTIFY_HANDLER,
  	OSL_GPE_HANDLER,
f988f24ee   Lv Zheng   ACPICA: Debugger:...
56
57
  	OSL_DEBUGGER_MAIN_THREAD,
  	OSL_DEBUGGER_EXEC_THREAD,
958dd242b   Bob Moore   ACPI: ACPICA 2006...
58
  	OSL_EC_POLL_HANDLER,
4119532c9   Bob Moore   ACPI: ACPICA 2006...
59
  	OSL_EC_BURST_HANDLER
958dd242b   Bob Moore   ACPI: ACPICA 2006...
60
  } acpi_execute_type;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
61
62
63
  
  #define ACPI_NO_UNIT_LIMIT          ((u32) -1)
  #define ACPI_MUTEX_SEM              1
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
64
65
66
67
  /* Functions for acpi_os_signal */
  
  #define ACPI_SIGNAL_FATAL           0
  #define ACPI_SIGNAL_BREAKPOINT      1
4be44fcd3   Len Brown   [ACPI] Lindent al...
68
69
70
71
  struct acpi_signal_fatal_info {
  	u32 type;
  	u32 code;
  	u32 argument;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
72
  };
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
73
74
75
  /*
   * OSL Initialization and shutdown primitives
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
76
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_initialize
93220587f   Lv Zheng   ACPICA: Update ac...
77
  acpi_status acpi_os_initialize(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
78
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
79

7e94632fc   Lv Zheng   ACPICA: Add suppo...
80
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_terminate
4be44fcd3   Len Brown   [ACPI] Lindent al...
81
  acpi_status acpi_os_terminate(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
82
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
83
84
85
86
  
  /*
   * ACPI Table interfaces
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
87
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_root_pointer
f3d2e7865   Bob Moore   ACPICA: Implement...
88
  acpi_physical_address acpi_os_get_root_pointer(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
89
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
90

7e94632fc   Lv Zheng   ACPICA: Add suppo...
91
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_predefined_override
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
92
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
93
  acpi_os_predefined_override(const struct acpi_predefined_names *init_val,
2bad7e27e   Dominik Brodowski   ACPI / osl: use s...
94
  			    char **new_val);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
95
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
96

7e94632fc   Lv Zheng   ACPICA: Add suppo...
97
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_table_override
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
98
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
99
100
  acpi_os_table_override(struct acpi_table_header *existing_table,
  		       struct acpi_table_header **new_table);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
101
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
102

7e94632fc   Lv Zheng   ACPICA: Add suppo...
103
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_physical_table_override
f7b004a17   Bob Moore   ACPICA: Add acpi_...
104
105
106
107
  acpi_status
  acpi_os_physical_table_override(struct acpi_table_header *existing_table,
  				acpi_physical_address * new_address,
  				u32 *new_table_length);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
108
  #endif
f7b004a17   Bob Moore   ACPICA: Add acpi_...
109

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
110
  /*
967440e3b   Bob Moore   ACPI: ACPICA 2006...
111
112
   * Spinlock primitives
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
113
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_lock
3e8214e5c   Lv Zheng   ACPICA: Cleanup i...
114
  acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
07e49a7a3   Rafael J. Wysocki   ACPI: Fix lockdep...
115
  #endif
9f63b88bd   Lin Ming   ACPI: osl, add ac...
116

7e94632fc   Lv Zheng   ACPICA: Add suppo...
117
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_lock
967440e3b   Bob Moore   ACPI: ACPICA 2006...
118
  void acpi_os_delete_lock(acpi_spinlock handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
119
  #endif
967440e3b   Bob Moore   ACPI: ACPICA 2006...
120

7e94632fc   Lv Zheng   ACPICA: Add suppo...
121
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_lock
967440e3b   Bob Moore   ACPI: ACPICA 2006...
122
  acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
123
  #endif
967440e3b   Bob Moore   ACPI: ACPICA 2006...
124

7e94632fc   Lv Zheng   ACPICA: Add suppo...
125
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_lock
967440e3b   Bob Moore   ACPI: ACPICA 2006...
126
  void acpi_os_release_lock(acpi_spinlock handle, acpi_cpu_flags flags);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
127
  #endif
967440e3b   Bob Moore   ACPI: ACPICA 2006...
128
129
130
  
  /*
   * Semaphore primitives
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
131
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
132
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_semaphore
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
133
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
134
  acpi_os_create_semaphore(u32 max_units,
967440e3b   Bob Moore   ACPI: ACPICA 2006...
135
  			 u32 initial_units, acpi_semaphore * out_handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
136
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
137

7e94632fc   Lv Zheng   ACPICA: Add suppo...
138
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_semaphore
967440e3b   Bob Moore   ACPI: ACPICA 2006...
139
  acpi_status acpi_os_delete_semaphore(acpi_semaphore handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
140
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
141

7e94632fc   Lv Zheng   ACPICA: Add suppo...
142
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_semaphore
967440e3b   Bob Moore   ACPI: ACPICA 2006...
143
144
  acpi_status
  acpi_os_wait_semaphore(acpi_semaphore handle, u32 units, u16 timeout);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
145
  #endif
967440e3b   Bob Moore   ACPI: ACPICA 2006...
146

7e94632fc   Lv Zheng   ACPICA: Add suppo...
147
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal_semaphore
967440e3b   Bob Moore   ACPI: ACPICA 2006...
148
  acpi_status acpi_os_signal_semaphore(acpi_semaphore handle, u32 units);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
149
  #endif
967440e3b   Bob Moore   ACPI: ACPICA 2006...
150
151
  
  /*
1685bd404   Bob Moore   ACPICA: Add ACPI_...
152
153
   * Mutex primitives. May be configured to use semaphores instead via
   * ACPI_MUTEX_TYPE (see platform/acenv.h)
967440e3b   Bob Moore   ACPI: ACPICA 2006...
154
   */
1685bd404   Bob Moore   ACPICA: Add ACPI_...
155
  #if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
7e94632fc   Lv Zheng   ACPICA: Add suppo...
156
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_mutex
967440e3b   Bob Moore   ACPI: ACPICA 2006...
157
  acpi_status acpi_os_create_mutex(acpi_mutex * out_handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
158
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
159

7e94632fc   Lv Zheng   ACPICA: Add suppo...
160
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_mutex
967440e3b   Bob Moore   ACPI: ACPICA 2006...
161
  void acpi_os_delete_mutex(acpi_mutex handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
162
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
163

7e94632fc   Lv Zheng   ACPICA: Add suppo...
164
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_mutex
967440e3b   Bob Moore   ACPI: ACPICA 2006...
165
  acpi_status acpi_os_acquire_mutex(acpi_mutex handle, u16 timeout);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
166
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
167

7e94632fc   Lv Zheng   ACPICA: Add suppo...
168
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_mutex
967440e3b   Bob Moore   ACPI: ACPICA 2006...
169
  void acpi_os_release_mutex(acpi_mutex handle);
1685bd404   Bob Moore   ACPICA: Add ACPI_...
170
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
171

7e94632fc   Lv Zheng   ACPICA: Add suppo...
172
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
173
174
175
  /*
   * Memory allocation and mapping
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
176
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate
4be44fcd3   Len Brown   [ACPI] Lindent al...
177
  void *acpi_os_allocate(acpi_size size);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
178
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
179

7e94632fc   Lv Zheng   ACPICA: Add suppo...
180
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_allocate_zeroed
b3c86c30e   Lv Zheng   ACPICA: Cleanup m...
181
  void *acpi_os_allocate_zeroed(acpi_size size);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
182
  #endif
b3c86c30e   Lv Zheng   ACPICA: Cleanup m...
183

7e94632fc   Lv Zheng   ACPICA: Add suppo...
184
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_free
739dcbb90   Lv Zheng   ACPICA: Cleanup s...
185
  void acpi_os_free(void *memory);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
186
  #endif
739dcbb90   Lv Zheng   ACPICA: Cleanup s...
187

7e94632fc   Lv Zheng   ACPICA: Add suppo...
188
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_map_memory
93220587f   Lv Zheng   ACPICA: Update ac...
189
  void *acpi_os_map_memory(acpi_physical_address where, acpi_size length);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
190
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
191

7e94632fc   Lv Zheng   ACPICA: Add suppo...
192
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_unmap_memory
93220587f   Lv Zheng   ACPICA: Update ac...
193
  void acpi_os_unmap_memory(void *logical_address, acpi_size size);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
194
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
195

7e94632fc   Lv Zheng   ACPICA: Add suppo...
196
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_physical_address
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
197
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
198
199
  acpi_os_get_physical_address(void *logical_address,
  			     acpi_physical_address * physical_address);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
200
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
201
202
203
  /*
   * Memory/Object Cache
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
204
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_create_cache
73459f73e   Robert Moore   ACPICA 20050617-0...
205
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
206
207
208
  acpi_os_create_cache(char *cache_name,
  		     u16 object_size,
  		     u16 max_depth, acpi_cache_t ** return_cache);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
209
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
210

7e94632fc   Lv Zheng   ACPICA: Add suppo...
211
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_delete_cache
4be44fcd3   Len Brown   [ACPI] Lindent al...
212
  acpi_status acpi_os_delete_cache(acpi_cache_t * cache);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
213
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
214

7e94632fc   Lv Zheng   ACPICA: Add suppo...
215
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_purge_cache
4be44fcd3   Len Brown   [ACPI] Lindent al...
216
  acpi_status acpi_os_purge_cache(acpi_cache_t * cache);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
217
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
218

7e94632fc   Lv Zheng   ACPICA: Add suppo...
219
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_acquire_object
4be44fcd3   Len Brown   [ACPI] Lindent al...
220
  void *acpi_os_acquire_object(acpi_cache_t * cache);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
221
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
222

7e94632fc   Lv Zheng   ACPICA: Add suppo...
223
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_release_object
4be44fcd3   Len Brown   [ACPI] Lindent al...
224
  acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
225
  #endif
73459f73e   Robert Moore   ACPICA 20050617-0...
226

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
227
228
229
  /*
   * Interrupt handlers
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
230
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_install_interrupt_handler
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
231
  acpi_status
739dcbb90   Lv Zheng   ACPICA: Cleanup s...
232
  acpi_os_install_interrupt_handler(u32 interrupt_number,
4be44fcd3   Len Brown   [ACPI] Lindent al...
233
234
  				  acpi_osd_handler service_routine,
  				  void *context);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
235
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
236

7e94632fc   Lv Zheng   ACPICA: Add suppo...
237
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_remove_interrupt_handler
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
238
  acpi_status
739dcbb90   Lv Zheng   ACPICA: Cleanup s...
239
240
  acpi_os_remove_interrupt_handler(u32 interrupt_number,
  				 acpi_osd_handler service_routine);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
241
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
242
243
244
245
  
  /*
   * Threads and Scheduling
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
246
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_thread_id
8313524a0   Bob Moore   ACPI: ACPICA 2006...
247
  acpi_thread_id acpi_os_get_thread_id(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
248
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
249

7e94632fc   Lv Zheng   ACPICA: Add suppo...
250
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_execute
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
251
  acpi_status
958dd242b   Bob Moore   ACPI: ACPICA 2006...
252
253
  acpi_os_execute(acpi_execute_type type,
  		acpi_osd_exec_callback function, void *context);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
254
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
255

7e94632fc   Lv Zheng   ACPICA: Add suppo...
256
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_wait_events_complete
bd6f10a5f   Lin Ming   ACPICA: Remove ar...
257
  void acpi_os_wait_events_complete(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
258
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
259

7e94632fc   Lv Zheng   ACPICA: Add suppo...
260
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_sleep
5df7e6cb4   Bob Moore   ACPICA: Remove ob...
261
  void acpi_os_sleep(u64 milliseconds);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
262
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
263

7e94632fc   Lv Zheng   ACPICA: Add suppo...
264
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_stall
4be44fcd3   Len Brown   [ACPI] Lindent al...
265
  void acpi_os_stall(u32 microseconds);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
266
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
267
268
269
270
  
  /*
   * Platform and hardware-independent I/O interfaces
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
271
272
273
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_port
  acpi_status acpi_os_read_port(acpi_io_address address, u32 *value, u32 width);
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
274

7e94632fc   Lv Zheng   ACPICA: Add suppo...
275
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_port
4be44fcd3   Len Brown   [ACPI] Lindent al...
276
  acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
277
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
278
279
280
281
  
  /*
   * Platform and hardware-independent physical memory interfaces
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
282
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_memory
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
283
  acpi_status
653f4b538   Bob Moore   ACPICA: Expand OS...
284
  acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
285
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
286

7e94632fc   Lv Zheng   ACPICA: Add suppo...
287
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_memory
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
288
  acpi_status
653f4b538   Bob Moore   ACPICA: Expand OS...
289
  acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
290
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
291
292
293
294
295
296
  
  /*
   * Platform and hardware-independent PCI configuration space access
   * Note: Can't use "Register" as a parameter, changed to "Reg" --
   * certain compilers complain.
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
297
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_pci_configuration
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
298
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
299
  acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
c5f0231ee   Bob Moore   ACPICA: Fix acpi_...
300
  			       u32 reg, u64 *value, u32 width);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
301
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
302

7e94632fc   Lv Zheng   ACPICA: Add suppo...
303
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_pci_configuration
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
304
  acpi_status
4be44fcd3   Len Brown   [ACPI] Lindent al...
305
  acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
5df7e6cb4   Bob Moore   ACPICA: Remove ob...
306
  				u32 reg, u64 value, u32 width);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
307
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
308
309
  
  /*
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
310
311
   * Miscellaneous
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
312
313
314
315
316
317
318
319
320
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_readable
  u8 acpi_os_readable(void *pointer, acpi_size length);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_writable
  u8 acpi_os_writable(void *pointer, acpi_size length);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_timer
4be44fcd3   Len Brown   [ACPI] Lindent al...
321
  u64 acpi_os_get_timer(void);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
322
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
323

7e94632fc   Lv Zheng   ACPICA: Add suppo...
324
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_signal
4be44fcd3   Len Brown   [ACPI] Lindent al...
325
  acpi_status acpi_os_signal(u32 function, void *info);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
326
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
327
328
329
330
  
  /*
   * Debug print routines
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
331
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_printf
4be44fcd3   Len Brown   [ACPI] Lindent al...
332
  void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
333
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
334

7e94632fc   Lv Zheng   ACPICA: Add suppo...
335
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_vprintf
4be44fcd3   Len Brown   [ACPI] Lindent al...
336
  void acpi_os_vprintf(const char *format, va_list args);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
337
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
338

7e94632fc   Lv Zheng   ACPICA: Add suppo...
339
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_redirect_output
4be44fcd3   Len Brown   [ACPI] Lindent al...
340
  void acpi_os_redirect_output(void *destination);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
341
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
342
343
344
345
  
  /*
   * Debug input
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
346
347
348
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_line
  acpi_status acpi_os_get_line(char *buffer, u32 buffer_length, u32 *bytes_read);
  #endif
7e94632fc   Lv Zheng   ACPICA: Add suppo...
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
  
  /*
   * Obtain ACPI table(s)
   */
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_name
  acpi_status
  acpi_os_get_table_by_name(char *signature,
  			  u32 instance,
  			  struct acpi_table_header **table,
  			  acpi_physical_address * address);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_index
  acpi_status
  acpi_os_get_table_by_index(u32 index,
  			   struct acpi_table_header **table,
  			   u32 *instance, acpi_physical_address * address);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_table_by_address
  acpi_status
  acpi_os_get_table_by_address(acpi_physical_address address,
  			     struct acpi_table_header **table);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
372
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
373
374
375
  /*
   * Directory manipulation
   */
7e94632fc   Lv Zheng   ACPICA: Add suppo...
376
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_directory
4be44fcd3   Len Brown   [ACPI] Lindent al...
377
378
  void *acpi_os_open_directory(char *pathname,
  			     char *wildcard_spec, char requested_file_type);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
379
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
380
381
382
383
384
  
  /* requeste_file_type values */
  
  #define REQUEST_FILE_ONLY                   0
  #define REQUEST_DIR_ONLY                    1
7e94632fc   Lv Zheng   ACPICA: Add suppo...
385
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_next_filename
4be44fcd3   Len Brown   [ACPI] Lindent al...
386
  char *acpi_os_get_next_filename(void *dir_handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
387
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
388

7e94632fc   Lv Zheng   ACPICA: Add suppo...
389
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_directory
4be44fcd3   Len Brown   [ACPI] Lindent al...
390
  void acpi_os_close_directory(void *dir_handle);
7e94632fc   Lv Zheng   ACPICA: Add suppo...
391
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
392

7824f44ec   Lv Zheng   ACPICA: OSL: Add ...
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
  /*
   * File I/O and related support
   */
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_open_file
  ACPI_FILE acpi_os_open_file(const char *path, u8 modes);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_close_file
  void acpi_os_close_file(ACPI_FILE file);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_read_file
  int
  acpi_os_read_file(ACPI_FILE file,
  		  void *buffer, acpi_size size, acpi_size count);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_write_file
  int
  acpi_os_write_file(ACPI_FILE file,
  		   void *buffer, acpi_size size, acpi_size count);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_get_file_offset
  long acpi_os_get_file_offset(ACPI_FILE file);
  #endif
  
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_set_file_offset
  acpi_status acpi_os_set_file_offset(ACPI_FILE file, long offset, u8 from);
  #endif
bab048241   Lv Zheng   ACPICA: Executer:...
423
424
425
426
427
  #ifndef ACPI_USE_ALTERNATE_PROTOTYPE_acpi_os_trace_point
  void
  acpi_os_trace_point(acpi_trace_event_type type,
  		    u8 begin, u8 *aml, char *pathname);
  #endif
4be44fcd3   Len Brown   [ACPI] Lindent al...
428
  #endif				/* __ACPIOSXF_H__ */