xref: /freebsd/sys/contrib/dev/acpica/include/acglobal.h (revision a9f12690a1c5018ef2676597bbcdfb5a7f692b80)
1a9f12690SJung-uk Kim /******************************************************************************
2a9f12690SJung-uk Kim  *
3a9f12690SJung-uk Kim  * Name: acglobal.h - Declarations for global variables
4a9f12690SJung-uk Kim  *
5a9f12690SJung-uk Kim  *****************************************************************************/
6a9f12690SJung-uk Kim 
7a9f12690SJung-uk Kim /******************************************************************************
8a9f12690SJung-uk Kim  *
9a9f12690SJung-uk Kim  * 1. Copyright Notice
10a9f12690SJung-uk Kim  *
11a9f12690SJung-uk Kim  * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
12a9f12690SJung-uk Kim  * All rights reserved.
13a9f12690SJung-uk Kim  *
14a9f12690SJung-uk Kim  * 2. License
15a9f12690SJung-uk Kim  *
16a9f12690SJung-uk Kim  * 2.1. This is your license from Intel Corp. under its intellectual property
17a9f12690SJung-uk Kim  * rights.  You may have additional license terms from the party that provided
18a9f12690SJung-uk Kim  * you this software, covering your right to use that party's intellectual
19a9f12690SJung-uk Kim  * property rights.
20a9f12690SJung-uk Kim  *
21a9f12690SJung-uk Kim  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22a9f12690SJung-uk Kim  * copy of the source code appearing in this file ("Covered Code") an
23a9f12690SJung-uk Kim  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24a9f12690SJung-uk Kim  * base code distributed originally by Intel ("Original Intel Code") to copy,
25a9f12690SJung-uk Kim  * make derivatives, distribute, use and display any portion of the Covered
26a9f12690SJung-uk Kim  * Code in any form, with the right to sublicense such rights; and
27a9f12690SJung-uk Kim  *
28a9f12690SJung-uk Kim  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29a9f12690SJung-uk Kim  * license (with the right to sublicense), under only those claims of Intel
30a9f12690SJung-uk Kim  * patents that are infringed by the Original Intel Code, to make, use, sell,
31a9f12690SJung-uk Kim  * offer to sell, and import the Covered Code and derivative works thereof
32a9f12690SJung-uk Kim  * solely to the minimum extent necessary to exercise the above copyright
33a9f12690SJung-uk Kim  * license, and in no event shall the patent license extend to any additions
34a9f12690SJung-uk Kim  * to or modifications of the Original Intel Code.  No other license or right
35a9f12690SJung-uk Kim  * is granted directly or by implication, estoppel or otherwise;
36a9f12690SJung-uk Kim  *
37a9f12690SJung-uk Kim  * The above copyright and patent license is granted only if the following
38a9f12690SJung-uk Kim  * conditions are met:
39a9f12690SJung-uk Kim  *
40a9f12690SJung-uk Kim  * 3. Conditions
41a9f12690SJung-uk Kim  *
42a9f12690SJung-uk Kim  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43a9f12690SJung-uk Kim  * Redistribution of source code of any substantial portion of the Covered
44a9f12690SJung-uk Kim  * Code or modification with rights to further distribute source must include
45a9f12690SJung-uk Kim  * the above Copyright Notice, the above License, this list of Conditions,
46a9f12690SJung-uk Kim  * and the following Disclaimer and Export Compliance provision.  In addition,
47a9f12690SJung-uk Kim  * Licensee must cause all Covered Code to which Licensee contributes to
48a9f12690SJung-uk Kim  * contain a file documenting the changes Licensee made to create that Covered
49a9f12690SJung-uk Kim  * Code and the date of any change.  Licensee must include in that file the
50a9f12690SJung-uk Kim  * documentation of any changes made by any predecessor Licensee.  Licensee
51a9f12690SJung-uk Kim  * must include a prominent statement that the modification is derived,
52a9f12690SJung-uk Kim  * directly or indirectly, from Original Intel Code.
53a9f12690SJung-uk Kim  *
54a9f12690SJung-uk Kim  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55a9f12690SJung-uk Kim  * Redistribution of source code of any substantial portion of the Covered
56a9f12690SJung-uk Kim  * Code or modification without rights to further distribute source must
57a9f12690SJung-uk Kim  * include the following Disclaimer and Export Compliance provision in the
58a9f12690SJung-uk Kim  * documentation and/or other materials provided with distribution.  In
59a9f12690SJung-uk Kim  * addition, Licensee may not authorize further sublicense of source of any
60a9f12690SJung-uk Kim  * portion of the Covered Code, and must include terms to the effect that the
61a9f12690SJung-uk Kim  * license from Licensee to its licensee is limited to the intellectual
62a9f12690SJung-uk Kim  * property embodied in the software Licensee provides to its licensee, and
63a9f12690SJung-uk Kim  * not to intellectual property embodied in modifications its licensee may
64a9f12690SJung-uk Kim  * make.
65a9f12690SJung-uk Kim  *
66a9f12690SJung-uk Kim  * 3.3. Redistribution of Executable. Redistribution in executable form of any
67a9f12690SJung-uk Kim  * substantial portion of the Covered Code or modification must reproduce the
68a9f12690SJung-uk Kim  * above Copyright Notice, and the following Disclaimer and Export Compliance
69a9f12690SJung-uk Kim  * provision in the documentation and/or other materials provided with the
70a9f12690SJung-uk Kim  * distribution.
71a9f12690SJung-uk Kim  *
72a9f12690SJung-uk Kim  * 3.4. Intel retains all right, title, and interest in and to the Original
73a9f12690SJung-uk Kim  * Intel Code.
74a9f12690SJung-uk Kim  *
75a9f12690SJung-uk Kim  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76a9f12690SJung-uk Kim  * Intel shall be used in advertising or otherwise to promote the sale, use or
77a9f12690SJung-uk Kim  * other dealings in products derived from or relating to the Covered Code
78a9f12690SJung-uk Kim  * without prior written authorization from Intel.
79a9f12690SJung-uk Kim  *
80a9f12690SJung-uk Kim  * 4. Disclaimer and Export Compliance
81a9f12690SJung-uk Kim  *
82a9f12690SJung-uk Kim  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83a9f12690SJung-uk Kim  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84a9f12690SJung-uk Kim  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
85a9f12690SJung-uk Kim  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
86a9f12690SJung-uk Kim  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
87a9f12690SJung-uk Kim  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88a9f12690SJung-uk Kim  * PARTICULAR PURPOSE.
89a9f12690SJung-uk Kim  *
90a9f12690SJung-uk Kim  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91a9f12690SJung-uk Kim  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92a9f12690SJung-uk Kim  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93a9f12690SJung-uk Kim  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94a9f12690SJung-uk Kim  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95a9f12690SJung-uk Kim  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
96a9f12690SJung-uk Kim  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97a9f12690SJung-uk Kim  * LIMITED REMEDY.
98a9f12690SJung-uk Kim  *
99a9f12690SJung-uk Kim  * 4.3. Licensee shall not export, either directly or indirectly, any of this
100a9f12690SJung-uk Kim  * software or system incorporating such software without first obtaining any
101a9f12690SJung-uk Kim  * required license or other approval from the U. S. Department of Commerce or
102a9f12690SJung-uk Kim  * any other agency or department of the United States Government.  In the
103a9f12690SJung-uk Kim  * event Licensee exports any such software from the United States or
104a9f12690SJung-uk Kim  * re-exports any such software from a foreign destination, Licensee shall
105a9f12690SJung-uk Kim  * ensure that the distribution and export/re-export of the software is in
106a9f12690SJung-uk Kim  * compliance with all laws, regulations, orders, or other restrictions of the
107a9f12690SJung-uk Kim  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108a9f12690SJung-uk Kim  * any of its subsidiaries will export/re-export any technical data, process,
109a9f12690SJung-uk Kim  * software, or service, directly or indirectly, to any country for which the
110a9f12690SJung-uk Kim  * United States government or any agency thereof requires an export license,
111a9f12690SJung-uk Kim  * other governmental approval, or letter of assurance, without first obtaining
112a9f12690SJung-uk Kim  * such license, approval or letter.
113a9f12690SJung-uk Kim  *
114a9f12690SJung-uk Kim  *****************************************************************************/
115a9f12690SJung-uk Kim 
116a9f12690SJung-uk Kim #ifndef __ACGLOBAL_H__
117a9f12690SJung-uk Kim #define __ACGLOBAL_H__
118a9f12690SJung-uk Kim 
119a9f12690SJung-uk Kim 
120a9f12690SJung-uk Kim /*
121a9f12690SJung-uk Kim  * Ensure that the globals are actually defined and initialized only once.
122a9f12690SJung-uk Kim  *
123a9f12690SJung-uk Kim  * The use of these macros allows a single list of globals (here) in order
124a9f12690SJung-uk Kim  * to simplify maintenance of the code.
125a9f12690SJung-uk Kim  */
126a9f12690SJung-uk Kim #ifdef DEFINE_ACPI_GLOBALS
127a9f12690SJung-uk Kim #define ACPI_EXTERN
128a9f12690SJung-uk Kim #define ACPI_INIT_GLOBAL(a,b) a=b
129a9f12690SJung-uk Kim #else
130a9f12690SJung-uk Kim #define ACPI_EXTERN extern
131a9f12690SJung-uk Kim #define ACPI_INIT_GLOBAL(a,b) a
132a9f12690SJung-uk Kim #endif
133a9f12690SJung-uk Kim 
134a9f12690SJung-uk Kim 
135a9f12690SJung-uk Kim #ifdef DEFINE_ACPI_GLOBALS
136a9f12690SJung-uk Kim 
137a9f12690SJung-uk Kim /* Public globals, available from outside ACPICA subsystem */
138a9f12690SJung-uk Kim 
139a9f12690SJung-uk Kim /*****************************************************************************
140a9f12690SJung-uk Kim  *
141a9f12690SJung-uk Kim  * Runtime configuration (static defaults that can be overriden at runtime)
142a9f12690SJung-uk Kim  *
143a9f12690SJung-uk Kim  ****************************************************************************/
144a9f12690SJung-uk Kim 
145a9f12690SJung-uk Kim /*
146a9f12690SJung-uk Kim  * Enable "slack" in the AML interpreter?  Default is FALSE, and the
147a9f12690SJung-uk Kim  * interpreter strictly follows the ACPI specification.  Setting to TRUE
148a9f12690SJung-uk Kim  * allows the interpreter to ignore certain errors and/or bad AML constructs.
149a9f12690SJung-uk Kim  *
150a9f12690SJung-uk Kim  * Currently, these features are enabled by this flag:
151a9f12690SJung-uk Kim  *
152a9f12690SJung-uk Kim  * 1) Allow "implicit return" of last value in a control method
153a9f12690SJung-uk Kim  * 2) Allow access beyond the end of an operation region
154a9f12690SJung-uk Kim  * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
155a9f12690SJung-uk Kim  * 4) Allow ANY object type to be a source operand for the Store() operator
156a9f12690SJung-uk Kim  * 5) Allow unresolved references (invalid target name) in package objects
157a9f12690SJung-uk Kim  * 6) Enable warning messages for behavior that is not ACPI spec compliant
158a9f12690SJung-uk Kim  */
159a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_EnableInterpreterSlack, FALSE);
160a9f12690SJung-uk Kim 
161a9f12690SJung-uk Kim /*
162a9f12690SJung-uk Kim  * Automatically serialize ALL control methods? Default is FALSE, meaning
163a9f12690SJung-uk Kim  * to use the Serialized/NotSerialized method flags on a per method basis.
164a9f12690SJung-uk Kim  * Only change this if the ASL code is poorly written and cannot handle
165a9f12690SJung-uk Kim  * reentrancy even though methods are marked "NotSerialized".
166a9f12690SJung-uk Kim  */
167a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_AllMethodsSerialized, FALSE);
168a9f12690SJung-uk Kim 
169a9f12690SJung-uk Kim /*
170a9f12690SJung-uk Kim  * Create the predefined _OSI method in the namespace? Default is TRUE
171a9f12690SJung-uk Kim  * because ACPI CA is fully compatible with other ACPI implementations.
172a9f12690SJung-uk Kim  * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
173a9f12690SJung-uk Kim  */
174a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_CreateOsiMethod, TRUE);
175a9f12690SJung-uk Kim 
176a9f12690SJung-uk Kim /*
177a9f12690SJung-uk Kim  * Disable wakeup GPEs during runtime? Default is TRUE because WAKE and
178a9f12690SJung-uk Kim  * RUNTIME GPEs should never be shared, and WAKE GPEs should typically only
179a9f12690SJung-uk Kim  * be enabled just before going to sleep.
180a9f12690SJung-uk Kim  */
181a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_LeaveWakeGpesDisabled, TRUE);
182a9f12690SJung-uk Kim 
183a9f12690SJung-uk Kim /*
184a9f12690SJung-uk Kim  * Optionally use default values for the ACPI register widths. Set this to
185a9f12690SJung-uk Kim  * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
186a9f12690SJung-uk Kim  */
187a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE);
188a9f12690SJung-uk Kim 
189a9f12690SJung-uk Kim 
190a9f12690SJung-uk Kim /* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
191a9f12690SJung-uk Kim 
192a9f12690SJung-uk Kim ACPI_TABLE_FADT             AcpiGbl_FADT;
193a9f12690SJung-uk Kim UINT32                      AcpiCurrentGpeCount;
194a9f12690SJung-uk Kim UINT32                      AcpiGbl_TraceFlags;
195a9f12690SJung-uk Kim ACPI_NAME                   AcpiGbl_TraceMethodName;
196a9f12690SJung-uk Kim 
197a9f12690SJung-uk Kim #endif
198a9f12690SJung-uk Kim 
199a9f12690SJung-uk Kim /*****************************************************************************
200a9f12690SJung-uk Kim  *
201a9f12690SJung-uk Kim  * ACPI Table globals
202a9f12690SJung-uk Kim  *
203a9f12690SJung-uk Kim  ****************************************************************************/
204a9f12690SJung-uk Kim 
205a9f12690SJung-uk Kim /*
206a9f12690SJung-uk Kim  * AcpiGbl_RootTableList is the master list of ACPI tables found in the
207a9f12690SJung-uk Kim  * RSDT/XSDT.
208a9f12690SJung-uk Kim  *
209a9f12690SJung-uk Kim  */
210a9f12690SJung-uk Kim ACPI_EXTERN ACPI_INTERNAL_RSDT          AcpiGbl_RootTableList;
211a9f12690SJung-uk Kim ACPI_EXTERN ACPI_TABLE_FACS            *AcpiGbl_FACS;
212a9f12690SJung-uk Kim 
213a9f12690SJung-uk Kim /* These addresses are calculated from the FADT Event Block addresses */
214a9f12690SJung-uk Kim 
215a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aStatus;
216a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aEnable;
217a9f12690SJung-uk Kim 
218a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bStatus;
219a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bEnable;
220a9f12690SJung-uk Kim 
221a9f12690SJung-uk Kim /*
222a9f12690SJung-uk Kim  * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
223a9f12690SJung-uk Kim  * determined by the revision of the DSDT: If the DSDT revision is less than
224a9f12690SJung-uk Kim  * 2, use only the lower 32 bits of the internal 64-bit Integer.
225a9f12690SJung-uk Kim  */
226a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerBitWidth;
227a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerByteWidth;
228a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerNybbleWidth;
229a9f12690SJung-uk Kim 
230a9f12690SJung-uk Kim 
231a9f12690SJung-uk Kim /*****************************************************************************
232a9f12690SJung-uk Kim  *
233a9f12690SJung-uk Kim  * Mutual exlusion within ACPICA subsystem
234a9f12690SJung-uk Kim  *
235a9f12690SJung-uk Kim  ****************************************************************************/
236a9f12690SJung-uk Kim 
237a9f12690SJung-uk Kim /*
238a9f12690SJung-uk Kim  * Predefined mutex objects. This array contains the
239a9f12690SJung-uk Kim  * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
240a9f12690SJung-uk Kim  * (The table maps local handles to the real OS handles)
241a9f12690SJung-uk Kim  */
242a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MUTEX_INFO             AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
243a9f12690SJung-uk Kim 
244a9f12690SJung-uk Kim /*
245a9f12690SJung-uk Kim  * Global lock mutex is an actual AML mutex object
246a9f12690SJung-uk Kim  * Global lock semaphore works in conjunction with the HW global lock
247a9f12690SJung-uk Kim  */
248a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OPERAND_OBJECT        *AcpiGbl_GlobalLockMutex;
249a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SEMAPHORE              AcpiGbl_GlobalLockSemaphore;
250a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_GlobalLockHandle;
251a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockAcquired;
252a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPresent;
253a9f12690SJung-uk Kim 
254a9f12690SJung-uk Kim /*
255a9f12690SJung-uk Kim  * Spinlocks are used for interfaces that can be possibly called at
256a9f12690SJung-uk Kim  * interrupt level
257a9f12690SJung-uk Kim  */
258a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GpeLock;      /* For GPE data structs and registers */
259a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */
260a9f12690SJung-uk Kim 
261a9f12690SJung-uk Kim /* Reader/Writer lock is used for namespace walk and dynamic table unload */
262a9f12690SJung-uk Kim 
263a9f12690SJung-uk Kim ACPI_EXTERN ACPI_RW_LOCK                AcpiGbl_NamespaceRwLock;
264a9f12690SJung-uk Kim 
265a9f12690SJung-uk Kim 
266a9f12690SJung-uk Kim /*****************************************************************************
267a9f12690SJung-uk Kim  *
268a9f12690SJung-uk Kim  * Miscellaneous globals
269a9f12690SJung-uk Kim  *
270a9f12690SJung-uk Kim  ****************************************************************************/
271a9f12690SJung-uk Kim 
272a9f12690SJung-uk Kim /* Object caches */
273a9f12690SJung-uk Kim 
274a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_NamespaceCache;
275a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_StateCache;
276a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeCache;
277a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeExtCache;
278a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
279a9f12690SJung-uk Kim 
280a9f12690SJung-uk Kim /* Global handlers */
281a9f12690SJung-uk Kim 
282a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
283a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
284a9f12690SJung-uk Kim ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
285a9f12690SJung-uk Kim ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
286a9f12690SJung-uk Kim ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
287a9f12690SJung-uk Kim ACPI_EXTERN void                       *AcpiGbl_TableHandlerContext;
288a9f12690SJung-uk Kim ACPI_EXTERN ACPI_WALK_STATE            *AcpiGbl_BreakpointWalk;
289a9f12690SJung-uk Kim 
290a9f12690SJung-uk Kim 
291a9f12690SJung-uk Kim /* Owner ID support */
292a9f12690SJung-uk Kim 
293a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
294a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_LastOwnerIdIndex;
295a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_NextOwnerIdOffset;
296a9f12690SJung-uk Kim 
297a9f12690SJung-uk Kim /* Misc */
298a9f12690SJung-uk Kim 
299a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalMode;
300a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_RsdpOriginalLocation;
301a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NsLookupCount;
302a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_PsFindCount;
303a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_Pm1EnableRegisterSave;
304a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_DebuggerConfiguration;
305a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_StepToNextCall;
306a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_AcpiHardwarePresent;
307a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_EventsInitialized;
308a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_SystemAwakeAndRunning;
309a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
310a9f12690SJung-uk Kim 
311a9f12690SJung-uk Kim 
312a9f12690SJung-uk Kim #ifndef DEFINE_ACPI_GLOBALS
313a9f12690SJung-uk Kim 
314a9f12690SJung-uk Kim /* Exception codes */
315a9f12690SJung-uk Kim 
316a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Env[];
317a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
318a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
319a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Aml[];
320a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
321a9f12690SJung-uk Kim 
322a9f12690SJung-uk Kim /* Other miscellaneous */
323a9f12690SJung-uk Kim 
324a9f12690SJung-uk Kim extern BOOLEAN                          AcpiGbl_Shutdown;
325a9f12690SJung-uk Kim extern UINT32                           AcpiGbl_StartupFlags;
326a9f12690SJung-uk Kim extern const char                      *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
327a9f12690SJung-uk Kim extern const char                      *AcpiGbl_HighestDstateNames[4];
328a9f12690SJung-uk Kim extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
329a9f12690SJung-uk Kim extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
330a9f12690SJung-uk Kim #endif
331a9f12690SJung-uk Kim 
332a9f12690SJung-uk Kim 
333a9f12690SJung-uk Kim #ifdef ACPI_DBG_TRACK_ALLOCATIONS
334a9f12690SJung-uk Kim 
335a9f12690SJung-uk Kim /* Lists for tracking memory allocations */
336a9f12690SJung-uk Kim 
337a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_GlobalList;
338a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_NsNodeList;
339a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DisplayFinalMemStats;
340a9f12690SJung-uk Kim #endif
341a9f12690SJung-uk Kim 
342a9f12690SJung-uk Kim 
343a9f12690SJung-uk Kim /*****************************************************************************
344a9f12690SJung-uk Kim  *
345a9f12690SJung-uk Kim  * Namespace globals
346a9f12690SJung-uk Kim  *
347a9f12690SJung-uk Kim  ****************************************************************************/
348a9f12690SJung-uk Kim 
349a9f12690SJung-uk Kim #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
350a9f12690SJung-uk Kim #define NUM_PREDEFINED_NAMES            10
351a9f12690SJung-uk Kim #else
352a9f12690SJung-uk Kim #define NUM_PREDEFINED_NAMES            9
353a9f12690SJung-uk Kim #endif
354a9f12690SJung-uk Kim 
355a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE         AcpiGbl_RootNodeStruct;
356a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_RootNode;
357a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_FadtGpeDevice;
358a9f12690SJung-uk Kim 
359a9f12690SJung-uk Kim extern const UINT8                      AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
360a9f12690SJung-uk Kim extern const ACPI_PREDEFINED_NAMES      AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
361a9f12690SJung-uk Kim 
362a9f12690SJung-uk Kim #ifdef ACPI_DEBUG_OUTPUT
363a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeCount;
364a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeSize;
365a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_MaxConcurrentNodeCount;
366a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_EntryStackPointer;
367a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_LowestStackPointer;
368a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DeepestNesting;
369a9f12690SJung-uk Kim #endif
370a9f12690SJung-uk Kim 
371a9f12690SJung-uk Kim 
372a9f12690SJung-uk Kim /*****************************************************************************
373a9f12690SJung-uk Kim  *
374a9f12690SJung-uk Kim  * Interpreter globals
375a9f12690SJung-uk Kim  *
376a9f12690SJung-uk Kim  ****************************************************************************/
377a9f12690SJung-uk Kim 
378a9f12690SJung-uk Kim 
379a9f12690SJung-uk Kim ACPI_EXTERN ACPI_THREAD_STATE          *AcpiGbl_CurrentWalkList;
380a9f12690SJung-uk Kim 
381a9f12690SJung-uk Kim /* Control method single step flag */
382a9f12690SJung-uk Kim 
383a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_CmSingleStep;
384a9f12690SJung-uk Kim 
385a9f12690SJung-uk Kim 
386a9f12690SJung-uk Kim /*****************************************************************************
387a9f12690SJung-uk Kim  *
388a9f12690SJung-uk Kim  * Hardware globals
389a9f12690SJung-uk Kim  *
390a9f12690SJung-uk Kim  ****************************************************************************/
391a9f12690SJung-uk Kim 
392a9f12690SJung-uk Kim extern      ACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
393a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeA;
394a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeB;
395a9f12690SJung-uk Kim 
396a9f12690SJung-uk Kim 
397a9f12690SJung-uk Kim /*****************************************************************************
398a9f12690SJung-uk Kim  *
399a9f12690SJung-uk Kim  * Event and GPE globals
400a9f12690SJung-uk Kim  *
401a9f12690SJung-uk Kim  ****************************************************************************/
402a9f12690SJung-uk Kim 
403a9f12690SJung-uk Kim extern      ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
404a9f12690SJung-uk Kim ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER    AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
405a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GPE_XRUPT_INFO        *AcpiGbl_GpeXruptListHead;
406a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GPE_BLOCK_INFO        *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
407a9f12690SJung-uk Kim 
408a9f12690SJung-uk Kim 
409a9f12690SJung-uk Kim /*****************************************************************************
410a9f12690SJung-uk Kim  *
411a9f12690SJung-uk Kim  * Debug support
412a9f12690SJung-uk Kim  *
413a9f12690SJung-uk Kim  ****************************************************************************/
414a9f12690SJung-uk Kim 
415a9f12690SJung-uk Kim /* Procedure nesting level for debug output */
416a9f12690SJung-uk Kim 
417a9f12690SJung-uk Kim extern      UINT32                      AcpiGbl_NestingLevel;
418a9f12690SJung-uk Kim 
419a9f12690SJung-uk Kim /* Event counters */
420a9f12690SJung-uk Kim 
421a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiMethodCount;
422a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGpeCount;
423a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiSciCount;
424a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
425a9f12690SJung-uk Kim 
426a9f12690SJung-uk Kim /* Support for dynamic control method tracing mechanism */
427a9f12690SJung-uk Kim 
428a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLevel;
429a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLayer;
430a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLevel;
431a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLayer;
432a9f12690SJung-uk Kim 
433a9f12690SJung-uk Kim 
434a9f12690SJung-uk Kim /*****************************************************************************
435a9f12690SJung-uk Kim  *
436a9f12690SJung-uk Kim  * Debugger globals
437a9f12690SJung-uk Kim  *
438a9f12690SJung-uk Kim  ****************************************************************************/
439a9f12690SJung-uk Kim 
440a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_DbOutputFlags;
441a9f12690SJung-uk Kim 
442a9f12690SJung-uk Kim #ifdef ACPI_DISASSEMBLER
443a9f12690SJung-uk Kim 
444a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
445a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;
446a9f12690SJung-uk Kim #endif
447a9f12690SJung-uk Kim 
448a9f12690SJung-uk Kim 
449a9f12690SJung-uk Kim #ifdef ACPI_DEBUGGER
450a9f12690SJung-uk Kim 
451a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_MethodExecuting;
452a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_AbortMethod;
453a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_DbTerminateThreads;
454a9f12690SJung-uk Kim 
455a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_tables;
456a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_stats;
457a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_ini_methods;
458a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_NoRegionSupport;
459a9f12690SJung-uk Kim 
460a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
461a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbLineBuf[80];
462a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[80];
463a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[40];
464a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[40];
465a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOutputToFile;
466a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbBuffer;
467a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbFilename;
468a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DbDebugLevel;
469a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DbConsoleDebugLevel;
470a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_DbScopeNode;
471a9f12690SJung-uk Kim 
472a9f12690SJung-uk Kim /*
473a9f12690SJung-uk Kim  * Statistic globals
474a9f12690SJung-uk Kim  */
475a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
476a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
477a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCountMisc;
478a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCountMisc;
479a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NumNodes;
480a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NumObjects;
481a9f12690SJung-uk Kim 
482a9f12690SJung-uk Kim 
483a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfParseTree;
484a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfMethodTrees;
485a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfNodeEntries;
486a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
487a9f12690SJung-uk Kim 
488a9f12690SJung-uk Kim #endif /* ACPI_DEBUGGER */
489a9f12690SJung-uk Kim 
490a9f12690SJung-uk Kim #endif /* __ACGLOBAL_H__ */
491