1 /******************************************************************************
3 * Name: acglobal.h - Declarations for global variables
6 *****************************************************************************/
9 * Copyright (C) 2000, 2001 R. Byron Moore
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #ifndef __ACGLOBAL_H__
27 #define __ACGLOBAL_H__
31 * Ensure that the globals are actually defined only once.
33 * The use of these defines allows a single list of globals (here) in order
34 * to simplify maintenance of the code.
36 #ifdef DEFINE_ACPI_GLOBALS
39 #define ACPI_EXTERN extern
43 /*****************************************************************************
47 ****************************************************************************/
49 /* Runtime configuration of debug print levels */
51 extern u32 acpi_dbg_level;
52 extern u32 acpi_dbg_layer;
54 /* Procedure nesting level for debug output */
56 extern u32 acpi_gbl_nesting_level;
59 /*****************************************************************************
63 ****************************************************************************/
67 * Although these pointers are somewhat redundant with the global Acpi_table,
68 * they are convenient because they are typed pointers.
70 * These tables are single-table only; meaning that there can be at most one
71 * of each in the system. Each global points to the actual table.
74 ACPI_EXTERN RSDP_DESCRIPTOR *acpi_gbl_RSDP;
75 ACPI_EXTERN xsdt_descriptor *acpi_gbl_XSDT;
76 ACPI_EXTERN FADT_DESCRIPTOR *acpi_gbl_FADT;
77 ACPI_EXTERN acpi_table_header *acpi_gbl_DSDT;
78 ACPI_EXTERN acpi_common_facs *acpi_gbl_FACS;
81 * Since there may be multiple SSDTs and PSDTS, a single pointer is not
82 * sufficient; Therefore, there isn't one!
87 * ACPI Table info arrays
89 extern acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES];
90 extern ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES];
93 * Predefined mutex objects. This array contains the
94 * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
95 * (The table maps local handles to the real OS handles)
97 ACPI_EXTERN acpi_mutex_info acpi_gbl_acpi_mutex_info [NUM_MTX];
100 /*****************************************************************************
102 * Miscellaneous globals
104 ****************************************************************************/
107 ACPI_EXTERN ACPI_MEMORY_LIST acpi_gbl_memory_lists[ACPI_NUM_MEM_LISTS];
108 ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER acpi_gbl_drv_notify;
109 ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER acpi_gbl_sys_notify;
110 ACPI_EXTERN u8 *acpi_gbl_gpe0enable_register_save;
111 ACPI_EXTERN u8 *acpi_gbl_gpe1_enable_register_save;
112 ACPI_EXTERN acpi_walk_state *acpi_gbl_breakpoint_walk;
113 ACPI_EXTERN acpi_handle acpi_gbl_global_lock_semaphore;
115 ACPI_EXTERN u32 acpi_gbl_global_lock_thread_count;
116 ACPI_EXTERN u32 acpi_gbl_restore_acpi_chipset;
117 ACPI_EXTERN u32 acpi_gbl_original_mode;
118 ACPI_EXTERN u32 acpi_gbl_edge_level_save;
119 ACPI_EXTERN u32 acpi_gbl_irq_enable_save;
120 ACPI_EXTERN u32 acpi_gbl_rsdp_original_location;
121 ACPI_EXTERN u32 acpi_gbl_ns_lookup_count;
122 ACPI_EXTERN u32 acpi_gbl_ps_find_count;
123 ACPI_EXTERN u16 acpi_gbl_pm1_enable_register_save;
124 ACPI_EXTERN u16 acpi_gbl_next_table_owner_id;
125 ACPI_EXTERN u16 acpi_gbl_next_method_owner_id;
126 ACPI_EXTERN u8 acpi_gbl_debugger_configuration;
127 ACPI_EXTERN u8 acpi_gbl_global_lock_acquired;
128 ACPI_EXTERN u8 acpi_gbl_step_to_next_call;
129 ACPI_EXTERN u8 acpi_gbl_acpi_hardware_present;
130 ACPI_EXTERN u8 acpi_gbl_global_lock_present;
132 extern u8 acpi_gbl_shutdown;
133 extern u32 acpi_gbl_system_flags;
134 extern u32 acpi_gbl_startup_flags;
135 extern const u8 acpi_gbl_decode_to8bit[8];
136 extern const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES];
139 /*****************************************************************************
143 ****************************************************************************/
145 #define NUM_NS_TYPES INTERNAL_TYPE_INVALID+1
146 #define NUM_PREDEFINED_NAMES 9
149 ACPI_EXTERN acpi_namespace_node acpi_gbl_root_node_struct;
150 ACPI_EXTERN acpi_namespace_node *acpi_gbl_root_node;
152 extern const u8 acpi_gbl_ns_properties[NUM_NS_TYPES];
153 extern const predefined_names acpi_gbl_pre_defined_names [NUM_PREDEFINED_NAMES];
156 ACPI_EXTERN u32 acpi_gbl_current_node_count;
157 ACPI_EXTERN u32 acpi_gbl_current_node_size;
158 ACPI_EXTERN u32 acpi_gbl_max_concurrent_node_count;
159 ACPI_EXTERN unsigned long acpi_gbl_entry_stack_pointer;
160 ACPI_EXTERN u32 acpi_gbl_lowest_stack_pointer;
161 ACPI_EXTERN u32 acpi_gbl_deepest_nesting;
164 /*****************************************************************************
166 * Interpreter globals
168 ****************************************************************************/
171 ACPI_EXTERN acpi_walk_list *acpi_gbl_current_walk_list;
173 /* Address Space handlers */
175 ACPI_EXTERN acpi_adr_space_info acpi_gbl_address_spaces[ACPI_NUM_ADDRESS_SPACES];
177 /* Control method single step flag */
179 ACPI_EXTERN u8 acpi_gbl_cm_single_step;
182 /*****************************************************************************
186 ****************************************************************************/
188 ACPI_EXTERN acpi_parse_object *acpi_gbl_parsed_namespace_root;
191 /*****************************************************************************
195 ****************************************************************************/
197 ACPI_EXTERN acpi_fixed_event_info acpi_gbl_fixed_event_handlers[ACPI_NUM_FIXED_EVENTS];
198 ACPI_EXTERN acpi_handle acpi_gbl_gpe_obj_handle;
199 ACPI_EXTERN u32 acpi_gbl_gpe_register_count;
200 ACPI_EXTERN acpi_gpe_registers *acpi_gbl_gpe_registers;
201 ACPI_EXTERN acpi_gpe_level_info *acpi_gbl_gpe_info;
204 * Gpe validation and translation table
205 * Indexed by the GPE number, returns GPE_INVALID if the GPE is not supported.
206 * Otherwise, returns a valid index into the global GPE table.
208 * This table is needed because the GPE numbers supported by block 1 do not
209 * have to be contiguous with the GPE numbers supported by block 0.
211 ACPI_EXTERN u8 acpi_gbl_gpe_valid [ACPI_NUM_GPE];
213 /* Acpi_event counter for debug only */
216 ACPI_EXTERN u32 acpi_gbl_event_count[ACPI_NUM_FIXED_EVENTS];
220 /*****************************************************************************
224 ****************************************************************************/
226 #ifdef ENABLE_DEBUGGER
227 ACPI_EXTERN u8 acpi_gbl_method_executing;
228 ACPI_EXTERN u8 acpi_gbl_db_terminate_threads;
232 #endif /* __ACGLOBAL_H__ */