1 /******************************************************************************
3 * Name: aclocal.h - Internal data types used across the ACPI subsystem
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2017, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
48 /* acpisrc:StructDefs -- for acpisrc conversion */
50 #define ACPI_SERIALIZED 0xFF
52 typedef UINT32 ACPI_MUTEX_HANDLE
;
53 #define ACPI_GLOBAL_LOCK (ACPI_SEMAPHORE) (-1)
55 /* Total number of aml opcodes defined */
57 #define AML_NUM_OPCODES 0x83
60 /* Forward declarations */
62 struct acpi_walk_state
;
63 struct acpi_obj_mutex
;
64 union acpi_parse_object
;
67 /*****************************************************************************
69 * Mutex typedefs and structs
71 ****************************************************************************/
75 * Predefined handles for the mutex objects used within the subsystem
76 * All mutex objects are automatically created by AcpiUtMutexInitialize.
78 * The acquire/release ordering protocol is implied via this list. Mutexes
79 * with a lower value must be acquired before mutexes with a higher value.
81 * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames
84 #define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */
85 #define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */
86 #define ACPI_MTX_TABLES 2 /* Data for ACPI tables */
87 #define ACPI_MTX_EVENTS 3 /* Data for ACPI events */
88 #define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */
89 #define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */
91 #define ACPI_MAX_MUTEX 5
92 #define ACPI_NUM_MUTEX (ACPI_MAX_MUTEX+1)
95 /* Lock structure for reader/writer interfaces */
97 typedef struct acpi_rw_lock
99 ACPI_MUTEX WriterMutex
;
100 ACPI_MUTEX ReaderMutex
;
107 * Predefined handles for spinlocks used within the subsystem.
108 * These spinlocks are created by AcpiUtMutexInitialize
110 #define ACPI_LOCK_GPES 0
111 #define ACPI_LOCK_HARDWARE 1
113 #define ACPI_MAX_LOCK 1
114 #define ACPI_NUM_LOCK (ACPI_MAX_LOCK+1)
117 /* This Thread ID means that the mutex is not in use (unlocked) */
119 #define ACPI_MUTEX_NOT_ACQUIRED ((ACPI_THREAD_ID) -1)
121 /* This Thread ID means an invalid thread ID */
123 #ifdef ACPI_OS_INVALID_THREAD_ID
124 #define ACPI_INVALID_THREAD_ID ACPI_OS_INVALID_THREAD_ID
126 #define ACPI_INVALID_THREAD_ID ((ACPI_THREAD_ID) 0xFFFFFFFF)
129 /* Table for the global mutexes */
131 typedef struct acpi_mutex_info
135 ACPI_THREAD_ID ThreadId
;
140 /* Lock flag parameter for various interfaces */
142 #define ACPI_MTX_DO_NOT_LOCK 0
143 #define ACPI_MTX_LOCK 1
146 /* Field access granularities */
148 #define ACPI_FIELD_BYTE_GRANULARITY 1
149 #define ACPI_FIELD_WORD_GRANULARITY 2
150 #define ACPI_FIELD_DWORD_GRANULARITY 4
151 #define ACPI_FIELD_QWORD_GRANULARITY 8
154 #define ACPI_ENTRY_NOT_FOUND NULL
157 /*****************************************************************************
159 * Namespace typedefs and structs
161 ****************************************************************************/
163 /* Operational modes of the AML interpreter/scanner */
167 ACPI_IMODE_LOAD_PASS1
= 0x01,
168 ACPI_IMODE_LOAD_PASS2
= 0x02,
169 ACPI_IMODE_EXECUTE
= 0x03
171 } ACPI_INTERPRETER_MODE
;
175 * The Namespace Node describes a named object that appears in the AML.
176 * DescriptorType is used to differentiate between internal descriptors.
178 * The node is optimized for both 32-bit and 64-bit platforms:
179 * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case.
181 * Note: The DescriptorType and Type fields must appear in the identical
182 * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT
185 typedef struct acpi_namespace_node
187 union acpi_operand_object
*Object
; /* Interpreter object */
188 UINT8 DescriptorType
; /* Differentiate object descriptor types */
189 UINT8 Type
; /* ACPI Type associated with this name */
190 UINT8 Flags
; /* Miscellaneous flags */
191 ACPI_OWNER_ID OwnerId
; /* Node creator */
192 ACPI_NAME_UNION Name
; /* ACPI Name, always 4 chars per ACPI spec */
193 struct acpi_namespace_node
*Parent
; /* Parent node */
194 struct acpi_namespace_node
*Child
; /* First child */
195 struct acpi_namespace_node
*Peer
; /* First peer */
198 * The following fields are used by the ASL compiler and disassembler only
200 #ifdef ACPI_LARGE_NAMESPACE_NODE
201 union acpi_parse_object
*Op
;
210 } ACPI_NAMESPACE_NODE
;
213 /* Namespace Node flags */
215 #define ANOBJ_RESERVED 0x01 /* Available for use */
216 #define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */
217 #define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
218 #define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
219 #define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */
220 #define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
221 #define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */
223 #define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
224 #define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
225 #define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
226 #define ANOBJ_IS_REFERENCED 0x80 /* iASL only: Object was referenced */
229 /* Internal ACPI table management - master table list */
231 typedef struct acpi_table_list
233 ACPI_TABLE_DESC
*Tables
; /* Table descriptor array */
234 UINT32 CurrentTableCount
; /* Tables currently in the array */
235 UINT32 MaxTableCount
; /* Max tables array will hold */
240 /* Flags for above */
242 #define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */
243 #define ACPI_ROOT_ORIGIN_ALLOCATED (1)
244 #define ACPI_ROOT_ALLOW_RESIZE (2)
247 /* List to manage incoming ACPI tables */
249 typedef struct acpi_new_table_desc
251 ACPI_TABLE_HEADER
*Table
;
252 struct acpi_new_table_desc
*Next
;
254 } ACPI_NEW_TABLE_DESC
;
257 /* Predefined table indexes */
259 #define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF)
262 typedef struct acpi_find_context
271 typedef struct acpi_ns_search_data
273 ACPI_NAMESPACE_NODE
*Node
;
275 } ACPI_NS_SEARCH_DATA
;
278 /* Object types used during package copies */
280 #define ACPI_COPY_TYPE_SIMPLE 0
281 #define ACPI_COPY_TYPE_PACKAGE 1
284 /* Info structure used to convert external<->internal namestrings */
286 typedef struct acpi_namestring_info
288 const char *ExternalName
;
289 const char *NextExternalChar
;
294 BOOLEAN FullyQualified
;
296 } ACPI_NAMESTRING_INFO
;
299 /* Field creation info */
301 typedef struct acpi_create_field_info
303 ACPI_NAMESPACE_NODE
*RegionNode
;
304 ACPI_NAMESPACE_NODE
*FieldNode
;
305 ACPI_NAMESPACE_NODE
*RegisterNode
;
306 ACPI_NAMESPACE_NODE
*DataRegisterNode
;
307 ACPI_NAMESPACE_NODE
*ConnectionNode
;
308 UINT8
*ResourceBuffer
;
310 UINT32 FieldBitPosition
;
311 UINT32 FieldBitLength
;
312 UINT16 ResourceLength
;
313 UINT16 PinNumberIndex
;
319 } ACPI_CREATE_FIELD_INFO
;
323 ACPI_STATUS (*ACPI_INTERNAL_METHOD
) (
324 struct acpi_walk_state
*WalkState
);
328 * Bitmapped ACPI types. Used internally only
330 #define ACPI_BTYPE_ANY 0x00000000
331 #define ACPI_BTYPE_INTEGER 0x00000001
332 #define ACPI_BTYPE_STRING 0x00000002
333 #define ACPI_BTYPE_BUFFER 0x00000004
334 #define ACPI_BTYPE_PACKAGE 0x00000008
335 #define ACPI_BTYPE_FIELD_UNIT 0x00000010
336 #define ACPI_BTYPE_DEVICE 0x00000020
337 #define ACPI_BTYPE_EVENT 0x00000040
338 #define ACPI_BTYPE_METHOD 0x00000080
339 #define ACPI_BTYPE_MUTEX 0x00000100
340 #define ACPI_BTYPE_REGION 0x00000200
341 #define ACPI_BTYPE_POWER 0x00000400
342 #define ACPI_BTYPE_PROCESSOR 0x00000800
343 #define ACPI_BTYPE_THERMAL 0x00001000
344 #define ACPI_BTYPE_BUFFER_FIELD 0x00002000
345 #define ACPI_BTYPE_DDB_HANDLE 0x00004000
346 #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000
347 #define ACPI_BTYPE_REFERENCE_OBJECT 0x00010000 /* From Index(), RefOf(), etc (Type6Opcodes) */
348 #define ACPI_BTYPE_RESOURCE 0x00020000
349 #define ACPI_BTYPE_NAMED_REFERENCE 0x00040000 /* Generic unresolved Name or Namepath */
351 #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
353 #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE)
355 /* Used by Copy, DeRefOf, Store, Printf, Fprintf */
357 #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE_OBJECT | ACPI_BTYPE_DDB_HANDLE)
358 #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
359 #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */
360 #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF
365 * Information structure for ACPI predefined names.
366 * Each entry in the table contains the following items:
368 * Name - The ACPI reserved name
369 * ParamCount - Number of arguments to the method
370 * ExpectedReturnBtypes - Allowed type(s) for the return value
372 typedef struct acpi_name_info
374 char Name
[ACPI_NAME_SIZE
];
376 UINT8 ExpectedBtypes
;
381 * Secondary information structures for ACPI predefined objects that return
382 * package objects. This structure appears as the next entry in the table
383 * after the NAME_INFO structure above.
385 * The reason for this is to minimize the size of the predefined name table.
389 * Used for ACPI_PTYPE1_FIXED, ACPI_PTYPE1_VAR, ACPI_PTYPE2,
390 * ACPI_PTYPE2_MIN, ACPI_PTYPE2_PKG_COUNT, ACPI_PTYPE2_COUNT,
391 * ACPI_PTYPE2_FIX_VAR
393 typedef struct acpi_package_info
404 /* Used for ACPI_PTYPE2_FIXED */
406 typedef struct acpi_package_info2
413 } ACPI_PACKAGE_INFO2
;
415 /* Used for ACPI_PTYPE1_OPTION */
417 typedef struct acpi_package_info3
422 UINT8 TailObjectType
;
425 } ACPI_PACKAGE_INFO3
;
427 typedef struct acpi_package_info4
432 UINT8 SubObjectTypes
;
436 } ACPI_PACKAGE_INFO4
;
438 typedef union acpi_predefined_info
441 ACPI_PACKAGE_INFO RetInfo
;
442 ACPI_PACKAGE_INFO2 RetInfo2
;
443 ACPI_PACKAGE_INFO3 RetInfo3
;
444 ACPI_PACKAGE_INFO4 RetInfo4
;
446 } ACPI_PREDEFINED_INFO
;
448 /* Reset to default packing */
453 /* Return object auto-repair info */
455 typedef ACPI_STATUS (*ACPI_OBJECT_CONVERTER
) (
456 struct acpi_namespace_node
*Scope
,
457 union acpi_operand_object
*OriginalObject
,
458 union acpi_operand_object
**ConvertedObject
);
460 typedef struct acpi_simple_repair_info
462 char Name
[ACPI_NAME_SIZE
];
463 UINT32 UnexpectedBtypes
;
465 ACPI_OBJECT_CONVERTER ObjectConverter
;
467 } ACPI_SIMPLE_REPAIR_INFO
;
471 * Bitmapped return value types
472 * Note: the actual data types must be contiguous, a loop in nspredef.c
475 #define ACPI_RTYPE_ANY 0x00
476 #define ACPI_RTYPE_NONE 0x01
477 #define ACPI_RTYPE_INTEGER 0x02
478 #define ACPI_RTYPE_STRING 0x04
479 #define ACPI_RTYPE_BUFFER 0x08
480 #define ACPI_RTYPE_PACKAGE 0x10
481 #define ACPI_RTYPE_REFERENCE 0x20
482 #define ACPI_RTYPE_ALL 0x3F
484 #define ACPI_NUM_RTYPES 5 /* Number of actual object types */
487 /* Info for running the _REG methods */
489 typedef struct acpi_reg_walk_info
491 ACPI_ADR_SPACE_TYPE SpaceId
;
495 } ACPI_REG_WALK_INFO
;
498 /*****************************************************************************
500 * Event typedefs and structs
502 ****************************************************************************/
504 /* Dispatch info for each host-installed SCI handler */
506 typedef struct acpi_sci_handler_info
508 struct acpi_sci_handler_info
*Next
;
509 ACPI_SCI_HANDLER Address
; /* Address of handler */
510 void *Context
; /* Context to be passed to handler */
512 } ACPI_SCI_HANDLER_INFO
;
514 /* Dispatch info for each GPE -- either a method or handler, cannot be both */
516 typedef struct acpi_gpe_handler_info
518 ACPI_GPE_HANDLER Address
; /* Address of handler, if any */
519 void *Context
; /* Context to be passed to handler */
520 ACPI_NAMESPACE_NODE
*MethodNode
; /* Method node for this GPE level (saved) */
521 UINT8 OriginalFlags
; /* Original (pre-handler) GPE info */
522 BOOLEAN OriginallyEnabled
; /* True if GPE was originally enabled */
524 } ACPI_GPE_HANDLER_INFO
;
526 /* Notify info for implicit notify, multiple device objects */
528 typedef struct acpi_gpe_notify_info
530 ACPI_NAMESPACE_NODE
*DeviceNode
; /* Device to be notified */
531 struct acpi_gpe_notify_info
*Next
;
533 } ACPI_GPE_NOTIFY_INFO
;
536 * GPE dispatch info. At any time, the GPE can have at most one type
537 * of dispatch - Method, Handler, or Implicit Notify.
539 typedef union acpi_gpe_dispatch_info
541 ACPI_NAMESPACE_NODE
*MethodNode
; /* Method node for this GPE level */
542 ACPI_GPE_HANDLER_INFO
*Handler
; /* Installed GPE handler */
543 ACPI_GPE_NOTIFY_INFO
*NotifyList
; /* List of _PRW devices for implicit notifies */
545 } ACPI_GPE_DISPATCH_INFO
;
548 * Information about a GPE, one per each GPE in an array.
549 * NOTE: Important to keep this struct as small as possible.
551 typedef struct acpi_gpe_event_info
553 union acpi_gpe_dispatch_info Dispatch
; /* Either Method, Handler, or NotifyList */
554 struct acpi_gpe_register_info
*RegisterInfo
; /* Backpointer to register info */
555 UINT8 Flags
; /* Misc info about this GPE */
556 UINT8 GpeNumber
; /* This GPE */
557 UINT8 RuntimeCount
; /* References to a run GPE */
558 BOOLEAN DisableForDispatch
; /* Masked during dispatching */
560 } ACPI_GPE_EVENT_INFO
;
562 /* Information about a GPE register pair, one per each status/enable pair in an array */
564 typedef struct acpi_gpe_register_info
566 ACPI_GENERIC_ADDRESS StatusAddress
; /* Address of status reg */
567 ACPI_GENERIC_ADDRESS EnableAddress
; /* Address of enable reg */
568 UINT16 BaseGpeNumber
; /* Base GPE number for this register */
569 UINT8 EnableForWake
; /* GPEs to keep enabled when sleeping */
570 UINT8 EnableForRun
; /* GPEs to keep enabled when running */
571 UINT8 MaskForRun
; /* GPEs to keep masked when running */
572 UINT8 EnableMask
; /* Current mask of enabled GPEs */
574 } ACPI_GPE_REGISTER_INFO
;
577 * Information about a GPE register block, one per each installed block --
578 * GPE0, GPE1, and one per each installed GPE Block Device.
580 typedef struct acpi_gpe_block_info
582 ACPI_NAMESPACE_NODE
*Node
;
583 struct acpi_gpe_block_info
*Previous
;
584 struct acpi_gpe_block_info
*Next
;
585 struct acpi_gpe_xrupt_info
*XruptBlock
; /* Backpointer to interrupt block */
586 ACPI_GPE_REGISTER_INFO
*RegisterInfo
; /* One per GPE register pair */
587 ACPI_GPE_EVENT_INFO
*EventInfo
; /* One for each GPE */
588 UINT64 Address
; /* Base address of the block */
589 UINT32 RegisterCount
; /* Number of register pairs in block */
590 UINT16 GpeCount
; /* Number of individual GPEs in block */
591 UINT16 BlockBaseNumber
;/* Base GPE number for this block */
593 BOOLEAN Initialized
; /* TRUE if this block is initialized */
595 } ACPI_GPE_BLOCK_INFO
;
597 /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */
599 typedef struct acpi_gpe_xrupt_info
601 struct acpi_gpe_xrupt_info
*Previous
;
602 struct acpi_gpe_xrupt_info
*Next
;
603 ACPI_GPE_BLOCK_INFO
*GpeBlockListHead
; /* List of GPE blocks for this xrupt */
604 UINT32 InterruptNumber
; /* System interrupt number */
606 } ACPI_GPE_XRUPT_INFO
;
608 typedef struct acpi_gpe_walk_info
610 ACPI_NAMESPACE_NODE
*GpeDevice
;
611 ACPI_GPE_BLOCK_INFO
*GpeBlock
;
613 ACPI_OWNER_ID OwnerId
;
614 BOOLEAN ExecuteByOwnerId
;
616 } ACPI_GPE_WALK_INFO
;
618 typedef struct acpi_gpe_device_info
621 UINT32 NextBlockBaseIndex
;
623 ACPI_NAMESPACE_NODE
*GpeDevice
;
625 } ACPI_GPE_DEVICE_INFO
;
627 typedef ACPI_STATUS (*ACPI_GPE_CALLBACK
) (
628 ACPI_GPE_XRUPT_INFO
*GpeXruptInfo
,
629 ACPI_GPE_BLOCK_INFO
*GpeBlock
,
633 /* Information about each particular fixed event */
635 typedef struct acpi_fixed_event_handler
637 ACPI_EVENT_HANDLER Handler
; /* Address of handler. */
638 void *Context
; /* Context to be passed to handler */
640 } ACPI_FIXED_EVENT_HANDLER
;
642 typedef struct acpi_fixed_event_info
644 UINT8 StatusRegisterId
;
645 UINT8 EnableRegisterId
;
646 UINT16 StatusBitMask
;
647 UINT16 EnableBitMask
;
649 } ACPI_FIXED_EVENT_INFO
;
651 /* Information used during field processing */
653 typedef struct acpi_field_info
662 /*****************************************************************************
664 * Generic "state" object for stacks
666 ****************************************************************************/
668 #define ACPI_CONTROL_NORMAL 0xC0
669 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1
670 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2
671 #define ACPI_CONTROL_PREDICATE_FALSE 0xC3
672 #define ACPI_CONTROL_PREDICATE_TRUE 0xC4
675 #define ACPI_STATE_COMMON \
677 UINT8 DescriptorType; /* To differentiate various internal objs */\
682 /* There are 2 bytes available here until the next natural alignment boundary */
684 typedef struct acpi_common_state
691 * Update state - used to traverse complex objects such as packages
693 typedef struct acpi_update_state
696 union acpi_operand_object
*Object
;
702 * Pkg state - used to traverse nested package structures
704 typedef struct acpi_pkg_state
708 union acpi_operand_object
*SourceObject
;
709 union acpi_operand_object
*DestObject
;
710 struct acpi_walk_state
*WalkState
;
718 * Control state - one per if/else and while constructs.
719 * Allows nesting of these constructs
721 typedef struct acpi_control_state
725 union acpi_parse_object
*PredicateOp
;
726 UINT8
*AmlPredicateStart
; /* Start of if/while predicate */
727 UINT8
*PackageEnd
; /* End of if/while block */
728 UINT32 LoopCount
; /* While() loop counter */
730 } ACPI_CONTROL_STATE
;
734 * Scope state - current scope during namespace lookups
736 typedef struct acpi_scope_state
739 ACPI_NAMESPACE_NODE
*Node
;
744 typedef struct acpi_pscope_state
747 UINT32 ArgCount
; /* Number of fixed arguments */
748 union acpi_parse_object
*Op
; /* Current op being parsed */
749 UINT8
*ArgEnd
; /* Current argument end */
750 UINT8
*PkgEnd
; /* Current package end */
751 UINT32 ArgList
; /* Next argument to parse */
757 * Thread state - one per thread across multiple walk states. Multiple walk
758 * states are created when there are nested control methods executing.
760 typedef struct acpi_thread_state
763 UINT8 CurrentSyncLevel
; /* Mutex Sync (nested acquire) level */
764 struct acpi_walk_state
*WalkStateList
; /* Head of list of WalkStates for this thread */
765 union acpi_operand_object
*AcquiredMutexList
; /* List of all currently acquired mutexes */
766 ACPI_THREAD_ID ThreadId
; /* Running thread ID */
772 * Result values - used to accumulate the results of nested
775 typedef struct acpi_result_values
778 union acpi_operand_object
*ObjDesc
[ACPI_RESULTS_FRAME_OBJ_NUM
];
780 } ACPI_RESULT_VALUES
;
784 ACPI_STATUS (*ACPI_PARSE_DOWNWARDS
) (
785 struct acpi_walk_state
*WalkState
,
786 union acpi_parse_object
**OutOp
);
789 ACPI_STATUS (*ACPI_PARSE_UPWARDS
) (
790 struct acpi_walk_state
*WalkState
);
793 /* Global handlers for AML Notifies */
795 typedef struct acpi_global_notify_handler
797 ACPI_NOTIFY_HANDLER Handler
;
800 } ACPI_GLOBAL_NOTIFY_HANDLER
;
803 * Notify info - used to pass info to the deferred notify
804 * handler/dispatcher.
806 typedef struct acpi_notify_info
810 ACPI_NAMESPACE_NODE
*Node
;
811 union acpi_operand_object
*HandlerListHead
;
812 ACPI_GLOBAL_NOTIFY_HANDLER
*Global
;
817 /* Generic state is union of structs above */
819 typedef union acpi_generic_state
821 ACPI_COMMON_STATE Common
;
822 ACPI_CONTROL_STATE Control
;
823 ACPI_UPDATE_STATE Update
;
824 ACPI_SCOPE_STATE Scope
;
825 ACPI_PSCOPE_STATE ParseScope
;
827 ACPI_THREAD_STATE Thread
;
828 ACPI_RESULT_VALUES Results
;
829 ACPI_NOTIFY_INFO Notify
;
831 } ACPI_GENERIC_STATE
;
834 /*****************************************************************************
836 * Interpreter typedefs and structs
838 ****************************************************************************/
841 ACPI_STATUS (*ACPI_EXECUTE_OP
) (
842 struct acpi_walk_state
*WalkState
);
844 /* Address Range info block */
846 typedef struct acpi_address_range
848 struct acpi_address_range
*Next
;
849 ACPI_NAMESPACE_NODE
*RegionNode
;
850 ACPI_PHYSICAL_ADDRESS StartAddress
;
851 ACPI_PHYSICAL_ADDRESS EndAddress
;
853 } ACPI_ADDRESS_RANGE
;
856 /*****************************************************************************
858 * Parser typedefs and structs
860 ****************************************************************************/
863 * AML opcode, name, and argument layout
865 typedef struct acpi_opcode_info
867 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
868 char *Name
; /* Opcode name (disassembler/debug only) */
870 UINT32 ParseArgs
; /* Grammar/Parse time arguments */
871 UINT32 RuntimeArgs
; /* Interpret time arguments */
872 UINT16 Flags
; /* Misc flags */
873 UINT8 ObjectType
; /* Corresponding internal object type */
874 UINT8 Class
; /* Opcode class */
875 UINT8 Type
; /* Opcode type */
879 /* Structure for Resource Tag information */
881 typedef struct acpi_tag_info
888 /* Value associated with the parse object */
890 typedef union acpi_parse_value
892 UINT64 Integer
; /* Integer constant (Up to 64 bits) */
893 UINT32 Size
; /* bytelist or field size */
894 char *String
; /* NULL terminated string */
895 UINT8
*Buffer
; /* buffer or string */
896 char *Name
; /* NULL terminated string */
897 union acpi_parse_object
*Arg
; /* arguments and contained ops */
898 ACPI_TAG_INFO Tag
; /* Resource descriptor tag info */
903 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
904 #define ACPI_DISASM_ONLY_MEMBERS(a) a;
906 #define ACPI_DISASM_ONLY_MEMBERS(a)
909 #if defined(ACPI_ASL_COMPILER)
910 #define ACPI_CONVERTER_ONLY_MEMBERS(a) a;
912 #define ACPI_CONVERTER_ONLY_MEMBERS(a)
915 #define ACPI_PARSE_COMMON \
916 union acpi_parse_object *Parent; /* Parent op */\
917 UINT8 DescriptorType; /* To differentiate various internal objs */\
918 UINT8 Flags; /* Type of Op */\
919 UINT16 AmlOpcode; /* AML opcode */\
920 UINT8 *Aml; /* Address of declaration in AML */\
921 union acpi_parse_object *Next; /* Next op */\
922 ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\
923 ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\
924 UINT8 ArgListLength; /* Number of elements in the arg list */\
925 ACPI_DISASM_ONLY_MEMBERS (\
926 UINT16 DisasmFlags; /* Used during AML disassembly */\
927 UINT8 DisasmOpcode; /* Subtype used for disassembly */\
928 char *OperatorSymbol; /* Used for C-style operator name strings */\
929 char AmlOpName[16]) /* Op name (debug only) */\
930 ACPI_CONVERTER_ONLY_MEMBERS (\
931 char *InlineComment; /* Inline comment */\
932 char *EndNodeComment; /* End of node comment */\
933 char *NameComment; /* Comment associated with the first parameter of the name node */\
934 char *CloseBraceComment; /* Comments that come after } on the same as } */\
935 ACPI_COMMENT_NODE *CommentList; /* comments that appears before this node */\
936 ACPI_COMMENT_NODE *EndBlkComment; /* comments that at the end of a block but before ) or } */\
937 char *CvFilename; /* Filename associated with this node. Used for ASL/ASL+ converter */\
938 char *CvParentFilename) /* Parent filename associated with this node. Used for ASL/ASL+ converter */
941 /* categories of comments */
945 STANDARD_COMMENT
= 1,
953 PARENTFILENAME_COMMENT
,
960 /* Internal opcodes for DisasmOpcode field above */
962 #define ACPI_DASM_BUFFER 0x00 /* Buffer is a simple data buffer */
963 #define ACPI_DASM_RESOURCE 0x01 /* Buffer is a Resource Descriptor */
964 #define ACPI_DASM_STRING 0x02 /* Buffer is a ASCII string */
965 #define ACPI_DASM_UNICODE 0x03 /* Buffer is a Unicode string */
966 #define ACPI_DASM_PLD_METHOD 0x04 /* Buffer is a _PLD method bit-packed buffer */
967 #define ACPI_DASM_UUID 0x05 /* Buffer is a UUID/GUID */
968 #define ACPI_DASM_EISAID 0x06 /* Integer is an EISAID */
969 #define ACPI_DASM_MATCHOP 0x07 /* Parent opcode is a Match() operator */
970 #define ACPI_DASM_LNOT_PREFIX 0x08 /* Start of a LNotEqual (etc.) pair of opcodes */
971 #define ACPI_DASM_LNOT_SUFFIX 0x09 /* End of a LNotEqual (etc.) pair of opcodes */
972 #define ACPI_DASM_HID_STRING 0x0A /* String is a _HID or _CID */
973 #define ACPI_DASM_IGNORE_SINGLE 0x0B /* Ignore the opcode but not it's children */
974 #define ACPI_DASM_SWITCH 0x0C /* While is a Switch */
975 #define ACPI_DASM_SWITCH_PREDICATE 0x0D /* Object is a predicate for a Switch or Case block */
976 #define ACPI_DASM_CASE 0x0E /* If/Else is a Case in a Switch/Case block */
977 #define ACPI_DASM_DEFAULT 0x0F /* Else is a Default in a Switch/Case block */
981 * List struct used in the -ca option
983 typedef struct acpi_comment_node
986 struct acpi_comment_node
*Next
;
991 typedef struct acpi_comment_addr_node
994 struct acpi_comment_addr_node
*Next
;
995 } ACPI_COMMENT_ADDR_NODE
;
998 * File node - used for "Include" operator file stack and
999 * depdendency tree for the -ca option
1001 typedef struct acpi_file_node
1005 char *FileStart
; /* Points to AML and indicates when the AML for this particular file starts. */
1006 char *FileEnd
; /* Points to AML and indicates when the AML for this particular file ends. */
1007 struct acpi_file_node
*Next
;
1008 struct acpi_file_node
*Parent
;
1009 BOOLEAN IncludeWritten
;
1010 ACPI_COMMENT_NODE
*IncludeComment
;
1016 * Generic operation (for example: If, While, Store)
1018 typedef struct acpi_parse_obj_common
1021 } ACPI_PARSE_OBJ_COMMON
;
1025 * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions),
1028 typedef struct acpi_parse_obj_named
1032 UINT8
*Data
; /* AML body or bytelist data */
1033 UINT32 Length
; /* AML length */
1034 UINT32 Name
; /* 4-byte name or zero if no name */
1036 } ACPI_PARSE_OBJ_NAMED
;
1039 /* This version is used by the iASL compiler only */
1041 #define ACPI_MAX_PARSEOP_NAME 20
1043 typedef struct acpi_parse_obj_asl
1046 union acpi_parse_object
*Child
;
1047 union acpi_parse_object
*ParentMethod
;
1049 BOOLEAN FileChanged
;
1050 char *ParentFilename
;
1057 UINT32 LogicalLineNumber
;
1058 UINT32 LogicalByteOffset
;
1060 UINT32 EndLogicalLine
;
1063 UINT32 AmlSubtreeLength
;
1064 UINT32 FinalAmlLength
;
1065 UINT32 FinalAmlOffset
;
1066 UINT32 CompileFlags
;
1068 UINT8 AmlOpcodeLength
;
1069 UINT8 AmlPkgLenBytes
;
1071 char ParseOpName
[ACPI_MAX_PARSEOP_NAME
];
1073 } ACPI_PARSE_OBJ_ASL
;
1075 typedef union acpi_parse_object
1077 ACPI_PARSE_OBJ_COMMON Common
;
1078 ACPI_PARSE_OBJ_NAMED Named
;
1079 ACPI_PARSE_OBJ_ASL Asl
;
1081 } ACPI_PARSE_OBJECT
;
1083 typedef struct asl_comment_state
1086 UINT32 SpacesBefore
;
1087 ACPI_PARSE_OBJECT
*Latest_Parse_Node
;
1088 ACPI_PARSE_OBJECT
*ParsingParenBraceNode
;
1089 BOOLEAN CaptureComments
;
1090 } ASL_COMMENT_STATE
;
1094 * Parse state - one state per parser invocation and each control
1097 typedef struct acpi_parse_state
1099 UINT8
*AmlStart
; /* First AML byte */
1100 UINT8
*Aml
; /* Next AML byte */
1101 UINT8
*AmlEnd
; /* (last + 1) AML byte */
1102 UINT8
*PkgStart
; /* Current package begin */
1103 UINT8
*PkgEnd
; /* Current package end */
1104 union acpi_parse_object
*StartOp
; /* Root of parse tree */
1105 struct acpi_namespace_node
*StartNode
;
1106 union acpi_generic_state
*Scope
; /* Current scope */
1107 union acpi_parse_object
*StartScope
;
1113 /* Parse object flags */
1115 #define ACPI_PARSEOP_GENERIC 0x01
1116 #define ACPI_PARSEOP_NAMED_OBJECT 0x02
1117 #define ACPI_PARSEOP_DEFERRED 0x04
1118 #define ACPI_PARSEOP_BYTELIST 0x08
1119 #define ACPI_PARSEOP_IN_STACK 0x10
1120 #define ACPI_PARSEOP_TARGET 0x20
1121 #define ACPI_PARSEOP_IN_CACHE 0x80
1123 /* Parse object DisasmFlags */
1125 #define ACPI_PARSEOP_IGNORE 0x0001
1126 #define ACPI_PARSEOP_PARAMETER_LIST 0x0002
1127 #define ACPI_PARSEOP_EMPTY_TERMLIST 0x0004
1128 #define ACPI_PARSEOP_PREDEFINED_CHECKED 0x0008
1129 #define ACPI_PARSEOP_CLOSING_PAREN 0x0010
1130 #define ACPI_PARSEOP_COMPOUND_ASSIGNMENT 0x0020
1131 #define ACPI_PARSEOP_ASSIGNMENT 0x0040
1132 #define ACPI_PARSEOP_ELSEIF 0x0080
1133 #define ACPI_PARSEOP_LEGACY_ASL_ONLY 0x0100
1136 /*****************************************************************************
1138 * Hardware (ACPI registers) and PNP
1140 ****************************************************************************/
1142 typedef struct acpi_bit_register_info
1144 UINT8 ParentRegister
;
1146 UINT16 AccessBitMask
;
1148 } ACPI_BIT_REGISTER_INFO
;
1152 * Some ACPI registers have bits that must be ignored -- meaning that they
1153 * must be preserved.
1155 #define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
1157 /* Write-only bits must be zeroed by software */
1159 #define ACPI_PM1_CONTROL_WRITEONLY_BITS 0x2004 /* Bits 13, 2 */
1161 /* For control registers, both ignored and reserved bits must be preserved */
1164 * For PM1 control, the SCI enable bit (bit 0, SCI_EN) is defined by the
1165 * ACPI specification to be a "preserved" bit - "OSPM always preserves this
1166 * bit position", section 4.7.3.2.1. However, on some machines the OS must
1167 * write a one to this bit after resume for the machine to work properly.
1168 * To enable this, we no longer attempt to preserve this bit. No machines
1169 * are known to fail if the bit is not preserved. (May 2009)
1171 #define ACPI_PM1_CONTROL_IGNORED_BITS 0x0200 /* Bit 9 */
1172 #define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */
1173 #define ACPI_PM1_CONTROL_PRESERVED_BITS \
1174 (ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)
1176 #define ACPI_PM2_CONTROL_PRESERVED_BITS 0xFFFFFFFE /* All except bit 0 */
1180 * These are the full ACPI registers
1182 #define ACPI_REGISTER_PM1_STATUS 0x01
1183 #define ACPI_REGISTER_PM1_ENABLE 0x02
1184 #define ACPI_REGISTER_PM1_CONTROL 0x03
1185 #define ACPI_REGISTER_PM2_CONTROL 0x04
1186 #define ACPI_REGISTER_PM_TIMER 0x05
1187 #define ACPI_REGISTER_PROCESSOR_BLOCK 0x06
1188 #define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x07
1191 /* Masks used to access the BitRegisters */
1193 #define ACPI_BITMASK_TIMER_STATUS 0x0001
1194 #define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010
1195 #define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020
1196 #define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100
1197 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200
1198 #define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400
1199 #define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */
1200 #define ACPI_BITMASK_WAKE_STATUS 0x8000
1202 #define ACPI_BITMASK_ALL_FIXED_STATUS (\
1203 ACPI_BITMASK_TIMER_STATUS | \
1204 ACPI_BITMASK_BUS_MASTER_STATUS | \
1205 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \
1206 ACPI_BITMASK_POWER_BUTTON_STATUS | \
1207 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \
1208 ACPI_BITMASK_RT_CLOCK_STATUS | \
1209 ACPI_BITMASK_PCIEXP_WAKE_STATUS | \
1210 ACPI_BITMASK_WAKE_STATUS)
1212 #define ACPI_BITMASK_TIMER_ENABLE 0x0001
1213 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020
1214 #define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100
1215 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200
1216 #define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400
1217 #define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */
1219 #define ACPI_BITMASK_SCI_ENABLE 0x0001
1220 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002
1221 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004
1222 #define ACPI_BITMASK_SLEEP_TYPE 0x1C00
1223 #define ACPI_BITMASK_SLEEP_ENABLE 0x2000
1225 #define ACPI_BITMASK_ARB_DISABLE 0x0001
1228 /* Raw bit position of each BitRegister */
1230 #define ACPI_BITPOSITION_TIMER_STATUS 0x00
1231 #define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04
1232 #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05
1233 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08
1234 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09
1235 #define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A
1236 #define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */
1237 #define ACPI_BITPOSITION_WAKE_STATUS 0x0F
1239 #define ACPI_BITPOSITION_TIMER_ENABLE 0x00
1240 #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05
1241 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08
1242 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09
1243 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A
1244 #define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */
1246 #define ACPI_BITPOSITION_SCI_ENABLE 0x00
1247 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01
1248 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02
1249 #define ACPI_BITPOSITION_SLEEP_TYPE 0x0A
1250 #define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D
1252 #define ACPI_BITPOSITION_ARB_DISABLE 0x00
1255 /* Structs and definitions for _OSI support and I/O port validation */
1257 #define ACPI_ALWAYS_ILLEGAL 0x00
1259 typedef struct acpi_interface_info
1262 struct acpi_interface_info
*Next
;
1266 } ACPI_INTERFACE_INFO
;
1268 #define ACPI_OSI_INVALID 0x01
1269 #define ACPI_OSI_DYNAMIC 0x02
1270 #define ACPI_OSI_FEATURE 0x04
1271 #define ACPI_OSI_DEFAULT_INVALID 0x08
1272 #define ACPI_OSI_OPTIONAL_FEATURE (ACPI_OSI_FEATURE | ACPI_OSI_DEFAULT_INVALID | ACPI_OSI_INVALID)
1274 typedef struct acpi_port_info
1279 UINT8 OsiDependency
;
1284 /*****************************************************************************
1286 * Resource descriptors
1288 ****************************************************************************/
1290 /* ResourceType values */
1292 #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0
1293 #define ACPI_ADDRESS_TYPE_IO_RANGE 1
1294 #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2
1296 /* Resource descriptor types and masks */
1298 #define ACPI_RESOURCE_NAME_LARGE 0x80
1299 #define ACPI_RESOURCE_NAME_SMALL 0x00
1301 #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */
1302 #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */
1303 #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */
1307 * Small resource descriptor "names" as defined by the ACPI specification.
1308 * Note: Bits 2:0 are used for the descriptor length
1310 #define ACPI_RESOURCE_NAME_IRQ 0x20
1311 #define ACPI_RESOURCE_NAME_DMA 0x28
1312 #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30
1313 #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38
1314 #define ACPI_RESOURCE_NAME_IO 0x40
1315 #define ACPI_RESOURCE_NAME_FIXED_IO 0x48
1316 #define ACPI_RESOURCE_NAME_FIXED_DMA 0x50
1317 #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58
1318 #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60
1319 #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68
1320 #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70
1321 #define ACPI_RESOURCE_NAME_END_TAG 0x78
1324 * Large resource descriptor "names" as defined by the ACPI specification.
1325 * Note: includes the Large Descriptor bit in bit[7]
1327 #define ACPI_RESOURCE_NAME_MEMORY24 0x81
1328 #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82
1329 #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83
1330 #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84
1331 #define ACPI_RESOURCE_NAME_MEMORY32 0x85
1332 #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86
1333 #define ACPI_RESOURCE_NAME_ADDRESS32 0x87
1334 #define ACPI_RESOURCE_NAME_ADDRESS16 0x88
1335 #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89
1336 #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
1337 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
1338 #define ACPI_RESOURCE_NAME_GPIO 0x8C
1339 #define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E
1340 #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E
1343 /*****************************************************************************
1347 ****************************************************************************/
1349 #define ACPI_ASCII_ZERO 0x30
1352 /*****************************************************************************
1356 ****************************************************************************/
1358 typedef struct acpi_external_list
1362 struct acpi_external_list
*Next
;
1368 } ACPI_EXTERNAL_LIST
;
1370 /* Values for Flags field above */
1372 #define ACPI_EXT_RESOLVED_REFERENCE 0x01 /* Object was resolved during cross ref */
1373 #define ACPI_EXT_ORIGIN_FROM_FILE 0x02 /* External came from a file */
1374 #define ACPI_EXT_INTERNAL_PATH_ALLOCATED 0x04 /* Deallocate internal path on completion */
1375 #define ACPI_EXT_EXTERNAL_EMITTED 0x08 /* External() statement has been emitted */
1376 #define ACPI_EXT_ORIGIN_FROM_OPCODE 0x10 /* External came from a External() opcode */
1379 typedef struct acpi_external_file
1382 struct acpi_external_file
*Next
;
1384 } ACPI_EXTERNAL_FILE
;
1387 /*****************************************************************************
1391 ****************************************************************************/
1393 typedef struct acpi_db_method_info
1396 ACPI_HANDLE MainThreadGate
;
1397 ACPI_HANDLE ThreadCompleteGate
;
1398 ACPI_HANDLE InfoGate
;
1399 ACPI_THREAD_ID
*Threads
;
1402 UINT32 NumCompleted
;
1407 char Pathname
[ACPI_DB_LINE_BUFFER_SIZE
];
1409 ACPI_OBJECT_TYPE
*Types
;
1412 * Arguments to be passed to method for the command
1414 * the Number of threads, ID of current thread and
1415 * Index of current thread inside all them created.
1418 #ifdef ACPI_DEBUGGER
1419 ACPI_OBJECT_TYPE ArgTypes
[4];
1422 char NumThreadsStr
[11];
1423 char IdOfThreadStr
[11];
1424 char IndexOfThreadStr
[11];
1426 } ACPI_DB_METHOD_INFO
;
1428 typedef struct acpi_integrity_info
1433 } ACPI_INTEGRITY_INFO
;
1436 #define ACPI_DB_DISABLE_OUTPUT 0x00
1437 #define ACPI_DB_REDIRECTABLE_OUTPUT 0x01
1438 #define ACPI_DB_CONSOLE_OUTPUT 0x02
1439 #define ACPI_DB_DUPLICATE_OUTPUT 0x03
1442 typedef struct acpi_object_info
1444 UINT32 Types
[ACPI_TOTAL_TYPES
];
1449 /*****************************************************************************
1453 ****************************************************************************/
1455 /* Entry for a memory allocation (debug only) */
1457 #define ACPI_MEM_MALLOC 0
1458 #define ACPI_MEM_CALLOC 1
1459 #define ACPI_MAX_MODULE_NAME 16
1461 #define ACPI_COMMON_DEBUG_MEM_HEADER \
1462 struct acpi_debug_mem_block *Previous; \
1463 struct acpi_debug_mem_block *Next; \
1467 char Module[ACPI_MAX_MODULE_NAME]; \
1470 typedef struct acpi_debug_mem_header
1472 ACPI_COMMON_DEBUG_MEM_HEADER
1474 } ACPI_DEBUG_MEM_HEADER
;
1476 typedef struct acpi_debug_mem_block
1478 ACPI_COMMON_DEBUG_MEM_HEADER
1481 } ACPI_DEBUG_MEM_BLOCK
;
1484 #define ACPI_MEM_LIST_GLOBAL 0
1485 #define ACPI_MEM_LIST_NSNODE 1
1486 #define ACPI_MEM_LIST_MAX 1
1487 #define ACPI_NUM_MEM_LISTS 2
1490 /*****************************************************************************
1494 ****************************************************************************/
1496 typedef struct ah_predefined_name
1500 #ifndef ACPI_ASL_COMPILER
1504 } AH_PREDEFINED_NAME
;
1506 typedef struct ah_device_id
1513 typedef struct ah_uuid
1520 typedef struct ah_table
1527 #endif /* __ACLOCAL_H__ */