From f5f00ea0addfa0016f8bfc2ffb0e1fc4fcb2ca8c Mon Sep 17 00:00:00 2001 From: njl Date: Tue, 25 May 2004 02:40:48 +0000 Subject: Local change: remove warnings. --- sys/contrib/dev/acpica/hwregs.c | 33 ++++++++++++----------- sys/contrib/dev/acpica/uteval.c | 22 ++++++++------- sys/contrib/dev/acpica/utglobal.c | 56 ++++++++++++++++++++++++--------------- 3 files changed, 66 insertions(+), 45 deletions(-) (limited to 'sys/contrib') diff --git a/sys/contrib/dev/acpica/hwregs.c b/sys/contrib/dev/acpica/hwregs.c index 614e9137..613884e 100644 --- a/sys/contrib/dev/acpica/hwregs.c +++ b/sys/contrib/dev/acpica/hwregs.c @@ -3,7 +3,7 @@ * * Module Name: hwregs - Read/write access functions for the various ACPI * control and status registers. - * $Revision: 154 $ + * $Revision: 156 $ * ******************************************************************************/ @@ -215,7 +215,7 @@ AcpiGetSleepTypeData ( UINT8 *SleepTypeB) { ACPI_STATUS Status = AE_OK; - ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_PARAMETER_INFO Info; ACPI_FUNCTION_TRACE ("AcpiGetSleepTypeData"); @@ -233,8 +233,9 @@ AcpiGetSleepTypeData ( /* * Evaluate the namespace object containing the values for this state */ + Info.Parameters = NULL; Status = AcpiNsEvaluateByName ((char *) (uintptr_t) AcpiGbl_SleepStateNames[SleepState], - NULL, &ObjDesc); + &Info); if (ACPI_FAILURE (Status)) { ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s while evaluating SleepState [%s]\n", @@ -245,7 +246,7 @@ AcpiGetSleepTypeData ( /* Must have a return object */ - if (!ObjDesc) + if (!Info.ReturnObject) { ACPI_REPORT_ERROR (("Missing Sleep State object\n")); Status = AE_NOT_EXIST; @@ -253,7 +254,7 @@ AcpiGetSleepTypeData ( /* It must be of type Package */ - else if (ACPI_GET_OBJECT_TYPE (ObjDesc) != ACPI_TYPE_PACKAGE) + else if (ACPI_GET_OBJECT_TYPE (Info.ReturnObject) != ACPI_TYPE_PACKAGE) { ACPI_REPORT_ERROR (("Sleep State object not a Package\n")); Status = AE_AML_OPERAND_TYPE; @@ -261,7 +262,7 @@ AcpiGetSleepTypeData ( /* The package must have at least two elements */ - else if (ObjDesc->Package.Count < 2) + else if (Info.ReturnObject->Package.Count < 2) { ACPI_REPORT_ERROR (("Sleep State package does not have at least two elements\n")); Status = AE_AML_NO_OPERAND; @@ -269,12 +270,12 @@ AcpiGetSleepTypeData ( /* The first two elements must both be of type Integer */ - else if ((ACPI_GET_OBJECT_TYPE (ObjDesc->Package.Elements[0]) != ACPI_TYPE_INTEGER) || - (ACPI_GET_OBJECT_TYPE (ObjDesc->Package.Elements[1]) != ACPI_TYPE_INTEGER)) + else if ((ACPI_GET_OBJECT_TYPE (Info.ReturnObject->Package.Elements[0]) != ACPI_TYPE_INTEGER) || + (ACPI_GET_OBJECT_TYPE (Info.ReturnObject->Package.Elements[1]) != ACPI_TYPE_INTEGER)) { ACPI_REPORT_ERROR (("Sleep State package elements are not both Integers (%s, %s)\n", - AcpiUtGetObjectTypeName (ObjDesc->Package.Elements[0]), - AcpiUtGetObjectTypeName (ObjDesc->Package.Elements[1]))); + AcpiUtGetObjectTypeName (Info.ReturnObject->Package.Elements[0]), + AcpiUtGetObjectTypeName (Info.ReturnObject->Package.Elements[1]))); Status = AE_AML_OPERAND_TYPE; } else @@ -282,17 +283,19 @@ AcpiGetSleepTypeData ( /* * Valid _Sx_ package size, type, and value */ - *SleepTypeA = (UINT8) (ObjDesc->Package.Elements[0])->Integer.Value; - *SleepTypeB = (UINT8) (ObjDesc->Package.Elements[1])->Integer.Value; + *SleepTypeA = (UINT8) (Info.ReturnObject->Package.Elements[0])->Integer.Value; + *SleepTypeB = (UINT8) (Info.ReturnObject->Package.Elements[1])->Integer.Value; } if (ACPI_FAILURE (Status)) { - ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "While evaluating SleepState [%s], bad Sleep object %p type %s\n", - AcpiGbl_SleepStateNames[SleepState], ObjDesc, AcpiUtGetObjectTypeName (ObjDesc))); + ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, + "While evaluating SleepState [%s], bad Sleep object %p type %s\n", + AcpiGbl_SleepStateNames[SleepState], Info.ReturnObject, + AcpiUtGetObjectTypeName (Info.ReturnObject))); } - AcpiUtRemoveReference (ObjDesc); + AcpiUtRemoveReference (Info.ReturnObject); return_ACPI_STATUS (Status); } diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c index bb86b3a..7269927 100644 --- a/sys/contrib/dev/acpica/uteval.c +++ b/sys/contrib/dev/acpica/uteval.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: uteval - Object evaluation - * $Revision: 52 $ + * $Revision: 54 $ * *****************************************************************************/ @@ -170,7 +170,7 @@ AcpiUtOsiImplementation ( for (i = 0; i < ACPI_NUM_OSI_STRINGS; i++) { - if (!ACPI_STRCMP (StringDesc->String.Pointer, + if (!ACPI_STRCMP (StringDesc->String.Pointer, (char *) (uintptr_t) AcpiGbl_ValidOsiStrings[i])) { /* This string is supported */ @@ -211,7 +211,7 @@ AcpiUtEvaluateObject ( UINT32 ExpectedReturnBtypes, ACPI_OPERAND_OBJECT **ReturnDesc) { - ACPI_OPERAND_OBJECT *ObjDesc; + ACPI_PARAMETER_INFO Info; ACPI_STATUS Status; UINT32 ReturnBtype; @@ -219,9 +219,13 @@ AcpiUtEvaluateObject ( ACPI_FUNCTION_TRACE ("UtEvaluateObject"); + Info.Node = PrefixNode; + Info.Parameters = NULL; + Info.ParameterType = ACPI_PARAM_ARGS; + /* Evaluate the object/method */ - Status = AcpiNsEvaluateRelative (PrefixNode, Path, NULL, &ObjDesc); + Status = AcpiNsEvaluateRelative (Path, &Info); if (ACPI_FAILURE (Status)) { if (Status == AE_NOT_FOUND) @@ -240,7 +244,7 @@ AcpiUtEvaluateObject ( /* Did we get a return object? */ - if (!ObjDesc) + if (!Info.ReturnObject) { if (ExpectedReturnBtypes) { @@ -255,7 +259,7 @@ AcpiUtEvaluateObject ( /* Map the return object type to the bitmapped type */ - switch (ACPI_GET_OBJECT_TYPE (ObjDesc)) + switch (ACPI_GET_OBJECT_TYPE (Info.ReturnObject)) { case ACPI_TYPE_INTEGER: ReturnBtype = ACPI_BTYPE_INTEGER; @@ -287,17 +291,17 @@ AcpiUtEvaluateObject ( ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Type returned from %s was incorrect: %X\n", - Path, ACPI_GET_OBJECT_TYPE (ObjDesc))); + Path, ACPI_GET_OBJECT_TYPE (Info.ReturnObject))); /* On error exit, we must delete the return object */ - AcpiUtRemoveReference (ObjDesc); + AcpiUtRemoveReference (Info.ReturnObject); return_ACPI_STATUS (AE_TYPE); } /* Object type is OK, return it */ - *ReturnDesc = ObjDesc; + *ReturnDesc = Info.ReturnObject; return_ACPI_STATUS (AE_OK); } diff --git a/sys/contrib/dev/acpica/utglobal.c b/sys/contrib/dev/acpica/utglobal.c index 1c61544..f1b183e 100644 --- a/sys/contrib/dev/acpica/utglobal.c +++ b/sys/contrib/dev/acpica/utglobal.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utglobal - Global variables for the ACPI subsystem - * $Revision: 198 $ + * $Revision: 201 $ * *****************************************************************************/ @@ -251,27 +251,40 @@ BOOLEAN AcpiGbl_Shutdown = TRUE; const UINT8 AcpiGbl_DecodeTo8bit [8] = {1,2,4,8,16,32,64,128}; -const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] = { - "\\_S0_", - "\\_S1_", - "\\_S2_", - "\\_S3_", - "\\_S4_", - "\\_S5_"}; - -const char *AcpiGbl_HighestDstateNames[4] = { - "_S1D", - "_S2D", - "_S3D", - "_S4D"}; +const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT] = +{ + "\\_S0_", + "\\_S1_", + "\\_S2_", + "\\_S3_", + "\\_S4_", + "\\_S5_" +}; -/* Strings supported by the _OSI predefined (internal) method */ +const char *AcpiGbl_HighestDstateNames[4] = +{ + "_S1D", + "_S2D", + "_S3D", + "_S4D" +}; -const char *AcpiGbl_ValidOsiStrings[ACPI_NUM_OSI_STRINGS] = { - "Linux", - "Windows 2000", - "Windows 2001", - "Windows 2001.1"}; +/* + * Strings supported by the _OSI predefined (internal) method. + * When adding strings, be sure to update ACPI_NUM_OSI_STRINGS. + */ +const char *AcpiGbl_ValidOsiStrings[ACPI_NUM_OSI_STRINGS] = +{ + "Linux", + "Windows 2000", + "Windows 2001", + "Windows 2001.1", + "Windows 2001 SP0", + "Windows 2001 SP1", + "Windows 2001 SP2", + "Windows 2001 SP3", + "Windows 2001 SP4" +}; /****************************************************************************** @@ -294,7 +307,7 @@ const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames[] = {"_PR_", ACPI_TYPE_LOCAL_SCOPE, NULL}, {"_SB_", ACPI_TYPE_DEVICE, NULL}, {"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL}, - {"_TZ_", ACPI_TYPE_LOCAL_SCOPE, NULL}, + {"_TZ_", ACPI_TYPE_THERMAL, NULL}, {"_REV", ACPI_TYPE_INTEGER, "2"}, {"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME}, {"_GL_", ACPI_TYPE_MUTEX, "0"}, @@ -968,6 +981,7 @@ AcpiUtInitGlobals ( /* Hardware oriented */ AcpiGbl_EventsInitialized = FALSE; + AcpiGbl_SystemAwakeAndRunning = TRUE; /* Namespace */ -- cgit v1.1