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

ACPICA: Debug output: print result of _OSI invocations

Print input strings and the result (supported or not supported)
for invocations of the _OSI method.
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 4f70e371
...@@ -98,6 +98,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) ...@@ -98,6 +98,7 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
acpi_status status; acpi_status status;
union acpi_operand_object *string_desc; union acpi_operand_object *string_desc;
union acpi_operand_object *return_desc; union acpi_operand_object *return_desc;
u32 return_value;
u32 i; u32 i;
ACPI_FUNCTION_TRACE(ut_osi_implementation); ACPI_FUNCTION_TRACE(ut_osi_implementation);
...@@ -116,10 +117,9 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) ...@@ -116,10 +117,9 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
return_ACPI_STATUS(AE_NO_MEMORY); return_ACPI_STATUS(AE_NO_MEMORY);
} }
/* Default return value is 0, NOT-SUPPORTED */ /* Default return value is 0, NOT SUPPORTED */
return_desc->integer.value = 0; return_value = 0;
walk_state->return_desc = return_desc;
/* Compare input string to static table of supported interfaces */ /* Compare input string to static table of supported interfaces */
...@@ -127,8 +127,11 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) ...@@ -127,8 +127,11 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
if (!ACPI_STRCMP if (!ACPI_STRCMP
(string_desc->string.pointer, (string_desc->string.pointer,
acpi_interfaces_supported[i])) { acpi_interfaces_supported[i])) {
return_desc->integer.value = ACPI_UINT32_MAX;
goto done; /* The interface is supported */
return_value = ACPI_UINT32_MAX;
goto exit;
} }
} }
...@@ -139,15 +142,22 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state) ...@@ -139,15 +142,22 @@ acpi_status acpi_ut_osi_implementation(struct acpi_walk_state *walk_state)
*/ */
status = acpi_os_validate_interface(string_desc->string.pointer); status = acpi_os_validate_interface(string_desc->string.pointer);
if (ACPI_SUCCESS(status)) { if (ACPI_SUCCESS(status)) {
return_desc->integer.value = ACPI_UINT32_MAX;
/* The interface is supported */
return_value = ACPI_UINT32_MAX;
} }
done: exit:
ACPI_DEBUG_PRINT_RAW((ACPI_DB_INFO, "ACPI: BIOS _OSI(%s) %ssupported\n", ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INFO,
string_desc->string.pointer, "ACPI: BIOS _OSI(%s) is %ssupported\n",
return_desc->integer.value == 0 ? "not-" : "")); string_desc->string.pointer, return_value == 0 ? "not " : ""));
return_ACPI_STATUS(AE_OK); /* Complete the return value */
return_desc->integer.value = return_value;
walk_state->return_desc = return_desc;
return_ACPI_STATUS (AE_OK);
} }
/******************************************************************************* /*******************************************************************************
......
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