summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/utdecode.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2016-11-30 15:21:57 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-12-09 02:47:01 +0100
commit5a6e7ec3bfef2ea518061d8d5d77367952770efb (patch)
treedae270482af2f2186057173caf7e0069731501c3 /drivers/acpi/acpica/utdecode.c
parent173fcf80269969378c1ce4cb96b8f518f7081855 (diff)
downloadop-kernel-dev-5a6e7ec3bfef2ea518061d8d5d77367952770efb.zip
op-kernel-dev-5a6e7ec3bfef2ea518061d8d5d77367952770efb.tar.gz
ACPICA: Utilities: Add new decode function for parser values
ACPICA commit 198fde8a061ac77357bcf1752e3c988fbe59f128 Implements a decode function for the ARGP_* parser info values for all AML opcodes. Link: https://github.com/acpica/acpica/commit/198fde8a Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/utdecode.c')
-rw-r--r--drivers/acpi/acpica/utdecode.c49
1 files changed, 49 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c
index 15728ad..b3d8421 100644
--- a/drivers/acpi/acpica/utdecode.c
+++ b/drivers/acpi/acpica/utdecode.c
@@ -44,6 +44,7 @@
#include <acpi/acpi.h>
#include "accommon.h"
#include "acnamesp.h"
+#include "amlcode.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME("utdecode")
@@ -532,6 +533,54 @@ const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type)
return ("Hardware-Specific");
}
+
+/*******************************************************************************
+ *
+ * FUNCTION: acpi_ut_get_argument_type_name
+ *
+ * PARAMETERS: arg_type - an ARGP_* parser argument type
+ *
+ * RETURN: Decoded ARGP_* type
+ *
+ * DESCRIPTION: Decode an ARGP_* parser type, as defined in the amlcode.h file,
+ * and used in the acopcode.h file. For example, ARGP_TERMARG.
+ * Used for debug only.
+ *
+ ******************************************************************************/
+
+static const char *acpi_gbl_argument_type[20] = {
+ /* 00 */ "Unknown ARGP",
+ /* 01 */ "ByteData",
+ /* 02 */ "ByteList",
+ /* 03 */ "CharList",
+ /* 04 */ "DataObject",
+ /* 05 */ "DataObjectList",
+ /* 06 */ "DWordData",
+ /* 07 */ "FieldList",
+ /* 08 */ "Name",
+ /* 09 */ "NameString",
+ /* 0A */ "ObjectList",
+ /* 0B */ "PackageLength",
+ /* 0C */ "SuperName",
+ /* 0D */ "Target",
+ /* 0E */ "TermArg",
+ /* 0F */ "TermList",
+ /* 10 */ "WordData",
+ /* 11 */ "QWordData",
+ /* 12 */ "SimpleName",
+ /* 13 */ "NameOrRef"
+};
+
+const char *acpi_ut_get_argument_type_name(u32 arg_type)
+{
+
+ if (arg_type > ARGP_MAX) {
+ return ("Unknown ARGP");
+ }
+
+ return (acpi_gbl_argument_type[arg_type]);
+}
+
#endif
/*******************************************************************************
OpenPOWER on IntegriCloud