Print this page
update to acpica-unix2-20131218
acpica-unix2-20130823
PANKOVs restructure
   1 /******************************************************************************
   2  *
   3  * Name: acglobal.h - Declarations for global variables
   4  *
   5  *****************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2011, Intel Corp.
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  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.
  25  *
  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.


 104 /*
 105  * Optionally use default values for the ACPI register widths. Set this to
 106  * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
 107  */
 108 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE);
 109 
 110 /*
 111  * Optionally enable output from the AML Debug Object.
 112  */
 113 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_EnableAmlDebugObject, FALSE);
 114 
 115 /*
 116  * Optionally copy the entire DSDT to local memory (instead of simply
 117  * mapping it.) There are some BIOSs that corrupt or replace the original
 118  * DSDT, creating the need for this option. Default is FALSE, do not copy
 119  * the DSDT.
 120  */
 121 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE);
 122 
 123 /*



















 124  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
 125  * with other ACPI implementations. NOTE: During ACPICA initialization,
 126  * this value is set to TRUE if any Windows OSI strings have been
 127  * requested by the BIOS.
 128  */
 129 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_TruncateIoAddresses, FALSE);
 130 





 131 













 132 /* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
 133 
 134 ACPI_TABLE_FADT             AcpiGbl_FADT;
 135 UINT32                      AcpiCurrentGpeCount;
 136 UINT32                      AcpiGbl_TraceFlags;
 137 ACPI_NAME                   AcpiGbl_TraceMethodName;
 138 BOOLEAN                     AcpiGbl_SystemAwakeAndRunning;
 139 
 140 #endif





 141 






 142 /*****************************************************************************
 143  *
 144  * ACPI Table globals
 145  *
 146  ****************************************************************************/
 147 
 148 /*
 149  * AcpiGbl_RootTableList is the master list of ACPI tables that were
 150  * found in the RSDT/XSDT.
 151  */
 152 ACPI_EXTERN ACPI_TABLE_LIST             AcpiGbl_RootTableList;


 153 ACPI_EXTERN ACPI_TABLE_FACS            *AcpiGbl_FACS;
 154 


 155 /* These addresses are calculated from the FADT Event Block addresses */
 156 
 157 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aStatus;
 158 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aEnable;
 159 
 160 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bStatus;
 161 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bEnable;
 162 
 163 /* DSDT information. Used to check for DSDT corruption */
 164 
 165 ACPI_EXTERN ACPI_TABLE_HEADER          *AcpiGbl_DSDT;
 166 ACPI_EXTERN ACPI_TABLE_HEADER           AcpiGbl_OriginalDsdtHeader;
 167 
 168 /*
 169  * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
 170  * determined by the revision of the DSDT: If the DSDT revision is less than
 171  * 2, use only the lower 32 bits of the internal 64-bit Integer.
 172  */
 173 ACPI_EXTERN UINT8                       AcpiGbl_IntegerBitWidth;
 174 ACPI_EXTERN UINT8                       AcpiGbl_IntegerByteWidth;
 175 ACPI_EXTERN UINT8                       AcpiGbl_IntegerNybbleWidth;
 176 
 177 
 178 /*****************************************************************************
 179  *
 180  * Mutual exlusion within ACPICA subsystem
 181  *
 182  ****************************************************************************/
 183 
 184 /*
 185  * Predefined mutex objects. This array contains the
 186  * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
 187  * (The table maps local handles to the real OS handles)
 188  */
 189 ACPI_EXTERN ACPI_MUTEX_INFO             AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
 190 
 191 /*
 192  * Global lock mutex is an actual AML mutex object
 193  * Global lock semaphore works in conjunction with the actual global lock
 194  * Global lock spinlock is used for "pending" handshake
 195  */
 196 ACPI_EXTERN ACPI_OPERAND_OBJECT        *AcpiGbl_GlobalLockMutex;
 197 ACPI_EXTERN ACPI_SEMAPHORE              AcpiGbl_GlobalLockSemaphore;
 198 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GlobalLockPendingLock;
 199 ACPI_EXTERN UINT16                      AcpiGbl_GlobalLockHandle;
 200 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockAcquired;
 201 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPresent;
 202 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPending;
 203 
 204 /*
 205  * Spinlocks are used for interfaces that can be possibly called at
 206  * interrupt level
 207  */
 208 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GpeLock;      /* For GPE data structs and registers */
 209 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */

 210 
 211 /* Mutex for _OSI support */
 212 
 213 ACPI_EXTERN ACPI_MUTEX                  AcpiGbl_OsiMutex;
 214 
 215 /* Reader/Writer lock is used for namespace walk and dynamic table unload */
 216 
 217 ACPI_EXTERN ACPI_RW_LOCK                AcpiGbl_NamespaceRwLock;
 218 
 219 
 220 /*****************************************************************************
 221  *
 222  * Miscellaneous globals
 223  *
 224  ****************************************************************************/
 225 
 226 /* Object caches */
 227 
 228 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_NamespaceCache;
 229 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_StateCache;
 230 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeCache;
 231 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeExtCache;
 232 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
 233 
 234 /* Global handlers */
 235 
 236 ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_DeviceNotify;
 237 ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER  AcpiGbl_SystemNotify;
 238 ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
 239 ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
 240 ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
 241 ACPI_EXTERN void                       *AcpiGbl_TableHandlerContext;
 242 ACPI_EXTERN ACPI_WALK_STATE            *AcpiGbl_BreakpointWalk;
 243 ACPI_EXTERN ACPI_INTERFACE_HANDLER      AcpiGbl_InterfaceHandler;

 244 
 245 /* Owner ID support */
 246 
 247 ACPI_EXTERN UINT32                      AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
 248 ACPI_EXTERN UINT8                       AcpiGbl_LastOwnerIdIndex;
 249 ACPI_EXTERN UINT8                       AcpiGbl_NextOwnerIdOffset;
 250 
 251 /* Initialization sequencing */
 252 
 253 ACPI_EXTERN BOOLEAN                     AcpiGbl_RegMethodsExecuted;
 254 
 255 /* Misc */
 256 
 257 ACPI_EXTERN UINT32                      AcpiGbl_OriginalMode;
 258 ACPI_EXTERN UINT32                      AcpiGbl_RsdpOriginalLocation;
 259 ACPI_EXTERN UINT32                      AcpiGbl_NsLookupCount;
 260 ACPI_EXTERN UINT32                      AcpiGbl_PsFindCount;
 261 ACPI_EXTERN UINT16                      AcpiGbl_Pm1EnableRegisterSave;
 262 ACPI_EXTERN UINT8                       AcpiGbl_DebuggerConfiguration;
 263 ACPI_EXTERN BOOLEAN                     AcpiGbl_StepToNextCall;
 264 ACPI_EXTERN BOOLEAN                     AcpiGbl_AcpiHardwarePresent;
 265 ACPI_EXTERN BOOLEAN                     AcpiGbl_EventsInitialized;
 266 ACPI_EXTERN UINT8                       AcpiGbl_OsiData;
 267 ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;

 268 
 269 
 270 #ifndef DEFINE_ACPI_GLOBALS
 271 
 272 /* Exception codes */
 273 
 274 extern char const                       *AcpiGbl_ExceptionNames_Env[];
 275 extern char const                       *AcpiGbl_ExceptionNames_Pgm[];
 276 extern char const                       *AcpiGbl_ExceptionNames_Tbl[];
 277 extern char const                       *AcpiGbl_ExceptionNames_Aml[];
 278 extern char const                       *AcpiGbl_ExceptionNames_Ctrl[];
 279 
 280 /* Other miscellaneous */
 281 
 282 extern BOOLEAN                          AcpiGbl_Shutdown;
 283 extern UINT32                           AcpiGbl_StartupFlags;
 284 extern const char                      *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
 285 extern const char                      *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
 286 extern const char                      *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
 287 extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
 288 extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
 289 #endif
 290 
 291 
 292 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 293 
 294 /* Lists for tracking memory allocations */
 295 
 296 ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_GlobalList;
 297 ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_NsNodeList;
 298 ACPI_EXTERN BOOLEAN                     AcpiGbl_DisplayFinalMemStats;
 299 ACPI_EXTERN BOOLEAN                     AcpiGbl_DisableMemTracking;


 320 
 321 extern const UINT8                      AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
 322 extern const ACPI_PREDEFINED_NAMES      AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
 323 
 324 #ifdef ACPI_DEBUG_OUTPUT
 325 ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeCount;
 326 ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeSize;
 327 ACPI_EXTERN UINT32                      AcpiGbl_MaxConcurrentNodeCount;
 328 ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_EntryStackPointer;
 329 ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_LowestStackPointer;
 330 ACPI_EXTERN UINT32                      AcpiGbl_DeepestNesting;
 331 #endif
 332 
 333 
 334 /*****************************************************************************
 335  *
 336  * Interpreter globals
 337  *
 338  ****************************************************************************/
 339 
 340 
 341 ACPI_EXTERN ACPI_THREAD_STATE          *AcpiGbl_CurrentWalkList;
 342 
 343 /* Control method single step flag */
 344 
 345 ACPI_EXTERN UINT8                       AcpiGbl_CmSingleStep;
 346 
 347 
 348 /*****************************************************************************
 349  *
 350  * Hardware globals
 351  *
 352  ****************************************************************************/
 353 
 354 extern      ACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
 355 ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeA;
 356 ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeB;
 357 
 358 
 359 /*****************************************************************************
 360  *
 361  * Event and GPE globals
 362  *
 363  ****************************************************************************/
 364 


 365 ACPI_EXTERN UINT8                       AcpiGbl_AllGpesInitialized;
 366 ACPI_EXTERN ACPI_GPE_XRUPT_INFO        *AcpiGbl_GpeXruptListHead;
 367 ACPI_EXTERN ACPI_GPE_BLOCK_INFO        *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
 368 ACPI_EXTERN ACPI_GBL_EVENT_HANDLER      AcpiGbl_GlobalEventHandler;
 369 ACPI_EXTERN void                       *AcpiGbl_GlobalEventHandlerContext;
 370 ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER    AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
 371 extern      ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
 372 

 373 
 374 /*****************************************************************************
 375  *
 376  * Debug support
 377  *
 378  ****************************************************************************/
 379 
 380 /* Procedure nesting level for debug output */
 381 
 382 extern      UINT32                      AcpiGbl_NestingLevel;
 383 
 384 /* Event counters */
 385 
 386 ACPI_EXTERN UINT32                      AcpiMethodCount;
 387 ACPI_EXTERN UINT32                      AcpiGpeCount;
 388 ACPI_EXTERN UINT32                      AcpiSciCount;
 389 ACPI_EXTERN UINT32                      AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
 390 
 391 /* Support for dynamic control method tracing mechanism */
 392 
 393 ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLevel;
 394 ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLayer;
 395 ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLevel;
 396 ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLayer;
 397 
 398 
 399 /*****************************************************************************
 400  *
 401  * Debugger globals
 402  *
 403  ****************************************************************************/
 404 
 405 ACPI_EXTERN UINT8                       AcpiGbl_DbOutputFlags;
 406 
 407 #ifdef ACPI_DISASSEMBLER
 408 


 409 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
 410 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;


 411 ACPI_EXTERN ACPI_EXTERNAL_LIST         *AcpiGbl_ExternalList;
 412 ACPI_EXTERN ACPI_EXTERNAL_FILE         *AcpiGbl_ExternalFileList;
 413 #endif
 414 
 415 
 416 #ifdef ACPI_DEBUGGER
 417 
 418 extern      BOOLEAN                     AcpiGbl_MethodExecuting;
 419 extern      BOOLEAN                     AcpiGbl_AbortMethod;
 420 extern      BOOLEAN                     AcpiGbl_DbTerminateThreads;
 421 
 422 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_tables;
 423 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_stats;
 424 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_ini_methods;
 425 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_NoRegionSupport;
 426 
 427 ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
 428 ACPI_EXTERN ACPI_OBJECT_TYPE            AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS];
 429 ACPI_EXTERN char                        AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE];
 430 ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE];
 431 ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[80];
 432 ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[80];
 433 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOutputToFile;
 434 ACPI_EXTERN char                       *AcpiGbl_DbBuffer;
 435 ACPI_EXTERN char                       *AcpiGbl_DbFilename;
 436 ACPI_EXTERN UINT32                      AcpiGbl_DbDebugLevel;
 437 ACPI_EXTERN UINT32                      AcpiGbl_DbConsoleDebugLevel;
 438 ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_DbScopeNode;
 439 










 440 /*
 441  * Statistic globals
 442  */
 443 ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
 444 ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
 445 ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCountMisc;
 446 ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCountMisc;
 447 ACPI_EXTERN UINT32                      AcpiGbl_NumNodes;
 448 ACPI_EXTERN UINT32                      AcpiGbl_NumObjects;
 449 
 450 
 451 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfParseTree;
 452 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfMethodTrees;
 453 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfNodeEntries;
 454 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
 455 
 456 #endif /* ACPI_DEBUGGER */
 457 























 458 #endif /* __ACGLOBAL_H__ */
   1 /******************************************************************************
   2  *
   3  * Name: acglobal.h - Declarations for global variables
   4  *
   5  *****************************************************************************/
   6 
   7 /*
   8  * Copyright (C) 2000 - 2013, Intel Corp.
   9  * All rights reserved.
  10  *
  11  * Redistribution and use in source and binary forms, with or without
  12  * modification, are permitted provided that the following conditions
  13  * are met:
  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.
  25  *
  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.


 104 /*
 105  * Optionally use default values for the ACPI register widths. Set this to
 106  * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
 107  */
 108 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_UseDefaultRegisterWidths, TRUE);
 109 
 110 /*
 111  * Optionally enable output from the AML Debug Object.
 112  */
 113 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_EnableAmlDebugObject, FALSE);
 114 
 115 /*
 116  * Optionally copy the entire DSDT to local memory (instead of simply
 117  * mapping it.) There are some BIOSs that corrupt or replace the original
 118  * DSDT, creating the need for this option. Default is FALSE, do not copy
 119  * the DSDT.
 120  */
 121 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE);
 122 
 123 /*
 124  * Optionally ignore an XSDT if present and use the RSDT instead.
 125  * Although the ACPI specification requires that an XSDT be used instead
 126  * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
 127  * some machines. Default behavior is to use the XSDT if present.
 128  */
 129 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DoNotUseXsdt, FALSE);
 130 
 131 
 132 /*
 133  * Optionally use 32-bit FADT addresses if and when there is a conflict
 134  * (address mismatch) between the 32-bit and 64-bit versions of the
 135  * address. Although ACPICA adheres to the ACPI specification which
 136  * requires the use of the corresponding 64-bit address if it is non-zero,
 137  * some machines have been found to have a corrupted non-zero 64-bit
 138  * address. Default is FALSE, do not favor the 32-bit addresses.
 139  */
 140 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_Use32BitFadtAddresses, FALSE);
 141 
 142 /*
 143  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
 144  * with other ACPI implementations. NOTE: During ACPICA initialization,
 145  * this value is set to TRUE if any Windows OSI strings have been
 146  * requested by the BIOS.
 147  */
 148 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_TruncateIoAddresses, FALSE);
 149 
 150 /*
 151  * Disable runtime checking and repair of values returned by control methods.
 152  * Use only if the repair is causing a problem on a particular machine.
 153  */
 154 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DisableAutoRepair, FALSE);
 155 
 156 /*
 157  * Optionally do not load any SSDTs from the RSDT/XSDT during initialization.
 158  * This can be useful for debugging ACPI problems on some machines.
 159  */
 160 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_DisableSsdtTableLoad, FALSE);
 161 
 162 /*
 163  * We keep track of the latest version of Windows that has been requested by
 164  * the BIOS.
 165  */
 166 UINT8       ACPI_INIT_GLOBAL (AcpiGbl_OsiData, 0);
 167 
 168 
 169 /* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
 170 
 171 ACPI_TABLE_FADT             AcpiGbl_FADT;
 172 UINT32                      AcpiCurrentGpeCount;
 173 UINT32                      AcpiGbl_TraceFlags;
 174 ACPI_NAME                   AcpiGbl_TraceMethodName;
 175 BOOLEAN                     AcpiGbl_SystemAwakeAndRunning;
 176 
 177 /*
 178  * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
 179  * that the ACPI hardware is no longer required. A flag in the FADT indicates
 180  * a reduced HW machine, and that flag is duplicated here for convenience.
 181  */
 182 BOOLEAN                     AcpiGbl_ReducedHardware;
 183 
 184 #endif /* DEFINE_ACPI_GLOBALS */
 185 
 186 /* Do not disassemble buffers to resource descriptors */
 187 
 188 ACPI_EXTERN UINT8       ACPI_INIT_GLOBAL (AcpiGbl_NoResourceDisassembly, FALSE);
 189 
 190 /*****************************************************************************
 191  *
 192  * ACPI Table globals
 193  *
 194  ****************************************************************************/
 195 
 196 /*
 197  * AcpiGbl_RootTableList is the master list of ACPI tables that were
 198  * found in the RSDT/XSDT.
 199  */
 200 ACPI_EXTERN ACPI_TABLE_LIST             AcpiGbl_RootTableList;
 201 
 202 #if (!ACPI_REDUCED_HARDWARE)
 203 ACPI_EXTERN ACPI_TABLE_FACS            *AcpiGbl_FACS;
 204 
 205 #endif /* !ACPI_REDUCED_HARDWARE */
 206 
 207 /* These addresses are calculated from the FADT Event Block addresses */
 208 
 209 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aStatus;
 210 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1aEnable;
 211 
 212 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bStatus;
 213 ACPI_EXTERN ACPI_GENERIC_ADDRESS        AcpiGbl_XPm1bEnable;
 214 
 215 /* DSDT information. Used to check for DSDT corruption */
 216 
 217 ACPI_EXTERN ACPI_TABLE_HEADER          *AcpiGbl_DSDT;
 218 ACPI_EXTERN ACPI_TABLE_HEADER           AcpiGbl_OriginalDsdtHeader;
 219 
 220 /*
 221  * Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
 222  * determined by the revision of the DSDT: If the DSDT revision is less than
 223  * 2, use only the lower 32 bits of the internal 64-bit Integer.
 224  */
 225 ACPI_EXTERN UINT8                       AcpiGbl_IntegerBitWidth;
 226 ACPI_EXTERN UINT8                       AcpiGbl_IntegerByteWidth;
 227 ACPI_EXTERN UINT8                       AcpiGbl_IntegerNybbleWidth;
 228 
 229 
 230 /*****************************************************************************
 231  *
 232  * Mutual exclusion within ACPICA subsystem
 233  *
 234  ****************************************************************************/
 235 
 236 /*
 237  * Predefined mutex objects. This array contains the
 238  * actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
 239  * (The table maps local handles to the real OS handles)
 240  */
 241 ACPI_EXTERN ACPI_MUTEX_INFO             AcpiGbl_MutexInfo[ACPI_NUM_MUTEX];
 242 
 243 /*
 244  * Global lock mutex is an actual AML mutex object
 245  * Global lock semaphore works in conjunction with the actual global lock
 246  * Global lock spinlock is used for "pending" handshake
 247  */
 248 ACPI_EXTERN ACPI_OPERAND_OBJECT        *AcpiGbl_GlobalLockMutex;
 249 ACPI_EXTERN ACPI_SEMAPHORE              AcpiGbl_GlobalLockSemaphore;
 250 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GlobalLockPendingLock;
 251 ACPI_EXTERN UINT16                      AcpiGbl_GlobalLockHandle;
 252 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockAcquired;
 253 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPresent;
 254 ACPI_EXTERN BOOLEAN                     AcpiGbl_GlobalLockPending;
 255 
 256 /*
 257  * Spinlocks are used for interfaces that can be possibly called at
 258  * interrupt level
 259  */
 260 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_GpeLock;      /* For GPE data structs and registers */
 261 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_HardwareLock; /* For ACPI H/W except GPE registers */
 262 ACPI_EXTERN ACPI_SPINLOCK               AcpiGbl_ReferenceCountLock;
 263 
 264 /* Mutex for _OSI support */
 265 
 266 ACPI_EXTERN ACPI_MUTEX                  AcpiGbl_OsiMutex;
 267 
 268 /* Reader/Writer lock is used for namespace walk and dynamic table unload */
 269 
 270 ACPI_EXTERN ACPI_RW_LOCK                AcpiGbl_NamespaceRwLock;
 271 
 272 
 273 /*****************************************************************************
 274  *
 275  * Miscellaneous globals
 276  *
 277  ****************************************************************************/
 278 
 279 /* Object caches */
 280 
 281 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_NamespaceCache;
 282 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_StateCache;
 283 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeCache;
 284 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_PsNodeExtCache;
 285 ACPI_EXTERN ACPI_CACHE_T               *AcpiGbl_OperandCache;
 286 
 287 /* Global handlers */
 288 
 289 ACPI_EXTERN ACPI_GLOBAL_NOTIFY_HANDLER  AcpiGbl_GlobalNotify[2];

 290 ACPI_EXTERN ACPI_EXCEPTION_HANDLER      AcpiGbl_ExceptionHandler;
 291 ACPI_EXTERN ACPI_INIT_HANDLER           AcpiGbl_InitHandler;
 292 ACPI_EXTERN ACPI_TABLE_HANDLER          AcpiGbl_TableHandler;
 293 ACPI_EXTERN void                       *AcpiGbl_TableHandlerContext;
 294 ACPI_EXTERN ACPI_WALK_STATE            *AcpiGbl_BreakpointWalk;
 295 ACPI_EXTERN ACPI_INTERFACE_HANDLER      AcpiGbl_InterfaceHandler;
 296 ACPI_EXTERN ACPI_SCI_HANDLER_INFO      *AcpiGbl_SciHandlerList;
 297 
 298 /* Owner ID support */
 299 
 300 ACPI_EXTERN UINT32                      AcpiGbl_OwnerIdMask[ACPI_NUM_OWNERID_MASKS];
 301 ACPI_EXTERN UINT8                       AcpiGbl_LastOwnerIdIndex;
 302 ACPI_EXTERN UINT8                       AcpiGbl_NextOwnerIdOffset;
 303 
 304 /* Initialization sequencing */
 305 
 306 ACPI_EXTERN BOOLEAN                     AcpiGbl_RegMethodsExecuted;
 307 
 308 /* Misc */
 309 
 310 ACPI_EXTERN UINT32                      AcpiGbl_OriginalMode;
 311 ACPI_EXTERN UINT32                      AcpiGbl_RsdpOriginalLocation;
 312 ACPI_EXTERN UINT32                      AcpiGbl_NsLookupCount;
 313 ACPI_EXTERN UINT32                      AcpiGbl_PsFindCount;
 314 ACPI_EXTERN UINT16                      AcpiGbl_Pm1EnableRegisterSave;
 315 ACPI_EXTERN UINT8                       AcpiGbl_DebuggerConfiguration;
 316 ACPI_EXTERN BOOLEAN                     AcpiGbl_StepToNextCall;
 317 ACPI_EXTERN BOOLEAN                     AcpiGbl_AcpiHardwarePresent;
 318 ACPI_EXTERN BOOLEAN                     AcpiGbl_EventsInitialized;

 319 ACPI_EXTERN ACPI_INTERFACE_INFO        *AcpiGbl_SupportedInterfaces;
 320 ACPI_EXTERN ACPI_ADDRESS_RANGE         *AcpiGbl_AddressRangeList[ACPI_ADDRESS_RANGE_MAX];
 321 

 322 #ifndef DEFINE_ACPI_GLOBALS
 323 








 324 /* Other miscellaneous */
 325 
 326 extern BOOLEAN                          AcpiGbl_Shutdown;
 327 extern UINT32                           AcpiGbl_StartupFlags;
 328 extern const char                      *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
 329 extern const char                      *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
 330 extern const char                      *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
 331 extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
 332 extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
 333 #endif
 334 
 335 
 336 #ifdef ACPI_DBG_TRACK_ALLOCATIONS
 337 
 338 /* Lists for tracking memory allocations */
 339 
 340 ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_GlobalList;
 341 ACPI_EXTERN ACPI_MEMORY_LIST           *AcpiGbl_NsNodeList;
 342 ACPI_EXTERN BOOLEAN                     AcpiGbl_DisplayFinalMemStats;
 343 ACPI_EXTERN BOOLEAN                     AcpiGbl_DisableMemTracking;


 364 
 365 extern const UINT8                      AcpiGbl_NsProperties [ACPI_NUM_NS_TYPES];
 366 extern const ACPI_PREDEFINED_NAMES      AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
 367 
 368 #ifdef ACPI_DEBUG_OUTPUT
 369 ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeCount;
 370 ACPI_EXTERN UINT32                      AcpiGbl_CurrentNodeSize;
 371 ACPI_EXTERN UINT32                      AcpiGbl_MaxConcurrentNodeCount;
 372 ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_EntryStackPointer;
 373 ACPI_EXTERN ACPI_SIZE                  *AcpiGbl_LowestStackPointer;
 374 ACPI_EXTERN UINT32                      AcpiGbl_DeepestNesting;
 375 #endif
 376 
 377 
 378 /*****************************************************************************
 379  *
 380  * Interpreter globals
 381  *
 382  ****************************************************************************/
 383 

 384 ACPI_EXTERN ACPI_THREAD_STATE          *AcpiGbl_CurrentWalkList;
 385 
 386 /* Control method single step flag */
 387 
 388 ACPI_EXTERN UINT8                       AcpiGbl_CmSingleStep;
 389 
 390 
 391 /*****************************************************************************
 392  *
 393  * Hardware globals
 394  *
 395  ****************************************************************************/
 396 
 397 extern      ACPI_BIT_REGISTER_INFO      AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
 398 ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeA;
 399 ACPI_EXTERN UINT8                       AcpiGbl_SleepTypeB;
 400 
 401 
 402 /*****************************************************************************
 403  *
 404  * Event and GPE globals
 405  *
 406  ****************************************************************************/
 407 
 408 #if (!ACPI_REDUCED_HARDWARE)
 409 
 410 ACPI_EXTERN UINT8                       AcpiGbl_AllGpesInitialized;
 411 ACPI_EXTERN ACPI_GPE_XRUPT_INFO        *AcpiGbl_GpeXruptListHead;
 412 ACPI_EXTERN ACPI_GPE_BLOCK_INFO        *AcpiGbl_GpeFadtBlocks[ACPI_MAX_GPE_BLOCKS];
 413 ACPI_EXTERN ACPI_GBL_EVENT_HANDLER      AcpiGbl_GlobalEventHandler;
 414 ACPI_EXTERN void                       *AcpiGbl_GlobalEventHandlerContext;
 415 ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER    AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
 416 extern      ACPI_FIXED_EVENT_INFO       AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
 417 
 418 #endif /* !ACPI_REDUCED_HARDWARE */
 419 
 420 /*****************************************************************************
 421  *
 422  * Debug support
 423  *
 424  ****************************************************************************/
 425 
 426 /* Procedure nesting level for debug output */
 427 
 428 extern      UINT32                      AcpiGbl_NestingLevel;
 429 
 430 /* Event counters */
 431 
 432 ACPI_EXTERN UINT32                      AcpiMethodCount;
 433 ACPI_EXTERN UINT32                      AcpiGpeCount;
 434 ACPI_EXTERN UINT32                      AcpiSciCount;
 435 ACPI_EXTERN UINT32                      AcpiFixedEventCount[ACPI_NUM_FIXED_EVENTS];
 436 
 437 /* Support for dynamic control method tracing mechanism */
 438 
 439 ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLevel;
 440 ACPI_EXTERN UINT32                      AcpiGbl_OriginalDbgLayer;
 441 ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLevel;
 442 ACPI_EXTERN UINT32                      AcpiGbl_TraceDbgLayer;
 443 
 444 
 445 /*****************************************************************************
 446  *
 447  * Debugger and Disassembler globals
 448  *
 449  ****************************************************************************/
 450 
 451 ACPI_EXTERN UINT8                       AcpiGbl_DbOutputFlags;
 452 
 453 #ifdef ACPI_DISASSEMBLER
 454 
 455 ACPI_EXTERN BOOLEAN                     ACPI_INIT_GLOBAL (AcpiGbl_IgnoreNoopOperator, FALSE);
 456 
 457 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_disasm;
 458 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_verbose;
 459 ACPI_EXTERN BOOLEAN                     AcpiGbl_NumExternalMethods;
 460 ACPI_EXTERN UINT32                      AcpiGbl_ResolvedExternalMethods;
 461 ACPI_EXTERN ACPI_EXTERNAL_LIST         *AcpiGbl_ExternalList;
 462 ACPI_EXTERN ACPI_EXTERNAL_FILE         *AcpiGbl_ExternalFileList;
 463 #endif
 464 
 465 
 466 #ifdef ACPI_DEBUGGER
 467 
 468 extern      BOOLEAN                     AcpiGbl_MethodExecuting;
 469 extern      BOOLEAN                     AcpiGbl_AbortMethod;
 470 extern      BOOLEAN                     AcpiGbl_DbTerminateThreads;
 471 
 472 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_tables;
 473 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_stats;
 474 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_ini_methods;
 475 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOpt_NoRegionSupport;







 476 ACPI_EXTERN BOOLEAN                     AcpiGbl_DbOutputToFile;
 477 ACPI_EXTERN char                       *AcpiGbl_DbBuffer;
 478 ACPI_EXTERN char                       *AcpiGbl_DbFilename;
 479 ACPI_EXTERN UINT32                      AcpiGbl_DbDebugLevel;
 480 ACPI_EXTERN UINT32                      AcpiGbl_DbConsoleDebugLevel;
 481 ACPI_EXTERN ACPI_NAMESPACE_NODE        *AcpiGbl_DbScopeNode;
 482 
 483 ACPI_EXTERN char                       *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
 484 ACPI_EXTERN ACPI_OBJECT_TYPE            AcpiGbl_DbArgTypes[ACPI_DEBUGGER_MAX_ARGS];
 485 
 486 /* These buffers should all be the same size */
 487 
 488 ACPI_EXTERN char                        AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE];
 489 ACPI_EXTERN char                        AcpiGbl_DbParsedBuf[ACPI_DB_LINE_BUFFER_SIZE];
 490 ACPI_EXTERN char                        AcpiGbl_DbScopeBuf[ACPI_DB_LINE_BUFFER_SIZE];
 491 ACPI_EXTERN char                        AcpiGbl_DbDebugFilename[ACPI_DB_LINE_BUFFER_SIZE];
 492 
 493 /*
 494  * Statistic globals
 495  */
 496 ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
 497 ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
 498 ACPI_EXTERN UINT16                      AcpiGbl_ObjTypeCountMisc;
 499 ACPI_EXTERN UINT16                      AcpiGbl_NodeTypeCountMisc;
 500 ACPI_EXTERN UINT32                      AcpiGbl_NumNodes;
 501 ACPI_EXTERN UINT32                      AcpiGbl_NumObjects;
 502 
 503 
 504 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfParseTree;
 505 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfMethodTrees;
 506 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfNodeEntries;
 507 ACPI_EXTERN UINT32                      AcpiGbl_SizeOfAcpiObjects;
 508 
 509 #endif /* ACPI_DEBUGGER */
 510 
 511 
 512 /*****************************************************************************
 513  *
 514  * Application globals
 515  *
 516  ****************************************************************************/
 517 
 518 #ifdef ACPI_APPLICATION
 519 
 520 ACPI_FILE   ACPI_INIT_GLOBAL (AcpiGbl_DebugFile, NULL);
 521 
 522 #endif /* ACPI_APPLICATION */
 523 
 524 
 525 /*****************************************************************************
 526  *
 527  * Info/help support
 528  *
 529  ****************************************************************************/
 530 
 531 extern const AH_PREDEFINED_NAME     AslPredefinedInfo[];
 532 
 533 
 534 #endif /* __ACGLOBAL_H__ */