diff options
Diffstat (limited to 'usr/src/uts/intel/io/acpica/utilities/utxface.c')
| -rw-r--r-- | usr/src/uts/intel/io/acpica/utilities/utxface.c | 134 |
1 files changed, 83 insertions, 51 deletions
diff --git a/usr/src/uts/intel/io/acpica/utilities/utxface.c b/usr/src/uts/intel/io/acpica/utilities/utxface.c index 4fad6dfa2d..f87106b755 100644 --- a/usr/src/uts/intel/io/acpica/utilities/utxface.c +++ b/usr/src/uts/intel/io/acpica/utilities/utxface.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utxface - External interfaces for "global" ACPI functions - * $Revision: 1.121 $ + * $Revision: 1.128 $ * *****************************************************************************/ @@ -9,7 +9,7 @@ * * 1. Copyright Notice * - * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. + * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. * All rights reserved. * * 2. License @@ -126,6 +126,8 @@ ACPI_MODULE_NAME ("utxface") +#ifndef ACPI_ASL_COMPILER + /******************************************************************************* * * FUNCTION: AcpiInitializeSubsystem @@ -149,6 +151,7 @@ AcpiInitializeSubsystem ( ACPI_FUNCTION_TRACE (AcpiInitializeSubsystem); + AcpiGbl_StartupFlags = ACPI_SUBSYSTEM_INITIALIZE; ACPI_DEBUG_EXEC (AcpiUtInitStackPtrTrace ()); /* Initialize the OS-Dependent layer */ @@ -162,7 +165,12 @@ AcpiInitializeSubsystem ( /* Initialize all globals used by the subsystem */ - AcpiUtInitGlobals (); + Status = AcpiUtInitGlobals (); + if (ACPI_FAILURE (Status)) + { + ACPI_EXCEPTION ((AE_INFO, Status, "During initialization of globals")); + return_ACPI_STATUS (Status); + } /* Create the default mutex objects */ @@ -216,22 +224,6 @@ AcpiEnableSubsystem ( ACPI_FUNCTION_TRACE (AcpiEnableSubsystem); - /* - * We must initialize the hardware before we can enable ACPI. - * The values from the FADT are validated here. - */ - if (!(Flags & ACPI_NO_HARDWARE_INIT)) - { - ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, - "[Init] Initializing ACPI hardware\n")); - - Status = AcpiHwInitialize (); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - } - /* Enable ACPI mode */ if (!(Flags & ACPI_NO_ACPI_ENABLE)) @@ -275,7 +267,9 @@ AcpiEnableSubsystem ( * * Note2: Fixed events are initialized and enabled here. GPEs are * initialized, but cannot be enabled until after the hardware is - * completely initialized (SCI and GlobalLock activated) + * completely initialized (SCI and GlobalLock activated) and the various + * initialization control methods are run (_REG, _STA, _INI) on the + * entire namespace. */ if (!(Flags & ACPI_NO_EVENT_INIT)) { @@ -305,26 +299,6 @@ AcpiEnableSubsystem ( } } - /* - * Complete the GPE initialization for the GPE blocks defined in the FADT - * (GPE block 0 and 1). - * - * Note1: This is where the _PRW methods are executed for the GPEs. These - * methods can only be executed after the SCI and Global Lock handlers are - * installed and initialized. - * - * Note2: Currently, there seems to be no need to run the _REG methods - * before execution of the _PRW methods and enabling of the GPEs. - */ - if (!(Flags & ACPI_NO_EVENT_INIT)) - { - Status = AcpiEvInstallFadtGpes (); - if (ACPI_FAILURE (Status)) - { - return (Status); - } - } - return_ACPI_STATUS (Status); } @@ -407,6 +381,27 @@ AcpiInitializeObjects ( } /* + * Initialize the GPE blocks defined in the FADT (GPE block 0 and 1). + * The runtime GPEs are enabled here. + * + * This is where the _PRW methods are executed for the GPEs. These + * methods can only be executed after the SCI and Global Lock handlers are + * installed and initialized. + * + * GPEs can only be enabled after the _REG, _STA, and _INI methods have + * been run. This ensures that all Operation Regions and all Devices have + * been initialized and are ready. + */ + if (!(Flags & ACPI_NO_EVENT_INIT)) + { + Status = AcpiEvInstallFadtGpes (); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + } + + /* * Empty the caches (delete the cached objects) on the assumption that * the table load filled them up more than they will be at runtime -- * thus wasting non-paged memory. @@ -420,6 +415,8 @@ AcpiInitializeObjects ( ACPI_EXPORT_SYMBOL (AcpiInitializeObjects) +#endif + /******************************************************************************* * * FUNCTION: AcpiTerminate @@ -471,6 +468,7 @@ AcpiTerminate ( ACPI_EXPORT_SYMBOL (AcpiTerminate) +#ifndef ACPI_ASL_COMPILER /******************************************************************************* * @@ -528,7 +526,6 @@ AcpiGetSystemInfo ( { ACPI_SYSTEM_INFO *InfoPtr; ACPI_STATUS Status; - UINT32 i; ACPI_FUNCTION_TRACE (AcpiGetSystemInfo); @@ -563,11 +560,7 @@ AcpiGetSystemInfo ( /* Timer resolution - 24 or 32 bits */ - if (!AcpiGbl_FADT) - { - InfoPtr->TimerResolution = 0; - } - else if (AcpiGbl_FADT->TmrValExt == 0) + if (AcpiGbl_FADT.Flags & ACPI_FADT_32BIT_TIMER) { InfoPtr->TimerResolution = 24; } @@ -586,18 +579,55 @@ AcpiGetSystemInfo ( InfoPtr->DebugLayer = AcpiDbgLayer; InfoPtr->DebugLevel = AcpiDbgLevel; - /* Current status of the ACPI tables, per table type */ + return_ACPI_STATUS (AE_OK); +} + +ACPI_EXPORT_SYMBOL (AcpiGetSystemInfo) + - InfoPtr->NumTableTypes = ACPI_TABLE_ID_MAX+1; - for (i = 0; i < (ACPI_TABLE_ID_MAX+1); i++) +/******************************************************************************* + * + * FUNCTION: AcpiGetStatistics + * + * PARAMETERS: Stats - Where the statistics are returned + * + * RETURN: Status - the status of the call + * + * DESCRIPTION: Get the contents of the various system counters + * + ******************************************************************************/ + +ACPI_STATUS +AcpiGetStatistics ( + ACPI_STATISTICS *Stats) +{ + ACPI_FUNCTION_TRACE (AcpiGetStatistics); + + + /* Parameter validation */ + + if (!Stats) { - InfoPtr->TableInfo[i].Count = AcpiGbl_TableLists[i].Count; + return_ACPI_STATUS (AE_BAD_PARAMETER); } + /* Various interrupt-based event counters */ + + Stats->SciCount = AcpiSciCount; + Stats->GpeCount = AcpiGpeCount; + + ACPI_MEMCPY (Stats->FixedEventCount, AcpiFixedEventCount, + sizeof (AcpiFixedEventCount)); + + + /* Other counters */ + + Stats->MethodCount = AcpiMethodCount; + return_ACPI_STATUS (AE_OK); } -ACPI_EXPORT_SYMBOL (AcpiGetSystemInfo) +ACPI_EXPORT_SYMBOL (AcpiGetStatistics) /***************************************************************************** @@ -664,3 +694,5 @@ AcpiPurgeCachedObjects ( } ACPI_EXPORT_SYMBOL (AcpiPurgeCachedObjects) + +#endif |
