evmisc.c revision 151937
1/****************************************************************************** 2 * 3 * Module Name: evmisc - Miscellaneous event manager support functions 4 * $Revision: 1.86 $ 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 12 * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117#include <contrib/dev/acpica/acpi.h> 118#include <contrib/dev/acpica/acevents.h> 119#include <contrib/dev/acpica/acnamesp.h> 120#include <contrib/dev/acpica/acinterp.h> 121 122#define _COMPONENT ACPI_EVENTS 123 ACPI_MODULE_NAME ("evmisc") 124 125 126#ifdef ACPI_DEBUG_OUTPUT 127static const char *AcpiNotifyValueNames[] = 128{ 129 "Bus Check", 130 "Device Check", 131 "Device Wake", 132 "Eject request", 133 "Device Check Light", 134 "Frequency Mismatch", 135 "Bus Mode Mismatch", 136 "Power Fault" 137}; 138#endif 139 140/* Local prototypes */ 141 142static void ACPI_SYSTEM_XFACE 143AcpiEvNotifyDispatch ( 144 void *Context); 145 146static void ACPI_SYSTEM_XFACE 147AcpiEvGlobalLockThread ( 148 void *Context); 149 150static UINT32 151AcpiEvGlobalLockHandler ( 152 void *Context); 153 154 155/******************************************************************************* 156 * 157 * FUNCTION: AcpiEvIsNotifyObject 158 * 159 * PARAMETERS: Node - Node to check 160 * 161 * RETURN: TRUE if notifies allowed on this object 162 * 163 * DESCRIPTION: Check type of node for a object that supports notifies. 164 * 165 * TBD: This could be replaced by a flag bit in the node. 166 * 167 ******************************************************************************/ 168 169BOOLEAN 170AcpiEvIsNotifyObject ( 171 ACPI_NAMESPACE_NODE *Node) 172{ 173 switch (Node->Type) 174 { 175 case ACPI_TYPE_DEVICE: 176 case ACPI_TYPE_PROCESSOR: 177 case ACPI_TYPE_POWER: 178 case ACPI_TYPE_THERMAL: 179 /* 180 * These are the ONLY objects that can receive ACPI notifications 181 */ 182 return (TRUE); 183 184 default: 185 return (FALSE); 186 } 187} 188 189 190/******************************************************************************* 191 * 192 * FUNCTION: AcpiEvQueueNotifyRequest 193 * 194 * PARAMETERS: Node - NS node for the notified object 195 * NotifyValue - Value from the Notify() request 196 * 197 * RETURN: Status 198 * 199 * DESCRIPTION: Dispatch a device notification event to a previously 200 * installed handler. 201 * 202 ******************************************************************************/ 203 204ACPI_STATUS 205AcpiEvQueueNotifyRequest ( 206 ACPI_NAMESPACE_NODE *Node, 207 UINT32 NotifyValue) 208{ 209 ACPI_OPERAND_OBJECT *ObjDesc; 210 ACPI_OPERAND_OBJECT *HandlerObj = NULL; 211 ACPI_GENERIC_STATE *NotifyInfo; 212 ACPI_STATUS Status = AE_OK; 213 214 215 ACPI_FUNCTION_NAME ("EvQueueNotifyRequest"); 216 217 218 /* 219 * For value 3 (Ejection Request), some device method may need to be run. 220 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need 221 * to be run. 222 * For value 0x80 (Status Change) on the power button or sleep button, 223 * initiate soft-off or sleep operation? 224 */ 225 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 226 "Dispatching Notify(%X) on node %p\n", NotifyValue, Node)); 227 228 if (NotifyValue <= 7) 229 { 230 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: %s\n", 231 AcpiNotifyValueNames[NotifyValue])); 232 } 233 else 234 { 235 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 236 "Notify value: 0x%2.2X **Device Specific**\n", 237 NotifyValue)); 238 } 239 240 /* Get the notify object attached to the NS Node */ 241 242 ObjDesc = AcpiNsGetAttachedObject (Node); 243 if (ObjDesc) 244 { 245 /* We have the notify object, Get the right handler */ 246 247 switch (Node->Type) 248 { 249 case ACPI_TYPE_DEVICE: 250 case ACPI_TYPE_THERMAL: 251 case ACPI_TYPE_PROCESSOR: 252 case ACPI_TYPE_POWER: 253 254 if (NotifyValue <= ACPI_MAX_SYS_NOTIFY) 255 { 256 HandlerObj = ObjDesc->CommonNotify.SystemNotify; 257 } 258 else 259 { 260 HandlerObj = ObjDesc->CommonNotify.DeviceNotify; 261 } 262 break; 263 264 default: 265 /* All other types are not supported */ 266 return (AE_TYPE); 267 } 268 } 269 270 /* If there is any handler to run, schedule the dispatcher */ 271 272 if ((AcpiGbl_SystemNotify.Handler && (NotifyValue <= ACPI_MAX_SYS_NOTIFY)) || 273 (AcpiGbl_DeviceNotify.Handler && (NotifyValue > ACPI_MAX_SYS_NOTIFY)) || 274 HandlerObj) 275 { 276 NotifyInfo = AcpiUtCreateGenericState (); 277 if (!NotifyInfo) 278 { 279 return (AE_NO_MEMORY); 280 } 281 282 NotifyInfo->Common.DataType = ACPI_DESC_TYPE_STATE_NOTIFY; 283 NotifyInfo->Notify.Node = Node; 284 NotifyInfo->Notify.Value = (UINT16) NotifyValue; 285 NotifyInfo->Notify.HandlerObj = HandlerObj; 286 287 Status = AcpiOsQueueForExecution (OSD_PRIORITY_HIGH, 288 AcpiEvNotifyDispatch, NotifyInfo); 289 if (ACPI_FAILURE (Status)) 290 { 291 AcpiUtDeleteGenericState (NotifyInfo); 292 } 293 } 294 295 if (!HandlerObj) 296 { 297 /* 298 * There is no per-device notify handler for this device. 299 * This may or may not be a problem. 300 */ 301 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, 302 "No notify handler for Notify(%4.4s, %X) node %p\n", 303 AcpiUtGetNodeName (Node), NotifyValue, Node)); 304 } 305 306 return (Status); 307} 308 309 310/******************************************************************************* 311 * 312 * FUNCTION: AcpiEvNotifyDispatch 313 * 314 * PARAMETERS: Context - To be passed to the notify handler 315 * 316 * RETURN: None. 317 * 318 * DESCRIPTION: Dispatch a device notification event to a previously 319 * installed handler. 320 * 321 ******************************************************************************/ 322 323static void ACPI_SYSTEM_XFACE 324AcpiEvNotifyDispatch ( 325 void *Context) 326{ 327 ACPI_GENERIC_STATE *NotifyInfo = (ACPI_GENERIC_STATE *) Context; 328 ACPI_NOTIFY_HANDLER GlobalHandler = NULL; 329 void *GlobalContext = NULL; 330 ACPI_OPERAND_OBJECT *HandlerObj; 331 332 333 ACPI_FUNCTION_ENTRY (); 334 335 336 /* 337 * We will invoke a global notify handler if installed. 338 * This is done _before_ we invoke the per-device handler attached 339 * to the device. 340 */ 341 if (NotifyInfo->Notify.Value <= ACPI_MAX_SYS_NOTIFY) 342 { 343 /* Global system notification handler */ 344 345 if (AcpiGbl_SystemNotify.Handler) 346 { 347 GlobalHandler = AcpiGbl_SystemNotify.Handler; 348 GlobalContext = AcpiGbl_SystemNotify.Context; 349 } 350 } 351 else 352 { 353 /* Global driver notification handler */ 354 355 if (AcpiGbl_DeviceNotify.Handler) 356 { 357 GlobalHandler = AcpiGbl_DeviceNotify.Handler; 358 GlobalContext = AcpiGbl_DeviceNotify.Context; 359 } 360 } 361 362 /* Invoke the system handler first, if present */ 363 364 if (GlobalHandler) 365 { 366 GlobalHandler (NotifyInfo->Notify.Node, NotifyInfo->Notify.Value, 367 GlobalContext); 368 } 369 370 /* Now invoke the per-device handler, if present */ 371 372 HandlerObj = NotifyInfo->Notify.HandlerObj; 373 if (HandlerObj) 374 { 375 HandlerObj->Notify.Handler (NotifyInfo->Notify.Node, 376 NotifyInfo->Notify.Value, 377 HandlerObj->Notify.Context); 378 } 379 380 /* All done with the info object */ 381 382 AcpiUtDeleteGenericState (NotifyInfo); 383} 384 385 386/******************************************************************************* 387 * 388 * FUNCTION: AcpiEvGlobalLockThread 389 * 390 * PARAMETERS: Context - From thread interface, not used 391 * 392 * RETURN: None 393 * 394 * DESCRIPTION: Invoked by SCI interrupt handler upon acquisition of the 395 * Global Lock. Simply signal all threads that are waiting 396 * for the lock. 397 * 398 ******************************************************************************/ 399 400static void ACPI_SYSTEM_XFACE 401AcpiEvGlobalLockThread ( 402 void *Context) 403{ 404 ACPI_STATUS Status; 405 406 407 /* Signal threads that are waiting for the lock */ 408 409 if (AcpiGbl_GlobalLockThreadCount) 410 { 411 /* Send sufficient units to the semaphore */ 412 413 Status = AcpiOsSignalSemaphore (AcpiGbl_GlobalLockSemaphore, 414 AcpiGbl_GlobalLockThreadCount); 415 if (ACPI_FAILURE (Status)) 416 { 417 ACPI_REPORT_ERROR (("Could not signal Global Lock semaphore\n")); 418 } 419 } 420} 421 422 423/******************************************************************************* 424 * 425 * FUNCTION: AcpiEvGlobalLockHandler 426 * 427 * PARAMETERS: Context - From thread interface, not used 428 * 429 * RETURN: ACPI_INTERRUPT_HANDLED or ACPI_INTERRUPT_NOT_HANDLED 430 * 431 * DESCRIPTION: Invoked directly from the SCI handler when a global lock 432 * release interrupt occurs. Grab the global lock and queue 433 * the global lock thread for execution 434 * 435 ******************************************************************************/ 436 437static UINT32 438AcpiEvGlobalLockHandler ( 439 void *Context) 440{ 441 BOOLEAN Acquired = FALSE; 442 ACPI_STATUS Status; 443 444 445 /* 446 * Attempt to get the lock 447 * If we don't get it now, it will be marked pending and we will 448 * take another interrupt when it becomes free. 449 */ 450 ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Acquired); 451 if (Acquired) 452 { 453 /* Got the lock, now wake all threads waiting for it */ 454 455 AcpiGbl_GlobalLockAcquired = TRUE; 456 457 /* Run the Global Lock thread which will signal all waiting threads */ 458 459 Status = AcpiOsQueueForExecution (OSD_PRIORITY_HIGH, 460 AcpiEvGlobalLockThread, Context); 461 if (ACPI_FAILURE (Status)) 462 { 463 ACPI_REPORT_ERROR (("Could not queue Global Lock thread, %s\n", 464 AcpiFormatException (Status))); 465 466 return (ACPI_INTERRUPT_NOT_HANDLED); 467 } 468 } 469 470 return (ACPI_INTERRUPT_HANDLED); 471} 472 473 474/******************************************************************************* 475 * 476 * FUNCTION: AcpiEvInitGlobalLockHandler 477 * 478 * PARAMETERS: None 479 * 480 * RETURN: Status 481 * 482 * DESCRIPTION: Install a handler for the global lock release event 483 * 484 ******************************************************************************/ 485 486ACPI_STATUS 487AcpiEvInitGlobalLockHandler ( 488 void) 489{ 490 ACPI_STATUS Status; 491 492 493 ACPI_FUNCTION_TRACE ("EvInitGlobalLockHandler"); 494 495 496 AcpiGbl_GlobalLockPresent = TRUE; 497 Status = AcpiInstallFixedEventHandler (ACPI_EVENT_GLOBAL, 498 AcpiEvGlobalLockHandler, NULL); 499 500 /* 501 * If the global lock does not exist on this platform, the attempt 502 * to enable GBL_STATUS will fail (the GBL_ENABLE bit will not stick) 503 * Map to AE_OK, but mark global lock as not present. 504 * Any attempt to actually use the global lock will be flagged 505 * with an error. 506 */ 507 if (Status == AE_NO_HARDWARE_RESPONSE) 508 { 509 ACPI_REPORT_ERROR (( 510 "No response from Global Lock hardware, disabling lock\n")); 511 512 AcpiGbl_GlobalLockPresent = FALSE; 513 Status = AE_OK; 514 } 515 516 return_ACPI_STATUS (Status); 517} 518 519 520/****************************************************************************** 521 * 522 * FUNCTION: AcpiEvAcquireGlobalLock 523 * 524 * PARAMETERS: Timeout - Max time to wait for the lock, in millisec. 525 * 526 * RETURN: Status 527 * 528 * DESCRIPTION: Attempt to gain ownership of the Global Lock. 529 * 530 *****************************************************************************/ 531 532ACPI_STATUS 533AcpiEvAcquireGlobalLock ( 534 UINT16 Timeout) 535{ 536 ACPI_STATUS Status = AE_OK; 537 BOOLEAN Acquired = FALSE; 538 539 540 ACPI_FUNCTION_TRACE ("EvAcquireGlobalLock"); 541 542 543#ifndef ACPI_APPLICATION 544 /* Make sure that we actually have a global lock */ 545 546 if (!AcpiGbl_GlobalLockPresent) 547 { 548 return_ACPI_STATUS (AE_NO_GLOBAL_LOCK); 549 } 550#endif 551 552 /* One more thread wants the global lock */ 553 554 AcpiGbl_GlobalLockThreadCount++; 555 556 /* 557 * If we (OS side vs. BIOS side) have the hardware lock already, 558 * we are done 559 */ 560 if (AcpiGbl_GlobalLockAcquired) 561 { 562 return_ACPI_STATUS (AE_OK); 563 } 564 565 /* We must acquire the actual hardware lock */ 566 567 ACPI_ACQUIRE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Acquired); 568 if (Acquired) 569 { 570 /* We got the lock */ 571 572 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Acquired the HW Global Lock\n")); 573 574 AcpiGbl_GlobalLockAcquired = TRUE; 575 return_ACPI_STATUS (AE_OK); 576 } 577 578 /* 579 * Did not get the lock. The pending bit was set above, and we must now 580 * wait until we get the global lock released interrupt. 581 */ 582 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Waiting for the HW Global Lock\n")); 583 584 /* 585 * Acquire the global lock semaphore first. 586 * Since this wait will block, we must release the interpreter 587 */ 588 Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore, 589 Timeout); 590 return_ACPI_STATUS (Status); 591} 592 593 594/******************************************************************************* 595 * 596 * FUNCTION: AcpiEvReleaseGlobalLock 597 * 598 * PARAMETERS: None 599 * 600 * RETURN: Status 601 * 602 * DESCRIPTION: Releases ownership of the Global Lock. 603 * 604 ******************************************************************************/ 605 606ACPI_STATUS 607AcpiEvReleaseGlobalLock ( 608 void) 609{ 610 BOOLEAN Pending = FALSE; 611 ACPI_STATUS Status = AE_OK; 612 613 614 ACPI_FUNCTION_TRACE ("EvReleaseGlobalLock"); 615 616 617 if (!AcpiGbl_GlobalLockThreadCount) 618 { 619 ACPI_REPORT_WARNING(( 620 "Cannot release HW Global Lock, it has not been acquired\n")); 621 return_ACPI_STATUS (AE_NOT_ACQUIRED); 622 } 623 624 /* One fewer thread has the global lock */ 625 626 AcpiGbl_GlobalLockThreadCount--; 627 if (AcpiGbl_GlobalLockThreadCount) 628 { 629 /* There are still some threads holding the lock, cannot release */ 630 631 return_ACPI_STATUS (AE_OK); 632 } 633 634 /* 635 * No more threads holding lock, we can do the actual hardware 636 * release 637 */ 638 ACPI_RELEASE_GLOBAL_LOCK (AcpiGbl_CommonFACS.GlobalLock, Pending); 639 AcpiGbl_GlobalLockAcquired = FALSE; 640 641 /* 642 * If the pending bit was set, we must write GBL_RLS to the control 643 * register 644 */ 645 if (Pending) 646 { 647 Status = AcpiSetRegister (ACPI_BITREG_GLOBAL_LOCK_RELEASE, 648 1, ACPI_MTX_LOCK); 649 } 650 651 return_ACPI_STATUS (Status); 652} 653 654 655/****************************************************************************** 656 * 657 * FUNCTION: AcpiEvTerminate 658 * 659 * PARAMETERS: none 660 * 661 * RETURN: none 662 * 663 * DESCRIPTION: Disable events and free memory allocated for table storage. 664 * 665 ******************************************************************************/ 666 667void 668AcpiEvTerminate ( 669 void) 670{ 671 ACPI_NATIVE_UINT i; 672 ACPI_STATUS Status; 673 674 675 ACPI_FUNCTION_TRACE ("EvTerminate"); 676 677 678 if (AcpiGbl_EventsInitialized) 679 { 680 /* 681 * Disable all event-related functionality. 682 * In all cases, on error, print a message but obviously we don't abort. 683 */ 684 685 /* Disable all fixed events */ 686 687 for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) 688 { 689 Status = AcpiDisableEvent ((UINT32) i, 0); 690 if (ACPI_FAILURE (Status)) 691 { 692 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 693 "Could not disable fixed event %d\n", (UINT32) i)); 694 } 695 } 696 697 /* Disable all GPEs in all GPE blocks */ 698 699 Status = AcpiEvWalkGpeList (AcpiHwDisableGpeBlock); 700 701 /* Remove SCI handler */ 702 703 Status = AcpiEvRemoveSciHandler (); 704 if (ACPI_FAILURE(Status)) 705 { 706 ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, 707 "Could not remove SCI handler\n")); 708 } 709 } 710 711 /* Deallocate all handler objects installed within GPE info structs */ 712 713 Status = AcpiEvWalkGpeList (AcpiEvDeleteGpeHandlers); 714 715 /* Return to original mode if necessary */ 716 717 if (AcpiGbl_OriginalMode == ACPI_SYS_MODE_LEGACY) 718 { 719 Status = AcpiDisable (); 720 if (ACPI_FAILURE (Status)) 721 { 722 ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiDisable failed\n")); 723 } 724 } 725 return_VOID; 726} 727 728