Commit ea143604 authored by Bob Moore's avatar Bob Moore Committed by Len Brown

ACPICA: ACPI 5: Update debug output for new notify values

Add new notify values, add support for "hardware specific" notifies.
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 653f4b53
...@@ -108,27 +108,30 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, ...@@ -108,27 +108,30 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
ACPI_FUNCTION_NAME(ev_queue_notify_request); ACPI_FUNCTION_NAME(ev_queue_notify_request);
/* /*
* For value 3 (Ejection Request), some device method may need to be run. * For value 0x03 (Ejection Request), may need to run a device method.
* For value 2 (Device Wake) if _PRW exists, the _PS0 method may need * For value 0x02 (Device Wake), if _PRW exists, may need to run
* to be run. * the _PS0 method.
* For value 0x80 (Status Change) on the power button or sleep button, * For value 0x80 (Status Change) on the power button or sleep button,
* initiate soft-off or sleep operation? * initiate soft-off or sleep operation.
*
* For all cases, simply dispatch the notify to the handler.
*/ */
ACPI_DEBUG_PRINT((ACPI_DB_INFO, ACPI_DEBUG_PRINT((ACPI_DB_INFO,
"Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n", "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n",
acpi_ut_get_node_name(node), node, notify_value, acpi_ut_get_node_name(node),
acpi_ut_get_notify_name(notify_value))); acpi_ut_get_type_name(node->type), notify_value,
acpi_ut_get_notify_name(notify_value), node));
/* Get the notify object attached to the NS Node */ /* Get the notify object attached to the NS Node */
obj_desc = acpi_ns_get_attached_object(node); obj_desc = acpi_ns_get_attached_object(node);
if (obj_desc) { if (obj_desc) {
/* We have the notify object, Get the right handler */ /* We have the notify object, Get the correct handler */
switch (node->type) { switch (node->type) {
/* Notify allowed only on these types */ /* Notify is allowed only on these types */
case ACPI_TYPE_DEVICE: case ACPI_TYPE_DEVICE:
case ACPI_TYPE_THERMAL: case ACPI_TYPE_THERMAL:
...@@ -152,7 +155,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, ...@@ -152,7 +155,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node,
} }
/* /*
* If there is any handler to run, schedule the dispatcher. * If there is a handler to run, schedule the dispatcher.
* Check for: * Check for:
* 1) Global system notify handler * 1) Global system notify handler
* 2) Global device notify handler * 2) Global device notify handler
......
...@@ -497,19 +497,20 @@ char *acpi_ut_get_mutex_name(u32 mutex_id) ...@@ -497,19 +497,20 @@ char *acpi_ut_get_mutex_name(u32 mutex_id)
/* Names for Notify() values, used for debug output */ /* Names for Notify() values, used for debug output */
static const char *acpi_gbl_notify_value_names[] = { static const char *acpi_gbl_notify_value_names[ACPI_NOTIFY_MAX + 1] = {
"Bus Check", /* 00 */ "Bus Check",
"Device Check", /* 01 */ "Device Check",
"Device Wake", /* 02 */ "Device Wake",
"Eject Request", /* 03 */ "Eject Request",
"Device Check Light", /* 04 */ "Device Check Light",
"Frequency Mismatch", /* 05 */ "Frequency Mismatch",
"Bus Mode Mismatch", /* 06 */ "Bus Mode Mismatch",
"Power Fault", /* 07 */ "Power Fault",
"Capabilities Check", /* 08 */ "Capabilities Check",
"Device PLD Check", /* 09 */ "Device PLD Check",
"Reserved", /* 10 */ "Reserved",
"System Locality Update" /* 11 */ "System Locality Update",
/* 12 */ "Shutdown Request"
}; };
const char *acpi_ut_get_notify_name(u32 notify_value) const char *acpi_ut_get_notify_name(u32 notify_value)
...@@ -519,9 +520,10 @@ const char *acpi_ut_get_notify_name(u32 notify_value) ...@@ -519,9 +520,10 @@ const char *acpi_ut_get_notify_name(u32 notify_value)
return (acpi_gbl_notify_value_names[notify_value]); return (acpi_gbl_notify_value_names[notify_value]);
} else if (notify_value <= ACPI_MAX_SYS_NOTIFY) { } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) {
return ("Reserved"); return ("Reserved");
} else { /* Greater or equal to 0x80 */ } else if (notify_value <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) {
return ("Device Specific");
return ("**Device Specific**"); } else {
return ("Hardware Specific");
} }
} }
#endif #endif
......
...@@ -532,8 +532,9 @@ typedef u64 acpi_integer; ...@@ -532,8 +532,9 @@ typedef u64 acpi_integer;
#define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09
#define ACPI_NOTIFY_RESERVED (u8) 0x0A #define ACPI_NOTIFY_RESERVED (u8) 0x0A
#define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B
#define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C
#define ACPI_NOTIFY_MAX 0x0B #define ACPI_NOTIFY_MAX 0x0C
/* /*
* Types associated with ACPI names and objects. The first group of * Types associated with ACPI names and objects. The first group of
...@@ -698,7 +699,8 @@ typedef u32 acpi_event_status; ...@@ -698,7 +699,8 @@ typedef u32 acpi_event_status;
#define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY)
#define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3
#define ACPI_MAX_SYS_NOTIFY 0x7f #define ACPI_MAX_SYS_NOTIFY 0x7F
#define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF
/* Address Space (Operation Region) Types */ /* Address Space (Operation Region) Types */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment