1/****************************************************************************** 2 * 3 * Module Name: utglobal - Global variables for the ACPI subsystem 4 * $Revision: 1.1.1.1 $ 5 * 6 *****************************************************************************/ 7 8/* 9 * Copyright (C) 2000, 2001 R. Byron Moore 10 * 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. 15 * 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. 20 * 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 24 */ 25 26#define DEFINE_ACPI_GLOBALS 27 28#include "acpi.h" 29#include "acevents.h" 30#include "acnamesp.h" 31#include "acinterp.h" 32#include "amlcode.h" 33 34 35#define _COMPONENT ACPI_UTILITIES 36 MODULE_NAME ("utglobal") 37 38 39/****************************************************************************** 40 * 41 * FUNCTION: Acpi_format_exception 42 * 43 * PARAMETERS: Status - The acpi_status code to be formatted 44 * 45 * RETURN: A string containing the exception text 46 * 47 * DESCRIPTION: This function translates an ACPI exception into an ASCII string. 48 * 49 ******************************************************************************/ 50 51const char * 52acpi_format_exception ( 53 acpi_status status) 54{ 55 const char *exception = "UNKNOWN_STATUS_CODE"; 56 acpi_status sub_status; 57 58 59 sub_status = (status & ~AE_CODE_MASK); 60 61 62 switch (status & AE_CODE_MASK) { 63 case AE_CODE_ENVIRONMENTAL: 64 65 if (sub_status <= AE_CODE_ENV_MAX) { 66 exception = acpi_gbl_exception_names_env [sub_status]; 67 } 68 break; 69 70 case AE_CODE_PROGRAMMER: 71 72 if (sub_status <= AE_CODE_PGM_MAX) { 73 exception = acpi_gbl_exception_names_pgm [sub_status -1]; 74 } 75 break; 76 77 case AE_CODE_ACPI_TABLES: 78 79 if (sub_status <= AE_CODE_TBL_MAX) { 80 exception = acpi_gbl_exception_names_tbl [sub_status -1]; 81 } 82 break; 83 84 case AE_CODE_AML: 85 86 if (sub_status <= AE_CODE_AML_MAX) { 87 exception = acpi_gbl_exception_names_aml [sub_status -1]; 88 } 89 break; 90 91 case AE_CODE_CONTROL: 92 93 if (sub_status <= AE_CODE_CTRL_MAX) { 94 exception = acpi_gbl_exception_names_ctrl [sub_status -1]; 95 } 96 break; 97 98 default: 99 break; 100 } 101 102 103 return ((const char *) exception); 104} 105 106 107/****************************************************************************** 108 * 109 * Static global variable initialization. 110 * 111 ******************************************************************************/ 112 113/* 114 * We want the debug switches statically initialized so they 115 * are already set when the debugger is entered. 116 */ 117 118/* Debug switch - level and trace mask */ 119 120#ifdef ACPI_DEBUG 121u32 acpi_dbg_level = DEBUG_DEFAULT; 122#else 123u32 acpi_dbg_level = NORMAL_DEFAULT; 124#endif 125 126/* Debug switch - layer (component) mask */ 127 128u32 acpi_dbg_layer = ACPI_COMPONENT_DEFAULT; 129u32 acpi_gbl_nesting_level = 0; 130 131 132/* Debugger globals */ 133 134u8 acpi_gbl_db_terminate_threads = FALSE; 135u8 acpi_gbl_method_executing = FALSE; 136 137/* System flags */ 138 139u32 acpi_gbl_system_flags = 0; 140u32 acpi_gbl_startup_flags = 0; 141 142/* System starts unitialized! */ 143 144u8 acpi_gbl_shutdown = TRUE; 145 146const u8 acpi_gbl_decode_to8bit [8] = {1,2,4,8,16,32,64,128}; 147 148const NATIVE_CHAR *acpi_gbl_db_sleep_states[ACPI_NUM_SLEEP_STATES] = { 149 "\\_S0_","\\_S1_","\\_S2_","\\_S3_", 150 "\\_S4_","\\_S5_","\\_S4B"}; 151 152 153/****************************************************************************** 154 * 155 * Namespace globals 156 * 157 ******************************************************************************/ 158 159 160/* 161 * Names built-in to the interpreter 162 * 163 * Initial values are currently supported only for types String and Number. 164 * To avoid type punning, both are specified as strings in this table. 165 * 166 * NOTES: 167 * 1) _SB_ is defined to be a device to allow _SB_/_INI to be run 168 * during the initialization sequence. 169 */ 170 171const predefined_names acpi_gbl_pre_defined_names[] = 172{ {"_GPE", INTERNAL_TYPE_DEF_ANY}, 173 {"_PR_", INTERNAL_TYPE_DEF_ANY}, 174 {"_SB_", ACPI_TYPE_DEVICE}, 175 {"_SI_", INTERNAL_TYPE_DEF_ANY}, 176 {"_TZ_", INTERNAL_TYPE_DEF_ANY}, 177 {"_REV", ACPI_TYPE_INTEGER, "2"}, 178 {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, 179 {"_GL_", ACPI_TYPE_MUTEX, "0"}, 180 {NULL, ACPI_TYPE_ANY} /* Table terminator */ 181}; 182 183 184/* 185 * Properties of the ACPI Object Types, both internal and external. 186 * 187 * Elements of Acpi_ns_properties are bit significant 188 * and the table is indexed by values of acpi_object_type 189 */ 190 191const u8 acpi_gbl_ns_properties[] = 192{ 193 NSP_NORMAL, /* 00 Any */ 194 NSP_NORMAL, /* 01 Number */ 195 NSP_NORMAL, /* 02 String */ 196 NSP_NORMAL, /* 03 Buffer */ 197 NSP_LOCAL, /* 04 Package */ 198 NSP_NORMAL, /* 05 Field_unit */ 199 NSP_NEWSCOPE | NSP_LOCAL, /* 06 Device */ 200 NSP_LOCAL, /* 07 Acpi_event */ 201 NSP_NEWSCOPE | NSP_LOCAL, /* 08 Method */ 202 NSP_LOCAL, /* 09 Mutex */ 203 NSP_LOCAL, /* 10 Region */ 204 NSP_NEWSCOPE | NSP_LOCAL, /* 11 Power */ 205 NSP_NEWSCOPE | NSP_LOCAL, /* 12 Processor */ 206 NSP_NEWSCOPE | NSP_LOCAL, /* 13 Thermal */ 207 NSP_NORMAL, /* 14 Buffer_field */ 208 NSP_NORMAL, /* 15 Ddb_handle */ 209 NSP_NORMAL, /* 16 Debug Object */ 210 NSP_NORMAL, /* 17 Def_field */ 211 NSP_NORMAL, /* 18 Bank_field */ 212 NSP_NORMAL, /* 19 Index_field */ 213 NSP_NORMAL, /* 20 Reference */ 214 NSP_NORMAL, /* 21 Alias */ 215 NSP_NORMAL, /* 22 Notify */ 216 NSP_NORMAL, /* 23 Address Handler */ 217 NSP_NEWSCOPE | NSP_LOCAL, /* 24 Resource Desc */ 218 NSP_NEWSCOPE | NSP_LOCAL, /* 25 Resource Field */ 219 NSP_NORMAL, /* 26 Def_field_defn */ 220 NSP_NORMAL, /* 27 Bank_field_defn */ 221 NSP_NORMAL, /* 28 Index_field_defn */ 222 NSP_NORMAL, /* 29 If */ 223 NSP_NORMAL, /* 30 Else */ 224 NSP_NORMAL, /* 31 While */ 225 NSP_NEWSCOPE, /* 32 Scope */ 226 NSP_LOCAL, /* 33 Def_any */ 227 NSP_NORMAL, /* 34 Extra */ 228 NSP_NORMAL /* 35 Invalid */ 229}; 230 231 232/* Hex to ASCII conversion table */ 233 234const NATIVE_CHAR acpi_gbl_hex_to_ascii[] = 235 {'0','1','2','3','4','5','6','7', 236 '8','9','A','B','C','D','E','F'}; 237 238/***************************************************************************** 239 * 240 * FUNCTION: Acpi_ut_hex_to_ascii_char 241 * 242 * PARAMETERS: Integer - Contains the hex digit 243 * Position - bit position of the digit within the 244 * integer 245 * 246 * RETURN: Ascii character 247 * 248 * DESCRIPTION: Convert a hex digit to an ascii character 249 * 250 ****************************************************************************/ 251 252u8 253acpi_ut_hex_to_ascii_char ( 254 acpi_integer integer, 255 u32 position) 256{ 257 258 return (acpi_gbl_hex_to_ascii[(integer >> position) & 0xF]); 259} 260 261 262/****************************************************************************** 263 * 264 * Table globals 265 * 266 * NOTE: This table includes ONLY the ACPI tables that the subsystem consumes. 267 * it is NOT an exhaustive list of all possible ACPI tables. All ACPI tables 268 * that are not used by the subsystem are simply ignored. 269 * 270 ******************************************************************************/ 271 272 273acpi_table_desc acpi_gbl_acpi_tables[NUM_ACPI_TABLES]; 274 275 276ACPI_TABLE_SUPPORT acpi_gbl_acpi_table_data[NUM_ACPI_TABLES] = 277{ 278 /*********** Name, Signature, Signature size, How many allowed?, Supported? Global typed pointer */ 279 280 /* RSDP 0 */ {RSDP_NAME, RSDP_SIG, sizeof (RSDP_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL}, 281 /* DSDT 1 */ {DSDT_SIG, DSDT_SIG, sizeof (DSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &acpi_gbl_DSDT}, 282 /* FADT 2 */ {FADT_SIG, FADT_SIG, sizeof (FADT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &acpi_gbl_FADT}, 283 /* FACS 3 */ {FACS_SIG, FACS_SIG, sizeof (FACS_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, (void **) &acpi_gbl_FACS}, 284 /* PSDT 4 */ {PSDT_SIG, PSDT_SIG, sizeof (PSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL}, 285 /* SSDT 5 */ {SSDT_SIG, SSDT_SIG, sizeof (SSDT_SIG)-1, ACPI_TABLE_MULTIPLE, AE_OK, NULL}, 286 /* XSDT 6 */ {XSDT_SIG, XSDT_SIG, sizeof (RSDT_SIG)-1, ACPI_TABLE_SINGLE, AE_OK, NULL}, 287}; 288 289 290#ifdef ACPI_DEBUG 291 292/* 293 * Strings and procedures used for debug only 294 * 295 */ 296 297 298/***************************************************************************** 299 * 300 * FUNCTION: Acpi_ut_get_mutex_name 301 * 302 * PARAMETERS: None. 303 * 304 * RETURN: Status 305 * 306 * DESCRIPTION: Translate a mutex ID into a name string (Debug only) 307 * 308 ****************************************************************************/ 309 310NATIVE_CHAR * 311acpi_ut_get_mutex_name ( 312 u32 mutex_id) 313{ 314 315 if (mutex_id > MAX_MTX) 316 { 317 return ("Invalid Mutex ID"); 318 } 319 320 return (acpi_gbl_mutex_names[mutex_id]); 321} 322 323 324/* 325 * Elements of Acpi_gbl_Ns_type_names below must match 326 * one-to-one with values of acpi_object_type 327 * 328 * The type ACPI_TYPE_ANY (Untyped) is used as a "don't care" when searching; when 329 * stored in a table it really means that we have thus far seen no evidence to 330 * indicatewhat type is actually going to be stored for this entry. 331 */ 332 333static const NATIVE_CHAR acpi_gbl_bad_type[] = "UNDEFINED"; 334#define TYPE_NAME_LENGTH 12 /* Maximum length of each string */ 335 336static const NATIVE_CHAR *acpi_gbl_ns_type_names[] = /* printable names of ACPI types */ 337{ 338 /* 00 */ "Untyped", 339 /* 01 */ "Integer", 340 /* 02 */ "String", 341 /* 03 */ "Buffer", 342 /* 04 */ "Package", 343 /* 05 */ "Field_unit", 344 /* 06 */ "Device", 345 /* 07 */ "Event", 346 /* 08 */ "Method", 347 /* 09 */ "Mutex", 348 /* 10 */ "Region", 349 /* 11 */ "Power", 350 /* 12 */ "Processor", 351 /* 13 */ "Thermal", 352 /* 14 */ "Buffer_field", 353 /* 15 */ "Ddb_handle", 354 /* 16 */ "Debug_object", 355 /* 17 */ "Region_field", 356 /* 18 */ "Bank_field", 357 /* 19 */ "Index_field", 358 /* 20 */ "Reference", 359 /* 21 */ "Alias", 360 /* 22 */ "Notify", 361 /* 23 */ "Addr_handler", 362 /* 24 */ "Resource_desc", 363 /* 25 */ "Resource_fld", 364 /* 26 */ "Region_fld_dfn", 365 /* 27 */ "Bank_fld_dfn", 366 /* 28 */ "Index_fld_dfn", 367 /* 29 */ "If", 368 /* 30 */ "Else", 369 /* 31 */ "While", 370 /* 32 */ "Scope", 371 /* 33 */ "Def_any", 372 /* 34 */ "Extra", 373 /* 35 */ "Invalid" 374}; 375 376 377/***************************************************************************** 378 * 379 * FUNCTION: Acpi_ut_get_type_name 380 * 381 * PARAMETERS: None. 382 * 383 * RETURN: Status 384 * 385 * DESCRIPTION: Translate a Type ID into a name string (Debug only) 386 * 387 ****************************************************************************/ 388 389NATIVE_CHAR * 390acpi_ut_get_type_name ( 391 u32 type) 392{ 393 394 if (type > INTERNAL_TYPE_INVALID) 395 { 396 return ((NATIVE_CHAR *) acpi_gbl_bad_type); 397 } 398 399 return ((NATIVE_CHAR *) acpi_gbl_ns_type_names[type]); 400} 401 402 403/* Region type decoding */ 404 405const NATIVE_CHAR *acpi_gbl_region_types[NUM_REGION_TYPES] = 406{ 407 "System_memory", 408 "System_iO", 409 "PCIConfig", 410 "Embedded_control", 411 "SMBus", 412 "CMOS", 413 "PCIBar_target", 414}; 415 416 417/***************************************************************************** 418 * 419 * FUNCTION: Acpi_ut_get_region_name 420 * 421 * PARAMETERS: None. 422 * 423 * RETURN: Status 424 * 425 * DESCRIPTION: Translate a Space ID into a name string (Debug only) 426 * 427 ****************************************************************************/ 428 429NATIVE_CHAR * 430acpi_ut_get_region_name ( 431 u8 space_id) 432{ 433 434 if (space_id >= USER_REGION_BEGIN) 435 { 436 return ("User_defined_region"); 437 } 438 439 else if (space_id >= NUM_REGION_TYPES) 440 { 441 return ("Invalid_space_iD"); 442 } 443 444 return ((NATIVE_CHAR *) acpi_gbl_region_types[space_id]); 445} 446 447 448/* Data used in keeping track of fields */ 449 450const NATIVE_CHAR *acpi_gbl_FEnames[NUM_FIELD_NAMES] = 451{ 452 "skip", 453 "?access?" 454}; /* FE = Field Element */ 455 456 457const NATIVE_CHAR *acpi_gbl_match_ops[NUM_MATCH_OPS] = 458{ 459 "Error", 460 "MTR", 461 "MEQ", 462 "MLE", 463 "MLT", 464 "MGE", 465 "MGT" 466}; 467 468 469/* Access type decoding */ 470 471const NATIVE_CHAR *acpi_gbl_access_types[NUM_ACCESS_TYPES] = 472{ 473 "Any_acc", 474 "Byte_acc", 475 "Word_acc", 476 "DWord_acc", 477 "Block_acc", 478 "SMBSend_recv_acc", 479 "SMBQuick_acc" 480}; 481 482 483/* Update rule decoding */ 484 485const NATIVE_CHAR *acpi_gbl_update_rules[NUM_UPDATE_RULES] = 486{ 487 "Preserve", 488 "Write_as_ones", 489 "Write_as_zeros" 490}; 491 492#endif 493 494 495/***************************************************************************** 496 * 497 * FUNCTION: Acpi_ut_valid_object_type 498 * 499 * PARAMETERS: None. 500 * 501 * RETURN: TRUE if valid object type 502 * 503 * DESCRIPTION: Validate an object type 504 * 505 ****************************************************************************/ 506 507u8 508acpi_ut_valid_object_type ( 509 u32 type) 510{ 511 512 if (type > ACPI_TYPE_MAX) 513 { 514 if ((type < INTERNAL_TYPE_BEGIN) || 515 (type > INTERNAL_TYPE_MAX)) 516 { 517 return (FALSE); 518 } 519 } 520 521 return (TRUE); 522} 523 524 525/**************************************************************************** 526 * 527 * FUNCTION: Acpi_ut_allocate_owner_id 528 * 529 * PARAMETERS: Id_type - Type of ID (method or table) 530 * 531 * DESCRIPTION: Allocate a table or method owner id 532 * 533 ***************************************************************************/ 534 535acpi_owner_id 536acpi_ut_allocate_owner_id ( 537 u32 id_type) 538{ 539 acpi_owner_id owner_id = 0xFFFF; 540 541 542 FUNCTION_TRACE ("Ut_allocate_owner_id"); 543 544 545 acpi_ut_acquire_mutex (ACPI_MTX_CACHES); 546 547 switch (id_type) 548 { 549 case OWNER_TYPE_TABLE: 550 551 owner_id = acpi_gbl_next_table_owner_id; 552 acpi_gbl_next_table_owner_id++; 553 554 if (acpi_gbl_next_table_owner_id == FIRST_METHOD_ID) 555 { 556 acpi_gbl_next_table_owner_id = FIRST_TABLE_ID; 557 } 558 break; 559 560 561 case OWNER_TYPE_METHOD: 562 563 owner_id = acpi_gbl_next_method_owner_id; 564 acpi_gbl_next_method_owner_id++; 565 566 if (acpi_gbl_next_method_owner_id == FIRST_TABLE_ID) 567 { 568 acpi_gbl_next_method_owner_id = FIRST_METHOD_ID; 569 } 570 break; 571 } 572 573 574 acpi_ut_release_mutex (ACPI_MTX_CACHES); 575 576 return_VALUE (owner_id); 577} 578 579 580/**************************************************************************** 581 * 582 * FUNCTION: Acpi_ut_init_globals 583 * 584 * PARAMETERS: none 585 * 586 * DESCRIPTION: Init library globals. All globals that require specific 587 * initialization should be initialized here! 588 * 589 ***************************************************************************/ 590 591void 592acpi_ut_init_globals ( 593 void) 594{ 595 u32 i; 596 597 598 FUNCTION_TRACE ("Ut_init_globals"); 599 600 /* Memory allocation and cache lists */ 601 602 MEMSET (acpi_gbl_memory_lists, 0, sizeof (ACPI_MEMORY_LIST) * ACPI_NUM_MEM_LISTS); 603 604 acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].link_offset = (u16) (NATIVE_UINT) &(((acpi_generic_state *) NULL)->common.next); 605 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].link_offset = (u16) (NATIVE_UINT) &(((acpi_parse_object *) NULL)->next); 606 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].link_offset = (u16) (NATIVE_UINT) &(((acpi_parse2_object *) NULL)->next); 607 acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].link_offset = (u16) (NATIVE_UINT) &(((acpi_operand_object *) NULL)->cache.next); 608 acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].link_offset = (u16) (NATIVE_UINT) &(((acpi_walk_state *) NULL)->next); 609 610 acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].object_size = sizeof (acpi_namespace_node); 611 acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].object_size = sizeof (acpi_generic_state); 612 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].object_size = sizeof (acpi_parse_object); 613 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].object_size = sizeof (acpi_parse2_object); 614 acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].object_size = sizeof (acpi_operand_object); 615 acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].object_size = sizeof (acpi_walk_state); 616 617 acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].max_cache_depth = MAX_STATE_CACHE_DEPTH; 618 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].max_cache_depth = MAX_PARSE_CACHE_DEPTH; 619 acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].max_cache_depth = MAX_EXTPARSE_CACHE_DEPTH; 620 acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].max_cache_depth = MAX_OBJECT_CACHE_DEPTH; 621 acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].max_cache_depth = MAX_WALK_CACHE_DEPTH; 622 623 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_GLOBAL].list_name = "Global Memory Allocation"); 624 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_NSNODE].list_name = "Namespace Nodes"); 625 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_STATE].list_name = "State Object Cache"); 626 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE].list_name = "Parse Node Cache"); 627 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_PSNODE_EXT].list_name = "Extended Parse Node Cache"); 628 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_OPERAND].list_name = "Operand Object Cache"); 629 ACPI_MEM_TRACKING (acpi_gbl_memory_lists[ACPI_MEM_LIST_WALK].list_name = "Tree Walk Node Cache"); 630 631 /* ACPI table structure */ 632 633 for (i = 0; i < NUM_ACPI_TABLES; i++) 634 { 635 acpi_gbl_acpi_tables[i].prev = &acpi_gbl_acpi_tables[i]; 636 acpi_gbl_acpi_tables[i].next = &acpi_gbl_acpi_tables[i]; 637 acpi_gbl_acpi_tables[i].pointer = NULL; 638 acpi_gbl_acpi_tables[i].length = 0; 639 acpi_gbl_acpi_tables[i].allocation = ACPI_MEM_NOT_ALLOCATED; 640 acpi_gbl_acpi_tables[i].count = 0; 641 } 642 643 644 /* Address Space handler array */ 645 646 for (i = 0; i < ACPI_NUM_ADDRESS_SPACES; i++) 647 { 648 acpi_gbl_address_spaces[i].handler = NULL; 649 acpi_gbl_address_spaces[i].context = NULL; 650 } 651 652 /* Mutex locked flags */ 653 654 for (i = 0; i < NUM_MTX; i++) 655 { 656 acpi_gbl_acpi_mutex_info[i].mutex = NULL; 657 acpi_gbl_acpi_mutex_info[i].owner_id = ACPI_MUTEX_NOT_ACQUIRED; 658 acpi_gbl_acpi_mutex_info[i].use_count = 0; 659 } 660 661 /* Global notify handlers */ 662 663 acpi_gbl_sys_notify.handler = NULL; 664 acpi_gbl_drv_notify.handler = NULL; 665 666 /* Global "typed" ACPI table pointers */ 667 668 acpi_gbl_RSDP = NULL; 669 acpi_gbl_XSDT = NULL; 670 acpi_gbl_FACS = NULL; 671 acpi_gbl_FADT = NULL; 672 acpi_gbl_DSDT = NULL; 673 674 /* Global Lock support */ 675 676 acpi_gbl_global_lock_acquired = FALSE; 677 acpi_gbl_global_lock_thread_count = 0; 678 679 /* Miscellaneous variables */ 680 681 acpi_gbl_system_flags = 0; 682 acpi_gbl_startup_flags = 0; 683 acpi_gbl_rsdp_original_location = 0; 684 acpi_gbl_cm_single_step = FALSE; 685 acpi_gbl_db_terminate_threads = FALSE; 686 acpi_gbl_shutdown = FALSE; 687 acpi_gbl_ns_lookup_count = 0; 688 acpi_gbl_ps_find_count = 0; 689 acpi_gbl_acpi_hardware_present = TRUE; 690 acpi_gbl_next_table_owner_id = FIRST_TABLE_ID; 691 acpi_gbl_next_method_owner_id = FIRST_METHOD_ID; 692 acpi_gbl_debugger_configuration = DEBUGGER_THREADING; 693 694 /* Hardware oriented */ 695 696 acpi_gbl_gpe0enable_register_save = NULL; 697 acpi_gbl_gpe1_enable_register_save = NULL; 698 acpi_gbl_original_mode = SYS_MODE_UNKNOWN; /* original ACPI/legacy mode */ 699 acpi_gbl_gpe_registers = NULL; 700 acpi_gbl_gpe_info = NULL; 701 702 /* Namespace */ 703 704 acpi_gbl_root_node = NULL; 705 706 acpi_gbl_root_node_struct.name = ACPI_ROOT_NAME; 707 acpi_gbl_root_node_struct.data_type = ACPI_DESC_TYPE_NAMED; 708 acpi_gbl_root_node_struct.type = ACPI_TYPE_ANY; 709 acpi_gbl_root_node_struct.child = NULL; 710 acpi_gbl_root_node_struct.peer = NULL; 711 acpi_gbl_root_node_struct.object = NULL; 712 acpi_gbl_root_node_struct.flags = ANOBJ_END_OF_PEER_LIST; 713 714 715#ifdef ACPI_DEBUG 716 acpi_gbl_lowest_stack_pointer = ACPI_UINT32_MAX; 717#endif 718 719 return_VOID; 720} 721 722 723