// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: exdump - Interpreter debug output routines * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acinterp.h" #include "amlcode.h" #include "acnamesp.h" #define _COMPONENT … ACPI_MODULE_NAME("exdump") /* * The following routines are used for debug output only */ #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) /* Local prototypes */ static void acpi_ex_out_string(const char *title, const char *value); static void acpi_ex_out_pointer(const char *title, const void *value); static void acpi_ex_dump_object(union acpi_operand_object *obj_desc, struct acpi_exdump_info *info); static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc); static void acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, u32 level, u32 index); /******************************************************************************* * * Object Descriptor info tables * * Note: The first table entry must be an INIT opcode and must contain * the table length (number of table entries) * ******************************************************************************/ static struct acpi_exdump_info acpi_ex_dump_integer[2] = …; static struct acpi_exdump_info acpi_ex_dump_string[4] = …; static struct acpi_exdump_info acpi_ex_dump_buffer[5] = …; static struct acpi_exdump_info acpi_ex_dump_package[6] = …; static struct acpi_exdump_info acpi_ex_dump_device[4] = …; static struct acpi_exdump_info acpi_ex_dump_event[2] = …; static struct acpi_exdump_info acpi_ex_dump_method[9] = …; static struct acpi_exdump_info acpi_ex_dump_mutex[6] = …; static struct acpi_exdump_info acpi_ex_dump_region[8] = …; static struct acpi_exdump_info acpi_ex_dump_power[6] = …; static struct acpi_exdump_info acpi_ex_dump_processor[7] = …; static struct acpi_exdump_info acpi_ex_dump_thermal[4] = …; static struct acpi_exdump_info acpi_ex_dump_buffer_field[3] = …; static struct acpi_exdump_info acpi_ex_dump_region_field[5] = …; static struct acpi_exdump_info acpi_ex_dump_bank_field[5] = …; static struct acpi_exdump_info acpi_ex_dump_index_field[5] = …; static struct acpi_exdump_info acpi_ex_dump_reference[9] = …; static struct acpi_exdump_info acpi_ex_dump_address_handler[6] = …; static struct acpi_exdump_info acpi_ex_dump_notify[7] = …; static struct acpi_exdump_info acpi_ex_dump_extra[6] = …; static struct acpi_exdump_info acpi_ex_dump_data[3] = …; /* Miscellaneous tables */ static struct acpi_exdump_info acpi_ex_dump_common[5] = …; static struct acpi_exdump_info acpi_ex_dump_field_common[7] = …; static struct acpi_exdump_info acpi_ex_dump_node[7] = …; /* Dispatch table, indexed by object type */ static struct acpi_exdump_info *acpi_ex_dump_info[] = …; /******************************************************************************* * * FUNCTION: acpi_ex_dump_object * * PARAMETERS: obj_desc - Descriptor to dump * info - Info table corresponding to this object * type * * RETURN: None * * DESCRIPTION: Walk the info table for this object * ******************************************************************************/ static void acpi_ex_dump_object(union acpi_operand_object *obj_desc, struct acpi_exdump_info *info) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_operand * * PARAMETERS: *obj_desc - Pointer to entry to be dumped * depth - Current nesting depth * * RETURN: None * * DESCRIPTION: Dump an operand object * ******************************************************************************/ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_operands * * PARAMETERS: operands - A list of Operand objects * opcode_name - AML opcode name * num_operands - Operand count for this opcode * * DESCRIPTION: Dump the operands associated with the opcode * ******************************************************************************/ void acpi_ex_dump_operands(union acpi_operand_object **operands, const char *opcode_name, u32 num_operands) { … } /******************************************************************************* * * FUNCTION: acpi_ex_out* functions * * PARAMETERS: title - Descriptive text * value - Value to be displayed * * DESCRIPTION: Object dump output formatting functions. These functions * reduce the number of format strings required and keeps them * all in one place for easy modification. * ******************************************************************************/ static void acpi_ex_out_string(const char *title, const char *value) { … } static void acpi_ex_out_pointer(const char *title, const void *value) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_namespace_node * * PARAMETERS: node - Descriptor to dump * flags - Force display if TRUE * * DESCRIPTION: Dumps the members of the given.Node * ******************************************************************************/ void acpi_ex_dump_namespace_node(struct acpi_namespace_node *node, u32 flags) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_reference_obj * * PARAMETERS: object - Descriptor to dump * * DESCRIPTION: Dumps a reference object * ******************************************************************************/ static void acpi_ex_dump_reference_obj(union acpi_operand_object *obj_desc) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_package_obj * * PARAMETERS: obj_desc - Descriptor to dump * level - Indentation Level * index - Package index for this object * * DESCRIPTION: Dumps the elements of the package * ******************************************************************************/ static void acpi_ex_dump_package_obj(union acpi_operand_object *obj_desc, u32 level, u32 index) { … } /******************************************************************************* * * FUNCTION: acpi_ex_dump_object_descriptor * * PARAMETERS: obj_desc - Descriptor to dump * flags - Force display if TRUE * * DESCRIPTION: Dumps the members of the object descriptor given. * ******************************************************************************/ void acpi_ex_dump_object_descriptor(union acpi_operand_object *obj_desc, u32 flags) { … } #endif