aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/aclocal.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-07-03 10:25:08 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-07-03 10:25:08 -0400
commit0a1340c185734a57fbf4775927966ad4a1347b02 (patch)
treed9ed8f0dd809a7c542a3356601125ea5b5aaa804 /include/acpi/aclocal.h
parentaf18ddb8864b096e3ed4732e2d4b21c956dcfe3a (diff)
parent29454dde27d8e340bb1987bad9aa504af7081eba (diff)
Merge rsync://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: include/linux/kernel.h
Diffstat (limited to 'include/acpi/aclocal.h')
-rw-r--r--include/acpi/aclocal.h292
1 files changed, 159 insertions, 133 deletions
diff --git a/include/acpi/aclocal.h b/include/acpi/aclocal.h
index 8361820d2970..56b802486161 100644
--- a/include/acpi/aclocal.h
+++ b/include/acpi/aclocal.h
@@ -44,10 +44,14 @@
44#ifndef __ACLOCAL_H__ 44#ifndef __ACLOCAL_H__
45#define __ACLOCAL_H__ 45#define __ACLOCAL_H__
46 46
47/* acpisrc:struct_defs -- for acpisrc conversion */
48
47#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */ 49#define ACPI_WAIT_FOREVER 0xFFFF /* u16, as per ACPI spec */
50#define ACPI_DO_NOT_WAIT 0
51#define ACPI_SERIALIZED 0xFF
48 52
49typedef void *acpi_mutex;
50typedef u32 acpi_mutex_handle; 53typedef u32 acpi_mutex_handle;
54#define ACPI_GLOBAL_LOCK (acpi_semaphore) (-1)
51 55
52/* Total number of aml opcodes defined */ 56/* Total number of aml opcodes defined */
53 57
@@ -69,52 +73,53 @@ union acpi_parse_object;
69 * Predefined handles for the mutex objects used within the subsystem 73 * Predefined handles for the mutex objects used within the subsystem
70 * All mutex objects are automatically created by acpi_ut_mutex_initialize. 74 * All mutex objects are automatically created by acpi_ut_mutex_initialize.
71 * 75 *
72 * The acquire/release ordering protocol is implied via this list. Mutexes 76 * The acquire/release ordering protocol is implied via this list. Mutexes
73 * with a lower value must be acquired before mutexes with a higher value. 77 * with a lower value must be acquired before mutexes with a higher value.
74 * 78 *
75 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names table also! 79 * NOTE: any changes here must be reflected in the acpi_gbl_mutex_names
80 * table below also!
76 */ 81 */
77#define ACPI_MTX_EXECUTE 0 82#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
78#define ACPI_MTX_INTERPRETER 1 83#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */
79#define ACPI_MTX_PARSER 2 84#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */
80#define ACPI_MTX_DISPATCHER 3 85#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
81#define ACPI_MTX_TABLES 4 86#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
82#define ACPI_MTX_OP_REGIONS 5 87#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
83#define ACPI_MTX_NAMESPACE 6 88#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */
84#define ACPI_MTX_EVENTS 7 89#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */
85#define ACPI_MTX_HARDWARE 8 90
86#define ACPI_MTX_CACHES 9 91#define ACPI_MAX_MUTEX 7
87#define ACPI_MTX_MEMORY 10 92#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1
88#define ACPI_MTX_DEBUG_CMD_COMPLETE 11
89#define ACPI_MTX_DEBUG_CMD_READY 12
90
91#define MAX_MUTEX 12
92#define NUM_MUTEX MAX_MUTEX+1
93 93
94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 94#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
95#ifdef DEFINE_ACPI_GLOBALS 95#ifdef DEFINE_ACPI_GLOBALS
96 96
97/* Names for the mutexes used in the subsystem */ 97/* Debug names for the mutexes above */
98 98
99static char *acpi_gbl_mutex_names[] = { 99static char *acpi_gbl_mutex_names[ACPI_NUM_MUTEX] = {
100 "ACPI_MTX_Execute",
101 "ACPI_MTX_Interpreter", 100 "ACPI_MTX_Interpreter",
102 "ACPI_MTX_Parser",
103 "ACPI_MTX_Dispatcher",
104 "ACPI_MTX_Tables", 101 "ACPI_MTX_Tables",
105 "ACPI_MTX_op_regions",
106 "ACPI_MTX_Namespace", 102 "ACPI_MTX_Namespace",
107 "ACPI_MTX_Events", 103 "ACPI_MTX_Events",
108 "ACPI_MTX_Hardware",
109 "ACPI_MTX_Caches", 104 "ACPI_MTX_Caches",
110 "ACPI_MTX_Memory", 105 "ACPI_MTX_Memory",
111 "ACPI_MTX_debug_cmd_complete", 106 "ACPI_MTX_CommandComplete",
112 "ACPI_MTX_debug_cmd_ready", 107 "ACPI_MTX_CommandReady"
113}; 108};
114 109
115#endif 110#endif
116#endif 111#endif
117 112
113/*
114 * Predefined handles for spinlocks used within the subsystem.
115 * These spinlocks are created by acpi_ut_mutex_initialize
116 */
117#define ACPI_LOCK_GPES 0
118#define ACPI_LOCK_HARDWARE 1
119
120#define ACPI_MAX_LOCK 1
121#define ACPI_NUM_LOCK ACPI_MAX_LOCK+1
122
118/* Owner IDs are used to track namespace nodes for selective deletion */ 123/* Owner IDs are used to track namespace nodes for selective deletion */
119 124
120typedef u8 acpi_owner_id; 125typedef u8 acpi_owner_id;
@@ -129,7 +134,7 @@ typedef u8 acpi_owner_id;
129struct acpi_mutex_info { 134struct acpi_mutex_info {
130 acpi_mutex mutex; 135 acpi_mutex mutex;
131 u32 use_count; 136 u32 use_count;
132 u32 thread_id; 137 acpi_thread_id thread_id;
133}; 138};
134 139
135/* Lock flag parameter for various interfaces */ 140/* Lock flag parameter for various interfaces */
@@ -144,6 +149,8 @@ struct acpi_mutex_info {
144#define ACPI_FIELD_DWORD_GRANULARITY 4 149#define ACPI_FIELD_DWORD_GRANULARITY 4
145#define ACPI_FIELD_QWORD_GRANULARITY 8 150#define ACPI_FIELD_QWORD_GRANULARITY 8
146 151
152#define ACPI_ENTRY_NOT_FOUND NULL
153
147/***************************************************************************** 154/*****************************************************************************
148 * 155 *
149 * Namespace typedefs and structs 156 * Namespace typedefs and structs
@@ -158,49 +165,55 @@ typedef enum {
158 ACPI_IMODE_EXECUTE = 0x0E 165 ACPI_IMODE_EXECUTE = 0x0E
159} acpi_interpreter_mode; 166} acpi_interpreter_mode;
160 167
161/*
162 * The Node describes a named object that appears in the AML
163 * An acpi_node is used to store Nodes.
164 *
165 * data_type is used to differentiate between internal descriptors, and MUST
166 * be the first byte in this structure.
167 */
168union acpi_name_union { 168union acpi_name_union {
169 u32 integer; 169 u32 integer;
170 char ascii[4]; 170 char ascii[4];
171}; 171};
172 172
173/*
174 * The Namespace Node describes a named object that appears in the AML.
175 * descriptor_type is used to differentiate between internal descriptors.
176 *
177 * The node is optimized for both 32-bit and 64-bit platforms:
178 * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
179 *
180 * Note: The descriptor_type and Type fields must appear in the identical
181 * position in both the struct acpi_namespace_node and union acpi_operand_object
182 * structures.
183 */
173struct acpi_namespace_node { 184struct acpi_namespace_node {
174 u8 descriptor; /* Used to differentiate object descriptor types */ 185 union acpi_operand_object *object; /* Interpreter object */
175 u8 type; /* Type associated with this name */ 186 u8 descriptor_type; /* Differentiate object descriptor types */
176 u16 reference_count; /* Current count of references and children */ 187 u8 type; /* ACPI Type associated with this name */
188 u8 flags; /* Miscellaneous flags */
189 acpi_owner_id owner_id; /* Node creator */
177 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */ 190 union acpi_name_union name; /* ACPI Name, always 4 chars per ACPI spec */
178 union acpi_operand_object *object; /* Pointer to attached ACPI object (optional) */
179 struct acpi_namespace_node *child; /* First child */ 191 struct acpi_namespace_node *child; /* First child */
180 struct acpi_namespace_node *peer; /* Next peer */ 192 struct acpi_namespace_node *peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */
181 u8 owner_id; /* Who created this node */
182 u8 flags;
183
184 /* Fields used by the ASL compiler only */
185 193
186#ifdef ACPI_ASL_COMPILER 194 /*
187 u32 value; 195 * The following fields are used by the ASL compiler and disassembler only
196 */
197#ifdef ACPI_LARGE_NAMESPACE_NODE
188 union acpi_parse_object *op; 198 union acpi_parse_object *op;
199 u32 value;
200 u32 length;
189#endif 201#endif
190}; 202};
191 203
192#define ACPI_ENTRY_NOT_FOUND NULL 204/* Namespace Node flags */
193 205
194/* Node flags */ 206#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */
207#define ANOBJ_DATA_WIDTH_32 0x02 /* Parent table uses 32-bit math */
208#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
209#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
210#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
195 211
196#define ANOBJ_RESERVED 0x01 212#define ANOBJ_IS_EXTERNAL 0x08 /* i_aSL only: This object created via External() */
197#define ANOBJ_END_OF_PEER_LIST 0x02 213#define ANOBJ_METHOD_NO_RETVAL 0x10 /* i_aSL only: Method has no return value */
198#define ANOBJ_DATA_WIDTH_32 0x04 /* Parent table is 64-bits */ 214#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* i_aSL only: Method has at least one return value */
199#define ANOBJ_METHOD_ARG 0x08 215#define ANOBJ_IS_BIT_OFFSET 0x40 /* i_aSL only: Reference is a bit offset */
200#define ANOBJ_METHOD_LOCAL 0x10 216#define ANOBJ_IS_REFERENCED 0x80 /* i_aSL only: Object was referenced */
201#define ANOBJ_METHOD_NO_RETVAL 0x20
202#define ANOBJ_METHOD_SOME_NO_RETVAL 0x40
203#define ANOBJ_IS_BIT_OFFSET 0x80
204 217
205/* 218/*
206 * ACPI Table Descriptor. One per ACPI table 219 * ACPI Table Descriptor. One per ACPI table
@@ -212,8 +225,8 @@ struct acpi_table_desc {
212 struct acpi_table_header *pointer; 225 struct acpi_table_header *pointer;
213 u8 *aml_start; 226 u8 *aml_start;
214 u64 physical_address; 227 u64 physical_address;
215 u32 aml_length;
216 acpi_size length; 228 acpi_size length;
229 u32 aml_length;
217 acpi_owner_id owner_id; 230 acpi_owner_id owner_id;
218 u8 type; 231 u8 type;
219 u8 allocation; 232 u8 allocation;
@@ -276,6 +289,9 @@ struct acpi_create_field_info {
276 u8 field_type; 289 u8 field_type;
277}; 290};
278 291
292typedef
293acpi_status(*ACPI_INTERNAL_METHOD) (struct acpi_walk_state * walk_state);
294
279/* 295/*
280 * Bitmapped ACPI types. Used internally only 296 * Bitmapped ACPI types. Used internally only
281 */ 297 */
@@ -377,7 +393,7 @@ struct acpi_gpe_walk_info {
377 struct acpi_gpe_block_info *gpe_block; 393 struct acpi_gpe_block_info *gpe_block;
378}; 394};
379 395
380typedef acpi_status(*ACPI_GPE_CALLBACK) (struct acpi_gpe_xrupt_info * 396typedef acpi_status(*acpi_gpe_callback) (struct acpi_gpe_xrupt_info *
381 gpe_xrupt_info, 397 gpe_xrupt_info,
382 struct acpi_gpe_block_info * 398 struct acpi_gpe_block_info *
383 gpe_block); 399 gpe_block);
@@ -416,13 +432,14 @@ struct acpi_field_info {
416#define ACPI_CONTROL_PREDICATE_FALSE 0xC3 432#define ACPI_CONTROL_PREDICATE_FALSE 0xC3
417#define ACPI_CONTROL_PREDICATE_TRUE 0xC4 433#define ACPI_CONTROL_PREDICATE_TRUE 0xC4
418 434
419#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\ 435#define ACPI_STATE_COMMON \
420 u8 data_type; /* To differentiate various internal objs */\ 436 void *next; \
421 u8 flags; \ 437 u8 descriptor_type; /* To differentiate various internal objs */\
422 u16 value; \ 438 u8 flags; \
423 u16 state; \ 439 u16 value; \
424 u16 reserved; \ 440 u16 state;
425 void *next; 441
442 /* There are 2 bytes available here until the next natural alignment boundary */
426 443
427struct acpi_common_state { 444struct acpi_common_state {
428ACPI_STATE_COMMON}; 445ACPI_STATE_COMMON};
@@ -438,12 +455,12 @@ struct acpi_update_state {
438 * Pkg state - used to traverse nested package structures 455 * Pkg state - used to traverse nested package structures
439 */ 456 */
440struct acpi_pkg_state { 457struct acpi_pkg_state {
441 ACPI_STATE_COMMON union acpi_operand_object *source_object; 458 ACPI_STATE_COMMON u16 index;
459 union acpi_operand_object *source_object;
442 union acpi_operand_object *dest_object; 460 union acpi_operand_object *dest_object;
443 struct acpi_walk_state *walk_state; 461 struct acpi_walk_state *walk_state;
444 void *this_target_obj; 462 void *this_target_obj;
445 u32 num_packages; 463 u32 num_packages;
446 u16 index;
447}; 464};
448 465
449/* 466/*
@@ -451,10 +468,10 @@ struct acpi_pkg_state {
451 * Allows nesting of these constructs 468 * Allows nesting of these constructs
452 */ 469 */
453struct acpi_control_state { 470struct acpi_control_state {
454 ACPI_STATE_COMMON union acpi_parse_object *predicate_op; 471 ACPI_STATE_COMMON u16 opcode;
472 union acpi_parse_object *predicate_op;
455 u8 *aml_predicate_start; /* Start of if/while predicate */ 473 u8 *aml_predicate_start; /* Start of if/while predicate */
456 u8 *package_end; /* End of if/while block */ 474 u8 *package_end; /* End of if/while block */
457 u16 opcode;
458}; 475};
459 476
460/* 477/*
@@ -465,11 +482,11 @@ struct acpi_scope_state {
465}; 482};
466 483
467struct acpi_pscope_state { 484struct acpi_pscope_state {
468 ACPI_STATE_COMMON union acpi_parse_object *op; /* Current op being parsed */ 485 ACPI_STATE_COMMON u32 arg_count; /* Number of fixed arguments */
486 union acpi_parse_object *op; /* Current op being parsed */
469 u8 *arg_end; /* Current argument end */ 487 u8 *arg_end; /* Current argument end */
470 u8 *pkg_end; /* Current package end */ 488 u8 *pkg_end; /* Current package end */
471 u32 arg_list; /* Next argument to parse */ 489 u32 arg_list; /* Next argument to parse */
472 u32 arg_count; /* Number of fixed arguments */
473}; 490};
474 491
475/* 492/*
@@ -477,10 +494,10 @@ struct acpi_pscope_state {
477 * states are created when there are nested control methods executing. 494 * states are created when there are nested control methods executing.
478 */ 495 */
479struct acpi_thread_state { 496struct acpi_thread_state {
480 ACPI_STATE_COMMON struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */ 497 ACPI_STATE_COMMON u8 current_sync_level; /* Mutex Sync (nested acquire) level */
498 struct acpi_walk_state *walk_state_list; /* Head of list of walk_states for this thread */
481 union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */ 499 union acpi_operand_object *acquired_mutex_list; /* List of all currently acquired mutexes */
482 u32 thread_id; /* Running thread ID */ 500 acpi_thread_id thread_id; /* Running thread ID */
483 u8 current_sync_level; /* Mutex Sync (nested acquire) level */
484}; 501};
485 502
486/* 503/*
@@ -488,10 +505,9 @@ struct acpi_thread_state {
488 * AML arguments 505 * AML arguments
489 */ 506 */
490struct acpi_result_values { 507struct acpi_result_values {
491 ACPI_STATE_COMMON 508 ACPI_STATE_COMMON u8 num_results;
492 union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
493 u8 num_results;
494 u8 last_insert; 509 u8 last_insert;
510 union acpi_operand_object *obj_desc[ACPI_OBJ_NUM_OPERANDS];
495}; 511};
496 512
497typedef 513typedef
@@ -546,7 +562,7 @@ struct acpi_opcode_info {
546#endif 562#endif
547 u32 parse_args; /* Grammar/Parse time arguments */ 563 u32 parse_args; /* Grammar/Parse time arguments */
548 u32 runtime_args; /* Interpret time arguments */ 564 u32 runtime_args; /* Interpret time arguments */
549 u32 flags; /* Misc flags */ 565 u16 flags; /* Misc flags */
550 u8 object_type; /* Corresponding internal object type */ 566 u8 object_type; /* Corresponding internal object type */
551 u8 class; /* Opcode class */ 567 u8 class; /* Opcode class */
552 u8 type; /* Opcode type */ 568 u8 type; /* Opcode type */
@@ -563,29 +579,31 @@ union acpi_parse_value {
563}; 579};
564 580
565#define ACPI_PARSE_COMMON \ 581#define ACPI_PARSE_COMMON \
566 u8 data_type; /* To differentiate various internal objs */\ 582 union acpi_parse_object *parent; /* Parent op */\
567 u8 flags; /* Type of Op */\ 583 u8 descriptor_type; /* To differentiate various internal objs */\
568 u16 aml_opcode; /* AML opcode */\ 584 u8 flags; /* Type of Op */\
569 u32 aml_offset; /* Offset of declaration in AML */\ 585 u16 aml_opcode; /* AML opcode */\
570 union acpi_parse_object *parent; /* Parent op */\ 586 u32 aml_offset; /* Offset of declaration in AML */\
571 union acpi_parse_object *next; /* Next op */\ 587 union acpi_parse_object *next; /* Next op */\
588 struct acpi_namespace_node *node; /* For use by interpreter */\
589 union acpi_parse_value value; /* Value or args associated with the opcode */\
572 ACPI_DISASM_ONLY_MEMBERS (\ 590 ACPI_DISASM_ONLY_MEMBERS (\
573 u8 disasm_flags; /* Used during AML disassembly */\ 591 u8 disasm_flags; /* Used during AML disassembly */\
574 u8 disasm_opcode; /* Subtype used for disassembly */\ 592 u8 disasm_opcode; /* Subtype used for disassembly */\
575 char aml_op_name[16]) /* Op name (debug only) */\ 593 char aml_op_name[16]) /* Op name (debug only) */
576 /* NON-DEBUG members below: */\ 594
577 struct acpi_namespace_node *node; /* For use by interpreter */\ 595#define ACPI_DASM_BUFFER 0x00
578 union acpi_parse_value value; /* Value or args associated with the opcode */ 596#define ACPI_DASM_RESOURCE 0x01
579 597#define ACPI_DASM_STRING 0x02
580#define ACPI_DASM_BUFFER 0x00 598#define ACPI_DASM_UNICODE 0x03
581#define ACPI_DASM_RESOURCE 0x01 599#define ACPI_DASM_EISAID 0x04
582#define ACPI_DASM_STRING 0x02 600#define ACPI_DASM_MATCHOP 0x05
583#define ACPI_DASM_UNICODE 0x03 601#define ACPI_DASM_LNOT_PREFIX 0x06
584#define ACPI_DASM_EISAID 0x04 602#define ACPI_DASM_LNOT_SUFFIX 0x07
585#define ACPI_DASM_MATCHOP 0x05 603#define ACPI_DASM_IGNORE 0x08
586 604
587/* 605/*
588 * generic operation (for example: If, While, Store) 606 * Generic operation (for example: If, While, Store)
589 */ 607 */
590struct acpi_parse_obj_common { 608struct acpi_parse_obj_common {
591ACPI_PARSE_COMMON}; 609ACPI_PARSE_COMMON};
@@ -601,7 +619,7 @@ struct acpi_parse_obj_named {
601 u32 name; /* 4-byte name or zero if no name */ 619 u32 name; /* 4-byte name or zero if no name */
602}; 620};
603 621
604/* The parse node is the fundamental element of the parse tree */ 622/* This version is used by the i_aSL compiler only */
605 623
606#define ACPI_MAX_PARSEOP_NAME 20 624#define ACPI_MAX_PARSEOP_NAME 20
607 625
@@ -643,7 +661,6 @@ union acpi_parse_object {
643 * method. 661 * method.
644 */ 662 */
645struct acpi_parse_state { 663struct acpi_parse_state {
646 u32 aml_size;
647 u8 *aml_start; /* First AML byte */ 664 u8 *aml_start; /* First AML byte */
648 u8 *aml; /* Next AML byte */ 665 u8 *aml; /* Next AML byte */
649 u8 *aml_end; /* (last + 1) AML byte */ 666 u8 *aml_end; /* (last + 1) AML byte */
@@ -653,22 +670,23 @@ struct acpi_parse_state {
653 struct acpi_namespace_node *start_node; 670 struct acpi_namespace_node *start_node;
654 union acpi_generic_state *scope; /* Current scope */ 671 union acpi_generic_state *scope; /* Current scope */
655 union acpi_parse_object *start_scope; 672 union acpi_parse_object *start_scope;
673 u32 aml_size;
656}; 674};
657 675
658/* Parse object flags */ 676/* Parse object flags */
659 677
660#define ACPI_PARSEOP_GENERIC 0x01 678#define ACPI_PARSEOP_GENERIC 0x01
661#define ACPI_PARSEOP_NAMED 0x02 679#define ACPI_PARSEOP_NAMED 0x02
662#define ACPI_PARSEOP_DEFERRED 0x04 680#define ACPI_PARSEOP_DEFERRED 0x04
663#define ACPI_PARSEOP_BYTELIST 0x08 681#define ACPI_PARSEOP_BYTELIST 0x08
664#define ACPI_PARSEOP_IN_CACHE 0x80 682#define ACPI_PARSEOP_IN_CACHE 0x80
665 683
666/* Parse object disasm_flags */ 684/* Parse object disasm_flags */
667 685
668#define ACPI_PARSEOP_IGNORE 0x01 686#define ACPI_PARSEOP_IGNORE 0x01
669#define ACPI_PARSEOP_PARAMLIST 0x02 687#define ACPI_PARSEOP_PARAMLIST 0x02
670#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 688#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04
671#define ACPI_PARSEOP_SPECIAL 0x10 689#define ACPI_PARSEOP_SPECIAL 0x10
672 690
673/***************************************************************************** 691/*****************************************************************************
674 * 692 *
@@ -676,8 +694,8 @@ struct acpi_parse_state {
676 * 694 *
677 ****************************************************************************/ 695 ****************************************************************************/
678 696
679#define PCI_ROOT_HID_STRING "PNP0A03" 697#define PCI_ROOT_HID_STRING "PNP0A03"
680#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" 698#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08"
681 699
682struct acpi_bit_register_info { 700struct acpi_bit_register_info {
683 u8 parent_register; 701 u8 parent_register;
@@ -686,6 +704,13 @@ struct acpi_bit_register_info {
686}; 704};
687 705
688/* 706/*
707 * Some ACPI registers have bits that must be ignored -- meaning that they
708 * must be preserved.
709 */
710#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
711#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */
712
713/*
689 * Register IDs 714 * Register IDs
690 * These are the full ACPI registers 715 * These are the full ACPI registers
691 */ 716 */
@@ -710,13 +735,14 @@ struct acpi_bit_register_info {
710#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */ 735#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */
711#define ACPI_BITMASK_WAKE_STATUS 0x8000 736#define ACPI_BITMASK_WAKE_STATUS 0x8000
712 737
713#define ACPI_BITMASK_ALL_FIXED_STATUS (ACPI_BITMASK_TIMER_STATUS | \ 738#define ACPI_BITMASK_ALL_FIXED_STATUS (\
714 ACPI_BITMASK_BUS_MASTER_STATUS | \ 739 ACPI_BITMASK_TIMER_STATUS | \
715 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ 740 ACPI_BITMASK_BUS_MASTER_STATUS | \
716 ACPI_BITMASK_POWER_BUTTON_STATUS | \ 741 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
717 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ 742 ACPI_BITMASK_POWER_BUTTON_STATUS | \
718 ACPI_BITMASK_RT_CLOCK_STATUS | \ 743 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
719 ACPI_BITMASK_WAKE_STATUS) 744 ACPI_BITMASK_RT_CLOCK_STATUS | \
745 ACPI_BITMASK_WAKE_STATUS)
720 746
721#define ACPI_BITMASK_TIMER_ENABLE 0x0001 747#define ACPI_BITMASK_TIMER_ENABLE 0x0001
722#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020 748#define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
@@ -820,7 +846,7 @@ struct acpi_bit_register_info {
820 * 846 *
821 ****************************************************************************/ 847 ****************************************************************************/
822 848
823#define ACPI_ASCII_ZERO 0x30 849#define ACPI_ASCII_ZERO 0x30
824 850
825/***************************************************************************** 851/*****************************************************************************
826 * 852 *
@@ -842,9 +868,9 @@ struct acpi_integrity_info {
842 u32 objects; 868 u32 objects;
843}; 869};
844 870
845#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 871#define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
846#define ACPI_DB_CONSOLE_OUTPUT 0x02 872#define ACPI_DB_CONSOLE_OUTPUT 0x02
847#define ACPI_DB_DUPLICATE_OUTPUT 0x03 873#define ACPI_DB_DUPLICATE_OUTPUT 0x03
848 874
849/***************************************************************************** 875/*****************************************************************************
850 * 876 *
@@ -854,18 +880,18 @@ struct acpi_integrity_info {
854 880
855/* Entry for a memory allocation (debug only) */ 881/* Entry for a memory allocation (debug only) */
856 882
857#define ACPI_MEM_MALLOC 0 883#define ACPI_MEM_MALLOC 0
858#define ACPI_MEM_CALLOC 1 884#define ACPI_MEM_CALLOC 1
859#define ACPI_MAX_MODULE_NAME 16 885#define ACPI_MAX_MODULE_NAME 16
860 886
861#define ACPI_COMMON_DEBUG_MEM_HEADER \ 887#define ACPI_COMMON_DEBUG_MEM_HEADER \
862 struct acpi_debug_mem_block *previous; \ 888 struct acpi_debug_mem_block *previous; \
863 struct acpi_debug_mem_block *next; \ 889 struct acpi_debug_mem_block *next; \
864 u32 size; \ 890 u32 size; \
865 u32 component; \ 891 u32 component; \
866 u32 line; \ 892 u32 line; \
867 char module[ACPI_MAX_MODULE_NAME]; \ 893 char module[ACPI_MAX_MODULE_NAME]; \
868 u8 alloc_type; 894 u8 alloc_type;
869 895
870struct acpi_debug_mem_header { 896struct acpi_debug_mem_header {
871ACPI_COMMON_DEBUG_MEM_HEADER}; 897ACPI_COMMON_DEBUG_MEM_HEADER};