Deleted Added
full compact
utxface.c (84491) utxface.c (87031)
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: 82 $
4 * $Revision: 85 $
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

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

120#include "acpi.h"
121#include "acevents.h"
122#include "achware.h"
123#include "acnamesp.h"
124#include "acinterp.h"
125#include "amlcode.h"
126#include "acdebug.h"
127#include "acexcep.h"
5 *
6 *****************************************************************************/
7
8/******************************************************************************
9 *
10 * 1. Copyright Notice
11 *
12 * Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.

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

120#include "acpi.h"
121#include "acevents.h"
122#include "achware.h"
123#include "acnamesp.h"
124#include "acinterp.h"
125#include "amlcode.h"
126#include "acdebug.h"
127#include "acexcep.h"
128#include "acparser.h"
129#include "acdispat.h"
128
129
130#define _COMPONENT ACPI_UTILITIES
131 MODULE_NAME ("utxface")
132
133
134/*******************************************************************************
135 *

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

290
291 Status = AcpiEvInitialize ();
292 if (ACPI_FAILURE (Status))
293 {
294 return_ACPI_STATUS (Status);
295 }
296 }
297
130
131
132#define _COMPONENT ACPI_UTILITIES
133 MODULE_NAME ("utxface")
134
135
136/*******************************************************************************
137 *

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

292
293 Status = AcpiEvInitialize ();
294 if (ACPI_FAILURE (Status))
295 {
296 return_ACPI_STATUS (Status);
297 }
298 }
299
298
299 /*
300 * Initialize all device objects in the namespace
301 * This runs the _STA and _INI methods.
302 */
303 if (!(Flags & ACPI_NO_DEVICE_INIT))
304 {
305 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n"));
306
307 Status = AcpiNsInitializeDevices ();
308 if (ACPI_FAILURE (Status))
309 {
310 return_ACPI_STATUS (Status);
311 }
312 }
313
300 /*
301 * Initialize all device objects in the namespace
302 * This runs the _STA and _INI methods.
303 */
304 if (!(Flags & ACPI_NO_DEVICE_INIT))
305 {
306 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n"));
307
308 Status = AcpiNsInitializeDevices ();
309 if (ACPI_FAILURE (Status))
310 {
311 return_ACPI_STATUS (Status);
312 }
313 }
314
314
315 /*
316 * Initialize the objects that remain uninitialized. This
317 * runs the executable AML that is part of the declaration of OpRegions
318 * and Fields.
319 */
320 if (!(Flags & ACPI_NO_OBJECT_INIT))
321 {
322 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Objects\n"));
323
324 Status = AcpiNsInitializeObjects ();
325 if (ACPI_FAILURE (Status))
326 {
327 return_ACPI_STATUS (Status);
328 }
329 }
330
315 /*
316 * Initialize the objects that remain uninitialized. This
317 * runs the executable AML that is part of the declaration of OpRegions
318 * and Fields.
319 */
320 if (!(Flags & ACPI_NO_OBJECT_INIT))
321 {
322 ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Objects\n"));
323
324 Status = AcpiNsInitializeObjects ();
325 if (ACPI_FAILURE (Status))
326 {
327 return_ACPI_STATUS (Status);
328 }
329 }
330
331 AcpiGbl_StartupFlags |= ACPI_INITIALIZED_OK;
331 /*
332 * Empty the caches (delete the cached objects) on the assumption that
333 * the table load filled them up more than they will be at runtime --
334 * thus wasting non-paged memory.
335 */
336 Status = AcpiPurgeCachedObjects ();
332
337
338 AcpiGbl_StartupFlags |= ACPI_INITIALIZED_OK;
333 return_ACPI_STATUS (Status);
334}
335
336
337/*******************************************************************************
338 *
339 * FUNCTION: AcpiTerminate
340 *

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

351{
352 FUNCTION_TRACE ("AcpiTerminate");
353
354
355 /* Terminate the AML Debugger if present */
356
357 DEBUGGER_EXEC(AcpiGbl_DbTerminateThreads = TRUE);
358
339 return_ACPI_STATUS (Status);
340}
341
342
343/*******************************************************************************
344 *
345 * FUNCTION: AcpiTerminate
346 *

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

357{
358 FUNCTION_TRACE ("AcpiTerminate");
359
360
361 /* Terminate the AML Debugger if present */
362
363 DEBUGGER_EXEC(AcpiGbl_DbTerminateThreads = TRUE);
364
359 /* TBD: [Investigate] This is no longer needed?*/
360/* AcpiUtReleaseMutex (ACPI_MTX_DEBUG_CMD_READY); */
361
362
363 /* Shutdown and free all resources */
364
365 AcpiUtSubsystemShutdown ();
366
367
368 /* Free the mutex objects */
369
370 AcpiUtMutexTerminate ();

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

469 */
470 OutBuffer->Length = sizeof (ACPI_SYSTEM_INFO);
471 InfoPtr = (ACPI_SYSTEM_INFO *) OutBuffer->Pointer;
472
473 InfoPtr->AcpiCaVersion = ACPI_CA_VERSION;
474
475 /* System flags (ACPI capabilities) */
476
365 /* Shutdown and free all resources */
366
367 AcpiUtSubsystemShutdown ();
368
369
370 /* Free the mutex objects */
371
372 AcpiUtMutexTerminate ();

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

471 */
472 OutBuffer->Length = sizeof (ACPI_SYSTEM_INFO);
473 InfoPtr = (ACPI_SYSTEM_INFO *) OutBuffer->Pointer;
474
475 InfoPtr->AcpiCaVersion = ACPI_CA_VERSION;
476
477 /* System flags (ACPI capabilities) */
478
477 InfoPtr->Flags = AcpiGbl_SystemFlags;
479 InfoPtr->Flags = SYS_MODE_ACPI;
478
479 /* Timer resolution - 24 or 32 bits */
480 if (!AcpiGbl_FADT)
481 {
482 InfoPtr->TimerResolution = 0;
483 }
484 else if (AcpiGbl_FADT->TmrValExt == 0)
485 {

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

507 {
508 InfoPtr->TableInfo[i].Count = AcpiGbl_AcpiTables[i].Count;
509 }
510
511 return_ACPI_STATUS (AE_OK);
512}
513
514
480
481 /* Timer resolution - 24 or 32 bits */
482 if (!AcpiGbl_FADT)
483 {
484 InfoPtr->TimerResolution = 0;
485 }
486 else if (AcpiGbl_FADT->TmrValExt == 0)
487 {

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

509 {
510 InfoPtr->TableInfo[i].Count = AcpiGbl_AcpiTables[i].Count;
511 }
512
513 return_ACPI_STATUS (AE_OK);
514}
515
516
517/*****************************************************************************
518 *
519 * FUNCTION: AcpiPurgeCachedObjects
520 *
521 * PARAMETERS: None
522 *
523 * RETURN: Status
524 *
525 * DESCRIPTION: Empty all caches (delete the cached objects)
526 *
527 ****************************************************************************/
528
529ACPI_STATUS
530AcpiPurgeCachedObjects (void)
531{
532 FUNCTION_TRACE ("AcpiPurgeCachedObjects");
533
534
535 AcpiUtDeleteGenericStateCache ();
536 AcpiUtDeleteObjectCache ();
537 AcpiDsDeleteWalkStateCache ();
538 AcpiPsDeleteParseCache ();
539
540 return_ACPI_STATUS (AE_OK);
541}