Deleted Added
full compact
utxface.c (114237) utxface.c (117521)
1/******************************************************************************
2 *
3 * Module Name: utxface - External interfaces for "global" ACPI functions
1/******************************************************************************
2 *
3 * Module Name: utxface - External interfaces for "global" ACPI functions
4 * $Revision: 101 $
4 * $Revision: 104 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.

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

218{
219 ACPI_STATUS Status = AE_OK;
220
221
222 ACPI_FUNCTION_TRACE ("AcpiEnableSubsystem");
223
224
225 /*
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.

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

218{
219 ACPI_STATUS Status = AE_OK;
220
221
222 ACPI_FUNCTION_TRACE ("AcpiEnableSubsystem");
223
224
225 /*
226 * Install the default OpRegion handlers. These are installed unless
227 * other handlers have already been installed via the
228 * InstallAddressSpaceHandler interface
229 */
230 if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
231 {
232 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing default address space handlers\n"));
233
234 Status = AcpiEvInitAddressSpaces ();
235 if (ACPI_FAILURE (Status))
236 {
237 return_ACPI_STATUS (Status);
238 }
239 }
240
241 /*
242 * We must initialize the hardware before we can enable ACPI.
226 * We must initialize the hardware before we can enable ACPI.
243 * FADT values are validated here.
227 * The values from the FADT are validated here.
244 */
245 if (!(Flags & ACPI_NO_HARDWARE_INIT))
246 {
247 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI hardware\n"));
248
249 Status = AcpiHwInitialize ();
250 if (ACPI_FAILURE (Status))
251 {
252 return_ACPI_STATUS (Status);
253 }
254 }
255
256 /*
228 */
229 if (!(Flags & ACPI_NO_HARDWARE_INIT))
230 {
231 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI hardware\n"));
232
233 Status = AcpiHwInitialize ();
234 if (ACPI_FAILURE (Status))
235 {
236 return_ACPI_STATUS (Status);
237 }
238 }
239
240 /*
257 * Enable ACPI on this platform
241 * Enable ACPI mode
258 */
259 if (!(Flags & ACPI_NO_ACPI_ENABLE))
260 {
261 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Going into ACPI mode\n"));
262
263 AcpiGbl_OriginalMode = AcpiHwGetMode();
264
265 Status = AcpiEnable ();
266 if (ACPI_FAILURE (Status))
267 {
268 ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiEnable failed.\n"));
269 return_ACPI_STATUS (Status);
270 }
271 }
272
273 /*
242 */
243 if (!(Flags & ACPI_NO_ACPI_ENABLE))
244 {
245 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Going into ACPI mode\n"));
246
247 AcpiGbl_OriginalMode = AcpiHwGetMode();
248
249 Status = AcpiEnable ();
250 if (ACPI_FAILURE (Status))
251 {
252 ACPI_DEBUG_PRINT ((ACPI_DB_WARN, "AcpiEnable failed.\n"));
253 return_ACPI_STATUS (Status);
254 }
255 }
256
257 /*
274 * Note:
275 * We must have the hardware AND events initialized before we can execute
258 * Initialize ACPI Event handling
259 *
260 * NOTE: We must have the hardware AND events initialized before we can execute
276 * ANY control methods SAFELY. Any control method can require ACPI hardware
277 * support, so the hardware MUST be initialized before execution!
278 */
279 if (!(Flags & ACPI_NO_EVENT_INIT))
280 {
281 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI events\n"));
282
283 Status = AcpiEvInitialize ();
284 if (ACPI_FAILURE (Status))
285 {
286 return_ACPI_STATUS (Status);
287 }
288 }
289
261 * ANY control methods SAFELY. Any control method can require ACPI hardware
262 * support, so the hardware MUST be initialized before execution!
263 */
264 if (!(Flags & ACPI_NO_EVENT_INIT))
265 {
266 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI events\n"));
267
268 Status = AcpiEvInitialize ();
269 if (ACPI_FAILURE (Status))
270 {
271 return_ACPI_STATUS (Status);
272 }
273 }
274
290 /* Install SCI handler, Global Lock handler, GPE handlers */
275 /* Install the SCI handler, Global Lock handler, and GPE handlers */
291
292 if (!(Flags & ACPI_NO_HANDLER_INIT))
293 {
294 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing SCI/GL/GPE handlers\n"));
295
296 Status = AcpiEvHandlerInitialize ();
297 if (ACPI_FAILURE (Status))
298 {

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

320AcpiInitializeObjects (
321 UINT32 Flags)
322{
323 ACPI_STATUS Status = AE_OK;
324
325
326 ACPI_FUNCTION_TRACE ("AcpiInitializeObjects");
327
276
277 if (!(Flags & ACPI_NO_HANDLER_INIT))
278 {
279 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing SCI/GL/GPE handlers\n"));
280
281 Status = AcpiEvHandlerInitialize ();
282 if (ACPI_FAILURE (Status))
283 {

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

305AcpiInitializeObjects (
306 UINT32 Flags)
307{
308 ACPI_STATUS Status = AE_OK;
309
310
311 ACPI_FUNCTION_TRACE ("AcpiInitializeObjects");
312
313
328 /*
314 /*
329 * Initialize all device objects in the namespace
330 * This runs the _STA and _INI methods.
315 * Install the default OpRegion handlers. These are installed unless
316 * other handlers have already been installed via the
317 * InstallAddressSpaceHandler interface.
318 *
319 * NOTE: This will cause _REG methods to be run. Any objects accessed
320 * by the _REG methods will be automatically initialized, even if they
321 * contain executable AML (see call to AcpiNsInitializeObjects below).
331 */
322 */
332 if (!(Flags & ACPI_NO_DEVICE_INIT))
323 if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
333 {
324 {
334 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n"));
325 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing default address space handlers\n"));
335
326
336 Status = AcpiNsInitializeDevices ();
327 Status = AcpiEvInitAddressSpaces ();
337 if (ACPI_FAILURE (Status))
338 {
339 return_ACPI_STATUS (Status);
340 }
341 }
342
343 /*
344 * Initialize the objects that remain uninitialized. This
328 if (ACPI_FAILURE (Status))
329 {
330 return_ACPI_STATUS (Status);
331 }
332 }
333
334 /*
335 * Initialize the objects that remain uninitialized. This
345 * runs the executable AML that is part of the declaration of OpRegions
346 * and Fields.
336 * runs the executable AML that may be part of the declaration of these
337 * objects: OperationRegions, BufferFields, Buffers, and Packages.
347 */
348 if (!(Flags & ACPI_NO_OBJECT_INIT))
349 {
350 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Objects\n"));
351
352 Status = AcpiNsInitializeObjects ();
353 if (ACPI_FAILURE (Status))
354 {
355 return_ACPI_STATUS (Status);
356 }
357 }
358
359 /*
338 */
339 if (!(Flags & ACPI_NO_OBJECT_INIT))
340 {
341 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Objects\n"));
342
343 Status = AcpiNsInitializeObjects ();
344 if (ACPI_FAILURE (Status))
345 {
346 return_ACPI_STATUS (Status);
347 }
348 }
349
350 /*
351 * Initialize all device objects in the namespace
352 * This runs the _STA and _INI methods.
353 */
354 if (!(Flags & ACPI_NO_DEVICE_INIT))
355 {
356 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n"));
357
358 Status = AcpiNsInitializeDevices ();
359 if (ACPI_FAILURE (Status))
360 {
361 return_ACPI_STATUS (Status);
362 }
363 }
364
365 /*
360 * Empty the caches (delete the cached objects) on the assumption that
361 * the table load filled them up more than they will be at runtime --
362 * thus wasting non-paged memory.
363 */
364 Status = AcpiPurgeCachedObjects ();
365
366 AcpiGbl_StartupFlags |= ACPI_INITIALIZED_OK;
367 return_ACPI_STATUS (Status);

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

525
526 /* Current debug levels */
527
528 InfoPtr->DebugLayer = AcpiDbgLayer;
529 InfoPtr->DebugLevel = AcpiDbgLevel;
530
531 /* Current status of the ACPI tables, per table type */
532
366 * Empty the caches (delete the cached objects) on the assumption that
367 * the table load filled them up more than they will be at runtime --
368 * thus wasting non-paged memory.
369 */
370 Status = AcpiPurgeCachedObjects ();
371
372 AcpiGbl_StartupFlags |= ACPI_INITIALIZED_OK;
373 return_ACPI_STATUS (Status);

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

531
532 /* Current debug levels */
533
534 InfoPtr->DebugLayer = AcpiDbgLayer;
535 InfoPtr->DebugLevel = AcpiDbgLevel;
536
537 /* Current status of the ACPI tables, per table type */
538
533 InfoPtr->NumTableTypes = NUM_ACPI_TABLES;
534 for (i = 0; i < NUM_ACPI_TABLES; i++)
539 InfoPtr->NumTableTypes = NUM_ACPI_TABLE_TYPES;
540 for (i = 0; i < NUM_ACPI_TABLE_TYPES; i++)
535 {
541 {
536 InfoPtr->TableInfo[i].Count = AcpiGbl_AcpiTables[i].Count;
542 InfoPtr->TableInfo[i].Count = AcpiGbl_TableLists[i].Count;
537 }
538
539 return_ACPI_STATUS (AE_OK);
540}
541
542
543/*****************************************************************************
544 *

--- 58 unchanged lines hidden ---
543 }
544
545 return_ACPI_STATUS (AE_OK);
546}
547
548
549/*****************************************************************************
550 *

--- 58 unchanged lines hidden ---