summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-08-04 10:40:09 +0800
committerLen Brown <len.brown@intel.com>2008-10-22 23:14:39 -0400
commitf02a99ac66748f8b62477c86f6df04d3ec6169fd (patch)
treeed52463cd238ded9acf88d93c6b4360209d44f14 /drivers
parentd00d23651d17a2848f6923f3b1ec4efe19f5f2f1 (diff)
downloadop-kernel-dev-f02a99ac66748f8b62477c86f6df04d3ec6169fd.zip
op-kernel-dev-f02a99ac66748f8b62477c86f6df04d3ec6169fd.tar.gz
ACPICA: Add function to decode reference obj types to strings
Created for improved error messages. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/utilities/utglobal.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/acpi/utilities/utglobal.c b/drivers/acpi/utilities/utglobal.c
index 248eefc..bcace57 100644
--- a/drivers/acpi/utilities/utglobal.c
+++ b/drivers/acpi/utilities/utglobal.c
@@ -45,6 +45,7 @@
#include <acpi/acpi.h>
#include <acpi/acnamesp.h>
+#include <acpi/amlcode.h>
ACPI_EXPORT_SYMBOL(acpi_gbl_FADT)
#define _COMPONENT ACPI_UTILITIES
@@ -575,6 +576,41 @@ char *acpi_ut_get_descriptor_name(void *object)
}
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_ut_get_reference_name
+ *
+ * PARAMETERS: Object - An ACPI reference object
+ *
+ * RETURN: Pointer to a string
+ *
+ * DESCRIPTION: Decode a reference object sub-type to a string.
+ *
+ ******************************************************************************/
+
+/* Printable names of reference object sub-types */
+
+const char *acpi_ut_get_reference_name(union acpi_operand_object *object)
+{
+
+ switch (object->reference.opcode) {
+ case AML_INT_NAMEPATH_OP:
+ return "Name";
+
+ case AML_LOAD_OP:
+ return "DDB-Handle";
+
+ case AML_REF_OF_OP:
+ return "RefOf";
+
+ case AML_INDEX_OP:
+ return "Index";
+
+ default:
+ return "Unknown";
+ }
+}
+
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
/*
* Strings and procedures used for debug only
OpenPOWER on IntegriCloud