diff options
Diffstat (limited to 'sys/contrib/dev/acpica/utilities/uteval.c')
-rw-r--r-- | sys/contrib/dev/acpica/utilities/uteval.c | 133 |
1 files changed, 0 insertions, 133 deletions
diff --git a/sys/contrib/dev/acpica/utilities/uteval.c b/sys/contrib/dev/acpica/utilities/uteval.c index c0790b4..399f05f 100644 --- a/sys/contrib/dev/acpica/utilities/uteval.c +++ b/sys/contrib/dev/acpica/utilities/uteval.c @@ -124,139 +124,6 @@ ACPI_MODULE_NAME ("uteval") -/* - * Strings supported by the _OSI predefined (internal) method. - * - * March 2009: Removed "Linux" as this host no longer wants to respond true - * for this string. Basically, the only safe OS strings are windows-related - * and in many or most cases represent the only test path within the - * BIOS-provided ASL code. - * - * The second element of each entry is used to track the newest version of - * Windows that the BIOS has requested. - */ -static const ACPI_INTERFACE_INFO AcpiInterfacesSupported[] = -{ - /* Operating System Vendor Strings */ - - {"Windows 2000", ACPI_OSI_WIN_2000}, /* Windows 2000 */ - {"Windows 2001", ACPI_OSI_WIN_XP}, /* Windows XP */ - {"Windows 2001 SP1", ACPI_OSI_WIN_XP_SP1}, /* Windows XP SP1 */ - {"Windows 2001.1", ACPI_OSI_WINSRV_2003}, /* Windows Server 2003 */ - {"Windows 2001 SP2", ACPI_OSI_WIN_XP_SP2}, /* Windows XP SP2 */ - {"Windows 2001.1 SP1", ACPI_OSI_WINSRV_2003_SP1}, /* Windows Server 2003 SP1 - Added 03/2006 */ - {"Windows 2006", ACPI_OSI_WIN_VISTA}, /* Windows Vista - Added 03/2006 */ - {"Windows 2006.1", ACPI_OSI_WINSRV_2008}, /* Windows Server 2008 - Added 09/2009 */ - {"Windows 2006 SP1", ACPI_OSI_WIN_VISTA_SP1}, /* Windows Vista SP1 - Added 09/2009 */ - {"Windows 2009", ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */ - - /* Feature Group Strings */ - - {"Extended Address Space Descriptor", 0} - - /* - * All "optional" feature group strings (features that are implemented - * by the host) should be implemented in the host version of - * AcpiOsValidateInterface and should not be added here. - */ -}; - - -/******************************************************************************* - * - * FUNCTION: AcpiUtOsiImplementation - * - * PARAMETERS: WalkState - Current walk state - * - * RETURN: Status - * - * DESCRIPTION: Implementation of the _OSI predefined control method - * - ******************************************************************************/ - -ACPI_STATUS -AcpiUtOsiImplementation ( - ACPI_WALK_STATE *WalkState) -{ - ACPI_STATUS Status; - ACPI_OPERAND_OBJECT *StringDesc; - ACPI_OPERAND_OBJECT *ReturnDesc; - UINT32 ReturnValue; - UINT32 i; - - - ACPI_FUNCTION_TRACE (UtOsiImplementation); - - - /* Validate the string input argument */ - - StringDesc = WalkState->Arguments[0].Object; - if (!StringDesc || (StringDesc->Common.Type != ACPI_TYPE_STRING)) - { - return_ACPI_STATUS (AE_TYPE); - } - - /* Create a return object */ - - ReturnDesc = AcpiUtCreateInternalObject (ACPI_TYPE_INTEGER); - if (!ReturnDesc) - { - return_ACPI_STATUS (AE_NO_MEMORY); - } - - /* Default return value is 0, NOT SUPPORTED */ - - ReturnValue = 0; - - /* Compare input string to static table of supported interfaces */ - - for (i = 0; i < ACPI_ARRAY_LENGTH (AcpiInterfacesSupported); i++) - { - if (!ACPI_STRCMP (StringDesc->String.Pointer, - AcpiInterfacesSupported[i].Name)) - { - /* - * The interface is supported. - * Update the OsiData if necessary. We keep track of the latest - * version of Windows that has been requested by the BIOS. - */ - if (AcpiInterfacesSupported[i].Value > AcpiGbl_OsiData) - { - AcpiGbl_OsiData = AcpiInterfacesSupported[i].Value; - } - - ReturnValue = ACPI_UINT32_MAX; - goto Exit; - } - } - - /* - * Did not match the string in the static table, call the host OSL to - * check for a match with one of the optional strings (such as - * "Module Device", "3.0 Thermal Model", etc.) - */ - Status = AcpiOsValidateInterface (StringDesc->String.Pointer); - if (ACPI_SUCCESS (Status)) - { - /* The interface is supported */ - - ReturnValue = ACPI_UINT32_MAX; - } - - -Exit: - ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO, - "ACPI: BIOS _OSI(%s) is %ssupported\n", - StringDesc->String.Pointer, ReturnValue == 0 ? "not " : "")); - - /* Complete the return value */ - - ReturnDesc->Integer.Value = ReturnValue; - WalkState->ReturnDesc = ReturnDesc; - return_ACPI_STATUS (AE_OK); -} - - /******************************************************************************* * * FUNCTION: AcpiUtEvaluateObject |