Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica: (42 commits)
  ACPICA: Update version to 20150818
  ACPICA: Debugger: Cleanup debugging outputs to dump name path without trailing underscores
  ACPICA: Disassembler: Cleanup acpi_gbl_db_opt_verbose acpiexec usage
  ACPICA: Disassembler: Cleanup acpi_gbl_db_opt_disasm
  ACPICA: Debugger: Split debugger initialization/termination APIs
  ACPICA: Header support to improve compatibility with MSVC
  ACPICA: Make the max-number-of-loops runtime configurable
  ACPICA: Debugger: Add option to display namespace summary/counts
  ACPICA: Add additional debug info/statements
  ACPICA: Table handling: Cleanup and update debug output for tools
  ACPICA: acpiexec/acpinames: Support very large number of ACPI tables
  ACPICA: acpinames: Add new options and wildcard support
  ACPICA: Headers: Fix some comments, no functional change
  ACPICA: Tables: Cleanup to reduce FACS globals
  ACPICA: Tables: Fix global table list issues by removing fixed table indexes
  ACPICA: Update info messages during ACPICA init
  ACPICA: Disassembler: Update for new listing mode
  ACPICA: Update parameter validation for data_table_region and load_table
  ACPICA: Disassembler: Remove duplicate code in _PLD processing.
  ACPICA: Correctly cleanup after a ACPI table load failure
  ...
  • Loading branch information
Rafael J. Wysocki committed Sep 1, 2015
2 parents 64291f7 + b7a4f7f commit c91c5b2
Show file tree
Hide file tree
Showing 68 changed files with 1,815 additions and 891 deletions.
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-y += acpi.o
acpi-y := \
dsargs.o \
dscontrol.o \
dsdebug.o \
dsfield.o \
dsinit.o \
dsmethod.o \
Expand Down Expand Up @@ -164,6 +165,7 @@ acpi-y += \
utmath.o \
utmisc.o \
utmutex.o \
utnonansi.o \
utobject.o \
utosi.o \
utownerid.o \
Expand Down
26 changes: 19 additions & 7 deletions drivers/acpi/acpica/acdebug.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,13 @@ struct acpi_db_execute_walk {
};

#define PARAM_LIST(pl) pl
#define DBTEST_OUTPUT_LEVEL(lvl) if (acpi_gbl_db_opt_verbose)
#define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\
acpi_os_printf PARAM_LIST(fp);}

#define EX_NO_SINGLE_STEP 1
#define EX_SINGLE_STEP 2

/*
* dbxface - external debugger interfaces
*/
acpi_status acpi_db_initialize(void);

void acpi_db_terminate(void);

acpi_status
acpi_db_single_step(struct acpi_walk_state *walk_state,
union acpi_parse_object *op, u32 op_type);
Expand All @@ -102,6 +95,8 @@ void acpi_db_display_interfaces(char *action_arg, char *interface_name_arg);

acpi_status acpi_db_sleep(char *object_arg);

void acpi_db_trace(char *enable_arg, char *method_arg, char *once_arg);

void acpi_db_display_locks(void);

void acpi_db_display_resources(char *object_arg);
Expand Down Expand Up @@ -261,6 +256,23 @@ acpi_status acpi_db_user_commands(char prompt, union acpi_parse_object *op);
char *acpi_db_get_next_token(char *string,
char **next, acpi_object_type * return_type);

/*
* dbobject
*/
void acpi_db_decode_internal_object(union acpi_operand_object *obj_desc);

void
acpi_db_display_internal_object(union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void acpi_db_decode_arguments(struct acpi_walk_state *walk_state);

void acpi_db_decode_locals(struct acpi_walk_state *walk_state);

void
acpi_db_dump_method_info(acpi_status status,
struct acpi_walk_state *walk_state);

/*
* dbstats - Generation and display of ACPI table statistics
*/
Expand Down
8 changes: 8 additions & 0 deletions drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,12 @@ acpi_status
acpi_ds_result_push(union acpi_operand_object *object,
struct acpi_walk_state *walk_state);

/*
* dsdebug - parser debugging routines
*/
void
acpi_ds_dump_method_stack(acpi_status status,
struct acpi_walk_state *walk_state,
union acpi_parse_object *op);

#endif /* _ACDISPAT_H_ */
20 changes: 12 additions & 8 deletions drivers/acpi/acpica/acglobal.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ ACPI_GLOBAL(struct acpi_table_list, acpi_gbl_root_table_list);

ACPI_GLOBAL(struct acpi_table_header *, acpi_gbl_DSDT);
ACPI_GLOBAL(struct acpi_table_header, acpi_gbl_original_dsdt_header);
ACPI_INIT_GLOBAL(u32, acpi_gbl_dsdt_index, ACPI_INVALID_TABLE_INDEX);
ACPI_INIT_GLOBAL(u32, acpi_gbl_facs_index, ACPI_INVALID_TABLE_INDEX);
ACPI_INIT_GLOBAL(u32, acpi_gbl_xfacs_index, ACPI_INVALID_TABLE_INDEX);

#if (!ACPI_REDUCED_HARDWARE)
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_FACS);
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs32);
ACPI_GLOBAL(struct acpi_table_facs *, acpi_gbl_facs64);

#endif /* !ACPI_REDUCED_HARDWARE */

Expand Down Expand Up @@ -235,6 +236,10 @@ ACPI_INIT_GLOBAL(u32, acpi_gbl_nesting_level, 0);

ACPI_GLOBAL(struct acpi_thread_state *, acpi_gbl_current_walk_list);

/* Maximum number of While() loop iterations before forced abort */

ACPI_GLOBAL(u16, acpi_gbl_max_loop_iterations);

/* Control method single step flag */

ACPI_GLOBAL(u8, acpi_gbl_cm_single_step);
Expand Down Expand Up @@ -290,8 +295,6 @@ ACPI_GLOBAL(u32, acpi_fixed_event_count[ACPI_NUM_FIXED_EVENTS]);

ACPI_GLOBAL(u32, acpi_gbl_original_dbg_level);
ACPI_GLOBAL(u32, acpi_gbl_original_dbg_layer);
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_level);
ACPI_GLOBAL(u32, acpi_gbl_trace_dbg_layer);

/*****************************************************************************
*
Expand All @@ -309,9 +312,10 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_ignore_noop_operator, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_opt_verbose, TRUE);

ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm);
ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing);
ACPI_GLOBAL(u8, acpi_gbl_num_external_methods);
ACPI_GLOBAL(u32, acpi_gbl_resolved_external_methods);
ACPI_GLOBAL(struct acpi_external_list *, acpi_gbl_external_list);
Expand Down Expand Up @@ -346,8 +350,8 @@ ACPI_GLOBAL(char, acpi_gbl_db_debug_filename[ACPI_DB_LINE_BUFFER_SIZE]);
/*
* Statistic globals
*/
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TYPE_NS_NODE_MAX + 1]);
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count[ACPI_TOTAL_TYPES]);
ACPI_GLOBAL(u16, acpi_gbl_node_type_count[ACPI_TOTAL_TYPES]);
ACPI_GLOBAL(u16, acpi_gbl_obj_type_count_misc);
ACPI_GLOBAL(u16, acpi_gbl_node_type_count_misc);
ACPI_GLOBAL(u32, acpi_gbl_num_nodes);
Expand Down
22 changes: 22 additions & 0 deletions drivers/acpi/acpica/acinterp.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,28 @@ void
acpi_ex_do_debug_object(union acpi_operand_object *source_desc,
u32 level, u32 index);

void
acpi_ex_start_trace_method(struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void
acpi_ex_stop_trace_method(struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state);

void
acpi_ex_start_trace_opcode(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

void
acpi_ex_stop_trace_opcode(union acpi_parse_object *op,
struct acpi_walk_state *walk_state);

void
acpi_ex_trace_point(acpi_trace_event_type type,
u8 begin, u8 *aml, char *pathname);

/*
* exfield - ACPI AML (p-code) execution - field manipulation
*/
Expand Down
28 changes: 22 additions & 6 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,12 @@ struct acpi_namespace_node {
*/
#ifdef ACPI_LARGE_NAMESPACE_NODE
union acpi_parse_object *op;
void *method_locals;
void *method_args;
u32 value;
u32 length;
u8 arg_count;

#endif
};

Expand Down Expand Up @@ -209,11 +213,9 @@ struct acpi_table_list {
#define ACPI_ROOT_ORIGIN_ALLOCATED (1)
#define ACPI_ROOT_ALLOW_RESIZE (2)

/* Predefined (fixed) table indexes */
/* Predefined table indexes */

#define ACPI_TABLE_INDEX_DSDT (0)
#define ACPI_TABLE_INDEX_FACS (1)
#define ACPI_TABLE_INDEX_X_FACS (2)
#define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF)

struct acpi_find_context {
char *search_for;
Expand Down Expand Up @@ -404,6 +406,13 @@ struct acpi_simple_repair_info {

#define ACPI_NUM_RTYPES 5 /* Number of actual object types */

/* Info for running the _REG methods */

struct acpi_reg_walk_info {
acpi_adr_space_type space_id;
u32 reg_run_count;
};

/*****************************************************************************
*
* Event typedefs and structs
Expand Down Expand Up @@ -715,7 +724,7 @@ union acpi_parse_value {
union acpi_parse_object *arg; /* arguments and contained ops */
};

#ifdef ACPI_DISASSEMBLER
#if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT)
#define ACPI_DISASM_ONLY_MEMBERS(a) a;
#else
#define ACPI_DISASM_ONLY_MEMBERS(a)
Expand All @@ -726,7 +735,7 @@ union acpi_parse_value {
u8 descriptor_type; /* To differentiate various internal objs */\
u8 flags; /* Type of Op */\
u16 aml_opcode; /* AML opcode */\
u32 aml_offset; /* Offset of declaration in AML */\
u8 *aml; /* Address of declaration in AML */\
union acpi_parse_object *next; /* Next op */\
struct acpi_namespace_node *node; /* For use by interpreter */\
union acpi_parse_value value; /* Value or args associated with the opcode */\
Expand Down Expand Up @@ -1103,6 +1112,9 @@ struct acpi_db_method_info {
* Index of current thread inside all them created.
*/
char init_args;
#ifdef ACPI_DEBUGGER
acpi_object_type arg_types[4];
#endif
char *arguments[4];
char num_threads_str[11];
char id_of_thread_str[11];
Expand All @@ -1119,6 +1131,10 @@ struct acpi_integrity_info {
#define ACPI_DB_CONSOLE_OUTPUT 0x02
#define ACPI_DB_DUPLICATE_OUTPUT 0x03

struct acpi_object_info {
u32 types[ACPI_TOTAL_TYPES];
};

/*****************************************************************************
*
* Debug
Expand Down
9 changes: 9 additions & 0 deletions drivers/acpi/acpica/acmacros.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,15 @@
#define ACPI_MUL_32(a) _ACPI_MUL(a, 5)
#define ACPI_MOD_32(a) _ACPI_MOD(a, 32)

/* Test for ASCII character */

#define ACPI_IS_ASCII(c) ((c) < 0x80)

/* Signed integers */

#define ACPI_SIGN_POSITIVE 0
#define ACPI_SIGN_NEGATIVE 1

/*
* Rounding macros (Power of two boundaries only)
*/
Expand Down
13 changes: 8 additions & 5 deletions drivers/acpi/acpica/acnamesp.h
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,20 @@ acpi_ns_check_package(struct acpi_evaluate_info *info,
*/
u32 acpi_ns_opens_scope(acpi_object_type type);

acpi_status
acpi_ns_build_external_path(struct acpi_namespace_node *node,
acpi_size size, char *name_buffer);

char *acpi_ns_get_external_pathname(struct acpi_namespace_node *node);

u32
acpi_ns_build_normalized_path(struct acpi_namespace_node *node,
char *full_path, u32 path_size, u8 no_trailing);

char *acpi_ns_get_normalized_pathname(struct acpi_namespace_node *node,
u8 no_trailing);

char *acpi_ns_name_of_current_scope(struct acpi_walk_state *walk_state);

acpi_status
acpi_ns_handle_to_pathname(acpi_handle target_handle,
struct acpi_buffer *buffer);
struct acpi_buffer *buffer, u8 no_trailing);

u8
acpi_ns_pattern_match(struct acpi_namespace_node *obj_node, char *search_for);
Expand Down
1 change: 1 addition & 0 deletions drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ struct acpi_object_method {
u8 param_count;
u8 sync_level;
union acpi_operand_object *mutex;
union acpi_operand_object *node;
u8 *aml_start;
union {
acpi_internal_method implementation;
Expand Down
4 changes: 2 additions & 2 deletions drivers/acpi/acpica/acparser.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,11 @@ void acpi_ps_delete_parse_tree(union acpi_parse_object *root);
/*
* psutils - parser utilities
*/
union acpi_parse_object *acpi_ps_create_scope_op(void);
union acpi_parse_object *acpi_ps_create_scope_op(u8 *aml);

void acpi_ps_init_op(union acpi_parse_object *op, u16 opcode);

union acpi_parse_object *acpi_ps_alloc_op(u16 opcode);
union acpi_parse_object *acpi_ps_alloc_op(u16 opcode, u8 *aml);

void acpi_ps_free_op(union acpi_parse_object *op);

Expand Down
2 changes: 1 addition & 1 deletion drivers/acpi/acpica/acstruct.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ struct acpi_walk_state {
u8 namespace_override; /* Override existing objects */
u8 result_size; /* Total elements for the result stack */
u8 result_count; /* Current number of occupied elements of result stack */
u32 aml_offset;
u8 *aml;
u32 arg_types;
u32 method_breakpoint; /* For single stepping */
u32 user_breakpoint; /* User AML breakpoint */
Expand Down
14 changes: 10 additions & 4 deletions drivers/acpi/acpica/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -154,14 +154,20 @@ void acpi_tb_check_dsdt_header(void);
struct acpi_table_header *acpi_tb_copy_dsdt(u32 table_index);

void
acpi_tb_install_table_with_override(u32 table_index,
struct acpi_table_desc *new_table_desc,
u8 override);
acpi_tb_install_table_with_override(struct acpi_table_desc *new_table_desc,
u8 override, u32 *table_index);

acpi_status
acpi_tb_install_fixed_table(acpi_physical_address address,
char *signature, u32 table_index);
char *signature, u32 *table_index);

acpi_status acpi_tb_parse_root_table(acpi_physical_address rsdp_address);

u8 acpi_is_valid_signature(char *signature);

/*
* tbxfload
*/
acpi_status acpi_tb_load_namespace(void);

#endif /* __ACTABLES_H__ */
Loading

0 comments on commit c91c5b2

Please sign in to comment.