| .. | .. |
|---|
| 24 | 24 | void acpi_db_method_end(struct acpi_walk_state *walk_state); |
|---|
| 25 | 25 | #endif |
|---|
| 26 | 26 | |
|---|
| 27 | +#ifdef ACPI_DISASSEMBLER |
|---|
| 28 | +static union acpi_parse_object *acpi_db_get_display_op(struct acpi_walk_state |
|---|
| 29 | + *walk_state, |
|---|
| 30 | + union acpi_parse_object |
|---|
| 31 | + *op); |
|---|
| 32 | +#endif |
|---|
| 33 | + |
|---|
| 27 | 34 | /******************************************************************************* |
|---|
| 28 | 35 | * |
|---|
| 29 | 36 | * FUNCTION: acpi_db_start_command |
|---|
| .. | .. |
|---|
| 113 | 120 | acpi_os_printf("**break** Executed AML BreakPoint opcode\n"); |
|---|
| 114 | 121 | } |
|---|
| 115 | 122 | |
|---|
| 123 | +#ifdef ACPI_DISASSEMBLER |
|---|
| 124 | +/******************************************************************************* |
|---|
| 125 | + * |
|---|
| 126 | + * FUNCTION: acpi_db_get_display_op |
|---|
| 127 | + * |
|---|
| 128 | + * PARAMETERS: walk_state - Current walk |
|---|
| 129 | + * op - Current executing op (from aml interpreter) |
|---|
| 130 | + * |
|---|
| 131 | + * RETURN: Opcode to display |
|---|
| 132 | + * |
|---|
| 133 | + * DESCRIPTION: Find the opcode to display during single stepping |
|---|
| 134 | + * |
|---|
| 135 | + ******************************************************************************/ |
|---|
| 136 | + |
|---|
| 137 | +static union acpi_parse_object *acpi_db_get_display_op(struct acpi_walk_state |
|---|
| 138 | + *walk_state, |
|---|
| 139 | + union acpi_parse_object |
|---|
| 140 | + *op) |
|---|
| 141 | +{ |
|---|
| 142 | + union acpi_parse_object *display_op; |
|---|
| 143 | + union acpi_parse_object *parent_op; |
|---|
| 144 | + |
|---|
| 145 | + display_op = op; |
|---|
| 146 | + parent_op = op->common.parent; |
|---|
| 147 | + if (parent_op) { |
|---|
| 148 | + if ((walk_state->control_state) && |
|---|
| 149 | + (walk_state->control_state->common.state == |
|---|
| 150 | + ACPI_CONTROL_PREDICATE_EXECUTING)) { |
|---|
| 151 | + /* |
|---|
| 152 | + * We are executing the predicate of an IF or WHILE statement |
|---|
| 153 | + * Search upwards for the containing IF or WHILE so that the |
|---|
| 154 | + * entire predicate can be displayed. |
|---|
| 155 | + */ |
|---|
| 156 | + while (parent_op) { |
|---|
| 157 | + if ((parent_op->common.aml_opcode == AML_IF_OP) |
|---|
| 158 | + || (parent_op->common.aml_opcode == |
|---|
| 159 | + AML_WHILE_OP)) { |
|---|
| 160 | + display_op = parent_op; |
|---|
| 161 | + break; |
|---|
| 162 | + } |
|---|
| 163 | + parent_op = parent_op->common.parent; |
|---|
| 164 | + } |
|---|
| 165 | + } else { |
|---|
| 166 | + while (parent_op) { |
|---|
| 167 | + if ((parent_op->common.aml_opcode == AML_IF_OP) |
|---|
| 168 | + || (parent_op->common.aml_opcode == |
|---|
| 169 | + AML_ELSE_OP) |
|---|
| 170 | + || (parent_op->common.aml_opcode == |
|---|
| 171 | + AML_SCOPE_OP) |
|---|
| 172 | + || (parent_op->common.aml_opcode == |
|---|
| 173 | + AML_METHOD_OP) |
|---|
| 174 | + || (parent_op->common.aml_opcode == |
|---|
| 175 | + AML_WHILE_OP)) { |
|---|
| 176 | + break; |
|---|
| 177 | + } |
|---|
| 178 | + display_op = parent_op; |
|---|
| 179 | + parent_op = parent_op->common.parent; |
|---|
| 180 | + } |
|---|
| 181 | + } |
|---|
| 182 | + } |
|---|
| 183 | + return display_op; |
|---|
| 184 | +} |
|---|
| 185 | +#endif |
|---|
| 186 | + |
|---|
| 116 | 187 | /******************************************************************************* |
|---|
| 117 | 188 | * |
|---|
| 118 | 189 | * FUNCTION: acpi_db_single_step |
|---|
| .. | .. |
|---|
| 134 | 205 | union acpi_parse_object *next; |
|---|
| 135 | 206 | acpi_status status = AE_OK; |
|---|
| 136 | 207 | u32 original_debug_level; |
|---|
| 137 | | - union acpi_parse_object *display_op; |
|---|
| 138 | | - union acpi_parse_object *parent_op; |
|---|
| 139 | 208 | u32 aml_offset; |
|---|
| 140 | 209 | |
|---|
| 141 | 210 | ACPI_FUNCTION_ENTRY(); |
|---|
| .. | .. |
|---|
| 222 | 291 | next = op->common.next; |
|---|
| 223 | 292 | op->common.next = NULL; |
|---|
| 224 | 293 | |
|---|
| 225 | | - display_op = op; |
|---|
| 226 | | - parent_op = op->common.parent; |
|---|
| 227 | | - if (parent_op) { |
|---|
| 228 | | - if ((walk_state->control_state) && |
|---|
| 229 | | - (walk_state->control_state->common.state == |
|---|
| 230 | | - ACPI_CONTROL_PREDICATE_EXECUTING)) { |
|---|
| 231 | | - /* |
|---|
| 232 | | - * We are executing the predicate of an IF or WHILE statement |
|---|
| 233 | | - * Search upwards for the containing IF or WHILE so that the |
|---|
| 234 | | - * entire predicate can be displayed. |
|---|
| 235 | | - */ |
|---|
| 236 | | - while (parent_op) { |
|---|
| 237 | | - if ((parent_op->common.aml_opcode == |
|---|
| 238 | | - AML_IF_OP) |
|---|
| 239 | | - || (parent_op->common.aml_opcode == |
|---|
| 240 | | - AML_WHILE_OP)) { |
|---|
| 241 | | - display_op = parent_op; |
|---|
| 242 | | - break; |
|---|
| 243 | | - } |
|---|
| 244 | | - parent_op = parent_op->common.parent; |
|---|
| 245 | | - } |
|---|
| 246 | | - } else { |
|---|
| 247 | | - while (parent_op) { |
|---|
| 248 | | - if ((parent_op->common.aml_opcode == |
|---|
| 249 | | - AML_IF_OP) |
|---|
| 250 | | - || (parent_op->common.aml_opcode == |
|---|
| 251 | | - AML_ELSE_OP) |
|---|
| 252 | | - || (parent_op->common.aml_opcode == |
|---|
| 253 | | - AML_SCOPE_OP) |
|---|
| 254 | | - || (parent_op->common.aml_opcode == |
|---|
| 255 | | - AML_METHOD_OP) |
|---|
| 256 | | - || (parent_op->common.aml_opcode == |
|---|
| 257 | | - AML_WHILE_OP)) { |
|---|
| 258 | | - break; |
|---|
| 259 | | - } |
|---|
| 260 | | - display_op = parent_op; |
|---|
| 261 | | - parent_op = parent_op->common.parent; |
|---|
| 262 | | - } |
|---|
| 263 | | - } |
|---|
| 264 | | - } |
|---|
| 265 | | - |
|---|
| 266 | 294 | /* Now we can disassemble and display it */ |
|---|
| 267 | 295 | |
|---|
| 268 | 296 | #ifdef ACPI_DISASSEMBLER |
|---|
| 269 | | - acpi_dm_disassemble(walk_state, display_op, ACPI_UINT32_MAX); |
|---|
| 297 | + acpi_dm_disassemble(walk_state, |
|---|
| 298 | + acpi_db_get_display_op(walk_state, op), |
|---|
| 299 | + ACPI_UINT32_MAX); |
|---|
| 270 | 300 | #else |
|---|
| 271 | 301 | /* |
|---|
| 272 | 302 | * The AML Disassembler is not configured - at least we can |
|---|
| .. | .. |
|---|
| 379 | 409 | acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT; |
|---|
| 380 | 410 | |
|---|
| 381 | 411 | acpi_gbl_db_opt_no_ini_methods = FALSE; |
|---|
| 412 | + acpi_gbl_db_opt_no_region_support = FALSE; |
|---|
| 382 | 413 | |
|---|
| 383 | 414 | acpi_gbl_db_buffer = acpi_os_allocate(ACPI_DEBUG_BUFFER_SIZE); |
|---|
| 384 | 415 | if (!acpi_gbl_db_buffer) { |
|---|