diff options
author | Bob Moore <robert.moore@intel.com> | 2016-11-30 02:21:57 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-08 20:47:01 -0500 |
commit | 5a6e7ec3bfef2ea518061d8d5d77367952770efb (patch) | |
tree | dae270482af2f2186057173caf7e0069731501c3 | |
parent | 173fcf80269969378c1ce4cb96b8f518f7081855 (diff) |
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>
-rw-r--r-- | drivers/acpi/acpica/acutils.h | 2 | ||||
-rw-r--r-- | drivers/acpi/acpica/amlcode.h | 1 | ||||
-rw-r--r-- | drivers/acpi/acpica/utdecode.c | 49 |
3 files changed, 52 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 0a1b53c9ee0e..845afb180a7e 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h | |||
@@ -232,6 +232,8 @@ const char *acpi_ut_get_region_name(u8 space_id); | |||
232 | 232 | ||
233 | const char *acpi_ut_get_event_name(u32 event_id); | 233 | const char *acpi_ut_get_event_name(u32 event_id); |
234 | 234 | ||
235 | const char *acpi_ut_get_argument_type_name(u32 arg_type); | ||
236 | |||
235 | char acpi_ut_hex_to_ascii_char(u64 integer, u32 position); | 237 | char acpi_ut_hex_to_ascii_char(u64 integer, u32 position); |
236 | 238 | ||
237 | acpi_status acpi_ut_ascii_to_hex_byte(char *two_ascii_chars, u8 *return_byte); | 239 | acpi_status acpi_ut_ascii_to_hex_byte(char *two_ascii_chars, u8 *return_byte); |
diff --git a/drivers/acpi/acpica/amlcode.h b/drivers/acpi/acpica/amlcode.h index ceb4f7365f7f..6bd8d4bcff65 100644 --- a/drivers/acpi/acpica/amlcode.h +++ b/drivers/acpi/acpica/amlcode.h | |||
@@ -240,6 +240,7 @@ | |||
240 | #define ARGP_QWORDDATA 0x11 | 240 | #define ARGP_QWORDDATA 0x11 |
241 | #define ARGP_SIMPLENAME 0x12 /* name_string | local_term | arg_term */ | 241 | #define ARGP_SIMPLENAME 0x12 /* name_string | local_term | arg_term */ |
242 | #define ARGP_NAME_OR_REF 0x13 /* For object_type only */ | 242 | #define ARGP_NAME_OR_REF 0x13 /* For object_type only */ |
243 | #define ARGP_MAX 0x13 | ||
243 | 244 | ||
244 | /* | 245 | /* |
245 | * Resolved argument types for the AML Interpreter | 246 | * Resolved argument types for the AML Interpreter |
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c index 15728ad8356b..b3d8421cfb80 100644 --- a/drivers/acpi/acpica/utdecode.c +++ b/drivers/acpi/acpica/utdecode.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <acpi/acpi.h> | 44 | #include <acpi/acpi.h> |
45 | #include "accommon.h" | 45 | #include "accommon.h" |
46 | #include "acnamesp.h" | 46 | #include "acnamesp.h" |
47 | #include "amlcode.h" | ||
47 | 48 | ||
48 | #define _COMPONENT ACPI_UTILITIES | 49 | #define _COMPONENT ACPI_UTILITIES |
49 | ACPI_MODULE_NAME("utdecode") | 50 | ACPI_MODULE_NAME("utdecode") |
@@ -532,6 +533,54 @@ const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type) | |||
532 | 533 | ||
533 | return ("Hardware-Specific"); | 534 | return ("Hardware-Specific"); |
534 | } | 535 | } |
536 | |||
537 | /******************************************************************************* | ||
538 | * | ||
539 | * FUNCTION: acpi_ut_get_argument_type_name | ||
540 | * | ||
541 | * PARAMETERS: arg_type - an ARGP_* parser argument type | ||
542 | * | ||
543 | * RETURN: Decoded ARGP_* type | ||
544 | * | ||
545 | * DESCRIPTION: Decode an ARGP_* parser type, as defined in the amlcode.h file, | ||
546 | * and used in the acopcode.h file. For example, ARGP_TERMARG. | ||
547 | * Used for debug only. | ||
548 | * | ||
549 | ******************************************************************************/ | ||
550 | |||
551 | static const char *acpi_gbl_argument_type[20] = { | ||
552 | /* 00 */ "Unknown ARGP", | ||
553 | /* 01 */ "ByteData", | ||
554 | /* 02 */ "ByteList", | ||
555 | /* 03 */ "CharList", | ||
556 | /* 04 */ "DataObject", | ||
557 | /* 05 */ "DataObjectList", | ||
558 | /* 06 */ "DWordData", | ||
559 | /* 07 */ "FieldList", | ||
560 | /* 08 */ "Name", | ||
561 | /* 09 */ "NameString", | ||
562 | /* 0A */ "ObjectList", | ||
563 | /* 0B */ "PackageLength", | ||
564 | /* 0C */ "SuperName", | ||
565 | /* 0D */ "Target", | ||
566 | /* 0E */ "TermArg", | ||
567 | /* 0F */ "TermList", | ||
568 | /* 10 */ "WordData", | ||
569 | /* 11 */ "QWordData", | ||
570 | /* 12 */ "SimpleName", | ||
571 | /* 13 */ "NameOrRef" | ||
572 | }; | ||
573 | |||
574 | const char *acpi_ut_get_argument_type_name(u32 arg_type) | ||
575 | { | ||
576 | |||
577 | if (arg_type > ARGP_MAX) { | ||
578 | return ("Unknown ARGP"); | ||
579 | } | ||
580 | |||
581 | return (acpi_gbl_argument_type[arg_type]); | ||
582 | } | ||
583 | |||
535 | #endif | 584 | #endif |
536 | 585 | ||
537 | /******************************************************************************* | 586 | /******************************************************************************* |