static acpi_status acpi_db_walk_for_predefined_names(acpi_handle obj_handle, u32 nesting_level, void *context, void **return_value) { struct acpi_namespace_node *node = (struct acpi_namespace_node *)obj_handle; u32 *count = (u32 *)context; const union acpi_predefined_info *predefined; const union acpi_predefined_info *package = NULL; char *pathname; char string_buffer[48]; predefined = acpi_ut_match_predefined_method(node->name.ascii); if (!predefined) { return (AE_OK); } pathname = acpi_ns_get_normalized_pathname(node, TRUE); if (!pathname) { return (AE_OK); } /* If method returns a package, the info is in the next table entry */ if (predefined->info.expected_btypes & ACPI_RTYPE_PACKAGE) { package = predefined + 1; } acpi_ut_get_expected_return_types(string_buffer, predefined->info.expected_btypes); acpi_os_printf("%-32s Arguments %X, Return Types: %s", pathname, METHOD_GET_ARG_COUNT(predefined->info.argument_list), string_buffer); if (package) { acpi_os_printf(" (PkgType %2.2X, ObjType %2.2X, Count %2.2X)", package->ret_info.type, package->ret_info.object_type1, package->ret_info.count1); } acpi_os_printf("\n"); /* Check that the declared argument count matches the ACPI spec */ acpi_ns_check_acpi_compliance(pathname, node, predefined); ACPI_FREE(pathname); (*count)++; return (AE_OK); }
void acpi_ut_display_predefined_method(char *buffer, const union acpi_predefined_info *this_name, u8 multi_line) { u32 arg_count; /* * Get the argument count and the string buffer * containing all argument types */ arg_count = acpi_ut_get_argument_types(buffer, this_name->info.argument_list); if (multi_line) { printf(" "); } printf("%4.4s Requires %s%u argument%s", this_name->info.name, (this_name->info.argument_list & ARG_COUNT_IS_MINIMUM) ? "(at least) " : "", arg_count, arg_count != 1 ? "s" : ""); /* Display the types for any arguments */ if (arg_count > 0) { printf(" (%s)", buffer); } if (multi_line) { printf("\n "); } /* Get the return value type(s) allowed */ if (this_name->info.expected_btypes) { acpi_ut_get_expected_return_types(buffer, this_name->info. expected_btypes); printf(" Return value types: %s\n", buffer); } else { printf(" No return value\n"); } }