diff options
Diffstat (limited to 'sys/contrib/dev/acpica/utxface.c')
-rw-r--r-- | sys/contrib/dev/acpica/utxface.c | 84 |
1 files changed, 45 insertions, 39 deletions
diff --git a/sys/contrib/dev/acpica/utxface.c b/sys/contrib/dev/acpica/utxface.c index fb79651..b6f5076 100644 --- a/sys/contrib/dev/acpica/utxface.c +++ b/sys/contrib/dev/acpica/utxface.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utxface - External interfaces for "global" ACPI functions - * $Revision: 106 $ + * $Revision: 1.112 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. * All rights reserved. * * 2. License @@ -120,8 +120,6 @@ #include <contrib/dev/acpica/acpi.h> #include <contrib/dev/acpica/acevents.h> #include <contrib/dev/acpica/acnamesp.h> -#include <contrib/dev/acpica/acparser.h> -#include <contrib/dev/acpica/acdispat.h> #include <contrib/dev/acpica/acdebug.h> #define _COMPONENT ACPI_UTILITIES @@ -147,16 +145,12 @@ AcpiInitializeSubsystem ( { ACPI_STATUS Status; + ACPI_FUNCTION_TRACE ("AcpiInitializeSubsystem"); ACPI_DEBUG_EXEC (AcpiUtInitStackPtrTrace ()); - - /* Initialize all globals used by the subsystem */ - - AcpiUtInitGlobals (); - /* Initialize the OS-Dependent layer */ Status = AcpiOsInitialize (); @@ -167,6 +161,10 @@ AcpiInitializeSubsystem ( return_ACPI_STATUS (Status); } + /* Initialize all globals used by the subsystem */ + + AcpiUtInitGlobals (); + /* Create the default mutex objects */ Status = AcpiUtMutexInitialize (); @@ -181,7 +179,6 @@ AcpiInitializeSubsystem ( * Initialize the namespace manager and * the root of the namespace tree */ - Status = AcpiNsRootInitialize (); if (ACPI_FAILURE (Status)) { @@ -190,7 +187,6 @@ AcpiInitializeSubsystem ( return_ACPI_STATUS (Status); } - /* If configured, initialize the AML debugger */ ACPI_DEBUGGER_EXEC (Status = AcpiDbInitialize ()); @@ -228,7 +224,8 @@ AcpiEnableSubsystem ( */ if (!(Flags & ACPI_NO_HARDWARE_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI hardware\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Initializing ACPI hardware\n")); Status = AcpiHwInitialize (); if (ACPI_FAILURE (Status)) @@ -260,7 +257,8 @@ AcpiEnableSubsystem ( */ if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing default address space handlers\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Installing default address space handlers\n")); Status = AcpiEvInstallRegionHandlers (); if (ACPI_FAILURE (Status)) @@ -272,13 +270,15 @@ AcpiEnableSubsystem ( /* * Initialize ACPI Event handling (Fixed and General Purpose) * - * NOTE: We must have the hardware AND events initialized before we can execute - * ANY control methods SAFELY. Any control method can require ACPI hardware - * support, so the hardware MUST be initialized before execution! + * NOTE: We must have the hardware AND events initialized before we can + * execute ANY control methods SAFELY. Any control method can require + * ACPI hardware support, so the hardware MUST be initialized before + * execution! */ if (!(Flags & ACPI_NO_EVENT_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI events\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Initializing ACPI events\n")); Status = AcpiEvInitializeEvents (); if (ACPI_FAILURE (Status)) @@ -291,7 +291,8 @@ AcpiEnableSubsystem ( if (!(Flags & ACPI_NO_HANDLER_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Installing SCI/GL handlers\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Installing SCI/GL handlers\n")); Status = AcpiEvInstallXruptHandlers (); if (ACPI_FAILURE (Status)) @@ -335,7 +336,8 @@ AcpiInitializeObjects ( */ if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Executing _REG OpRegion methods\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Executing _REG OpRegion methods\n")); Status = AcpiEvInitializeOpRegions (); if (ACPI_FAILURE (Status)) @@ -351,7 +353,8 @@ AcpiInitializeObjects ( */ if (!(Flags & ACPI_NO_OBJECT_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Completing Initialization of ACPI Objects\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Completing Initialization of ACPI Objects\n")); Status = AcpiNsInitializeObjects (); if (ACPI_FAILURE (Status)) @@ -366,7 +369,8 @@ AcpiInitializeObjects ( */ if (!(Flags & ACPI_NO_DEVICE_INIT)) { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[Init] Initializing ACPI Devices\n")); + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, + "[Init] Initializing ACPI Devices\n")); Status = AcpiNsInitializeDevices (); if (ACPI_FAILURE (Status)) @@ -400,7 +404,8 @@ AcpiInitializeObjects ( ******************************************************************************/ ACPI_STATUS -AcpiTerminate (void) +AcpiTerminate ( + void) { ACPI_STATUS Status; @@ -436,7 +441,7 @@ AcpiTerminate (void) } -/***************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiSubsystemStatus * @@ -445,14 +450,16 @@ AcpiTerminate (void) * RETURN: Status of the ACPI subsystem * * DESCRIPTION: Other drivers that use the ACPI subsystem should call this - * before making any other calls, to ensure the subsystem initial- - * ized successfully. + * before making any other calls, to ensure the subsystem + * initialized successfully. * - ****************************************************************************/ + ******************************************************************************/ ACPI_STATUS -AcpiSubsystemStatus (void) +AcpiSubsystemStatus ( + void) { + if (AcpiGbl_StartupFlags & ACPI_INITIALIZED_OK) { return (AE_OK); @@ -464,13 +471,12 @@ AcpiSubsystemStatus (void) } -/****************************************************************************** +/******************************************************************************* * * FUNCTION: AcpiGetSystemInfo * - * PARAMETERS: OutBuffer - a pointer to a buffer to receive the - * resources for the device - * BufferLength - the number of bytes available in the buffer + * PARAMETERS: OutBuffer - A buffer to receive the resources for the + * device * * RETURN: Status - the status of the call * @@ -488,8 +494,8 @@ AcpiGetSystemInfo ( ACPI_BUFFER *OutBuffer) { ACPI_SYSTEM_INFO *InfoPtr; - UINT32 i; ACPI_STATUS Status; + UINT32 i; ACPI_FUNCTION_TRACE ("AcpiGetSystemInfo"); @@ -564,6 +570,7 @@ AcpiGetSystemInfo ( * FUNCTION: AcpiInstallInitializationHandler * * PARAMETERS: Handler - Callback procedure + * Function - Not (currently) used, see below * * RETURN: Status * @@ -607,15 +614,14 @@ AcpiInstallInitializationHandler ( ****************************************************************************/ ACPI_STATUS -AcpiPurgeCachedObjects (void) +AcpiPurgeCachedObjects ( + void) { ACPI_FUNCTION_TRACE ("AcpiPurgeCachedObjects"); - - AcpiUtDeleteGenericStateCache (); - AcpiUtDeleteObjectCache (); - AcpiDsDeleteWalkStateCache (); - AcpiPsDeleteParseCache (); - + (void) AcpiOsPurgeCache (AcpiGbl_StateCache); + (void) AcpiOsPurgeCache (AcpiGbl_OperandCache); + (void) AcpiOsPurgeCache (AcpiGbl_PsNodeCache); + (void) AcpiOsPurgeCache (AcpiGbl_PsNodeExtCache); return_ACPI_STATUS (AE_OK); } |