Deleted Added
full compact
evmisc.c (77424) evmisc.c (82367)
1/******************************************************************************
2 *
3 * Module Name: evmisc - ACPI device notification handler dispatch
4 * and ACPI Global Lock support
1/******************************************************************************
2 *
3 * Module Name: evmisc - ACPI device notification handler dispatch
4 * and ACPI Global Lock support
5 * $Revision: 31 $
5 * $Revision: 32 $
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 140 unchanged lines hidden (view full) ---

154
155 /*
156 * For value 1 (Ejection Request), some device method may need to be run.
157 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run.
158 * For value 0x80 (Status Change) on the power button or sleep button,
159 * initiate soft-off or sleep operation?
160 */
161
6 *
7 *****************************************************************************/
8
9/******************************************************************************
10 *
11 * 1. Copyright Notice
12 *
13 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

--- 140 unchanged lines hidden (view full) ---

154
155 /*
156 * For value 1 (Ejection Request), some device method may need to be run.
157 * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need to be run.
158 * For value 0x80 (Status Change) on the power button or sleep button,
159 * initiate soft-off or sleep operation?
160 */
161
162 DEBUG_PRINTP (ACPI_INFO,
163 ("Dispatching Notify(%X) on node %p\n", NotifyValue, Node));
162 ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
163 "Dispatching Notify(%X) on node %p\n", NotifyValue, Node));
164
165 switch (NotifyValue)
166 {
167 case 0:
164
165 switch (NotifyValue)
166 {
167 case 0:
168 DEBUG_PRINTP (ACPI_INFO, ("Notify value: Re-enumerate Devices\n"));
168 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Re-enumerate Devices\n"));
169 break;
170
171 case 1:
169 break;
170
171 case 1:
172 DEBUG_PRINTP (ACPI_INFO, ("Notify value: Ejection Request\n"));
172 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Ejection Request\n"));
173 break;
174
175 case 2:
173 break;
174
175 case 2:
176 DEBUG_PRINTP (ACPI_INFO, ("Notify value: Device Wake\n"));
176 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Device Wake\n"));
177 break;
178
179 case 0x80:
177 break;
178
179 case 0x80:
180 DEBUG_PRINTP (ACPI_INFO, ("Notify value: Status Change\n"));
180 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Notify value: Status Change\n"));
181 break;
182
183 default:
181 break;
182
183 default:
184 DEBUG_PRINTP (ACPI_INFO, ("Unknown Notify Value: %lx \n", NotifyValue));
184 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Unknown Notify Value: %lx \n", NotifyValue));
185 break;
186 }
187
188
189 /*
190 * Get the notify object attached to the device Node
191 */
192

--- 54 unchanged lines hidden (view full) ---

247 AcpiUtDeleteGenericState (NotifyInfo);
248 }
249 }
250
251 if (!HandlerObj)
252 {
253 /* There is no per-device notify handler for this device */
254
185 break;
186 }
187
188
189 /*
190 * Get the notify object attached to the device Node
191 */
192

--- 54 unchanged lines hidden (view full) ---

247 AcpiUtDeleteGenericState (NotifyInfo);
248 }
249 }
250
251 if (!HandlerObj)
252 {
253 /* There is no per-device notify handler for this device */
254
255 DEBUG_PRINTP (ACPI_INFO, ("No notify handler for node %p \n", Node));
255 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "No notify handler for node %p \n", Node));
256 }
257
258 return (Status);
259}
260
261
262/*******************************************************************************
263 *

--- 232 unchanged lines hidden (view full) ---

496 /* We must acquire the actual hardware lock */
497
498 GlobalLock = AcpiGbl_FACS->GlobalLock;
499 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
500 if (Acquired)
501 {
502 /* We got the lock */
503
256 }
257
258 return (Status);
259}
260
261
262/*******************************************************************************
263 *

--- 232 unchanged lines hidden (view full) ---

496 /* We must acquire the actual hardware lock */
497
498 GlobalLock = AcpiGbl_FACS->GlobalLock;
499 ACPI_ACQUIRE_GLOBAL_LOCK (GlobalLock, Acquired);
500 if (Acquired)
501 {
502 /* We got the lock */
503
504 DEBUG_PRINTP (ACPI_INFO, ("Acquired the Global Lock\n"));
504 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Acquired the Global Lock\n"));
505
506 AcpiGbl_GlobalLockAcquired = TRUE;
507 return_ACPI_STATUS (AE_OK);
508 }
509
510
511 /*
512 * Did not get the lock. The pending bit was set above, and we must now
513 * wait until we get the global lock released interrupt.
514 */
515
505
506 AcpiGbl_GlobalLockAcquired = TRUE;
507 return_ACPI_STATUS (AE_OK);
508 }
509
510
511 /*
512 * Did not get the lock. The pending bit was set above, and we must now
513 * wait until we get the global lock released interrupt.
514 */
515
516 DEBUG_PRINTP (ACPI_INFO, ("Waiting for the HW Global Lock\n"));
516 ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Waiting for the HW Global Lock\n"));
517
518 /*
519 * Acquire the global lock semaphore first.
520 * Since this wait will block, we must release the interpreter
521 */
522
523 Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
524 ACPI_UINT32_MAX);

--- 57 unchanged lines hidden ---
517
518 /*
519 * Acquire the global lock semaphore first.
520 * Since this wait will block, we must release the interpreter
521 */
522
523 Status = AcpiExSystemWaitSemaphore (AcpiGbl_GlobalLockSemaphore,
524 ACPI_UINT32_MAX);

--- 57 unchanged lines hidden ---