diff options
author | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2013-07-26 18:20:00 +0000 |
commit | 8e9a373708032aaf58694e237e3889d7d3fd796f (patch) | |
tree | e05da15a04629f6e36af5ca6c81a2efda47a9dc3 /source/components/utilities | |
parent | 7aca7201724cb02a2a0541bd3ad2c0aca23dd076 (diff) | |
download | FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.zip FreeBSD-src-8e9a373708032aaf58694e237e3889d7d3fd796f.tar.gz |
Import ACPICA 20130725.
Diffstat (limited to 'source/components/utilities')
-rw-r--r-- | source/components/utilities/utglobal.c | 1 | ||||
-rw-r--r-- | source/components/utilities/utosi.c | 89 | ||||
-rw-r--r-- | source/components/utilities/utxface.c | 34 |
3 files changed, 110 insertions, 14 deletions
diff --git a/source/components/utilities/utglobal.c b/source/components/utilities/utglobal.c index 83b0526..56c4e06 100644 --- a/source/components/utilities/utglobal.c +++ b/source/components/utilities/utglobal.c @@ -319,7 +319,6 @@ AcpiUtInitGlobals ( AcpiGbl_TraceDbgLayer = 0; AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING; AcpiGbl_DbOutputFlags = ACPI_DB_CONSOLE_OUTPUT; - AcpiGbl_OsiData = 0; AcpiGbl_OsiMutex = NULL; AcpiGbl_RegMethodsExecuted = FALSE; diff --git a/source/components/utilities/utosi.c b/source/components/utilities/utosi.c index 21fe51b..c376256 100644 --- a/source/components/utilities/utosi.c +++ b/source/components/utilities/utosi.c @@ -81,21 +81,20 @@ static ACPI_INTERFACE_INFO AcpiDefaultSupportedInterfaces[] = /* Feature Group Strings */ - {"Extended Address Space Descriptor", NULL, 0, 0} + {"Extended Address Space Descriptor", NULL, ACPI_OSI_FEATURE, 0}, /* * All "optional" feature group strings (features that are implemented - * by the host) should be dynamically added by the host via - * AcpiInstallInterface and should not be manually added here. - * - * Examples of optional feature group strings: - * - * "Module Device" - * "Processor Device" - * "3.0 Thermal Model" - * "3.0 _SCP Extensions" - * "Processor Aggregator Device" + * by the host) should be dynamically modified to VALID by the host via + * AcpiInstallInterface or AcpiUpdateInterfaces. Such optional feature + * group strings are set as INVALID by default here. */ + + {"Module Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, + {"Processor Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, + {"3.0 Thermal Model", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, + {"3.0 _SCP Extensions", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0}, + {"Processor Aggregator Device", NULL, ACPI_OSI_OPTIONAL_FEATURE, 0} }; @@ -172,13 +171,26 @@ AcpiUtInterfaceTerminate ( { AcpiGbl_SupportedInterfaces = NextInterface->Next; - /* Only interfaces added at runtime can be freed */ - if (NextInterface->Flags & ACPI_OSI_DYNAMIC) { + /* Only interfaces added at runtime can be freed */ + ACPI_FREE (NextInterface->Name); ACPI_FREE (NextInterface); } + else + { + /* Interface is in static list. Reset it to invalid or valid. */ + + if (NextInterface->Flags & ACPI_OSI_DEFAULT_INVALID) + { + NextInterface->Flags |= ACPI_OSI_INVALID; + } + else + { + NextInterface->Flags &= ~ACPI_OSI_INVALID; + } + } NextInterface = AcpiGbl_SupportedInterfaces; } @@ -307,6 +319,57 @@ AcpiUtRemoveInterface ( /******************************************************************************* * + * FUNCTION: AcpiUtUpdateInterfaces + * + * PARAMETERS: Action - Actions to be performed during the + * update + * + * RETURN: Status + * + * DESCRIPTION: Update _OSI interface strings, disabling or enabling OS vendor + * strings or/and feature group strings. + * Caller MUST hold AcpiGbl_OsiMutex + * + ******************************************************************************/ + +ACPI_STATUS +AcpiUtUpdateInterfaces ( + UINT8 Action) +{ + ACPI_INTERFACE_INFO *NextInterface; + + + NextInterface = AcpiGbl_SupportedInterfaces; + while (NextInterface) + { + if (((NextInterface->Flags & ACPI_OSI_FEATURE) && + (Action & ACPI_FEATURE_STRINGS)) || + (!(NextInterface->Flags & ACPI_OSI_FEATURE) && + (Action & ACPI_VENDOR_STRINGS))) + { + if (Action & ACPI_DISABLE_INTERFACES) + { + /* Mark the interfaces as invalid */ + + NextInterface->Flags |= ACPI_OSI_INVALID; + } + else + { + /* Mark the interfaces as valid */ + + NextInterface->Flags &= ~ACPI_OSI_INVALID; + } + } + + NextInterface = NextInterface->Next; + } + + return (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiUtGetInterface * * PARAMETERS: InterfaceName - The interface to find diff --git a/source/components/utilities/utxface.c b/source/components/utilities/utxface.c index 4506980..021a462 100644 --- a/source/components/utilities/utxface.c +++ b/source/components/utilities/utxface.c @@ -499,6 +499,40 @@ ACPI_EXPORT_SYMBOL (AcpiInstallInterfaceHandler) /***************************************************************************** * + * FUNCTION: AcpiUpdateInterfaces + * + * PARAMETERS: Action - Actions to be performed during the + * update + * + * RETURN: Status + * + * DESCRIPTION: Update _OSI interface strings, disabling or enabling OS vendor + * string or/and feature group strings. + * + ****************************************************************************/ + +ACPI_STATUS +AcpiUpdateInterfaces ( + UINT8 Action) +{ + ACPI_STATUS Status; + + + Status = AcpiOsAcquireMutex (AcpiGbl_OsiMutex, ACPI_WAIT_FOREVER); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + Status = AcpiUtUpdateInterfaces (Action); + + AcpiOsReleaseMutex (AcpiGbl_OsiMutex); + return (Status); +} + + +/***************************************************************************** + * * FUNCTION: AcpiCheckAddressRange * * PARAMETERS: SpaceId - Address space ID |