/******************************************************************************* * * FUNCTION: acpi_db_set_method_breakpoint * * PARAMETERS: location - AML offset of breakpoint * walk_state - Current walk info * op - Current Op (from parse walk) * * RETURN: None * * DESCRIPTION: Set a breakpoint in a control method at the specified * AML offset *
******************************************************************************/
if (!op) {
acpi_os_printf("There is no method currently executing\n"); return;
}
/* Get and verify the breakpoint address */
address = strtoul(location, NULL, 16);
aml_offset = (u32)ACPI_PTR_DIFF(op->common.aml,
walk_state->parser_state.aml_start); if (address <= aml_offset) {
acpi_os_printf("Breakpoint %X is beyond current address %X\n",
address, aml_offset);
}
/* Save breakpoint in current walk */
walk_state->user_breakpoint = address;
acpi_os_printf("Breakpoint set at AML offset %X\n", address);
}
/******************************************************************************* * * FUNCTION: acpi_db_set_method_call_breakpoint * * PARAMETERS: op - Current Op (from parse walk) * * RETURN: None * * DESCRIPTION: Set a breakpoint in a control method at the specified * AML offset *
******************************************************************************/
if (!op) {
acpi_os_printf("There is no method currently executing\n"); return;
}
acpi_gbl_step_to_next_call = TRUE;
}
/******************************************************************************* * * FUNCTION: acpi_db_set_method_data * * PARAMETERS: type_arg - L for local, A for argument * index_arg - which one * value_arg - Value to set. * * RETURN: None * * DESCRIPTION: Set a local or argument for the running control method. * NOTE: only object supported is Number. *
******************************************************************************/
acpi_ut_strupr(type_arg);
type = type_arg[0]; if ((type != 'L') && (type != 'A') && (type != 'N')) {
acpi_os_printf("Invalid SET operand: %s\n", type_arg); return;
}
value = strtoul(value_arg, NULL, 16);
if (type == 'N') {
node = acpi_db_convert_to_node(index_arg); if (!node) { return;
}
if (node->type != ACPI_TYPE_INTEGER) {
acpi_os_printf("Can only set Integer nodes\n"); return;
}
obj_desc = node->object;
obj_desc->integer.value = value; return;
}
/* Get the index and value */
index = strtoul(index_arg, NULL, 16);
walk_state = acpi_ds_get_current_walk_state(acpi_gbl_current_walk_list); if (!walk_state) {
acpi_os_printf("There is no method currently executing\n"); return;
}
/* Create and initialize the new object */
obj_desc = acpi_ut_create_integer_object((u64)value); if (!obj_desc) {
acpi_os_printf("Could not create an internal object\n"); return;
}
#ifdef ACPI_DISASSEMBLER /******************************************************************************* * * FUNCTION: acpi_db_disassemble_aml * * PARAMETERS: statements - Number of statements to disassemble * op - Current Op (from parse walk) * * RETURN: None * * DESCRIPTION: Display disassembled AML (ASL) starting from Op for the number * of statements specified. *
******************************************************************************/
if (!op) {
acpi_os_printf("There is no method currently executing\n"); return;
}
if (statements) {
num_statements = strtoul(statements, NULL, 0);
}
acpi_dm_disassemble(NULL, op, num_statements);
}
/******************************************************************************* * * FUNCTION: acpi_db_disassemble_method * * PARAMETERS: name - Name of control method * * RETURN: None * * DESCRIPTION: Display disassembled AML (ASL) starting from Op for the number * of statements specified. *
******************************************************************************/
acpi_status acpi_db_disassemble_method(char *name)
{
acpi_status status; union acpi_parse_object *op; struct acpi_walk_state *walk_state; union acpi_operand_object *obj_desc; struct acpi_namespace_node *method;
method = acpi_db_convert_to_node(name); if (!method) { return (AE_BAD_PARAMETER);
}
if (method->type != ACPI_TYPE_METHOD) {
ACPI_ERROR((AE_INFO, "%s (%s): Object must be a control method",
name, acpi_ut_get_type_name(method->type))); return (AE_BAD_PARAMETER);
}
obj_desc = method->object;
op = acpi_ps_create_scope_op(obj_desc->method.aml_start); if (!op) { return (AE_NO_MEMORY);
}
/******************************************************************************* * * FUNCTION: acpi_db_evaluate_object * * PARAMETERS: node - Namespace node for the object * * RETURN: Status * * DESCRIPTION: Main execution function for the Evaluate/Execute/All debugger * commands. *
******************************************************************************/
predefined = acpi_ut_match_predefined_method(node->name.ascii); if (!predefined) { return (AE_OK);
}
if (node->type == ACPI_TYPE_LOCAL_SCOPE) { return (AE_OK);
}
acpi_db_evaluate_object(node);
/* Ignore status from object evaluation */
status = AE_OK;
/* Update count, check if we have executed enough methods */
info->count++; if (info->count >= info->max_count) {
status = AE_CTRL_TERMINATE;
}
return (status);
}
/******************************************************************************* * * FUNCTION: acpi_db_walk_for_execute_all * * PARAMETERS: Callback from walk_namespace * * RETURN: Status * * DESCRIPTION: Batch execution function. Evaluates all objects whose path ends * with the nameseg "Info->NameSeg". Used for the "ALL" command. *
******************************************************************************/
if (!ACPI_COMPARE_NAMESEG(node->name.ascii, info->name_seg)) { return (AE_OK);
}
if (node->type == ACPI_TYPE_LOCAL_SCOPE) { return (AE_OK);
}
/* Now evaluate the input object (node) */
acpi_db_evaluate_object(node);
/* Ignore status from method execution */
status = AE_OK;
/* Update count of executed methods/objects */
info->count++; return (status);
}
/******************************************************************************* * * FUNCTION: acpi_db_evaluate_predefined_names * * PARAMETERS: None * * RETURN: None * * DESCRIPTION: Namespace batch execution. Execute predefined names in the * namespace, up to the max count, if specified. *
******************************************************************************/
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.