Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
torvalds
GitHub Repository: torvalds/linux
Path: blob/master/include/acpi/acpixf.h
29266 views
1
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2
/******************************************************************************
3
*
4
* Name: acpixf.h - External interfaces to the ACPI subsystem
5
*
6
* Copyright (C) 2000 - 2025, Intel Corp.
7
*
8
*****************************************************************************/
9
10
#ifndef __ACXFACE_H__
11
#define __ACXFACE_H__
12
13
/* Current ACPICA subsystem version in YYYYMMDD format */
14
15
#define ACPI_CA_VERSION 0x20250807
16
17
#include <acpi/acconfig.h>
18
#include <acpi/actypes.h>
19
#include <acpi/actbl.h>
20
#include <acpi/acbuffer.h>
21
22
/*****************************************************************************
23
*
24
* Macros used for ACPICA globals and configuration
25
*
26
****************************************************************************/
27
28
/*
29
* Ensure that global variables are defined and initialized only once.
30
*
31
* The use of these macros allows for a single list of globals (here)
32
* in order to simplify maintenance of the code.
33
*/
34
#ifdef DEFINE_ACPI_GLOBALS
35
#define ACPI_GLOBAL(type,name) \
36
extern type name; \
37
type name
38
39
#define ACPI_INIT_GLOBAL(type,name,value) \
40
type name=value
41
42
#else
43
#ifndef ACPI_GLOBAL
44
#define ACPI_GLOBAL(type,name) \
45
extern type name
46
#endif
47
48
#ifndef ACPI_INIT_GLOBAL
49
#define ACPI_INIT_GLOBAL(type,name,value) \
50
extern type name
51
#endif
52
#endif
53
54
/*
55
* These macros configure the various ACPICA interfaces. They are
56
* useful for generating stub inline functions for features that are
57
* configured out of the current kernel or ACPICA application.
58
*/
59
#ifndef ACPI_EXTERNAL_RETURN_STATUS
60
#define ACPI_EXTERNAL_RETURN_STATUS(prototype) \
61
prototype;
62
#endif
63
64
#ifndef ACPI_EXTERNAL_RETURN_OK
65
#define ACPI_EXTERNAL_RETURN_OK(prototype) \
66
prototype;
67
#endif
68
69
#ifndef ACPI_EXTERNAL_RETURN_VOID
70
#define ACPI_EXTERNAL_RETURN_VOID(prototype) \
71
prototype;
72
#endif
73
74
#ifndef ACPI_EXTERNAL_RETURN_UINT32
75
#define ACPI_EXTERNAL_RETURN_UINT32(prototype) \
76
prototype;
77
#endif
78
79
#ifndef ACPI_EXTERNAL_RETURN_PTR
80
#define ACPI_EXTERNAL_RETURN_PTR(prototype) \
81
prototype;
82
#endif
83
84
/*****************************************************************************
85
*
86
* Public globals and runtime configuration options
87
*
88
****************************************************************************/
89
90
/*
91
* Enable "slack mode" of the AML interpreter? Default is FALSE, and the
92
* interpreter strictly follows the ACPI specification. Setting to TRUE
93
* allows the interpreter to ignore certain errors and/or bad AML constructs.
94
*
95
* Currently, these features are enabled by this flag:
96
*
97
* 1) Allow "implicit return" of last value in a control method
98
* 2) Allow access beyond the end of an operation region
99
* 3) Allow access to uninitialized locals/args (auto-init to integer 0)
100
* 4) Allow ANY object type to be a source operand for the Store() operator
101
* 5) Allow unresolved references (invalid target name) in package objects
102
* 6) Enable warning messages for behavior that is not ACPI spec compliant
103
*/
104
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_interpreter_slack, FALSE);
105
106
/*
107
* Automatically serialize all methods that create named objects? Default
108
* is TRUE, meaning that all non_serialized methods are scanned once at
109
* table load time to determine those that create named objects. Methods
110
* that create named objects are marked Serialized in order to prevent
111
* possible run-time problems if they are entered by more than one thread.
112
*/
113
ACPI_INIT_GLOBAL(u8, acpi_gbl_auto_serialize_methods, TRUE);
114
115
/*
116
* Create the predefined _OSI method in the namespace? Default is TRUE
117
* because ACPICA is fully compatible with other ACPI implementations.
118
* Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
119
*/
120
ACPI_INIT_GLOBAL(u8, acpi_gbl_create_osi_method, TRUE);
121
122
/*
123
* Optionally use default values for the ACPI register widths. Set this to
124
* TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
125
*/
126
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_default_register_widths, TRUE);
127
128
/*
129
* Whether or not to validate (map) an entire table to verify
130
* checksum/duplication in early stage before install. Set this to TRUE to
131
* allow early table validation before install it to the table manager.
132
* Note that enabling this option causes errors to happen in some OSPMs
133
* during early initialization stages. Default behavior is to allow such
134
* validation.
135
*/
136
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_table_validation, TRUE);
137
138
/*
139
* Optionally enable output from the AML Debug Object.
140
*/
141
ACPI_INIT_GLOBAL(u8, acpi_gbl_enable_aml_debug_object, FALSE);
142
143
/*
144
* Optionally copy the entire DSDT to local memory (instead of simply
145
* mapping it.) There are some BIOSs that corrupt or replace the original
146
* DSDT, creating the need for this option. Default is FALSE, do not copy
147
* the DSDT.
148
*/
149
ACPI_INIT_GLOBAL(u8, acpi_gbl_copy_dsdt_locally, FALSE);
150
151
/*
152
* Optionally ignore an XSDT if present and use the RSDT instead.
153
* Although the ACPI specification requires that an XSDT be used instead
154
* of the RSDT, the XSDT has been found to be corrupt or ill-formed on
155
* some machines. Default behavior is to use the XSDT if present.
156
*/
157
ACPI_INIT_GLOBAL(u8, acpi_gbl_do_not_use_xsdt, FALSE);
158
159
/*
160
* Optionally use 32-bit FADT addresses if and when there is a conflict
161
* (address mismatch) between the 32-bit and 64-bit versions of the
162
* address. Although ACPICA adheres to the ACPI specification which
163
* requires the use of the corresponding 64-bit address if it is non-zero,
164
* some machines have been found to have a corrupted non-zero 64-bit
165
* address. Default is FALSE, do not favor the 32-bit addresses.
166
*/
167
ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_fadt_addresses, FALSE);
168
169
/*
170
* Optionally use 32-bit FACS table addresses.
171
* It is reported that some platforms fail to resume from system suspending
172
* if 64-bit FACS table address is selected:
173
* https://bugzilla.kernel.org/show_bug.cgi?id=74021
174
* Default is TRUE, favor the 32-bit addresses.
175
*/
176
ACPI_INIT_GLOBAL(u8, acpi_gbl_use32_bit_facs_addresses, TRUE);
177
178
/*
179
* Optionally truncate I/O addresses to 16 bits. Provides compatibility
180
* with other ACPI implementations. NOTE: During ACPICA initialization,
181
* this value is set to TRUE if any Windows OSI strings have been
182
* requested by the BIOS.
183
*/
184
ACPI_INIT_GLOBAL(u8, acpi_gbl_truncate_io_addresses, FALSE);
185
186
/*
187
* Disable runtime checking and repair of values returned by control methods.
188
* Use only if the repair is causing a problem on a particular machine.
189
*/
190
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_auto_repair, FALSE);
191
192
/*
193
* Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
194
* This can be useful for debugging ACPI problems on some machines.
195
*/
196
ACPI_INIT_GLOBAL(u8, acpi_gbl_disable_ssdt_table_install, FALSE);
197
198
/*
199
* Optionally enable runtime namespace override.
200
*/
201
ACPI_INIT_GLOBAL(u8, acpi_gbl_runtime_namespace_override, TRUE);
202
203
/*
204
* We keep track of the latest version of Windows that has been requested by
205
* the BIOS. ACPI 5.0.
206
*/
207
ACPI_INIT_GLOBAL(u8, acpi_gbl_osi_data, 0);
208
209
/*
210
* ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
211
* that the ACPI hardware is no longer required. A flag in the FADT indicates
212
* a reduced HW machine, and that flag is duplicated here for convenience.
213
*/
214
ACPI_INIT_GLOBAL(u8, acpi_gbl_reduced_hardware, FALSE);
215
216
/*
217
* ACPI Global Lock is mainly used for systems with SMM, so no-SMM systems
218
* (such as loong_arch) may not have and not use Global Lock.
219
*/
220
ACPI_INIT_GLOBAL(u8, acpi_gbl_use_global_lock, TRUE);
221
222
/*
223
* Maximum timeout for While() loop iterations before forced method abort.
224
* This mechanism is intended to prevent infinite loops during interpreter
225
* execution within a host kernel.
226
*/
227
ACPI_INIT_GLOBAL(u32, acpi_gbl_max_loop_iterations, ACPI_MAX_LOOP_TIMEOUT);
228
229
/*
230
* Optionally ignore AE_NOT_FOUND errors from named reference package elements
231
* during DSDT/SSDT table loading. This reduces error "noise" in platforms
232
* whose firmware is carrying around a bunch of unused package objects that
233
* refer to non-existent named objects. However, If the AML actually tries to
234
* use such a package, the unresolved element(s) will be replaced with NULL
235
* elements.
236
*/
237
ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_package_resolution_errors, FALSE);
238
239
/*
240
* This mechanism is used to trace a specified AML method. The method is
241
* traced each time it is executed.
242
*/
243
ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_flags, 0);
244
ACPI_INIT_GLOBAL(const char *, acpi_gbl_trace_method_name, NULL);
245
ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_dbg_level, ACPI_TRACE_LEVEL_DEFAULT);
246
ACPI_INIT_GLOBAL(u32, acpi_gbl_trace_dbg_layer, ACPI_TRACE_LAYER_DEFAULT);
247
248
/*
249
* Runtime configuration of debug output control masks. We want the debug
250
* switches statically initialized so they are already set when the debugger
251
* is entered.
252
*/
253
ACPI_INIT_GLOBAL(u32, acpi_dbg_level, ACPI_DEBUG_DEFAULT);
254
ACPI_INIT_GLOBAL(u32, acpi_dbg_layer, 0);
255
256
/* Optionally enable timer output with Debug Object output */
257
258
ACPI_INIT_GLOBAL(u8, acpi_gbl_display_debug_timer, FALSE);
259
260
/*
261
* Debugger command handshake globals. Host OSes need to access these
262
* variables to implement their own command handshake mechanism.
263
*/
264
#ifdef ACPI_DEBUGGER
265
ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
266
ACPI_GLOBAL(char, acpi_gbl_db_line_buf[ACPI_DB_LINE_BUFFER_SIZE]);
267
#endif
268
269
/*
270
* Other miscellaneous globals
271
*/
272
ACPI_GLOBAL(struct acpi_table_fadt, acpi_gbl_FADT);
273
ACPI_GLOBAL(u32, acpi_current_gpe_count);
274
ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
275
276
/*****************************************************************************
277
*
278
* ACPICA public interface configuration.
279
*
280
* Interfaces that are configured out of the ACPICA build are replaced
281
* by inlined stubs by default.
282
*
283
****************************************************************************/
284
285
/*
286
* Hardware-reduced prototypes (default: Not hardware reduced).
287
*
288
* All ACPICA hardware-related interfaces that use these macros will be
289
* configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
290
* is set to TRUE.
291
*
292
* Note: This static build option for reduced hardware is intended to
293
* reduce ACPICA code size if desired or necessary. However, even if this
294
* option is not specified, the runtime behavior of ACPICA is dependent
295
* on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
296
* the flag will enable similar behavior -- ACPICA will not attempt
297
* to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
298
*/
299
#if (!ACPI_REDUCED_HARDWARE)
300
#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
301
ACPI_EXTERNAL_RETURN_STATUS(prototype)
302
303
#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
304
ACPI_EXTERNAL_RETURN_OK(prototype)
305
306
#define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \
307
ACPI_EXTERNAL_RETURN_UINT32(prototype)
308
309
#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
310
ACPI_EXTERNAL_RETURN_VOID(prototype)
311
312
#else
313
#define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \
314
static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);}
315
316
#define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \
317
static ACPI_INLINE prototype {return(AE_OK);}
318
319
#define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \
320
static ACPI_INLINE prototype {return(0);}
321
322
#define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \
323
static ACPI_INLINE prototype {return;}
324
325
#endif /* !ACPI_REDUCED_HARDWARE */
326
327
/*
328
* Error message prototypes (default: error messages enabled).
329
*
330
* All interfaces related to error and warning messages
331
* will be configured out of the ACPICA build if the
332
* ACPI_NO_ERROR_MESSAGE flag is defined.
333
*/
334
#ifndef ACPI_NO_ERROR_MESSAGES
335
#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
336
prototype;
337
338
#else
339
#define ACPI_MSG_DEPENDENT_RETURN_VOID(prototype) \
340
static ACPI_INLINE prototype {return;}
341
342
#endif /* ACPI_NO_ERROR_MESSAGES */
343
344
/*
345
* Debugging output prototypes (default: no debug output).
346
*
347
* All interfaces related to debug output messages
348
* will be configured out of the ACPICA build unless the
349
* ACPI_DEBUG_OUTPUT flag is defined.
350
*/
351
#ifdef ACPI_DEBUG_OUTPUT
352
#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
353
prototype;
354
355
#else
356
#define ACPI_DBG_DEPENDENT_RETURN_VOID(prototype) \
357
static ACPI_INLINE prototype {return;}
358
359
#endif /* ACPI_DEBUG_OUTPUT */
360
361
/*
362
* Application prototypes
363
*
364
* All interfaces used by application will be configured
365
* out of the ACPICA build unless the ACPI_APPLICATION
366
* flag is defined.
367
*/
368
#ifdef ACPI_APPLICATION
369
#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
370
prototype;
371
372
#else
373
#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
374
static ACPI_INLINE prototype {return;}
375
376
#endif /* ACPI_APPLICATION */
377
378
/*
379
* Debugger prototypes
380
*
381
* All interfaces used by debugger will be configured
382
* out of the ACPICA build unless the ACPI_DEBUGGER
383
* flag is defined.
384
*/
385
#ifdef ACPI_DEBUGGER
386
#define ACPI_DBR_DEPENDENT_RETURN_OK(prototype) \
387
ACPI_EXTERNAL_RETURN_OK(prototype)
388
389
#define ACPI_DBR_DEPENDENT_RETURN_VOID(prototype) \
390
ACPI_EXTERNAL_RETURN_VOID(prototype)
391
392
#else
393
#define ACPI_DBR_DEPENDENT_RETURN_OK(prototype) \
394
static ACPI_INLINE prototype {return(AE_OK);}
395
396
#define ACPI_DBR_DEPENDENT_RETURN_VOID(prototype) \
397
static ACPI_INLINE prototype {return;}
398
399
#endif /* ACPI_DEBUGGER */
400
401
/*****************************************************************************
402
*
403
* ACPICA public interface prototypes
404
*
405
****************************************************************************/
406
407
/*
408
* Initialization
409
*/
410
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
411
acpi_initialize_tables(struct acpi_table_desc
412
*initial_storage,
413
u32 initial_table_count,
414
u8 allow_resize))
415
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
416
acpi_initialize_subsystem(void))
417
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
418
acpi_enable_subsystem(u32 flags))
419
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
420
acpi_initialize_objects(u32 flags))
421
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
422
acpi_terminate(void))
423
424
/*
425
* Miscellaneous global interfaces
426
*/
427
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
428
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
429
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_subsystem_status(void))
430
431
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
432
acpi_get_system_info(struct acpi_buffer
433
*ret_buffer))
434
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
435
acpi_get_statistics(struct acpi_statistics *stats))
436
ACPI_EXTERNAL_RETURN_PTR(const char
437
*acpi_format_exception(acpi_status exception))
438
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_purge_cached_objects(void))
439
440
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
441
acpi_install_interface(acpi_string interface_name))
442
443
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
444
acpi_remove_interface(acpi_string interface_name))
445
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_update_interfaces(u8 action))
446
447
ACPI_EXTERNAL_RETURN_UINT32(u32
448
acpi_check_address_range(acpi_adr_space_type
449
space_id,
450
acpi_physical_address
451
address, acpi_size length,
452
u8 warn))
453
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
454
acpi_decode_pld_buffer(u8 *in_buffer,
455
acpi_size length,
456
struct acpi_pld_info
457
**return_buffer))
458
459
/*
460
* ACPI table load/unload interfaces
461
*/
462
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
463
acpi_install_table(struct acpi_table_header *table))
464
465
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
466
acpi_install_physical_table(acpi_physical_address
467
address))
468
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
469
acpi_load_table(struct acpi_table_header *table,
470
u32 *table_idx))
471
472
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
473
acpi_unload_table(u32 table_index))
474
475
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
476
acpi_unload_parent_table(acpi_handle object))
477
478
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
479
acpi_load_tables(void))
480
481
/*
482
* ACPI table manipulation interfaces
483
*/
484
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
485
acpi_reallocate_root_table(void))
486
487
ACPI_EXTERNAL_RETURN_STATUS(acpi_status ACPI_INIT_FUNCTION
488
acpi_find_root_pointer(acpi_physical_address
489
*rsdp_address))
490
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
491
acpi_get_table_header(acpi_string signature,
492
u32 instance,
493
struct acpi_table_header
494
*out_table_header))
495
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
496
acpi_get_table(acpi_string signature, u32 instance,
497
struct acpi_table_header
498
**out_table))
499
ACPI_EXTERNAL_RETURN_VOID(void acpi_put_table(struct acpi_table_header *table))
500
501
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
502
acpi_get_table_by_index(u32 table_index,
503
struct acpi_table_header
504
**out_table))
505
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
506
acpi_install_table_handler(acpi_table_handler
507
handler, void *context))
508
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
509
acpi_remove_table_handler(acpi_table_handler
510
handler))
511
512
/*
513
* Namespace and name interfaces
514
*/
515
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
516
acpi_walk_namespace(acpi_object_type type,
517
acpi_handle start_object,
518
u32 max_depth,
519
acpi_walk_callback
520
descending_callback,
521
acpi_walk_callback
522
ascending_callback,
523
void *context,
524
void **return_value))
525
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
526
acpi_get_devices(const char *HID,
527
acpi_walk_callback user_function,
528
void *context,
529
void **return_value))
530
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
531
acpi_get_name(acpi_handle object, u32 name_type,
532
struct acpi_buffer *ret_path_ptr))
533
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
534
acpi_get_handle(acpi_handle parent,
535
const char *pathname,
536
acpi_handle *ret_handle))
537
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
538
acpi_attach_data(acpi_handle object,
539
acpi_object_handler handler,
540
void *data))
541
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
542
acpi_detach_data(acpi_handle object,
543
acpi_object_handler handler))
544
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
545
acpi_get_data(acpi_handle object,
546
acpi_object_handler handler,
547
void **data))
548
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
549
acpi_debug_trace(const char *name, u32 debug_level,
550
u32 debug_layer, u32 flags))
551
552
/*
553
* Object manipulation and enumeration
554
*/
555
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
556
acpi_evaluate_object(acpi_handle object,
557
acpi_string pathname,
558
struct acpi_object_list
559
*parameter_objects,
560
struct acpi_buffer
561
*return_object_buffer))
562
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
563
acpi_evaluate_object_typed(acpi_handle object,
564
acpi_string pathname,
565
struct acpi_object_list
566
*external_params,
567
struct acpi_buffer
568
*return_buffer,
569
acpi_object_type
570
return_type))
571
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
572
acpi_get_object_info(acpi_handle object,
573
struct acpi_device_info
574
**return_buffer))
575
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_install_method(u8 *buffer))
576
577
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
578
acpi_get_next_object(acpi_object_type type,
579
acpi_handle parent,
580
acpi_handle child,
581
acpi_handle *out_handle))
582
583
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
584
acpi_get_type(acpi_handle object,
585
acpi_object_type *out_type))
586
587
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
588
acpi_get_parent(acpi_handle object,
589
acpi_handle *out_handle))
590
591
/*
592
* Handler interfaces
593
*/
594
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
595
acpi_install_initialization_handler
596
(acpi_init_handler handler, u32 function))
597
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
598
acpi_install_sci_handler(acpi_sci_handler
599
address,
600
void *context))
601
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
602
acpi_remove_sci_handler(acpi_sci_handler
603
address))
604
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
605
acpi_install_global_event_handler
606
(acpi_gbl_event_handler handler,
607
void *context))
608
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
609
acpi_install_fixed_event_handler(u32
610
acpi_event,
611
acpi_event_handler
612
handler,
613
void
614
*context))
615
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
616
acpi_remove_fixed_event_handler(u32 acpi_event,
617
acpi_event_handler
618
handler))
619
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
620
acpi_install_gpe_handler(acpi_handle
621
gpe_device,
622
u32 gpe_number,
623
u32 type,
624
acpi_gpe_handler
625
address,
626
void *context))
627
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
628
acpi_install_gpe_raw_handler(acpi_handle
629
gpe_device,
630
u32 gpe_number,
631
u32 type,
632
acpi_gpe_handler
633
address,
634
void *context))
635
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
636
acpi_remove_gpe_handler(acpi_handle gpe_device,
637
u32 gpe_number,
638
acpi_gpe_handler
639
address))
640
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
641
acpi_install_notify_handler(acpi_handle device,
642
u32 handler_type,
643
acpi_notify_handler
644
handler,
645
void *context))
646
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
647
acpi_remove_notify_handler(acpi_handle device,
648
u32 handler_type,
649
acpi_notify_handler
650
handler))
651
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
652
acpi_install_address_space_handler(acpi_handle
653
device,
654
acpi_adr_space_type
655
space_id,
656
acpi_adr_space_handler
657
handler,
658
acpi_adr_space_setup
659
setup,
660
void *context))
661
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
662
acpi_install_address_space_handler_no_reg
663
(acpi_handle device, acpi_adr_space_type space_id,
664
acpi_adr_space_handler handler,
665
acpi_adr_space_setup setup,
666
void *context))
667
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
668
acpi_execute_reg_methods(acpi_handle device,
669
u32 nax_depth,
670
acpi_adr_space_type
671
space_id))
672
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
673
acpi_remove_address_space_handler(acpi_handle
674
device,
675
acpi_adr_space_type
676
space_id,
677
acpi_adr_space_handler
678
handler))
679
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
680
acpi_install_exception_handler
681
(acpi_exception_handler handler))
682
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
683
acpi_install_interface_handler
684
(acpi_interface_handler handler))
685
686
/*
687
* Global Lock interfaces
688
*/
689
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
690
acpi_acquire_global_lock(u16 timeout,
691
u32 *handle))
692
693
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
694
acpi_release_global_lock(u32 handle))
695
696
/*
697
* Interfaces to AML mutex objects
698
*/
699
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
700
acpi_acquire_mutex(acpi_handle handle,
701
acpi_string pathname,
702
u16 timeout))
703
704
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
705
acpi_release_mutex(acpi_handle handle,
706
acpi_string pathname))
707
708
/*
709
* Fixed Event interfaces
710
*/
711
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
712
acpi_enable_event(u32 event, u32 flags))
713
714
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
715
acpi_disable_event(u32 event, u32 flags))
716
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event))
717
718
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
719
acpi_get_event_status(u32 event,
720
acpi_event_status
721
*event_status))
722
723
/*
724
* General Purpose Event (GPE) Interfaces
725
*/
726
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void))
727
728
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
729
acpi_enable_gpe(acpi_handle gpe_device,
730
u32 gpe_number))
731
732
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
733
acpi_disable_gpe(acpi_handle gpe_device,
734
u32 gpe_number))
735
736
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
737
acpi_clear_gpe(acpi_handle gpe_device,
738
u32 gpe_number))
739
740
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
741
acpi_set_gpe(acpi_handle gpe_device,
742
u32 gpe_number, u8 action))
743
744
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
745
acpi_finish_gpe(acpi_handle gpe_device,
746
u32 gpe_number))
747
748
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
749
acpi_mask_gpe(acpi_handle gpe_device,
750
u32 gpe_number, u8 is_masked))
751
752
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
753
acpi_mark_gpe_for_wake(acpi_handle gpe_device,
754
u32 gpe_number))
755
756
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
757
acpi_setup_gpe_for_wake(acpi_handle
758
parent_device,
759
acpi_handle gpe_device,
760
u32 gpe_number))
761
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
762
acpi_set_gpe_wake_mask(acpi_handle gpe_device,
763
u32 gpe_number,
764
u8 action))
765
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
766
acpi_get_gpe_status(acpi_handle gpe_device,
767
u32 gpe_number,
768
acpi_event_status
769
*event_status))
770
ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_dispatch_gpe(acpi_handle gpe_device, u32 gpe_number))
771
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_hw_disable_all_gpes(void))
772
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_hw_enable_all_wakeup_gpes(void))
773
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void))
774
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void))
775
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_wakeup_gpes(void))
776
ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_gpe_status_set(u32 gpe_skip_number))
777
ACPI_HW_DEPENDENT_RETURN_UINT32(u32 acpi_any_fixed_event_status_set(void))
778
779
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
780
acpi_get_gpe_device(u32 gpe_index,
781
acpi_handle *gpe_device))
782
783
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
784
acpi_install_gpe_block(acpi_handle gpe_device,
785
struct
786
acpi_generic_address
787
*gpe_block_address,
788
u32 register_count,
789
u32 interrupt_number))
790
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
791
acpi_remove_gpe_block(acpi_handle gpe_device))
792
793
/*
794
* Resource interfaces
795
*/
796
typedef
797
acpi_status (*acpi_walk_resource_callback) (struct acpi_resource * resource,
798
void *context);
799
800
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
801
acpi_get_vendor_resource(acpi_handle device,
802
char *name,
803
struct acpi_vendor_uuid
804
*uuid,
805
struct acpi_buffer
806
*ret_buffer))
807
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
808
acpi_get_current_resources(acpi_handle device,
809
struct acpi_buffer
810
*ret_buffer))
811
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
812
acpi_get_possible_resources(acpi_handle device,
813
struct acpi_buffer
814
*ret_buffer))
815
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
816
acpi_get_event_resources(acpi_handle device_handle,
817
struct acpi_buffer
818
*ret_buffer))
819
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
820
acpi_walk_resource_buffer(struct acpi_buffer
821
*buffer,
822
acpi_walk_resource_callback
823
user_function,
824
void *context))
825
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
826
acpi_walk_resources(acpi_handle device, char *name,
827
acpi_walk_resource_callback
828
user_function, void *context))
829
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
830
acpi_set_current_resources(acpi_handle device,
831
struct acpi_buffer
832
*in_buffer))
833
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
834
acpi_get_irq_routing_table(acpi_handle device,
835
struct acpi_buffer
836
*ret_buffer))
837
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
838
acpi_resource_to_address64(struct acpi_resource
839
*resource,
840
struct
841
acpi_resource_address64
842
*out))
843
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
844
acpi_buffer_to_resource(u8 *aml_buffer,
845
u16 aml_buffer_length,
846
struct acpi_resource
847
**resource_ptr))
848
849
/*
850
* Hardware (ACPI device) interfaces
851
*/
852
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_reset(void))
853
854
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
855
acpi_read(u64 *value,
856
struct acpi_generic_address *reg))
857
858
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
859
acpi_write(u64 value,
860
struct acpi_generic_address *reg))
861
862
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
863
acpi_read_bit_register(u32 register_id,
864
u32 *return_value))
865
866
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
867
acpi_write_bit_register(u32 register_id,
868
u32 value))
869
870
/*
871
* Sleep/Wake interfaces
872
*/
873
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
874
acpi_get_sleep_type_data(u8 sleep_state,
875
u8 *slp_typ_a,
876
u8 *slp_typ_b))
877
878
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
879
acpi_enter_sleep_state_prep(u8 sleep_state))
880
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_enter_sleep_state(u8 sleep_state))
881
882
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enter_sleep_state_s4bios(void))
883
884
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
885
acpi_leave_sleep_state_prep(u8 sleep_state))
886
ACPI_EXTERNAL_RETURN_STATUS(acpi_status acpi_leave_sleep_state(u8 sleep_state))
887
888
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
889
acpi_set_firmware_waking_vector
890
(acpi_physical_address physical_address,
891
acpi_physical_address physical_address64))
892
/*
893
* ACPI Timer interfaces
894
*/
895
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
896
acpi_get_timer_resolution(u32 *resolution))
897
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks))
898
899
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
900
acpi_get_timer_duration(u32 start_ticks,
901
u32 end_ticks,
902
u32 *time_elapsed))
903
904
/*
905
* Error/Warning output
906
*/
907
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
908
void ACPI_INTERNAL_VAR_XFACE
909
acpi_error(const char *module_name,
910
u32 line_number,
911
const char *format, ...))
912
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
913
void ACPI_INTERNAL_VAR_XFACE
914
acpi_exception(const char *module_name,
915
u32 line_number,
916
acpi_status status,
917
const char *format, ...))
918
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
919
void ACPI_INTERNAL_VAR_XFACE
920
acpi_warning(const char *module_name,
921
u32 line_number,
922
const char *format, ...))
923
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
924
void ACPI_INTERNAL_VAR_XFACE
925
acpi_info(const char *format, ...))
926
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
927
void ACPI_INTERNAL_VAR_XFACE
928
acpi_bios_error(const char *module_name,
929
u32 line_number,
930
const char *format, ...))
931
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(4)
932
void ACPI_INTERNAL_VAR_XFACE
933
acpi_bios_exception(const char *module_name,
934
u32 line_number,
935
acpi_status status,
936
const char *format, ...))
937
ACPI_MSG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(3)
938
void ACPI_INTERNAL_VAR_XFACE
939
acpi_bios_warning(const char *module_name,
940
u32 line_number,
941
const char *format, ...))
942
943
/*
944
* Debug output
945
*/
946
ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
947
void ACPI_INTERNAL_VAR_XFACE
948
acpi_debug_print(u32 requested_debug_level,
949
u32 line_number,
950
const char *function_name,
951
const char *module_name,
952
u32 component_id,
953
const char *format, ...))
954
ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
955
void ACPI_INTERNAL_VAR_XFACE
956
acpi_debug_print_raw(u32 requested_debug_level,
957
u32 line_number,
958
const char *function_name,
959
const char *module_name,
960
u32 component_id,
961
const char *format, ...))
962
963
ACPI_DBG_DEPENDENT_RETURN_VOID(void
964
acpi_trace_point(acpi_trace_event_type type,
965
u8 begin,
966
u8 *aml, char *pathname))
967
968
acpi_status acpi_initialize_debugger(void);
969
970
void acpi_terminate_debugger(void);
971
972
/*
973
* Divergences
974
*/
975
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
976
acpi_get_data_full(acpi_handle object,
977
acpi_object_handler handler,
978
void **data,
979
void (*callback)(void *)))
980
981
void acpi_set_debugger_thread_id(acpi_thread_id thread_id);
982
983
#endif /* __ACXFACE_H__ */
984
985