/* Local prototypes */ #ifdef ACPI_OBSOLETE_FUNCTIONS
acpi_status acpi_db_second_pass_parse(union acpi_parse_object *root);
void acpi_db_dump_buffer(u32 address); #endif
/******************************************************************************* * * FUNCTION: acpi_db_match_argument * * PARAMETERS: user_argument - User command line * arguments - Array of commands to match against * * RETURN: Index into command array or ACPI_TYPE_NOT_FOUND if not found * * DESCRIPTION: Search command array for a command match *
******************************************************************************/
if (!user_argument || user_argument[0] == 0) { return (ACPI_TYPE_NOT_FOUND);
}
for (i = 0; arguments[i].name; i++) { if (strstr(ACPI_CAST_PTR(char, arguments[i].name),
ACPI_CAST_PTR(char,
user_argument)) == arguments[i].name) { return (i);
}
}
/* Argument not recognized */
return (ACPI_TYPE_NOT_FOUND);
}
/******************************************************************************* * * FUNCTION: acpi_db_set_output_destination * * PARAMETERS: output_flags - Current flags word * * RETURN: None * * DESCRIPTION: Set the current destination for debugger output. Also sets * the debug output level accordingly. *
******************************************************************************/
/******************************************************************************* * * FUNCTION: acpi_db_prep_namestring * * PARAMETERS: name - String to prepare * * RETURN: None * * DESCRIPTION: Translate all forward slashes and dots to backslashes. *
******************************************************************************/
void acpi_db_prep_namestring(char *name)
{
if (!name) { return;
}
acpi_ut_strupr(name);
/* Convert a leading forward slash to a backslash */
if (*name == '/') {
*name = '\\';
}
/* Ignore a leading backslash, this is the root prefix */
if (ACPI_IS_ROOT_PREFIX(*name)) {
name++;
}
/* Convert all slash path separators to dots */
while (*name) { if ((*name == '/') || (*name == '\\')) {
*name = '.';
}
name++;
}
}
/******************************************************************************* * * FUNCTION: acpi_db_local_ns_lookup * * PARAMETERS: name - Name to lookup * * RETURN: Pointer to a namespace node, null on failure * * DESCRIPTION: Lookup a name in the ACPI namespace * * Note: Currently begins search from the root. Could be enhanced to use * the current prefix (scope) node as the search beginning point. *
******************************************************************************/
status = acpi_ns_internalize_name(name, &internal_path); if (ACPI_FAILURE(status)) {
acpi_os_printf("Invalid namestring: %s\n", name); return (NULL);
}
/* * Lookup the name. * (Uses root node as the search starting point)
*/
status = acpi_ns_lookup(NULL, internal_path, ACPI_TYPE_ANY,
ACPI_IMODE_EXECUTE,
ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE,
NULL, &node); if (ACPI_FAILURE(status)) {
acpi_os_printf("Could not locate name: %s, %s\n",
name, acpi_format_exception(status));
}
ACPI_FREE(internal_path); return (node);
}
/******************************************************************************* * * FUNCTION: acpi_db_uint32_to_hex_string * * PARAMETERS: value - The value to be converted to string * buffer - Buffer for result (not less than 11 bytes) * * RETURN: None * * DESCRIPTION: Convert the unsigned 32-bit value to the hexadecimal image * * NOTE: It is the caller's responsibility to ensure that the length of buffer * is sufficient. *
******************************************************************************/
void acpi_db_uint32_to_hex_string(u32 value, char *buffer)
{ int i;
if (value == 0) {
strcpy(buffer, "0"); return;
}
buffer[8] = '\0';
for (i = 7; i >= 0; i--) {
buffer[i] = acpi_gbl_upper_hex_digits[value & 0x0F];
value = value >> 4;
}
}
#ifdef ACPI_OBSOLETE_FUNCTIONS /******************************************************************************* * * FUNCTION: acpi_db_second_pass_parse * * PARAMETERS: root - Root of the parse tree * * RETURN: Status * * DESCRIPTION: Second pass parse of the ACPI tables. We need to wait until * second pass to parse the control methods *
******************************************************************************/
acpi_status acpi_db_second_pass_parse(union acpi_parse_object *root)
{ union acpi_parse_object *op = root; union acpi_parse_object *method; union acpi_parse_object *search_op; union acpi_parse_object *start_op;
acpi_status status = AE_OK;
u32 base_aml_offset; struct acpi_walk_state *walk_state;
ACPI_FUNCTION_ENTRY();
acpi_os_printf("Pass two parse ....\n");
while (op) { if (op->common.aml_opcode == AML_METHOD_OP) {
method = op;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.