Commit 90679878 authored by Andy Grover's avatar Andy Grover Committed by Linus Torvalds

[PATCH] ACPI patch 5/9

This is the update to the core interpreter code.
parent 3177bcb8
#
# Makefile for all Linux ACPI interpreter subdirectories
# EXCEPT for the ospm directory
#
O_TARGET := $(notdir $(CURDIR)).o
obj-$(CONFIG_ACPI) := $(patsubst %.c,%.o,$(wildcard *.c))
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
......
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
*
* Module Name: dbdisply - debug display commands
* $Revision: 57 $
* $Revision: 66 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -39,7 +39,7 @@
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbdisply")
ACPI_MODULE_NAME ("dbdisply")
/******************************************************************************
......@@ -75,8 +75,7 @@ acpi_db_get_pointer (
/* Simple flat pointer */
obj_ptr = (void *) STRTOUL (target, NULL, 16);
obj_ptr = ACPI_TO_POINTER (ACPI_STRTOUL (target, NULL, 16));
#endif
return (obj_ptr);
......@@ -107,7 +106,7 @@ acpi_db_dump_parser_descriptor (
acpi_os_printf ("Parser Op Descriptor:\n");
acpi_os_printf ("%20.20s : %4.4X\n", "Opcode", op->opcode);
DEBUG_ONLY_MEMBERS (acpi_os_printf ("%20.20s : %s\n", "Opcode Name", info->name));
ACPI_DEBUG_ONLY_MEMBERS (acpi_os_printf ("%20.20s : %s\n", "Opcode Name", info->name));
acpi_os_printf ("%20.20s : %p\n", "Value/Arg_list", op->value);
acpi_os_printf ("%20.20s : %p\n", "Parent", op->parent);
......@@ -136,6 +135,7 @@ acpi_db_decode_and_display_object (
{
void *obj_ptr;
acpi_namespace_node *node;
acpi_operand_object *obj_desc;
u32 display = DB_BYTE_DISPLAY;
NATIVE_CHAR buffer[80];
acpi_buffer ret_buf;
......@@ -150,7 +150,7 @@ acpi_db_decode_and_display_object (
/* Decode the output type */
if (output_type) {
STRUPR (output_type);
ACPI_STRUPR (output_type);
if (output_type[0] == 'W') {
display = DB_WORD_DISPLAY;
}
......@@ -162,7 +162,6 @@ acpi_db_decode_and_display_object (
}
}
ret_buf.length = sizeof (buffer);
ret_buf.pointer = buffer;
......@@ -177,8 +176,10 @@ acpi_db_decode_and_display_object (
/* Decode the object type */
if (VALID_DESCRIPTOR_TYPE ((obj_ptr), ACPI_DESC_TYPE_NAMED)) {
/* This is a Node */
switch (ACPI_GET_DESCRIPTOR_TYPE (obj_ptr)) {
case ACPI_DESC_TYPE_NAMED:
/* This is a namespace Node */
if (!acpi_os_readable (obj_ptr, sizeof (acpi_namespace_node))) {
acpi_os_printf ("Cannot read entire Named object at address %p\n", obj_ptr);
......@@ -187,10 +188,11 @@ acpi_db_decode_and_display_object (
node = obj_ptr;
goto dump_nte;
}
else if (VALID_DESCRIPTOR_TYPE ((obj_ptr), ACPI_DESC_TYPE_INTERNAL)) {
/* This is an ACPI OBJECT */
case ACPI_DESC_TYPE_INTERNAL:
/* This is a ACPI OPERAND OBJECT */
if (!acpi_os_readable (obj_ptr, sizeof (acpi_operand_object))) {
acpi_os_printf ("Cannot read entire ACPI object at address %p\n", obj_ptr);
......@@ -199,22 +201,27 @@ acpi_db_decode_and_display_object (
acpi_ut_dump_buffer (obj_ptr, sizeof (acpi_operand_object), display, ACPI_UINT32_MAX);
acpi_ex_dump_object_descriptor (obj_ptr, 1);
}
break;
else if (VALID_DESCRIPTOR_TYPE ((obj_ptr), ACPI_DESC_TYPE_PARSER)) {
/* This is an Parser Op object */
case ACPI_DESC_TYPE_PARSER:
/* This is a Parser Op object */
if (!acpi_os_readable (obj_ptr, sizeof (acpi_parse_object))) {
acpi_os_printf ("Cannot read entire Parser object at address %p\n", obj_ptr);
return;
}
acpi_ut_dump_buffer (obj_ptr, sizeof (acpi_parse_object), display, ACPI_UINT32_MAX);
acpi_db_dump_parser_descriptor ((acpi_parse_object *) obj_ptr);
}
break;
default:
/* Is not a recognizeable object */
else {
size = 16;
if (acpi_os_readable (obj_ptr, 64)) {
size = 64;
......@@ -223,12 +230,12 @@ acpi_db_decode_and_display_object (
/* Just dump some memory */
acpi_ut_dump_buffer (obj_ptr, size, display, ACPI_UINT32_MAX);
break;
}
return;
}
/* The parameter is a name string that must be resolved to a Named obj */
node = acpi_db_local_ns_lookup (target);
......@@ -257,15 +264,16 @@ acpi_db_decode_and_display_object (
acpi_ut_dump_buffer ((void *) node, sizeof (acpi_namespace_node), display, ACPI_UINT32_MAX);
acpi_ex_dump_node (node, 1);
if (node->object) {
acpi_os_printf ("\n_attached Object (%p):\n", node->object);
if (!acpi_os_readable (node->object, sizeof (acpi_operand_object))) {
acpi_os_printf ("Invalid internal ACPI Object at address %p\n", node->object);
obj_desc = acpi_ns_get_attached_object (node);
if (obj_desc) {
acpi_os_printf ("\n_attached Object (%p):\n", obj_desc);
if (!acpi_os_readable (obj_desc, sizeof (acpi_operand_object))) {
acpi_os_printf ("Invalid internal ACPI Object at address %p\n", obj_desc);
return;
}
acpi_ut_dump_buffer ((void *) node->object, sizeof (acpi_operand_object), display, ACPI_UINT32_MAX);
acpi_ex_dump_object_descriptor (node->object, 1);
acpi_ut_dump_buffer ((void *) obj_desc, sizeof (acpi_operand_object), display, ACPI_UINT32_MAX);
acpi_ex_dump_object_descriptor (obj_desc, 1);
}
}
......@@ -298,8 +306,8 @@ acpi_db_decode_internal_object (
switch (obj_desc->common.type) {
case ACPI_TYPE_INTEGER:
acpi_os_printf (" %.8X%.8X", HIDWORD (obj_desc->integer.value),
LODWORD (obj_desc->integer.value));
acpi_os_printf (" %.8X%.8X", ACPI_HIDWORD (obj_desc->integer.value),
ACPI_LODWORD (obj_desc->integer.value));
break;
......@@ -358,26 +366,32 @@ acpi_db_display_internal_object (
return;
}
/* Decode the object type */
else if (VALID_DESCRIPTOR_TYPE (obj_desc, ACPI_DESC_TYPE_PARSER)) {
switch (ACPI_GET_DESCRIPTOR_TYPE (obj_desc)) {
case ACPI_DESC_TYPE_PARSER:
acpi_os_printf ("<Parser> ");
}
break;
case ACPI_DESC_TYPE_NAMED:
else if (VALID_DESCRIPTOR_TYPE (obj_desc, ACPI_DESC_TYPE_NAMED)) {
acpi_os_printf ("<Node> Name %4.4s Type-%s",
&((acpi_namespace_node *)obj_desc)->name,
acpi_ut_get_type_name (((acpi_namespace_node *) obj_desc)->type));
if (((acpi_namespace_node *) obj_desc)->flags & ANOBJ_METHOD_ARG) {
acpi_os_printf (" [Method Arg]");
}
if (((acpi_namespace_node *) obj_desc)->flags & ANOBJ_METHOD_LOCAL) {
acpi_os_printf (" [Method Local]");
}
}
break;
case ACPI_DESC_TYPE_INTERNAL:
else if (VALID_DESCRIPTOR_TYPE (obj_desc, ACPI_DESC_TYPE_INTERNAL)) {
type = obj_desc->common.type;
if (type > INTERNAL_TYPE_MAX) {
acpi_os_printf (" Type %x [Invalid Type]", type);
......@@ -428,7 +442,7 @@ acpi_db_display_internal_object (
break;
case AML_INDEX_OP:
acpi_os_printf ("[Index] ");
acpi_os_printf ("[Index] ");
acpi_db_decode_internal_object (obj_desc->reference.object);
break;
......@@ -444,12 +458,16 @@ acpi_db_display_internal_object (
acpi_db_decode_internal_object (obj_desc);
break;
}
}
break;
default:
else {
acpi_os_printf ("<Not a valid ACPI Object Descriptor> ");
break;
}
acpi_os_printf ("\n");
}
......@@ -494,9 +512,9 @@ acpi_db_display_method_info (
}
obj_desc = walk_state->method_desc;
node = walk_state->method_node;
node = walk_state->method_node;
num_args = obj_desc->method.param_count;
num_args = obj_desc->method.param_count;
concurrency = obj_desc->method.concurrency;
acpi_os_printf ("Currently executing control method is [%4.4s]\n", &node->name);
......@@ -546,7 +564,6 @@ acpi_db_display_method_info (
break;
}
op = acpi_ps_get_depth_next (start_op, op);
}
......@@ -587,8 +604,6 @@ acpi_db_display_locals (void)
obj_desc = walk_state->method_desc;
node = walk_state->method_node;
acpi_os_printf ("Local Variables for method [%4.4s]:\n", &node->name);
for (i = 0; i < MTH_NUM_LOCALS; i++) {
......@@ -629,12 +644,13 @@ acpi_db_display_arguments (void)
}
obj_desc = walk_state->method_desc;
node = walk_state->method_node;
node = walk_state->method_node;
num_args = obj_desc->method.param_count;
num_args = obj_desc->method.param_count;
concurrency = obj_desc->method.concurrency;
acpi_os_printf ("Method [%4.4s] has %X arguments, max concurrency = %X\n", &node->name, num_args, concurrency);
acpi_os_printf ("Method [%4.4s] has %X arguments, max concurrency = %X\n",
&node->name, num_args, concurrency);
for (i = 0; i < num_args; i++) {
obj_desc = walk_state->arguments[i].object;
......@@ -679,7 +695,8 @@ acpi_db_display_results (void)
num_results = walk_state->results->results.num_results;
}
acpi_os_printf ("Method [%4.4s] has %X stacked result objects\n", &node->name, num_results);
acpi_os_printf ("Method [%4.4s] has %X stacked result objects\n",
&node->name, num_results);
for (i = 0; i < num_results; i++) {
obj_desc = walk_state->results->results.obj_desc[i];
......@@ -716,7 +733,6 @@ acpi_db_display_calling_tree (void)
}
node = walk_state->method_node;
acpi_os_printf ("Current Control Method Call Tree\n");
for (i = 0; walk_state; i++) {
......@@ -740,6 +756,10 @@ acpi_db_display_calling_tree (void)
*
* DESCRIPTION: Display the result of an AML opcode
*
* Note: Curently only displays the result object if we are single stepping.
* However, this output may be useful in other contexts and could be enabled
* to do so if needed.
*
******************************************************************************/
void
......@@ -748,10 +768,8 @@ acpi_db_display_result_object (
acpi_walk_state *walk_state)
{
/* TBD: [Future] We don't always want to display the result.
* For now, only display if single stepping
* however, this output is very useful in other contexts also
*/
/* Only display if single stepping */
if (!acpi_gbl_cm_single_step) {
return;
}
......@@ -781,7 +799,6 @@ acpi_db_display_argument_object (
acpi_walk_state *walk_state)
{
if (!acpi_gbl_cm_single_step) {
return;
}
......
/*******************************************************************************
*
* Module Name: dbexec - debugger control method execution
* $Revision: 34 $
* $Revision: 39 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -38,10 +38,10 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbexec")
ACPI_MODULE_NAME ("dbexec")
db_method_info acpi_gbl_db_method_info;
acpi_db_method_info acpi_gbl_db_method_info;
/*******************************************************************************
......@@ -59,7 +59,7 @@ db_method_info acpi_gbl_db_method_info;
acpi_status
acpi_db_execute_method (
db_method_info *info,
acpi_db_method_info *info,
acpi_buffer *return_obj)
{
acpi_status status;
......@@ -77,13 +77,12 @@ acpi_db_execute_method (
if (info->args && info->args[0]) {
for (i = 0; info->args[i] && i < MTH_NUM_ARGS; i++) {
params[i].type = ACPI_TYPE_INTEGER;
params[i].integer.value = STRTOUL (info->args[i], NULL, 16);
params[i].integer.value = ACPI_STRTOUL (info->args[i], NULL, 16);
}
param_objects.pointer = params;
param_objects.count = i;
}
else {
/* Setup default parameters */
......@@ -103,7 +102,6 @@ acpi_db_execute_method (
return_obj->pointer = acpi_gbl_db_buffer;
return_obj->length = ACPI_DEBUG_BUFFER_SIZE;
/* Do the actual method execution */
status = acpi_evaluate_object (NULL, info->pathname, &param_objects, return_obj);
......@@ -129,7 +127,7 @@ acpi_db_execute_method (
void
acpi_db_execute_setup (
db_method_info *info)
acpi_db_method_info *info)
{
/* Catenate the current scope to the supplied name */
......@@ -137,24 +135,24 @@ acpi_db_execute_setup (
info->pathname[0] = 0;
if ((info->name[0] != '\\') &&
(info->name[0] != '/')) {
STRCAT (info->pathname, acpi_gbl_db_scope_buf);
ACPI_STRCAT (info->pathname, acpi_gbl_db_scope_buf);
}
STRCAT (info->pathname, info->name);
ACPI_STRCAT (info->pathname, info->name);
acpi_db_prep_namestring (info->pathname);
acpi_db_set_output_destination (DB_DUPLICATE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_DUPLICATE_OUTPUT);
acpi_os_printf ("Executing %s\n", info->pathname);
if (info->flags & EX_SINGLE_STEP) {
acpi_gbl_cm_single_step = TRUE;
acpi_db_set_output_destination (DB_CONSOLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_CONSOLE_OUTPUT);
}
else {
/* No single step, allow redirection to a file */
acpi_db_set_output_destination (DB_REDIRECTABLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_REDIRECTABLE_OUTPUT);
}
}
......@@ -176,11 +174,11 @@ acpi_db_execute_setup (
u32
acpi_db_get_outstanding_allocations (void)
{
u32 i;
u32 outstanding = 0;
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
u32 i;
for (i = ACPI_MEM_LIST_FIRST_CACHE_LIST; i < ACPI_NUM_MEM_LISTS; i++) {
outstanding += (acpi_gbl_memory_lists[i].total_allocated -
......@@ -248,7 +246,7 @@ acpi_db_execute (
allocations = acpi_db_get_outstanding_allocations () - previous_allocations;
acpi_db_set_output_destination (DB_DUPLICATE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_DUPLICATE_OUTPUT);
if (allocations > 0) {
acpi_os_printf ("Outstanding: %ld allocations after execution\n",
......@@ -271,7 +269,7 @@ acpi_db_execute (
}
}
acpi_db_set_output_destination (DB_CONSOLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_CONSOLE_OUTPUT);
}
......@@ -288,12 +286,12 @@ acpi_db_execute (
*
******************************************************************************/
void
void ACPI_SYSTEM_XFACE
acpi_db_method_thread (
void *context)
{
acpi_status status;
db_method_info *info = context;
acpi_db_method_info *info = context;
u32 i;
acpi_buffer return_obj;
......@@ -344,15 +342,14 @@ acpi_db_create_execution_threads (
/* Get the arguments */
num_threads = STRTOUL (num_threads_arg, NULL, 0);
num_loops = STRTOUL (num_loops_arg, NULL, 0);
num_threads = ACPI_STRTOUL (num_threads_arg, NULL, 0);
num_loops = ACPI_STRTOUL (num_loops_arg, NULL, 0);
if (!num_threads || !num_loops) {
acpi_os_printf ("Bad argument: Threads %X, Loops %X\n", num_threads, num_loops);
return;
}
/* Create the synchronization semaphore */
status = acpi_os_create_semaphore (1, 0, &thread_gate);
......@@ -371,7 +368,6 @@ acpi_db_create_execution_threads (
acpi_db_execute_setup (&acpi_gbl_db_method_info);
/* Create the threads */
acpi_os_printf ("Creating %X threads to execute %X times each\n", num_threads, num_loops);
......@@ -380,7 +376,6 @@ acpi_db_create_execution_threads (
acpi_os_queue_for_execution (OSD_PRIORITY_MED, acpi_db_method_thread, &acpi_gbl_db_method_info);
}
/* Wait for all threads to complete */
i = num_threads;
......@@ -393,9 +388,9 @@ acpi_db_create_execution_threads (
acpi_os_delete_semaphore (thread_gate);
acpi_db_set_output_destination (DB_DUPLICATE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_DUPLICATE_OUTPUT);
acpi_os_printf ("All threads (%X) have completed\n", num_threads);
acpi_db_set_output_destination (DB_CONSOLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_CONSOLE_OUTPUT);
}
......
......@@ -2,12 +2,12 @@
*
* Module Name: dbfileio - Debugger file I/O commands. These can't usually
* be used when running the debugger in Ring 0 (Kernel mode)
* $Revision: 53 $
* $Revision: 59 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -35,7 +35,7 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbfileio")
ACPI_MODULE_NAME ("dbfileio")
/*
......@@ -64,7 +64,7 @@ acpi_table_header *acpi_gbl_db_table_ptr = NULL;
*
******************************************************************************/
acpi_object_type8
acpi_object_type
acpi_db_match_argument (
NATIVE_CHAR *user_argument,
ARGUMENT_INFO *arguments)
......@@ -77,8 +77,8 @@ acpi_db_match_argument (
}
for (i = 0; arguments[i].name; i++) {
if (STRSTR (arguments[i].name, user_argument) == arguments[i].name) {
return ((acpi_object_type8) i);
if (ACPI_STRSTR (arguments[i].name, user_argument) == arguments[i].name) {
return (i);
}
}
......@@ -141,7 +141,7 @@ acpi_db_open_debug_file (
acpi_gbl_debug_file = fopen (name, "w+");
if (acpi_gbl_debug_file) {
acpi_os_printf ("Debug output file %s opened\n", name);
STRCPY (acpi_gbl_db_debug_filename, name);
ACPI_STRCPY (acpi_gbl_db_debug_filename, name);
acpi_gbl_db_output_to_file = TRUE;
}
else {
......@@ -200,11 +200,11 @@ acpi_db_load_table(
/* We only support a limited number of table types */
if (STRNCMP ((char *) table_header.signature, DSDT_SIG, 4) &&
STRNCMP ((char *) table_header.signature, PSDT_SIG, 4) &&
STRNCMP ((char *) table_header.signature, SSDT_SIG, 4)) {
if (ACPI_STRNCMP ((char *) table_header.signature, DSDT_SIG, 4) &&
ACPI_STRNCMP ((char *) table_header.signature, PSDT_SIG, 4) &&
ACPI_STRNCMP ((char *) table_header.signature, SSDT_SIG, 4)) {
acpi_os_printf ("Table signature is invalid\n");
DUMP_BUFFER (&table_header, sizeof (acpi_table_header));
ACPI_DUMP_BUFFER (&table_header, sizeof (acpi_table_header));
return (AE_ERROR);
}
......@@ -224,7 +224,7 @@ acpi_db_load_table(
/* Copy the header to the buffer */
MEMCPY (*table_ptr, &table_header, sizeof (table_header));
ACPI_MEMCPY (*table_ptr, &table_header, sizeof (table_header));
/* Get the rest of the table */
......@@ -275,7 +275,7 @@ ae_local_load_table (
acpi_table_desc table_info;
FUNCTION_TRACE ("Ae_local_load_table");
ACPI_FUNCTION_TRACE ("Ae_local_load_table");
if (!table_ptr) {
return_ACPI_STATUS (AE_BAD_PARAMETER);
......@@ -354,7 +354,7 @@ acpi_db_load_acpi_table (
status = ae_local_load_table (acpi_gbl_db_table_ptr);
if (ACPI_FAILURE (status)) {
if (status == AE_EXIST) {
if (status == AE_ALREADY_EXISTS) {
acpi_os_printf ("Table %4.4s is already installed\n",
&acpi_gbl_db_table_ptr->signature);
}
......@@ -363,7 +363,6 @@ acpi_db_load_acpi_table (
acpi_format_exception (status));
}
acpi_os_free (acpi_gbl_db_table_ptr);
return (status);
}
......
/******************************************************************************
*
* Module Name: dbhistry - debugger HISTORY command
* $Revision: 19 $
* $Revision: 22 $
*
*****************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -38,7 +38,7 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbhistry")
ACPI_MODULE_NAME ("dbhistry")
#define HI_NO_HISTORY 0
......@@ -78,10 +78,9 @@ acpi_db_add_to_history (
NATIVE_CHAR *command_line)
{
/* Put command into the next available slot */
STRCPY (acpi_gbl_history_buffer[acpi_gbl_next_history_index].command, command_line);
ACPI_STRCPY (acpi_gbl_history_buffer[acpi_gbl_next_history_index].command, command_line);
acpi_gbl_history_buffer[acpi_gbl_next_history_index].cmd_num = acpi_gbl_next_cmd_num;
......@@ -100,12 +99,10 @@ acpi_db_add_to_history (
acpi_gbl_next_history_index = 0;
}
acpi_gbl_next_cmd_num++;
if (acpi_gbl_num_history < HISTORY_SIZE) {
acpi_gbl_num_history++;
}
}
......@@ -171,10 +168,9 @@ acpi_db_get_from_history (
}
else {
cmd_num = STRTOUL (command_num_arg, NULL, 0);
cmd_num = ACPI_STRTOUL (command_num_arg, NULL, 0);
}
/* Search history buffer */
history_index = acpi_gbl_lo_history;
......
/*******************************************************************************
*
* Module Name: dbinput - user front-end to the AML debugger
* $Revision: 72 $
* $Revision: 81 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -35,56 +35,14 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbinput")
ACPI_MODULE_NAME ("dbinput")
/*
* Globals that are specific to the debugger
*/
NATIVE_CHAR acpi_gbl_db_line_buf[80];
NATIVE_CHAR acpi_gbl_db_parsed_buf[80];
NATIVE_CHAR acpi_gbl_db_scope_buf[40];
NATIVE_CHAR acpi_gbl_db_debug_filename[40];
NATIVE_CHAR *acpi_gbl_db_args[DB_MAX_ARGS];
NATIVE_CHAR *acpi_gbl_db_buffer = NULL;
NATIVE_CHAR *acpi_gbl_db_filename = NULL;
u8 acpi_gbl_db_output_to_file = FALSE;
u32 acpi_gbl_db_debug_level = ACPI_LV_VERBOSITY2;
u32 acpi_gbl_db_console_debug_level = NORMAL_DEFAULT | ACPI_LV_TABLES;
u8 acpi_gbl_db_output_flags = DB_CONSOLE_OUTPUT;
u8 acpi_gbl_db_opt_tables = FALSE;
u8 acpi_gbl_db_opt_disasm = FALSE;
u8 acpi_gbl_db_opt_stats = FALSE;
u8 acpi_gbl_db_opt_parse_jit = FALSE;
u8 acpi_gbl_db_opt_verbose = TRUE;
u8 acpi_gbl_db_opt_ini_methods = TRUE;
/*
* Statistic globals
*/
u16 acpi_gbl_obj_type_count[INTERNAL_TYPE_NODE_MAX+1];
u16 acpi_gbl_node_type_count[INTERNAL_TYPE_NODE_MAX+1];
u16 acpi_gbl_obj_type_count_misc;
u16 acpi_gbl_node_type_count_misc;
u32 acpi_gbl_num_nodes;
u32 acpi_gbl_num_objects;
u32 acpi_gbl_size_of_parse_tree;
u32 acpi_gbl_size_of_method_trees;
u32 acpi_gbl_size_of_node_entries;
u32 acpi_gbl_size_of_acpi_objects;
/*
* Top-level debugger commands.
*
* This list of commands must match the string table below it
*/
enum acpi_ex_debugger_commands
{
CMD_NOT_FOUND = 0,
......@@ -224,13 +182,11 @@ acpi_db_display_help (
}
/*
* Parameter is the command class
*
* The idea here is to keep each class of commands smaller than a screenful
*/
switch (help_type[0])
{
case 'G':
......@@ -321,6 +277,7 @@ acpi_db_get_next_token (
{
NATIVE_CHAR *start;
/* At end of buffer? */
if (!string || !(*string))
......@@ -328,7 +285,6 @@ acpi_db_get_next_token (
return (NULL);
}
/* Get rid of any spaces at the beginning */
if (*string == ' ')
......@@ -353,12 +309,10 @@ acpi_db_get_next_token (
string++;
}
if (!(*string))
{
*next = NULL;
}
else
{
*string = 0;
......@@ -392,11 +346,11 @@ acpi_db_get_line (
NATIVE_CHAR *this;
STRCPY (acpi_gbl_db_parsed_buf, input_buffer);
STRUPR (acpi_gbl_db_parsed_buf);
ACPI_STRCPY (acpi_gbl_db_parsed_buf, input_buffer);
ACPI_STRUPR (acpi_gbl_db_parsed_buf);
this = acpi_gbl_db_parsed_buf;
for (i = 0; i < DB_MAX_ARGS; i++)
for (i = 0; i < ACPI_DEBUGGER_MAX_ARGS; i++)
{
acpi_gbl_db_args[i] = acpi_db_get_next_token (this, &next);
if (!acpi_gbl_db_args[i])
......@@ -407,12 +361,11 @@ acpi_db_get_line (
this = next;
}
/* Uppercase the actual command */
if (acpi_gbl_db_args[0])
{
STRUPR (acpi_gbl_db_args[0]);
ACPI_STRUPR (acpi_gbl_db_args[0]);
}
count = i;
......@@ -451,7 +404,8 @@ acpi_db_match_command (
for (i = CMD_FIRST_VALID; acpi_gbl_db_commands[i].name; i++)
{
if (STRSTR (acpi_gbl_db_commands[i].name, user_command) == acpi_gbl_db_commands[i].name)
if (ACPI_STRSTR (acpi_gbl_db_commands[i].name, user_command) ==
acpi_gbl_db_commands[i].name)
{
return (i);
}
......@@ -601,7 +555,6 @@ acpi_db_command_dispatch (
status = AE_CTRL_TRUE;
}
return (status);
break;
case CMD_HISTORY_LAST:
command_line = acpi_db_get_from_history (NULL);
......@@ -625,9 +578,6 @@ acpi_db_command_dispatch (
if (op)
{
acpi_gbl_cm_single_step = TRUE;
/* TBD: Must get current walk state */
/* Acpi_gbl_Method_breakpoint = 0; */
return (AE_OK);
}
break;
......@@ -641,13 +591,13 @@ acpi_db_command_dispatch (
else if (param_count == 2)
{
temp = acpi_gbl_db_console_debug_level;
acpi_gbl_db_console_debug_level = STRTOUL (acpi_gbl_db_args[1], NULL, 16);
acpi_gbl_db_console_debug_level = ACPI_STRTOUL (acpi_gbl_db_args[1], NULL, 16);
acpi_os_printf ("Debug Level for console output was %8.8lX, now %8.8lX\n", temp, acpi_gbl_db_console_debug_level);
}
else
{
temp = acpi_gbl_db_debug_level;
acpi_gbl_db_debug_level = STRTOUL (acpi_gbl_db_args[1], NULL, 16);
acpi_gbl_db_debug_level = ACPI_STRTOUL (acpi_gbl_db_args[1], NULL, 16);
acpi_os_printf ("Debug Level for file output was %8.8lX, now %8.8lX\n", temp, acpi_gbl_db_debug_level);
}
break;
......@@ -681,12 +631,12 @@ acpi_db_command_dispatch (
break;
case CMD_NOTIFY:
temp = STRTOUL (acpi_gbl_db_args[2], NULL, 0);
temp = ACPI_STRTOUL (acpi_gbl_db_args[2], NULL, 0);
acpi_db_send_notify (acpi_gbl_db_args[1], temp);
break;
case CMD_OBJECT:
acpi_db_display_objects (STRUPR (acpi_gbl_db_args[1]), acpi_gbl_db_args[2]);
acpi_db_display_objects (ACPI_STRUPR (acpi_gbl_db_args[1]), acpi_gbl_db_args[2]);
break;
case CMD_OPEN:
......@@ -723,14 +673,13 @@ acpi_db_command_dispatch (
case CMD_STOP:
return (AE_AML_ERROR);
break;
case CMD_TABLES:
acpi_db_display_table_info (acpi_gbl_db_args[1]);
break;
case CMD_TERMINATE:
acpi_db_set_output_destination (DB_REDIRECTABLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_REDIRECTABLE_OUTPUT);
acpi_ut_subsystem_shutdown ();
/* TBD: [Restructure] Need some way to re-initialize without re-creating the semaphores! */
......@@ -798,11 +747,12 @@ acpi_db_command_dispatch (
*
******************************************************************************/
void
void ACPI_SYSTEM_XFACE
acpi_db_execute_thread (
void *context)
{
acpi_status status = AE_OK;
acpi_status Mstatus;
while (status != AE_CTRL_TERMINATE)
......@@ -810,9 +760,19 @@ acpi_db_execute_thread (
acpi_gbl_method_executing = FALSE;
acpi_gbl_step_to_next_call = FALSE;
acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_READY);
Mstatus = acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_READY);
if (ACPI_FAILURE (Mstatus))
{
return;
}
status = acpi_db_command_dispatch (acpi_gbl_db_line_buf, NULL, NULL);
acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
Mstatus = acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
if (ACPI_FAILURE (Mstatus))
{
return;
}
}
}
......@@ -834,7 +794,7 @@ void
acpi_db_single_thread (
void)
{
acpi_status status = AE_OK;
acpi_status status;
acpi_gbl_method_executing = FALSE;
......@@ -872,17 +832,17 @@ acpi_db_user_commands (
{
/* Force output to console until a command is entered */
acpi_db_set_output_destination (DB_CONSOLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_CONSOLE_OUTPUT);
/* Different prompt if method is executing */
if (!acpi_gbl_method_executing)
{
acpi_os_printf ("%1c ", DB_COMMAND_PROMPT);
acpi_os_printf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT);
}
else
{
acpi_os_printf ("%1c ", DB_EXECUTE_PROMPT);
acpi_os_printf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT);
}
/* Get the user input line */
......@@ -898,10 +858,18 @@ acpi_db_user_commands (
* Signal the debug thread that we have a command to execute,
* and wait for the command to complete.
*/
acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_READY);
acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
status = acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_READY);
if (ACPI_FAILURE (status))
{
return (status);
}
status = acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
if (ACPI_FAILURE (status))
{
return (status);
}
}
else
{
/* Just call to the command line interpreter */
......@@ -910,7 +878,6 @@ acpi_db_user_commands (
}
}
/*
* Only this thread (the original thread) should actually terminate the subsystem,
* because all the semaphores are deleted during termination
......
/*******************************************************************************
*
* Module Name: dbstats - Generation and display of ACPI table statistics
* $Revision: 47 $
* $Revision: 55 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -33,7 +33,7 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbstats")
ACPI_MODULE_NAME ("dbstats")
/*
* Statistics subcommands
......@@ -67,9 +67,8 @@ ARGUMENT_INFO acpi_db_stat_types [] =
* RETURN: None
*
* DESCRIPTION: Add this object to the global counts, by object type.
* Recursively handles subobjects and packages.
*
* [TBD] Restructure - remove recursion.
* Limited recursion handles subobjects and packages, and this
* is probably acceptable within the AML debugger only.
*
******************************************************************************/
......@@ -77,7 +76,6 @@ void
acpi_db_enumerate_object (
acpi_operand_object *obj_desc)
{
u32 type;
u32 i;
......@@ -91,22 +89,21 @@ acpi_db_enumerate_object (
acpi_gbl_num_objects++;
type = obj_desc->common.type;
if (type > INTERNAL_TYPE_NODE_MAX)
if (obj_desc->common.type > INTERNAL_TYPE_NODE_MAX)
{
acpi_gbl_obj_type_count_misc++;
}
else
{
acpi_gbl_obj_type_count [type]++;
acpi_gbl_obj_type_count [obj_desc->common.type]++;
}
/* Count the sub-objects */
switch (type)
switch (obj_desc->common.type)
{
case ACPI_TYPE_PACKAGE:
for (i = 0; i< obj_desc->package.count; i++)
for (i = 0; i < obj_desc->package.count; i++)
{
acpi_db_enumerate_object (obj_desc->package.elements[i]);
}
......@@ -118,7 +115,15 @@ acpi_db_enumerate_object (
acpi_db_enumerate_object (obj_desc->device.addr_handler);
break;
case ACPI_TYPE_BUFFER_FIELD:
if (acpi_ns_get_secondary_object (obj_desc))
{
acpi_gbl_obj_type_count [ACPI_TYPE_BUFFER_FIELD]++;
}
break;
case ACPI_TYPE_REGION:
acpi_gbl_obj_type_count [INTERNAL_TYPE_REGION_FIELD ]++;
acpi_db_enumerate_object (obj_desc->region.addr_handler);
break;
......@@ -172,7 +177,7 @@ acpi_db_classify_one_object (
acpi_gbl_num_nodes++;
node = (acpi_namespace_node *) obj_handle;
obj_desc = ((acpi_namespace_node *) obj_handle)->object;
obj_desc = acpi_ns_get_attached_object (node);
acpi_db_enumerate_object (obj_desc);
......@@ -271,8 +276,10 @@ acpi_db_display_statistics (
{
u32 i;
u32 type;
u32 outstanding;
u32 size;
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
u32 outstanding;
#endif
if (!acpi_gbl_DSDT)
......@@ -286,7 +293,7 @@ acpi_db_display_statistics (
return (AE_OK);
}
STRUPR (type_arg);
ACPI_STRUPR (type_arg);
type = acpi_db_match_argument (type_arg, acpi_db_stat_types);
if (type == (u32) -1)
{
......@@ -368,11 +375,11 @@ acpi_db_display_statistics (
if (acpi_gbl_memory_lists[i].object_size)
{
size = ROUND_UP_TO_1K (outstanding * acpi_gbl_memory_lists[i].object_size);
size = ACPI_ROUND_UP_TO_1K (outstanding * acpi_gbl_memory_lists[i].object_size);
}
else
{
size = ROUND_UP_TO_1K (acpi_gbl_memory_lists[i].current_total_size);
size = ACPI_ROUND_UP_TO_1K (acpi_gbl_memory_lists[i].current_total_size);
}
acpi_os_printf (" Mem: [Alloc Free Outstanding Size] % 7d % 7d % 7d % 7d Kb\n",
......@@ -425,6 +432,7 @@ acpi_db_display_statistics (
acpi_os_printf ("Notify_handler %3d\n", sizeof (ACPI_OBJECT_NOTIFY_HANDLER));
acpi_os_printf ("Addr_handler %3d\n", sizeof (ACPI_OBJECT_ADDR_HANDLER));
acpi_os_printf ("Extra %3d\n", sizeof (ACPI_OBJECT_EXTRA));
acpi_os_printf ("Data %3d\n", sizeof (ACPI_OBJECT_DATA));
acpi_os_printf ("\n");
......
/*******************************************************************************
*
* Module Name: dbutils - AML debugger utilities
* $Revision: 45 $
* $Revision: 51 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -38,7 +38,7 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbutils")
ACPI_MODULE_NAME ("dbutils")
/*******************************************************************************
......@@ -61,10 +61,8 @@ acpi_db_set_output_destination (
acpi_gbl_db_output_flags = (u8) output_flags;
if (output_flags & DB_REDIRECTABLE_OUTPUT) {
if (acpi_gbl_db_output_to_file) {
acpi_dbg_level = acpi_gbl_db_debug_level;
}
if ((output_flags & ACPI_DB_REDIRECTABLE_OUTPUT) && acpi_gbl_db_output_to_file) {
acpi_dbg_level = acpi_gbl_db_debug_level;
}
else {
acpi_dbg_level = acpi_gbl_db_console_debug_level;
......@@ -92,7 +90,7 @@ acpi_db_dump_buffer (
acpi_os_printf ("\n_location %X:\n", address);
acpi_dbg_level |= ACPI_LV_TABLES;
acpi_ut_dump_buffer ((u8 *) address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
acpi_ut_dump_buffer (ACPI_TO_POINTER (address), 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
}
......@@ -135,8 +133,9 @@ acpi_db_dump_object (
case ACPI_TYPE_INTEGER:
acpi_os_printf ("[Integer] = %8.8X%8.8X\n", HIDWORD (obj_desc->integer.value),
LODWORD (obj_desc->integer.value));
acpi_os_printf ("[Integer] = %8.8X%8.8X\n",
ACPI_HIDWORD (obj_desc->integer.value),
ACPI_LODWORD (obj_desc->integer.value));
break;
......@@ -215,7 +214,7 @@ acpi_db_prep_namestring (
return;
}
STRUPR (name);
ACPI_STRUPR (name);
/* Convert a leading forward slash to a backslash */
......@@ -268,7 +267,7 @@ acpi_db_second_pass_parse (
acpi_walk_state *walk_state;
FUNCTION_ENTRY ();
ACPI_FUNCTION_ENTRY ();
acpi_os_printf ("Pass two parse ....\n");
......@@ -339,6 +338,9 @@ acpi_db_second_pass_parse (
*
* 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.
*
******************************************************************************/
acpi_namespace_node *
......@@ -360,21 +362,17 @@ acpi_db_local_ns_lookup (
return (NULL);
}
/* Lookup the name */
/* TBD: [Investigate] what scope do we use? */
/* Use the root scope for the start of the search */
status = acpi_ns_lookup (NULL, internal_path, ACPI_TYPE_ANY, IMODE_EXECUTE,
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE, NULL, &node);
/*
* 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_MEM_FREE (internal_path);
return (node);
}
......
/*******************************************************************************
*
* Module Name: dbxface - AML Debugger external interfaces
* $Revision: 45 $
* $Revision: 55 $
*
******************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -37,7 +37,7 @@
#ifdef ENABLE_DEBUGGER
#define _COMPONENT ACPI_DEBUGGER
MODULE_NAME ("dbxface")
ACPI_MODULE_NAME ("dbxface")
/*******************************************************************************
......@@ -64,25 +64,33 @@ acpi_db_single_step (
acpi_status status = AE_OK;
u32 original_debug_level;
acpi_parse_object *display_op;
acpi_parse_object *parent_op;
FUNCTION_ENTRY ();
ACPI_FUNCTION_ENTRY ();
/* Is there a breakpoint set? */
/* Check for single-step breakpoint */
if (walk_state->method_breakpoint) {
if (walk_state->method_breakpoint && (walk_state->method_breakpoint <= op->aml_offset)) {
/* Check if the breakpoint has been reached or passed */
/* Hit the breakpoint, resume single step, reset breakpoint */
if (walk_state->method_breakpoint <= op->aml_offset) {
/* Hit the breakpoint, resume single step, reset breakpoint */
acpi_os_printf ("***Break*** at AML offset %X\n", op->aml_offset);
acpi_gbl_cm_single_step = TRUE;
acpi_gbl_step_to_next_call = FALSE;
walk_state->method_breakpoint = 0;
}
acpi_os_printf ("***Break*** at AML offset %X\n", op->aml_offset);
acpi_gbl_cm_single_step = TRUE;
acpi_gbl_step_to_next_call = FALSE;
walk_state->method_breakpoint = 0;
}
/* Check for user breakpoint (Must be on exact Aml offset) */
else if (walk_state->user_breakpoint && (walk_state->user_breakpoint == op->aml_offset)) {
acpi_os_printf ("***User_breakpoint*** at AML offset %X\n", op->aml_offset);
acpi_gbl_cm_single_step = TRUE;
acpi_gbl_step_to_next_call = FALSE;
walk_state->method_breakpoint = 0;
}
/*
* Check if this is an opcode that we are interested in --
* namely, opcodes that have arguments
......@@ -95,7 +103,6 @@ acpi_db_single_step (
case AML_CLASS_UNKNOWN:
case AML_CLASS_ARGUMENT: /* constants, literals, etc. do nothing */
return (AE_OK);
break;
}
/*
......@@ -121,10 +128,36 @@ acpi_db_single_step (
display_op = op;
if (op->parent) {
if ((op->parent->opcode == AML_IF_OP) ||
(op->parent->opcode == AML_WHILE_OP)) {
display_op = op->parent;
parent_op = op->parent;
if (parent_op) {
if ((walk_state->control_state) &&
(walk_state->control_state->common.state == ACPI_CONTROL_PREDICATE_EXECUTING)) {
/*
* We are executing the predicate of an IF or WHILE statement
* Search upwards for the containing IF or WHILE so that the
* entire predicate can be displayed.
*/
while (parent_op) {
if ((parent_op->opcode == AML_IF_OP) ||
(parent_op->opcode == AML_WHILE_OP)) {
display_op = parent_op;
break;
}
parent_op = parent_op->parent;
}
}
else {
while (parent_op) {
if ((parent_op->opcode == AML_IF_OP) ||
(parent_op->opcode == AML_ELSE_OP) ||
(parent_op->opcode == AML_SCOPE_OP) ||
(parent_op->opcode == AML_METHOD_OP) ||
(parent_op->opcode == AML_WHILE_OP)) {
break;
}
display_op = parent_op;
parent_op = parent_op->parent;
}
}
}
......@@ -135,15 +168,15 @@ acpi_db_single_step (
if ((op->opcode == AML_IF_OP) ||
(op->opcode == AML_WHILE_OP)) {
if (walk_state->control_state->common.value) {
acpi_os_printf ("Predicate was TRUE, executed block\n");
acpi_os_printf ("Predicate = [True], IF block was executed\n");
}
else {
acpi_os_printf ("Predicate is FALSE, skipping block\n");
acpi_os_printf ("Predicate = [False], Skipping IF block\n");
}
}
else if (op->opcode == AML_ELSE_OP) {
/* TBD */
acpi_os_printf ("Predicate = [False], ELSE block was executed\n");
}
/* Restore everything */
......@@ -159,7 +192,6 @@ acpi_db_single_step (
return (AE_OK);
}
/*
* If we are executing a step-to-call command,
* Check if this is a method call.
......@@ -176,7 +208,6 @@ acpi_db_single_step (
acpi_gbl_step_to_next_call = FALSE;
}
/*
* If the next opcode is a method call, we will "step over" it
* by default.
......@@ -184,11 +215,9 @@ acpi_db_single_step (
if (op->opcode == AML_INT_METHODCALL_OP) {
acpi_gbl_cm_single_step = FALSE; /* No more single step while executing called method */
/* Set the breakpoint on the call, it will stop execution as soon as we return */
/* Set the breakpoint on/before the call, it will stop execution as soon as we return */
/* TBD: [Future] don't kill the user breakpoint! */
walk_state->method_breakpoint = /* Op->Aml_offset + */ 1; /* Must be non-zero! */
walk_state->method_breakpoint = 1; /* Must be non-zero! */
}
......@@ -204,8 +233,14 @@ acpi_db_single_step (
if (acpi_gbl_debugger_configuration == DEBUGGER_MULTI_THREADED) {
/* Handshake with the front-end that gets user command lines */
acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_READY);
status = acpi_ut_release_mutex (ACPI_MTX_DEBUG_CMD_COMPLETE);
if (ACPI_FAILURE (status)) {
return (status);
}
status = acpi_ut_acquire_mutex (ACPI_MTX_DEBUG_CMD_READY);
if (ACPI_FAILURE (status)) {
return (status);
}
}
else {
......@@ -213,15 +248,15 @@ acpi_db_single_step (
/* Force output to console until a command is entered */
acpi_db_set_output_destination (DB_CONSOLE_OUTPUT);
acpi_db_set_output_destination (ACPI_DB_CONSOLE_OUTPUT);
/* Different prompt if method is executing */
if (!acpi_gbl_method_executing) {
acpi_os_printf ("%1c ", DB_COMMAND_PROMPT);
acpi_os_printf ("%1c ", ACPI_DEBUGGER_COMMAND_PROMPT);
}
else {
acpi_os_printf ("%1c ", DB_EXECUTE_PROMPT);
acpi_os_printf ("%1c ", ACPI_DEBUGGER_EXECUTE_PROMPT);
}
/* Get the user input line */
......@@ -256,16 +291,33 @@ int
acpi_db_initialize (void)
{
/* Init globals */
acpi_gbl_db_buffer = acpi_os_callocate (ACPI_DEBUG_BUFFER_SIZE);
acpi_gbl_db_buffer = NULL;
acpi_gbl_db_filename = NULL;
acpi_gbl_db_output_to_file = FALSE;
acpi_gbl_db_debug_level = ACPI_LV_VERBOSITY2;
acpi_gbl_db_console_debug_level = NORMAL_DEFAULT | ACPI_LV_TABLES;
acpi_gbl_db_output_flags = ACPI_DB_CONSOLE_OUTPUT;
acpi_gbl_db_opt_tables = FALSE;
acpi_gbl_db_opt_disasm = FALSE;
acpi_gbl_db_opt_stats = FALSE;
acpi_gbl_db_opt_verbose = TRUE;
acpi_gbl_db_opt_ini_methods = TRUE;
acpi_gbl_db_buffer = acpi_os_allocate (ACPI_DEBUG_BUFFER_SIZE);
if (!acpi_gbl_db_buffer) {
return 0;
}
ACPI_MEMSET (acpi_gbl_db_buffer, 0, ACPI_DEBUG_BUFFER_SIZE);
/* Initial scope is the root */
acpi_gbl_db_scope_buf [0] = '\\';
acpi_gbl_db_scope_buf [1] = 0;
acpi_gbl_db_scope_node = acpi_gbl_root_node;
/*
* If configured for multi-thread support, the debug executor runs in
......
#
# Makefile for all Linux ACPI interpreter subdirectories
# EXCEPT for the ospm directory
#
O_TARGET := $(notdir $(CURDIR)).o
obj-$(CONFIG_ACPI) := $(patsubst %.c,%.o,$(wildcard *.c))
obj-$(CONFIG_ACPI_INTERPRETER) := $(patsubst %.c,%.o,$(wildcard *.c))
EXTRA_CFLAGS += $(ACPI_CFLAGS)
......
This diff is collapsed.
/******************************************************************************
*
* Module Name: dsmethod - Parser/Interpreter interface - control method parsing
* $Revision: 69 $
* $Revision: 79 $
*
*****************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -35,7 +35,7 @@
#define _COMPONENT ACPI_DISPATCHER
MODULE_NAME ("dsmethod")
ACPI_MODULE_NAME ("dsmethod")
/*******************************************************************************
......@@ -68,7 +68,7 @@ acpi_ds_parse_method (
acpi_walk_state *walk_state;
FUNCTION_TRACE_PTR ("Ds_parse_method", obj_handle);
ACPI_FUNCTION_TRACE_PTR ("Ds_parse_method", obj_handle);
/* Parameter Validation */
......@@ -78,13 +78,12 @@ acpi_ds_parse_method (
}
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Parsing [%4.4s] **** Named_obj=%p\n",
(char*)&((acpi_namespace_node *)obj_handle)->name, obj_handle));
(char *) &((acpi_namespace_node *) obj_handle)->name, obj_handle));
/* Extract the method object from the method Node */
node = (acpi_namespace_node *) obj_handle;
obj_desc = node->object;
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
return_ACPI_STATUS (AE_NULL_OBJECT);
}
......@@ -115,9 +114,17 @@ acpi_ds_parse_method (
acpi_ps_set_name (op, node->name);
op->node = node;
/*
* Get a new Owner_id for objects created by this method. Namespace
* objects (such as Operation Regions) can be created during the
* first pass parse.
*/
owner_id = acpi_ut_allocate_owner_id (ACPI_OWNER_TYPE_METHOD);
obj_desc->method.owning_id = owner_id;
/* Create and initialize a new walk state */
walk_state = acpi_ds_create_walk_state (TABLE_ID_DSDT,
walk_state = acpi_ds_create_walk_state (owner_id,
NULL, NULL, NULL);
if (!walk_state) {
return_ACPI_STATUS (AE_NO_MEMORY);
......@@ -126,7 +133,7 @@ acpi_ds_parse_method (
status = acpi_ds_init_aml_walk (walk_state, op, node, obj_desc->method.aml_start,
obj_desc->method.aml_length, NULL, NULL, 1);
if (ACPI_FAILURE (status)) {
/* TBD: delete walk state */
acpi_ds_delete_walk_state (walk_state);
return_ACPI_STATUS (status);
}
......@@ -145,16 +152,10 @@ acpi_ds_parse_method (
return_ACPI_STATUS (status);
}
/* Get a new Owner_id for objects created by this method */
owner_id = acpi_ut_allocate_owner_id (OWNER_TYPE_METHOD);
obj_desc->method.owning_id = owner_id;
ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** [%4.4s] Parsed **** Named_obj=%p Op=%p\n",
(char*)&((acpi_namespace_node *)obj_handle)->name, obj_handle, op));
(char *) &((acpi_namespace_node *) obj_handle)->name, obj_handle, op));
acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status);
}
......@@ -186,14 +187,13 @@ acpi_ds_begin_method_execution (
acpi_status status = AE_OK;
FUNCTION_TRACE_PTR ("Ds_begin_method_execution", method_node);
ACPI_FUNCTION_TRACE_PTR ("Ds_begin_method_execution", method_node);
if (!method_node) {
return_ACPI_STATUS (AE_NULL_ENTRY);
}
/*
* If there is a concurrency limit on this method, we need to
* obtain a unit from the method semaphore.
......@@ -221,13 +221,11 @@ acpi_ds_begin_method_execution (
WAIT_FOREVER);
}
/*
* Increment the method parse tree thread count since it has been
* reentered one more time (even if it is the same thread)
*/
obj_desc->method.thread_count++;
return_ACPI_STATUS (status);
}
......@@ -247,9 +245,9 @@ acpi_ds_begin_method_execution (
acpi_status
acpi_ds_call_control_method (
acpi_walk_list *walk_list,
ACPI_THREAD_STATE *thread,
acpi_walk_state *this_walk_state,
acpi_parse_object *op) /* TBD: This operand is obsolete */
acpi_parse_object *op)
{
acpi_status status;
acpi_namespace_node *method_node;
......@@ -258,7 +256,7 @@ acpi_ds_call_control_method (
u32 i;
FUNCTION_TRACE_PTR ("Ds_call_control_method", this_walk_state);
ACPI_FUNCTION_TRACE_PTR ("Ds_call_control_method", this_walk_state);
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Execute method %p, currentstate=%p\n",
this_walk_state->prev_op, this_walk_state));
......@@ -284,14 +282,12 @@ acpi_ds_call_control_method (
return_ACPI_STATUS (status);
}
/* 1) Parse: Create a new walk state for the preempting walk */
next_walk_state = acpi_ds_create_walk_state (obj_desc->method.owning_id,
op, obj_desc, NULL);
if (!next_walk_state) {
return_ACPI_STATUS (AE_NO_MEMORY);
goto cleanup;
}
/* Create and init a Root Node */
......@@ -306,7 +302,7 @@ acpi_ds_call_control_method (
obj_desc->method.aml_start, obj_desc->method.aml_length,
NULL, NULL, 1);
if (ACPI_FAILURE (status)) {
/* TBD: delete walk state */
acpi_ds_delete_walk_state (next_walk_state);
goto cleanup;
}
......@@ -315,11 +311,10 @@ acpi_ds_call_control_method (
status = acpi_ps_parse_aml (next_walk_state);
acpi_ps_delete_parse_tree (op);
/* 2) Execute: Create a new state for the preempting walk */
next_walk_state = acpi_ds_create_walk_state (obj_desc->method.owning_id,
NULL, obj_desc, walk_list);
NULL, obj_desc, thread);
if (!next_walk_state) {
status = AE_NO_MEMORY;
goto cleanup;
......@@ -390,7 +385,7 @@ acpi_ds_restart_control_method (
acpi_status status;
FUNCTION_TRACE_PTR ("Ds_restart_control_method", walk_state);
ACPI_FUNCTION_TRACE_PTR ("Ds_restart_control_method", walk_state);
if (return_desc) {
......@@ -405,7 +400,6 @@ acpi_ds_restart_control_method (
return_ACPI_STATUS (status);
}
}
else {
/*
* Delete the return value if it will not be used by the
......@@ -413,7 +407,6 @@ acpi_ds_restart_control_method (
*/
acpi_ut_remove_reference (return_desc);
}
}
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
......@@ -446,12 +439,13 @@ acpi_ds_terminate_control_method (
{
acpi_operand_object *obj_desc;
acpi_namespace_node *method_node;
acpi_status status;
FUNCTION_TRACE_PTR ("Ds_terminate_control_method", walk_state);
ACPI_FUNCTION_TRACE_PTR ("Ds_terminate_control_method", walk_state);
/* The method object should be stored in the walk state */
/* The current method object was saved in the walk state */
obj_desc = walk_state->method_desc;
if (!obj_desc) {
......@@ -467,8 +461,10 @@ acpi_ds_terminate_control_method (
* If this is the last thread executing the method,
* we have additional cleanup to perform
*/
acpi_ut_acquire_mutex (ACPI_MTX_PARSER);
status = acpi_ut_acquire_mutex (ACPI_MTX_PARSER);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
/* Signal completion of the execution of this method if necessary */
......@@ -493,7 +489,11 @@ acpi_ds_terminate_control_method (
* Delete any namespace entries created immediately underneath
* the method
*/
acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
status = acpi_ut_acquire_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
if (method_node->child) {
acpi_ns_delete_namespace_subtree (method_node);
}
......@@ -503,11 +503,14 @@ acpi_ds_terminate_control_method (
* the namespace
*/
acpi_ns_delete_namespace_by_owner (walk_state->method_desc->method.owning_id);
acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
status = acpi_ut_release_mutex (ACPI_MTX_NAMESPACE);
if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status);
}
}
acpi_ut_release_mutex (ACPI_MTX_PARSER);
return_ACPI_STATUS (AE_OK);
status = acpi_ut_release_mutex (ACPI_MTX_PARSER);
return_ACPI_STATUS (status);
}
This diff is collapsed.
/******************************************************************************
*
* Module Name: dsobject - Dispatcher object management routines
* $Revision: 81 $
* $Revision: 90 $
*
*****************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -32,7 +32,7 @@
#include "acnamesp.h"
#define _COMPONENT ACPI_DISPATCHER
MODULE_NAME ("dsobject")
ACPI_MODULE_NAME ("dsobject")
/*******************************************************************************
......@@ -62,13 +62,13 @@ acpi_ds_init_one_object (
void *context,
void **return_value)
{
acpi_object_type8 type;
acpi_object_type type;
acpi_status status;
acpi_init_walk_info *info = (acpi_init_walk_info *) context;
u8 table_revision;
PROC_NAME ("Ds_init_one_object");
ACPI_FUNCTION_NAME ("Ds_init_one_object");
info->object_count++;
......@@ -89,7 +89,6 @@ acpi_ds_init_one_object (
type = acpi_ns_get_type (obj_handle);
switch (type) {
case ACPI_TYPE_REGION:
acpi_ds_initialize_region (obj_handle);
......@@ -121,7 +120,7 @@ acpi_ds_init_one_object (
status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
obj_handle, (char*)&((acpi_namespace_node *)obj_handle)->name,
obj_handle, (char *) &((acpi_namespace_node *) obj_handle)->name,
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
......@@ -134,6 +133,7 @@ acpi_ds_init_one_object (
* for every execution since there isn't much overhead
*/
acpi_ns_delete_namespace_subtree (obj_handle);
acpi_ns_delete_namespace_by_owner (((acpi_namespace_node *) obj_handle)->object->method.owning_id);
break;
default:
......@@ -170,7 +170,7 @@ acpi_ds_initialize_objects (
acpi_init_walk_info info;
FUNCTION_TRACE ("Ds_initialize_objects");
ACPI_FUNCTION_TRACE ("Ds_initialize_objects");
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
......@@ -235,7 +235,7 @@ acpi_ds_init_object_from_op (
acpi_operand_object *obj_desc;
PROC_NAME ("Ds_init_object_from_op");
ACPI_FUNCTION_NAME ("Ds_init_object_from_op");
obj_desc = *ret_obj_desc;
......@@ -252,6 +252,8 @@ acpi_ds_init_object_from_op (
switch (obj_desc->common.type) {
case ACPI_TYPE_BUFFER:
obj_desc->buffer.node = (acpi_namespace_node *) walk_state->operands[0];
/* First arg is a number */
acpi_ds_create_operand (walk_state, op->value.arg, 0);
......@@ -285,7 +287,7 @@ acpi_ds_init_object_from_op (
if (obj_desc->buffer.length == 0) {
obj_desc->buffer.pointer = NULL;
REPORT_WARNING (("Buffer created with zero length in AML\n"));
ACPI_REPORT_WARNING (("Buffer created with zero length in AML\n"));
break;
}
......@@ -312,8 +314,8 @@ acpi_ds_init_object_from_op (
return (AE_TYPE);
}
MEMCPY (obj_desc->buffer.pointer, byte_list->data,
obj_desc->buffer.length);
ACPI_MEMCPY (obj_desc->buffer.pointer, byte_list->data,
obj_desc->buffer.length);
}
break;
......@@ -339,7 +341,7 @@ acpi_ds_init_object_from_op (
case ACPI_TYPE_STRING:
obj_desc->string.pointer = op->value.string;
obj_desc->string.length = STRLEN (op->value.string);
obj_desc->string.length = ACPI_STRLEN (op->value.string);
/*
* The string is contained in the ACPI table, don't ever try
......@@ -422,42 +424,38 @@ acpi_ds_build_internal_simple_obj (
acpi_operand_object **obj_desc_ptr)
{
acpi_operand_object *obj_desc;
acpi_object_type8 type;
acpi_status status;
u32 length;
char *name;
FUNCTION_TRACE ("Ds_build_internal_simple_obj");
ACPI_FUNCTION_TRACE ("Ds_build_internal_simple_obj");
if (op->opcode == AML_INT_NAMEPATH_OP) {
/*
* This is an object reference. If The name was
* previously looked up in the NS, it is stored in this op.
* This is an object reference. If this name was
* previously looked up in the namespace, it was stored in this op.
* Otherwise, go ahead and look it up now
*/
if (!op->node) {
status = acpi_ns_lookup (walk_state->scope_info,
op->value.string, ACPI_TYPE_ANY,
IMODE_EXECUTE,
NS_SEARCH_PARENT | NS_DONT_OPEN_SCOPE,
NULL,
(acpi_namespace_node **)&(op->node));
status = acpi_ns_lookup (walk_state->scope_info, op->value.string,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
(acpi_namespace_node **) &(op->node));
if (ACPI_FAILURE (status)) {
if (status == AE_NOT_FOUND) {
name = NULL;
acpi_ns_externalize_name (ACPI_UINT32_MAX, op->value.string, &length, &name);
acpi_ns_externalize_name (ACPI_UINT32_MAX, op->value.string, NULL, &name);
if (name) {
REPORT_WARNING (("Reference %s at AML %X not found\n",
ACPI_REPORT_WARNING (("Reference %s at AML %X not found\n",
name, op->aml_offset));
ACPI_MEM_FREE (name);
}
else {
REPORT_WARNING (("Reference %s at AML %X not found\n",
ACPI_REPORT_WARNING (("Reference %s at AML %X not found\n",
op->value.string, op->aml_offset));
}
......@@ -469,23 +467,11 @@ acpi_ds_build_internal_simple_obj (
}
}
}
/*
* The reference will be a Reference
* TBD: [Restructure] unless we really need a separate
* type of INTERNAL_TYPE_REFERENCE change
* Acpi_ds_map_opcode_to_data_type to handle this case
*/
type = INTERNAL_TYPE_REFERENCE;
}
else {
type = acpi_ds_map_opcode_to_data_type (op->opcode, NULL);
}
/* Create and init the internal ACPI object */
obj_desc = acpi_ut_create_internal_object (type);
obj_desc = acpi_ut_create_internal_object ((acpi_ps_get_opcode_info (op->opcode))->object_type);
if (!obj_desc) {
return_ACPI_STATUS (AE_NO_MEMORY);
}
......@@ -527,7 +513,7 @@ acpi_ds_build_internal_package_obj (
acpi_status status = AE_OK;
FUNCTION_TRACE ("Ds_build_internal_package_obj");
ACPI_FUNCTION_TRACE ("Ds_build_internal_package_obj");
obj_desc = acpi_ut_create_internal_object (ACPI_TYPE_PACKAGE);
......@@ -651,7 +637,7 @@ acpi_ds_create_node (
acpi_operand_object *obj_desc;
FUNCTION_TRACE_PTR ("Ds_create_node", op);
ACPI_FUNCTION_TRACE_PTR ("Ds_create_node", op);
/*
......@@ -659,7 +645,7 @@ acpi_ds_create_node (
* parts of the table, we can arrive here twice. Only init
* the named object node the first time through
*/
if (node->object) {
if (acpi_ns_get_attached_object (node)) {
return_ACPI_STATUS (AE_OK);
}
......@@ -682,7 +668,7 @@ acpi_ds_create_node (
/* Init obj */
status = acpi_ns_attach_object (node, obj_desc, (u8) node->type);
status = acpi_ns_attach_object (node, obj_desc, node->type);
/* Remove local reference to the object */
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/******************************************************************************
*
* Module Name: dswscope - Scope stack manipulation
* $Revision: 49 $
* $Revision: 52 $
*
*****************************************************************************/
/*
* Copyright (C) 2000, 2001 R. Byron Moore
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -30,7 +30,7 @@
#define _COMPONENT ACPI_DISPATCHER
MODULE_NAME ("dswscope")
ACPI_MODULE_NAME ("dswscope")
#define STACK_POP(head) head
......@@ -53,7 +53,7 @@ acpi_ds_scope_stack_clear (
{
acpi_generic_state *scope_info;
PROC_NAME ("Ds_scope_stack_clear");
ACPI_FUNCTION_NAME ("Ds_scope_stack_clear");
while (walk_state->scope_info) {
......@@ -84,26 +84,26 @@ acpi_ds_scope_stack_clear (
acpi_status
acpi_ds_scope_stack_push (
acpi_namespace_node *node,
acpi_object_type8 type,
acpi_object_type type,
acpi_walk_state *walk_state)
{
acpi_generic_state *scope_info;
FUNCTION_TRACE ("Ds_scope_stack_push");
ACPI_FUNCTION_TRACE ("Ds_scope_stack_push");
if (!node) {
/* Invalid scope */
REPORT_ERROR (("Ds_scope_stack_push: null scope passed\n"));
ACPI_REPORT_ERROR (("Ds_scope_stack_push: null scope passed\n"));
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
/* Make sure object type is valid */
if (!acpi_ex_validate_object_type (type)) {
REPORT_WARNING (("Ds_scope_stack_push: type code out of range\n"));
ACPI_REPORT_WARNING (("Ds_scope_stack_push: type code out of range\n"));
}
......@@ -152,7 +152,7 @@ acpi_ds_scope_stack_pop (
acpi_generic_state *scope_info;
FUNCTION_TRACE ("Ds_scope_stack_pop");
ACPI_FUNCTION_TRACE ("Ds_scope_stack_pop");
/*
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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