aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/uteval.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/uteval.c')
-rw-r--r--sys/contrib/dev/acpica/uteval.c57
1 files changed, 41 insertions, 16 deletions
diff --git a/sys/contrib/dev/acpica/uteval.c b/sys/contrib/dev/acpica/uteval.c
index 8969ad13ed5d..c1fd6d839673 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: 54 $
+ * $Revision: 1.59 $
*
*****************************************************************************/
@@ -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
@@ -124,6 +124,19 @@
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("uteval")
+/* Local prototypes */
+
+static void
+AcpiUtCopyIdString (
+ char *Destination,
+ char *Source,
+ ACPI_SIZE MaxLength);
+
+static ACPI_STATUS
+AcpiUtTranslateOneCid (
+ ACPI_OPERAND_OBJECT *ObjDesc,
+ ACPI_COMPATIBLE_ID *OneCid);
+
/*******************************************************************************
*
@@ -282,6 +295,18 @@ AcpiUtEvaluateObject (
break;
}
+ if ((AcpiGbl_EnableInterpreterSlack) &&
+ (!ExpectedReturnBtypes))
+ {
+ /*
+ * We received a return object, but one was not expected. This can
+ * happen frequently if the "implicit return" feature is enabled.
+ * Just delete the return object and return AE_OK.
+ */
+ AcpiUtRemoveReference (Info.ReturnObject);
+ return_ACPI_STATUS (AE_OK);
+ }
+
/* Is the return object one of the expected types? */
if (!(ExpectedReturnBtypes & ReturnBtype))
@@ -290,8 +315,9 @@ AcpiUtEvaluateObject (
PrefixNode, Path, AE_TYPE);
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
- "Type returned from %s was incorrect: %X\n",
- Path, ACPI_GET_OBJECT_TYPE (Info.ReturnObject)));
+ "Type returned from %s was incorrect: %s, expected Btypes: %X\n",
+ Path, AcpiUtGetObjectTypeName (Info.ReturnObject),
+ ExpectedReturnBtypes));
/* On error exit, we must delete the return object */
@@ -310,9 +336,9 @@ AcpiUtEvaluateObject (
*
* FUNCTION: AcpiUtEvaluateNumericObject
*
- * PARAMETERS: *ObjectName - Object name to be evaluated
+ * PARAMETERS: ObjectName - Object name to be evaluated
* DeviceNode - Node for the device
- * *Address - Where the value is returned
+ * Address - Where the value is returned
*
* RETURN: Status
*
@@ -377,7 +403,6 @@ AcpiUtCopyIdString (
ACPI_SIZE MaxLength)
{
-
/*
* Workaround for ID strings that have a leading asterisk. This construct
* is not allowed by the ACPI specification (ID strings must be
@@ -400,7 +425,7 @@ AcpiUtCopyIdString (
* FUNCTION: AcpiUtExecute_HID
*
* PARAMETERS: DeviceNode - Node for the device
- * *Hid - Where the HID is returned
+ * Hid - Where the HID is returned
*
* RETURN: Status
*
@@ -509,7 +534,7 @@ AcpiUtTranslateOneCid (
* FUNCTION: AcpiUtExecute_CID
*
* PARAMETERS: DeviceNode - Node for the device
- * *Cid - Where the CID is returned
+ * ReturnCidList - Where the CID list is returned
*
* RETURN: Status
*
@@ -571,10 +596,10 @@ AcpiUtExecute_CID (
CidList->Size = Size;
/*
- * A _CID can return either a single compatible ID or a package of compatible
- * IDs. Each compatible ID can be one of the following:
- * -- Number (32 bit compressed EISA ID) or
- * -- String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss").
+ * A _CID can return either a single compatible ID or a package of
+ * compatible IDs. Each compatible ID can be one of the following:
+ * 1) Integer (32 bit compressed EISA ID) or
+ * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss")
*/
/* The _CID object can be either a single CID or a package (list) of CIDs */
@@ -623,7 +648,7 @@ AcpiUtExecute_CID (
* FUNCTION: AcpiUtExecute_UID
*
* PARAMETERS: DeviceNode - Node for the device
- * *Uid - Where the UID is returned
+ * Uid - Where the UID is returned
*
* RETURN: Status
*
@@ -679,7 +704,7 @@ AcpiUtExecute_UID (
* FUNCTION: AcpiUtExecute_STA
*
* PARAMETERS: DeviceNode - Node for the device
- * *Flags - Where the status flags are returned
+ * Flags - Where the status flags are returned
*
* RETURN: Status
*
@@ -735,7 +760,7 @@ AcpiUtExecute_STA (
* FUNCTION: AcpiUtExecute_Sxds
*
* PARAMETERS: DeviceNode - Node for the device
- * *Flags - Where the status flags are returned
+ * Flags - Where the status flags are returned
*
* RETURN: Status
*