xref: /freebsd/sys/contrib/dev/acpica/include/acglobal.h (revision 5a77b11bd396353d1820bff1ee51e58c2a6ee6a6)
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  *
119a179dd8SJung-uk Kim  * Some or all of this work - Copyright (c) 1999 - 2010, 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  * Optionally use default values for the ACPI register widths. Set this to
178a9f12690SJung-uk Kim  * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
179a9f12690SJung-uk Kim  */
180a9f12690SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE);
181a9f12690SJung-uk Kim 
182ca3cf4faSJung-uk Kim /*
183ca3cf4faSJung-uk Kim  * Optionally enable output from the AML Debug Object.
184ca3cf4faSJung-uk Kim  */
185ca3cf4faSJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_EnableAmlDebugObject, FALSE);
186ca3cf4faSJung-uk Kim 
1878c8be05fSJung-uk Kim /*
1888c8be05fSJung-uk Kim  * Optionally copy the entire DSDT to local memory (instead of simply
1898c8be05fSJung-uk Kim  * mapping it.) There are some BIOSs that corrupt or replace the original
1908c8be05fSJung-uk Kim  * DSDT, creating the need for this option. Default is FALSE, do not copy
1918c8be05fSJung-uk Kim  * the DSDT.
1928c8be05fSJung-uk Kim  */
1938c8be05fSJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE);
1948c8be05fSJung-uk Kim 
195a88e22b7SJung-uk Kim /*
196a88e22b7SJung-uk Kim  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
197a88e22b7SJung-uk Kim  * with other ACPI implementations. NOTE: During ACPICA initialization,
198a88e22b7SJung-uk Kim  * this value is set to TRUE if any Windows OSI strings have been
199a88e22b7SJung-uk Kim  * requested by the BIOS.
200a88e22b7SJung-uk Kim  */
201a88e22b7SJung-uk Kim UINT8       ACPI_INIT_GLOBAL (AcpiGbl_TruncateIoAddresses, FALSE);
202a88e22b7SJung-uk Kim 
203a9f12690SJung-uk Kim 
204a9f12690SJung-uk Kim /* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
205a9f12690SJung-uk Kim 
206a9f12690SJung-uk Kim ACPI_TABLE_FADT             AcpiGbl_FADT;
207a9f12690SJung-uk Kim UINT32                      AcpiCurrentGpeCount;
208a9f12690SJung-uk Kim UINT32                      AcpiGbl_TraceFlags;
209a9f12690SJung-uk Kim ACPI_NAME                   AcpiGbl_TraceMethodName;
21042fecd12SJung-uk Kim BOOLEAN                     AcpiGbl_SystemAwakeAndRunning;
211a9f12690SJung-uk Kim 
212a9f12690SJung-uk Kim #endif
213a9f12690SJung-uk Kim 
214a9f12690SJung-uk Kim /*****************************************************************************
215a9f12690SJung-uk Kim  *
216a9f12690SJung-uk Kim  * ACPI Table globals
217a9f12690SJung-uk Kim  *
218a9f12690SJung-uk Kim  ****************************************************************************/
219a9f12690SJung-uk Kim 
220a9f12690SJung-uk Kim /*
2213f5e024cSJung-uk Kim  * AcpiGbl_RootTableList is the master list of ACPI tables that were
2223f5e024cSJung-uk Kim  * found in the RSDT/XSDT.
223a9f12690SJung-uk Kim  */
2243f5e024cSJung-uk Kim ACPI_EXTERN ACPI_TABLE_LIST             AcpiGbl_RootTableList;
225a9f12690SJung-uk Kim ACPI_EXTERN ACPI_TABLE_FACS            *AcpiGbl_FACS;
226a9f12690SJung-uk Kim 
227a9f12690SJung-uk Kim /* These addresses are calculated from the FADT Event Block addresses */
228a9f12690SJung-uk Kim 
229a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aStatus;
230a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aEnable;
231a9f12690SJung-uk Kim 
232a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bStatus;
233a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bEnable;
234a9f12690SJung-uk Kim 
2358c8be05fSJung-uk Kim /* DSDT information. Used to check for DSDT corruption */
2368c8be05fSJung-uk Kim 
2378c8be05fSJung-uk Kim ACPI_EXTERN ACPI_TABLE_HEADER          *AcpiGbl_DSDT;
2388c8be05fSJung-uk Kim ACPI_EXTERN ACPI_TABLE_HEADER           AcpiGbl_OriginalDsdtHeader;
2398c8be05fSJung-uk Kim 
240a9f12690SJung-uk Kim /*
241a9f12690SJung-uk Kim  * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
242a9f12690SJung-uk Kim  * determined by the revision of the DSDT: If the DSDT revision is less than
243a9f12690SJung-uk Kim  * 2, use only the lower 32 bits of the internal 64-bit Integer.
244a9f12690SJung-uk Kim  */
245a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerBitWidth;
246a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerByteWidth;
247a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_IntegerNybbleWidth;
248a9f12690SJung-uk Kim 
249a9f12690SJung-uk Kim 
250a9f12690SJung-uk Kim /*****************************************************************************
251a9f12690SJung-uk Kim  *
252a9f12690SJung-uk Kim  * Mutual exlusion within ACPICA subsystem
253a9f12690SJung-uk Kim  *
254a9f12690SJung-uk Kim  ****************************************************************************/
255a9f12690SJung-uk Kim 
256a9f12690SJung-uk Kim /*
257a9f12690SJung-uk Kim  * Predefined mutex objects. This array contains the
258a9f12690SJung-uk Kim  * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
259a9f12690SJung-uk Kim  * (The table maps local handles to the real OS handles)
260a9f12690SJung-uk Kim  */
261a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MUTEX_INFO             AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
262a9f12690SJung-uk Kim 
263a9f12690SJung-uk Kim /*
264a9f12690SJung-uk Kim  * Global lock mutex is an actual AML mutex object
265a9f12690SJung-uk Kim  * Global lock semaphore works in conjunction with the HW global lock
266a9f12690SJung-uk Kim  */
267a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OPERAND_OBJECT        *AcpiGbl_GlobalLockMutex;
268a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SEMAPHORE              AcpiGbl_GlobalLockSemaphore;
269a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_GlobalLockHandle;
270a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockAcquired;
271a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPresent;
272a9f12690SJung-uk Kim 
273a9f12690SJung-uk Kim /*
274a9f12690SJung-uk Kim  * Spinlocks are used for interfaces that can be possibly called at
275a9f12690SJung-uk Kim  * interrupt level
276a9f12690SJung-uk Kim  */
277a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GpeLock;      /* For GPE data structs and registers */
278a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */
279a9f12690SJung-uk Kim 
280709fac06SJung-uk Kim /* Mutex for _OSI support */
281709fac06SJung-uk Kim 
282709fac06SJung-uk Kim ACPI_EXTERN ACPI_MUTEX                  AcpiGbl_OsiMutex;
283709fac06SJung-uk Kim 
284a9f12690SJung-uk Kim /* Reader/Writer lock is used for namespace walk and dynamic table unload */
285a9f12690SJung-uk Kim 
286a9f12690SJung-uk Kim ACPI_EXTERN ACPI_RW_LOCK                AcpiGbl_NamespaceRwLock;
287a9f12690SJung-uk Kim 
288a9f12690SJung-uk Kim 
289a9f12690SJung-uk Kim /*****************************************************************************
290a9f12690SJung-uk Kim  *
291a9f12690SJung-uk Kim  * Miscellaneous globals
292a9f12690SJung-uk Kim  *
293a9f12690SJung-uk Kim  ****************************************************************************/
294a9f12690SJung-uk Kim 
295a9f12690SJung-uk Kim /* Object caches */
296a9f12690SJung-uk Kim 
297a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_NamespaceCache;
298a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_StateCache;
299a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeCache;
300a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeExtCache;
301a9f12690SJung-uk Kim ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
302a9f12690SJung-uk Kim 
303a9f12690SJung-uk Kim /* Global handlers */
304a9f12690SJung-uk Kim 
305a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
306a9f12690SJung-uk Kim ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
307a9f12690SJung-uk Kim ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
308a9f12690SJung-uk Kim ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
309a9f12690SJung-uk Kim ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
310a9f12690SJung-uk Kim ACPI_EXTERN void                       *AcpiGbl_TableHandlerContext;
311a9f12690SJung-uk Kim ACPI_EXTERN ACPI_WALK_STATE            *AcpiGbl_BreakpointWalk;
312709fac06SJung-uk Kim ACPI_EXTERN ACPI_INTERFACE_HANDLER      AcpiGbl_InterfaceHandler;
313a9f12690SJung-uk Kim 
314a9f12690SJung-uk Kim /* Owner ID support */
315a9f12690SJung-uk Kim 
316a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
317a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_LastOwnerIdIndex;
318a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_NextOwnerIdOffset;
319a9f12690SJung-uk Kim 
320a9f12690SJung-uk Kim /* Misc */
321a9f12690SJung-uk Kim 
322a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalMode;
323a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_RsdpOriginalLocation;
324a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NsLookupCount;
325a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_PsFindCount;
326a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_Pm1EnableRegisterSave;
327a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_DebuggerConfiguration;
328a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_StepToNextCall;
329a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_AcpiHardwarePresent;
330a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_EventsInitialized;
331a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
332709fac06SJung-uk Kim ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
333a9f12690SJung-uk Kim 
334a9f12690SJung-uk Kim 
335a9f12690SJung-uk Kim #ifndef DEFINE_ACPI_GLOBALS
336a9f12690SJung-uk Kim 
337a9f12690SJung-uk Kim /* Exception codes */
338a9f12690SJung-uk Kim 
339a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Env[];
340a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
341a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
342a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Aml[];
343a9f12690SJung-uk Kim extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
344a9f12690SJung-uk Kim 
345a9f12690SJung-uk Kim /* Other miscellaneous */
346a9f12690SJung-uk Kim 
347a9f12690SJung-uk Kim extern BOOLEAN                          AcpiGbl_Shutdown;
348a9f12690SJung-uk Kim extern UINT32                           AcpiGbl_StartupFlags;
349a9f12690SJung-uk Kim extern const char                      *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
350d6dd1baeSJung-uk Kim extern const char                      *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
351d6dd1baeSJung-uk Kim extern const char                      *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
352a9f12690SJung-uk Kim extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
353a9f12690SJung-uk Kim extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
354a9f12690SJung-uk Kim #endif
355a9f12690SJung-uk Kim 
356a9f12690SJung-uk Kim 
357a9f12690SJung-uk Kim #ifdef ACPI_DBG_TRACK_ALLOCATIONS
358a9f12690SJung-uk Kim 
359a9f12690SJung-uk Kim /* Lists for tracking memory allocations */
360a9f12690SJung-uk Kim 
361a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_GlobalList;
362a9f12690SJung-uk Kim ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_NsNodeList;
363a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DisplayFinalMemStats;
364a88e22b7SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DisableMemTracking;
365a9f12690SJung-uk Kim #endif
366a9f12690SJung-uk Kim 
367a9f12690SJung-uk Kim 
368a9f12690SJung-uk Kim /*****************************************************************************
369a9f12690SJung-uk Kim  *
370a9f12690SJung-uk Kim  * Namespace globals
371a9f12690SJung-uk Kim  *
372a9f12690SJung-uk Kim  ****************************************************************************/
373a9f12690SJung-uk Kim 
374a9f12690SJung-uk Kim #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
375a9f12690SJung-uk Kim #define NUM_PREDEFINED_NAMES            10
376a9f12690SJung-uk Kim #else
377a9f12690SJung-uk Kim #define NUM_PREDEFINED_NAMES            9
378a9f12690SJung-uk Kim #endif
379a9f12690SJung-uk Kim 
380a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE         AcpiGbl_RootNodeStruct;
381a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_RootNode;
382a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_FadtGpeDevice;
383d6dd1baeSJung-uk Kim ACPI_EXTERN ACPI_OPERAND_OBJECT        *AcpiGbl_ModuleCodeList;
384d6dd1baeSJung-uk Kim 
385a9f12690SJung-uk Kim 
386a9f12690SJung-uk Kim extern const UINT8                      AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
387a9f12690SJung-uk Kim extern const ACPI_PREDEFINED_NAMES      AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
388a9f12690SJung-uk Kim 
389a9f12690SJung-uk Kim #ifdef ACPI_DEBUG_OUTPUT
390a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeCount;
391a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeSize;
392a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_MaxConcurrentNodeCount;
393a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_EntryStackPointer;
394a9f12690SJung-uk Kim ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_LowestStackPointer;
395a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DeepestNesting;
396a9f12690SJung-uk Kim #endif
397a9f12690SJung-uk Kim 
398a9f12690SJung-uk Kim 
399a9f12690SJung-uk Kim /*****************************************************************************
400a9f12690SJung-uk Kim  *
401a9f12690SJung-uk Kim  * Interpreter globals
402a9f12690SJung-uk Kim  *
403a9f12690SJung-uk Kim  ****************************************************************************/
404a9f12690SJung-uk Kim 
405a9f12690SJung-uk Kim 
406a9f12690SJung-uk Kim ACPI_EXTERN ACPI_THREAD_STATE          *AcpiGbl_CurrentWalkList;
407a9f12690SJung-uk Kim 
408a9f12690SJung-uk Kim /* Control method single step flag */
409a9f12690SJung-uk Kim 
410a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_CmSingleStep;
411a9f12690SJung-uk Kim 
412a9f12690SJung-uk Kim 
413a9f12690SJung-uk Kim /*****************************************************************************
414a9f12690SJung-uk Kim  *
415a9f12690SJung-uk Kim  * Hardware globals
416a9f12690SJung-uk Kim  *
417a9f12690SJung-uk Kim  ****************************************************************************/
418a9f12690SJung-uk Kim 
419a9f12690SJung-uk Kim extern      ACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
420a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeA;
421a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeB;
422a9f12690SJung-uk Kim 
423a9f12690SJung-uk Kim 
424a9f12690SJung-uk Kim /*****************************************************************************
425a9f12690SJung-uk Kim  *
426a9f12690SJung-uk Kim  * Event and GPE globals
427a9f12690SJung-uk Kim  *
428a9f12690SJung-uk Kim  ****************************************************************************/
429a9f12690SJung-uk Kim 
430*5a77b11bSJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_AllGpesInitialized;
431a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GPE_XRUPT_INFO        *AcpiGbl_GpeXruptListHead;
432a9f12690SJung-uk Kim ACPI_EXTERN ACPI_GPE_BLOCK_INFO        *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
433*5a77b11bSJung-uk Kim ACPI_EXTERN ACPI_GBL_EVENT_HANDLER      AcpiGbl_GlobalEventHandler;
434*5a77b11bSJung-uk Kim ACPI_EXTERN void                       *AcpiGbl_GlobalEventHandlerContext;
435*5a77b11bSJung-uk Kim ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER    AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
436*5a77b11bSJung-uk Kim extern      ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
437a9f12690SJung-uk Kim 
438a9f12690SJung-uk Kim 
439a9f12690SJung-uk Kim /*****************************************************************************
440a9f12690SJung-uk Kim  *
441a9f12690SJung-uk Kim  * Debug support
442a9f12690SJung-uk Kim  *
443a9f12690SJung-uk Kim  ****************************************************************************/
444a9f12690SJung-uk Kim 
445a9f12690SJung-uk Kim /* Procedure nesting level for debug output */
446a9f12690SJung-uk Kim 
447a9f12690SJung-uk Kim extern      UINT32                      AcpiGbl_NestingLevel;
448a9f12690SJung-uk Kim 
449a9f12690SJung-uk Kim /* Event counters */
450a9f12690SJung-uk Kim 
451a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiMethodCount;
452a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGpeCount;
453a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiSciCount;
454a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
455a9f12690SJung-uk Kim 
456a9f12690SJung-uk Kim /* Support for dynamic control method tracing mechanism */
457a9f12690SJung-uk Kim 
458a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLevel;
459a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLayer;
460a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLevel;
461a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLayer;
462a9f12690SJung-uk Kim 
463a9f12690SJung-uk Kim 
464a9f12690SJung-uk Kim /*****************************************************************************
465a9f12690SJung-uk Kim  *
466a9f12690SJung-uk Kim  * Debugger globals
467a9f12690SJung-uk Kim  *
468a9f12690SJung-uk Kim  ****************************************************************************/
469a9f12690SJung-uk Kim 
470a9f12690SJung-uk Kim ACPI_EXTERN UINT8                       AcpiGbl_DbOutputFlags;
471a9f12690SJung-uk Kim 
472a9f12690SJung-uk Kim #ifdef ACPI_DISASSEMBLER
473a9f12690SJung-uk Kim 
474a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
475a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;
476f556842eSJung-uk Kim ACPI_EXTERN ACPI_EXTERNAL_LIST         *AcpiGbl_ExternalList;
477709fac06SJung-uk Kim ACPI_EXTERN ACPI_EXTERNAL_FILE         *AcpiGbl_ExternalFileList;
478a9f12690SJung-uk Kim #endif
479a9f12690SJung-uk Kim 
480a9f12690SJung-uk Kim 
481a9f12690SJung-uk Kim #ifdef ACPI_DEBUGGER
482a9f12690SJung-uk Kim 
483a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_MethodExecuting;
484a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_AbortMethod;
485a9f12690SJung-uk Kim extern      BOOLEAN                     AcpiGbl_DbTerminateThreads;
486a9f12690SJung-uk Kim 
487a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_tables;
488a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_stats;
489a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_ini_methods;
490a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_NoRegionSupport;
491a9f12690SJung-uk Kim 
492a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
493a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbLineBuf[80];
494a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[80];
495a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[40];
496a9f12690SJung-uk Kim ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[40];
497a9f12690SJung-uk Kim ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOutputToFile;
498a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbBuffer;
499a9f12690SJung-uk Kim ACPI_EXTERN char                       *AcpiGbl_DbFilename;
500a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DbDebugLevel;
501a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_DbConsoleDebugLevel;
502a9f12690SJung-uk Kim ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_DbScopeNode;
503a9f12690SJung-uk Kim 
504a9f12690SJung-uk Kim /*
505a9f12690SJung-uk Kim  * Statistic globals
506a9f12690SJung-uk Kim  */
507a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
508a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
509a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCountMisc;
510a9f12690SJung-uk Kim ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCountMisc;
511a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NumNodes;
512a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_NumObjects;
513a9f12690SJung-uk Kim 
514a9f12690SJung-uk Kim 
515a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfParseTree;
516a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfMethodTrees;
517a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfNodeEntries;
518a9f12690SJung-uk Kim ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
519a9f12690SJung-uk Kim 
520a9f12690SJung-uk Kim #endif /* ACPI_DEBUGGER */
521a9f12690SJung-uk Kim 
522a9f12690SJung-uk Kim #endif /* __ACGLOBAL_H__ */
523