You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'acpica'
* acpica: (43 commits) ACPICA: Drop Linux-specific waking vector functions ACPICA: Update version to 20151218 ACPICA: Add per-table execution of module-level code ACPICA: Add "root node" case to the ACPI name repair code ACPICA: Events: Introduce ACPI_REG_DISCONNECT invocation to acpi_ev_execute_reg_methods() ACPICA: Events: Enhance acpi_ev_execute_reg_method() to ensure no _REG evaluations can happen during OS early boot stages ACPICA: Events: Split acpi_ev_associate_reg_method() from region initialization code ACPICA: Events: Fix an issue that region object is re-attached to another scope when it is already attached ACPICA: Utilities: Reorder initialization code ACPICA: Events: Uses common_notify for address space handlers ACPICA: Events: Deploys acpi_ev_find_region_handler() ACPICA: Cleanup code related to the per-table module level improvement ACPICA: Update for CondRefOf and RefOf operators ACPICA: Update internal #defines for ObjectType operator. No functional change ACPICA: Update parameter type for ObjectType operator ACPICA: Parser: Fix for SuperName method invocation ACPICA: Parser: Add constants for internal namepath function ACPICA: iasl/Disassembler: Support ASL ElseIf operator ACPICA: Add new exception code, AE_IO_ERROR ACPICA: Tools: Add spacing and missing options in acpibin tool ...
This commit is contained in:
@@ -50,6 +50,7 @@ acpi-y += \
|
||||
exdump.o \
|
||||
exfield.o \
|
||||
exfldio.o \
|
||||
exmisc.o \
|
||||
exmutex.o \
|
||||
exnames.o \
|
||||
exoparg1.o \
|
||||
@@ -57,7 +58,6 @@ acpi-y += \
|
||||
exoparg3.o \
|
||||
exoparg6.o \
|
||||
exprep.o \
|
||||
exmisc.o \
|
||||
exregion.o \
|
||||
exresnte.o \
|
||||
exresolv.o \
|
||||
@@ -66,6 +66,7 @@ acpi-y += \
|
||||
exstoren.o \
|
||||
exstorob.o \
|
||||
exsystem.o \
|
||||
extrace.o \
|
||||
exutils.o
|
||||
|
||||
acpi-y += \
|
||||
@@ -196,7 +197,6 @@ acpi-$(ACPI_FUTURE_USAGE) += \
|
||||
dbfileio.o \
|
||||
dbtest.o \
|
||||
utcache.o \
|
||||
utfileio.o \
|
||||
utprint.o \
|
||||
uttrack.o \
|
||||
utuuid.o
|
||||
|
||||
@@ -44,6 +44,8 @@
|
||||
#ifndef _ACAPPS
|
||||
#define _ACAPPS
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
/* Common info for tool signons */
|
||||
|
||||
#define ACPICA_NAME "Intel ACPI Component Architecture"
|
||||
@@ -85,11 +87,40 @@
|
||||
acpi_os_printf (description);
|
||||
|
||||
#define ACPI_OPTION(name, description) \
|
||||
acpi_os_printf (" %-18s%s\n", name, description);
|
||||
acpi_os_printf (" %-20s%s\n", name, description);
|
||||
|
||||
/* Check for unexpected exceptions */
|
||||
|
||||
#define ACPI_CHECK_STATUS(name, status, expected) \
|
||||
if (status != expected) \
|
||||
{ \
|
||||
acpi_os_printf ("Unexpected %s from %s (%s-%d)\n", \
|
||||
acpi_format_exception (status), #name, _acpi_module_name, __LINE__); \
|
||||
}
|
||||
|
||||
/* Check for unexpected non-AE_OK errors */
|
||||
|
||||
#define ACPI_CHECK_OK(name, status) ACPI_CHECK_STATUS (name, status, AE_OK);
|
||||
|
||||
#define FILE_SUFFIX_DISASSEMBLY "dsl"
|
||||
#define FILE_SUFFIX_BINARY_TABLE ".dat" /* Needs the dot */
|
||||
|
||||
/* acfileio */
|
||||
|
||||
acpi_status
|
||||
ac_get_all_tables_from_file(char *filename,
|
||||
u8 get_only_aml_tables,
|
||||
struct acpi_new_table_desc **return_list_head);
|
||||
|
||||
u8 ac_is_file_binary(FILE * file);
|
||||
|
||||
acpi_status ac_validate_table_header(FILE * file, long table_offset);
|
||||
|
||||
/* Values for get_only_aml_tables */
|
||||
|
||||
#define ACPI_GET_ONLY_AML_TABLES TRUE
|
||||
#define ACPI_GET_ALL_TABLES FALSE
|
||||
|
||||
/*
|
||||
* getopt
|
||||
*/
|
||||
@@ -107,30 +138,6 @@ extern char *acpi_gbl_optarg;
|
||||
*/
|
||||
u32 cm_get_file_size(ACPI_FILE file);
|
||||
|
||||
#ifndef ACPI_DUMP_APP
|
||||
/*
|
||||
* adisasm
|
||||
*/
|
||||
acpi_status
|
||||
ad_aml_disassemble(u8 out_to_file,
|
||||
char *filename, char *prefix, char **out_filename);
|
||||
|
||||
void ad_print_statistics(void);
|
||||
|
||||
acpi_status ad_find_dsdt(u8 **dsdt_ptr, u32 *dsdt_length);
|
||||
|
||||
void ad_dump_tables(void);
|
||||
|
||||
acpi_status ad_get_local_tables(void);
|
||||
|
||||
acpi_status
|
||||
ad_parse_table(struct acpi_table_header *table,
|
||||
acpi_owner_id * owner_id, u8 load_table, u8 external);
|
||||
|
||||
acpi_status ad_display_tables(char *filename, struct acpi_table_header *table);
|
||||
|
||||
acpi_status ad_display_statistics(void);
|
||||
|
||||
/*
|
||||
* adwalk
|
||||
*/
|
||||
@@ -168,6 +175,5 @@ char *ad_generate_filename(char *prefix, char *table_id);
|
||||
void
|
||||
ad_write_table(struct acpi_table_header *table,
|
||||
u32 length, char *table_name, char *oem_table_id);
|
||||
#endif
|
||||
|
||||
#endif /* _ACAPPS */
|
||||
|
||||
@@ -245,10 +245,7 @@ void acpi_db_open_debug_file(char *name);
|
||||
|
||||
acpi_status acpi_db_load_acpi_table(char *filename);
|
||||
|
||||
acpi_status
|
||||
acpi_db_get_table_from_file(char *filename,
|
||||
struct acpi_table_header **table,
|
||||
u8 must_be_aml_table);
|
||||
acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head);
|
||||
|
||||
/*
|
||||
* dbhistry - debugger HISTORY command
|
||||
|
||||
@@ -161,6 +161,11 @@ acpi_ev_delete_gpe_handlers(struct acpi_gpe_xrupt_info *gpe_xrupt_info,
|
||||
/*
|
||||
* evhandler - Address space handling
|
||||
*/
|
||||
union acpi_operand_object *acpi_ev_find_region_handler(acpi_adr_space_type
|
||||
space_id,
|
||||
union acpi_operand_object
|
||||
*handler_obj);
|
||||
|
||||
u8
|
||||
acpi_ev_has_default_handler(struct acpi_namespace_node *node,
|
||||
acpi_adr_space_type space_id);
|
||||
@@ -193,9 +198,11 @@ void
|
||||
acpi_ev_detach_region(union acpi_operand_object *region_obj,
|
||||
u8 acpi_ns_is_locked);
|
||||
|
||||
acpi_status
|
||||
void acpi_ev_associate_reg_method(union acpi_operand_object *region_obj);
|
||||
|
||||
void
|
||||
acpi_ev_execute_reg_methods(struct acpi_namespace_node *node,
|
||||
acpi_adr_space_type space_id);
|
||||
acpi_adr_space_type space_id, u32 function);
|
||||
|
||||
acpi_status
|
||||
acpi_ev_execute_reg_method(union acpi_operand_object *region_obj, u32 function);
|
||||
|
||||
@@ -145,6 +145,7 @@ ACPI_GLOBAL(acpi_cache_t *, acpi_gbl_operand_cache);
|
||||
|
||||
ACPI_INIT_GLOBAL(u32, acpi_gbl_startup_flags, 0);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_shutdown, TRUE);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_early_initialization, TRUE);
|
||||
|
||||
/* Global handlers */
|
||||
|
||||
@@ -164,7 +165,7 @@ ACPI_GLOBAL(u8, acpi_gbl_next_owner_id_offset);
|
||||
|
||||
/* Initialization sequencing */
|
||||
|
||||
ACPI_GLOBAL(u8, acpi_gbl_reg_methods_executed);
|
||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_reg_methods_enabled, FALSE);
|
||||
|
||||
/* Misc */
|
||||
|
||||
|
||||
@@ -219,6 +219,13 @@ struct acpi_table_list {
|
||||
#define ACPI_ROOT_ORIGIN_ALLOCATED (1)
|
||||
#define ACPI_ROOT_ALLOW_RESIZE (2)
|
||||
|
||||
/* List to manage incoming ACPI tables */
|
||||
|
||||
struct acpi_new_table_desc {
|
||||
struct acpi_table_header *table;
|
||||
struct acpi_new_table_desc *next;
|
||||
};
|
||||
|
||||
/* Predefined table indexes */
|
||||
|
||||
#define ACPI_INVALID_TABLE_INDEX (0xFFFFFFFF)
|
||||
@@ -388,7 +395,8 @@ union acpi_predefined_info {
|
||||
|
||||
/* Return object auto-repair info */
|
||||
|
||||
typedef acpi_status(*acpi_object_converter) (union acpi_operand_object
|
||||
typedef acpi_status(*acpi_object_converter) (struct acpi_namespace_node * scope,
|
||||
union acpi_operand_object
|
||||
*original_object,
|
||||
union acpi_operand_object
|
||||
**converted_object);
|
||||
@@ -420,6 +428,7 @@ struct acpi_simple_repair_info {
|
||||
|
||||
struct acpi_reg_walk_info {
|
||||
acpi_adr_space_type space_id;
|
||||
u32 function;
|
||||
u32 reg_run_count;
|
||||
};
|
||||
|
||||
@@ -861,6 +870,7 @@ struct acpi_parse_state {
|
||||
#define ACPI_PARSEOP_CLOSING_PAREN 0x10
|
||||
#define ACPI_PARSEOP_COMPOUND 0x20
|
||||
#define ACPI_PARSEOP_ASSIGNMENT 0x40
|
||||
#define ACPI_PARSEOP_ELSEIF 0x80
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
|
||||
@@ -77,6 +77,7 @@
|
||||
/* Object is not a package element */
|
||||
|
||||
#define ACPI_NOT_PACKAGE_ELEMENT ACPI_UINT32_MAX
|
||||
#define ACPI_ALL_PACKAGE_ELEMENTS (ACPI_UINT32_MAX-1)
|
||||
|
||||
/* Always emit warning message, not dependent on node flags */
|
||||
|
||||
@@ -183,13 +184,20 @@ acpi_ns_convert_to_buffer(union acpi_operand_object *original_object,
|
||||
union acpi_operand_object **return_object);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_convert_to_unicode(union acpi_operand_object *original_object,
|
||||
acpi_ns_convert_to_unicode(struct acpi_namespace_node *scope,
|
||||
union acpi_operand_object *original_object,
|
||||
union acpi_operand_object **return_object);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_convert_to_resource(union acpi_operand_object *original_object,
|
||||
acpi_ns_convert_to_resource(struct acpi_namespace_node *scope,
|
||||
union acpi_operand_object *original_object,
|
||||
union acpi_operand_object **return_object);
|
||||
|
||||
acpi_status
|
||||
acpi_ns_convert_to_reference(struct acpi_namespace_node *scope,
|
||||
union acpi_operand_object *original_object,
|
||||
union acpi_operand_object **return_object);
|
||||
|
||||
/*
|
||||
* nsdump - Namespace dump/print utilities
|
||||
*/
|
||||
|
||||
@@ -93,9 +93,10 @@
|
||||
#define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */
|
||||
#define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */
|
||||
#define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */
|
||||
#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized, _REG was run */
|
||||
#define AOPOBJ_SETUP_COMPLETE 0x10 /* Region setup is complete */
|
||||
#define AOPOBJ_INVALID 0x20 /* Host OS won't allow a Region address */
|
||||
#define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */
|
||||
#define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */
|
||||
#define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */
|
||||
#define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
#define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_SUPERNAME)
|
||||
#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_NAME_OR_REF,ARGP_TARGET)
|
||||
#define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_CONTINUE_OP ARG_NONE
|
||||
#define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME)
|
||||
@@ -152,13 +152,14 @@
|
||||
#define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
#define ARGP_NOOP_OP ARG_NONE
|
||||
#define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
|
||||
#define ARGP_OBJECT_TYPE_OP ARGP_LIST1 (ARGP_NAME_OR_REF)
|
||||
#define ARGP_ONE_OP ARG_NONE
|
||||
#define ARGP_ONES_OP ARG_NONE
|
||||
#define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST)
|
||||
#define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST)
|
||||
#define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST)
|
||||
#define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA)
|
||||
#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_NAME_OR_REF)
|
||||
#define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG)
|
||||
#define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING)
|
||||
@@ -185,7 +186,6 @@
|
||||
#define ARGP_TO_HEX_STR_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_INTEGER_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TO_STRING_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET)
|
||||
#define ARGP_TYPE_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_UNLOAD_OP ARGP_LIST1 (ARGP_SUPERNAME)
|
||||
#define ARGP_VAR_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_TERMARG, ARGP_DATAOBJLIST)
|
||||
#define ARGP_WAIT_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG)
|
||||
@@ -223,7 +223,7 @@
|
||||
#define ARGI_BUFFER_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_BYTE_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_BYTELIST_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_COMPUTEDATA,ARGI_COMPUTEDATA, ARGI_TARGETREF)
|
||||
#define ARGI_CONCAT_OP ARGI_LIST3 (ARGI_ANYTYPE, ARGI_ANYTYPE, ARGI_TARGETREF)
|
||||
#define ARGI_CONCAT_RES_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_BUFFER, ARGI_TARGETREF)
|
||||
#define ARGI_COND_REF_OF_OP ARGI_LIST2 (ARGI_OBJECT_REF, ARGI_TARGETREF)
|
||||
#define ARGI_CONNECTFIELD_OP ARGI_INVALID_OPCODE
|
||||
@@ -285,6 +285,7 @@
|
||||
#define ARGI_NAMEPATH_OP ARGI_INVALID_OPCODE
|
||||
#define ARGI_NOOP_OP ARG_NONE
|
||||
#define ARGI_NOTIFY_OP ARGI_LIST2 (ARGI_DEVICE_REF, ARGI_INTEGER)
|
||||
#define ARGI_OBJECT_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
|
||||
#define ARGI_ONE_OP ARG_NONE
|
||||
#define ARGI_ONES_OP ARG_NONE
|
||||
#define ARGI_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
@@ -318,7 +319,6 @@
|
||||
#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET)
|
||||
#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET)
|
||||
#define ARGI_TYPE_OP ARGI_LIST1 (ARGI_ANYTYPE)
|
||||
#define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE)
|
||||
#define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER)
|
||||
#define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER)
|
||||
|
||||
@@ -92,7 +92,13 @@ acpi_ps_get_next_simple_arg(struct acpi_parse_state *parser_state,
|
||||
acpi_status
|
||||
acpi_ps_get_next_namepath(struct acpi_walk_state *walk_state,
|
||||
struct acpi_parse_state *parser_state,
|
||||
union acpi_parse_object *arg, u8 method_call);
|
||||
union acpi_parse_object *arg,
|
||||
u8 possible_method_call);
|
||||
|
||||
/* Values for u8 above */
|
||||
|
||||
#define ACPI_NOT_METHOD_CALL FALSE
|
||||
#define ACPI_POSSIBLE_METHOD_CALL TRUE
|
||||
|
||||
acpi_status
|
||||
acpi_ps_get_next_arg(struct acpi_walk_state *walk_state,
|
||||
|
||||
@@ -184,24 +184,24 @@ acpi_status acpi_ut_init_globals(void);
|
||||
|
||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
|
||||
|
||||
char *acpi_ut_get_mutex_name(u32 mutex_id);
|
||||
const char *acpi_ut_get_mutex_name(u32 mutex_id);
|
||||
|
||||
const char *acpi_ut_get_notify_name(u32 notify_value, acpi_object_type type);
|
||||
#endif
|
||||
|
||||
char *acpi_ut_get_type_name(acpi_object_type type);
|
||||
const char *acpi_ut_get_type_name(acpi_object_type type);
|
||||
|
||||
char *acpi_ut_get_node_name(void *object);
|
||||
const char *acpi_ut_get_node_name(void *object);
|
||||
|
||||
char *acpi_ut_get_descriptor_name(void *object);
|
||||
const char *acpi_ut_get_descriptor_name(void *object);
|
||||
|
||||
const char *acpi_ut_get_reference_name(union acpi_operand_object *object);
|
||||
|
||||
char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
|
||||
const char *acpi_ut_get_object_type_name(union acpi_operand_object *obj_desc);
|
||||
|
||||
char *acpi_ut_get_region_name(u8 space_id);
|
||||
const char *acpi_ut_get_region_name(u8 space_id);
|
||||
|
||||
char *acpi_ut_get_event_name(u32 event_id);
|
||||
const char *acpi_ut_get_event_name(u32 event_id);
|
||||
|
||||
char acpi_ut_hex_to_ascii_char(u64 integer, u32 position);
|
||||
|
||||
@@ -352,14 +352,6 @@ acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node,
|
||||
const char **method_names,
|
||||
u8 method_count, u8 *out_values);
|
||||
|
||||
/*
|
||||
* utfileio - file operations
|
||||
*/
|
||||
#ifdef ACPI_APPLICATION
|
||||
acpi_status
|
||||
acpi_ut_read_table_from_file(char *filename, struct acpi_table_header **table);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* utids - device ID support
|
||||
*/
|
||||
@@ -371,10 +363,6 @@ acpi_status
|
||||
acpi_ut_execute_UID(struct acpi_namespace_node *device_node,
|
||||
struct acpi_pnp_device_id ** return_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_execute_SUB(struct acpi_namespace_node *device_node,
|
||||
struct acpi_pnp_device_id **return_id);
|
||||
|
||||
acpi_status
|
||||
acpi_ut_execute_CID(struct acpi_namespace_node *device_node,
|
||||
struct acpi_pnp_device_id_list ** return_cid_list);
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
#define AML_CREATE_WORD_FIELD_OP (u16) 0x8b
|
||||
#define AML_CREATE_BYTE_FIELD_OP (u16) 0x8c
|
||||
#define AML_CREATE_BIT_FIELD_OP (u16) 0x8d
|
||||
#define AML_TYPE_OP (u16) 0x8e
|
||||
#define AML_OBJECT_TYPE_OP (u16) 0x8e
|
||||
#define AML_CREATE_QWORD_FIELD_OP (u16) 0x8f /* ACPI 2.0 */
|
||||
#define AML_LAND_OP (u16) 0x90
|
||||
#define AML_LOR_OP (u16) 0x91
|
||||
@@ -238,7 +238,8 @@
|
||||
#define ARGP_TERMLIST 0x0F
|
||||
#define ARGP_WORDDATA 0x10
|
||||
#define ARGP_QWORDDATA 0x11
|
||||
#define ARGP_SIMPLENAME 0x12
|
||||
#define ARGP_SIMPLENAME 0x12 /* name_string | local_term | arg_term */
|
||||
#define ARGP_NAME_OR_REF 0x13 /* For object_type only */
|
||||
|
||||
/*
|
||||
* Resolved argument types for the AML Interpreter
|
||||
|
||||
@@ -798,7 +798,7 @@ acpi_db_device_resources(acpi_handle obj_handle,
|
||||
acpi_status status;
|
||||
|
||||
node = ACPI_CAST_PTR(struct acpi_namespace_node, obj_handle);
|
||||
parent_path = acpi_ns_get_external_pathname(node);
|
||||
parent_path = acpi_ns_get_normalized_pathname(node, TRUE);
|
||||
if (!parent_path) {
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
@@ -1131,13 +1131,8 @@ void acpi_db_trace(char *enable_arg, char *method_arg, char *once_arg)
|
||||
u32 debug_layer = 0;
|
||||
u32 flags = 0;
|
||||
|
||||
if (enable_arg) {
|
||||
acpi_ut_strupr(enable_arg);
|
||||
}
|
||||
|
||||
if (once_arg) {
|
||||
acpi_ut_strupr(once_arg);
|
||||
}
|
||||
acpi_ut_strupr(enable_arg);
|
||||
acpi_ut_strupr(once_arg);
|
||||
|
||||
if (method_arg) {
|
||||
if (acpi_db_trace_method_name) {
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "acnamesp.h"
|
||||
#include "acparser.h"
|
||||
#include "acinterp.h"
|
||||
#include "acevents.h"
|
||||
#include "acdebug.h"
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
@@ -588,7 +589,7 @@ void acpi_db_display_calling_tree(void)
|
||||
*
|
||||
* FUNCTION: acpi_db_display_object_type
|
||||
*
|
||||
* PARAMETERS: name - User entered NS node handle or name
|
||||
* PARAMETERS: object_arg - User entered NS node handle
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
@@ -596,44 +597,34 @@ void acpi_db_display_calling_tree(void)
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void acpi_db_display_object_type(char *name)
|
||||
void acpi_db_display_object_type(char *object_arg)
|
||||
{
|
||||
struct acpi_namespace_node *node;
|
||||
acpi_handle handle;
|
||||
struct acpi_device_info *info;
|
||||
acpi_status status;
|
||||
u32 i;
|
||||
|
||||
node = acpi_db_convert_to_node(name);
|
||||
if (!node) {
|
||||
return;
|
||||
}
|
||||
handle = ACPI_TO_POINTER(strtoul(object_arg, NULL, 16));
|
||||
|
||||
status = acpi_get_object_info(ACPI_CAST_PTR(acpi_handle, node), &info);
|
||||
status = acpi_get_object_info(handle, &info);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
acpi_os_printf("Could not get object info, %s\n",
|
||||
acpi_format_exception(status));
|
||||
return;
|
||||
}
|
||||
|
||||
if (info->valid & ACPI_VALID_ADR) {
|
||||
acpi_os_printf("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
|
||||
ACPI_FORMAT_UINT64(info->address),
|
||||
info->current_status, info->flags);
|
||||
}
|
||||
if (info->valid & ACPI_VALID_SXDS) {
|
||||
acpi_os_printf("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
|
||||
info->highest_dstates[0],
|
||||
info->highest_dstates[1],
|
||||
info->highest_dstates[2],
|
||||
info->highest_dstates[3]);
|
||||
}
|
||||
if (info->valid & ACPI_VALID_SXWS) {
|
||||
acpi_os_printf
|
||||
("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
|
||||
info->lowest_dstates[0], info->lowest_dstates[1],
|
||||
info->lowest_dstates[2], info->lowest_dstates[3],
|
||||
info->lowest_dstates[4]);
|
||||
}
|
||||
acpi_os_printf("ADR: %8.8X%8.8X, STA: %8.8X, Flags: %X\n",
|
||||
ACPI_FORMAT_UINT64(info->address),
|
||||
info->current_status, info->flags);
|
||||
|
||||
acpi_os_printf("S1D-%2.2X S2D-%2.2X S3D-%2.2X S4D-%2.2X\n",
|
||||
info->highest_dstates[0], info->highest_dstates[1],
|
||||
info->highest_dstates[2], info->highest_dstates[3]);
|
||||
|
||||
acpi_os_printf("S0W-%2.2X S1W-%2.2X S2W-%2.2X S3W-%2.2X S4W-%2.2X\n",
|
||||
info->lowest_dstates[0], info->lowest_dstates[1],
|
||||
info->lowest_dstates[2], info->lowest_dstates[3],
|
||||
info->lowest_dstates[4]);
|
||||
|
||||
if (info->valid & ACPI_VALID_HID) {
|
||||
acpi_os_printf("HID: %s\n", info->hardware_id.string);
|
||||
@@ -643,10 +634,6 @@ void acpi_db_display_object_type(char *name)
|
||||
acpi_os_printf("UID: %s\n", info->unique_id.string);
|
||||
}
|
||||
|
||||
if (info->valid & ACPI_VALID_SUB) {
|
||||
acpi_os_printf("SUB: %s\n", info->subsystem_id.string);
|
||||
}
|
||||
|
||||
if (info->valid & ACPI_VALID_CID) {
|
||||
for (i = 0; i < info->compatible_id_list.count; i++) {
|
||||
acpi_os_printf("CID %u: %s\n", i,
|
||||
@@ -963,28 +950,25 @@ void acpi_db_display_handlers(void)
|
||||
if (obj_desc) {
|
||||
for (i = 0; i < ACPI_ARRAY_LENGTH(acpi_gbl_space_id_list); i++) {
|
||||
space_id = acpi_gbl_space_id_list[i];
|
||||
handler_obj = obj_desc->device.handler;
|
||||
|
||||
acpi_os_printf(ACPI_PREDEFINED_PREFIX,
|
||||
acpi_ut_get_region_name((u8)space_id),
|
||||
space_id);
|
||||
|
||||
while (handler_obj) {
|
||||
if (acpi_gbl_space_id_list[i] ==
|
||||
handler_obj->address_space.space_id) {
|
||||
acpi_os_printf
|
||||
(ACPI_HANDLER_PRESENT_STRING,
|
||||
(handler_obj->address_space.
|
||||
handler_flags &
|
||||
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)
|
||||
? "Default" : "User",
|
||||
handler_obj->address_space.
|
||||
handler);
|
||||
handler_obj =
|
||||
acpi_ev_find_region_handler(space_id,
|
||||
obj_desc->common_notify.
|
||||
handler);
|
||||
if (handler_obj) {
|
||||
acpi_os_printf(ACPI_HANDLER_PRESENT_STRING,
|
||||
(handler_obj->address_space.
|
||||
handler_flags &
|
||||
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED)
|
||||
? "Default" : "User",
|
||||
handler_obj->address_space.
|
||||
handler);
|
||||
|
||||
goto found_handler;
|
||||
}
|
||||
|
||||
handler_obj = handler_obj->address_space.next;
|
||||
goto found_handler;
|
||||
}
|
||||
|
||||
/* There is no handler for this space_id */
|
||||
@@ -996,7 +980,7 @@ found_handler: ;
|
||||
|
||||
/* Find all handlers for user-defined space_IDs */
|
||||
|
||||
handler_obj = obj_desc->device.handler;
|
||||
handler_obj = obj_desc->common_notify.handler;
|
||||
while (handler_obj) {
|
||||
if (handler_obj->address_space.space_id >=
|
||||
ACPI_USER_REGION_BEGIN) {
|
||||
@@ -1091,14 +1075,14 @@ acpi_db_display_non_root_handlers(acpi_handle obj_handle,
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
pathname = acpi_ns_get_external_pathname(node);
|
||||
pathname = acpi_ns_get_normalized_pathname(node, TRUE);
|
||||
if (!pathname) {
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Display all handlers associated with this device */
|
||||
|
||||
handler_obj = obj_desc->device.handler;
|
||||
handler_obj = obj_desc->common_notify.handler;
|
||||
while (handler_obj) {
|
||||
acpi_os_printf(ACPI_PREDEFINED_PREFIX,
|
||||
acpi_ut_get_region_name((u8)handler_obj->
|
||||
|
||||
+16
-109
@@ -46,6 +46,10 @@
|
||||
#include "accommon.h"
|
||||
#include "acdebug.h"
|
||||
#include "actables.h"
|
||||
#include <stdio.h>
|
||||
#ifdef ACPI_APPLICATION
|
||||
#include "acapps.h"
|
||||
#endif
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
ACPI_MODULE_NAME("dbfileio")
|
||||
@@ -110,122 +114,31 @@ void acpi_db_open_debug_file(char *name)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
#include "acapps.h"
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: ae_local_load_table
|
||||
* FUNCTION: acpi_db_load_tables
|
||||
*
|
||||
* PARAMETERS: table - pointer to a buffer containing the entire
|
||||
* table to be loaded
|
||||
* PARAMETERS: list_head - List of ACPI tables to load
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: This function is called to load a table from the caller's
|
||||
* buffer. The buffer must contain an entire ACPI Table including
|
||||
* a valid header. The header fields will be verified, and if it
|
||||
* is determined that the table is invalid, the call will fail.
|
||||
* DESCRIPTION: Load ACPI tables from a previously constructed table list.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static acpi_status ae_local_load_table(struct acpi_table_header *table)
|
||||
acpi_status acpi_db_load_tables(struct acpi_new_table_desc *list_head)
|
||||
{
|
||||
acpi_status status = AE_OK;
|
||||
|
||||
ACPI_FUNCTION_TRACE(ae_local_load_table);
|
||||
|
||||
#if 0
|
||||
/* struct acpi_table_desc table_info; */
|
||||
|
||||
if (!table) {
|
||||
return_ACPI_STATUS(AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
table_info.pointer = table;
|
||||
status = acpi_tb_recognize_table(&table_info, ACPI_TABLE_ALL);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
|
||||
/* Install the new table into the local data structures */
|
||||
|
||||
status = acpi_tb_init_table_descriptor(&table_info);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
if (status == AE_ALREADY_EXISTS) {
|
||||
|
||||
/* Table already exists, no error */
|
||||
|
||||
status = AE_OK;
|
||||
}
|
||||
|
||||
/* Free table allocated by acpi_tb_get_table */
|
||||
|
||||
acpi_tb_delete_single_table(&table_info);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
#if (!defined (ACPI_NO_METHOD_EXECUTION) && !defined (ACPI_CONSTANT_EVAL_ONLY))
|
||||
|
||||
status =
|
||||
acpi_ns_load_table(table_info.installed_desc, acpi_gbl_root_node);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
|
||||
/* Uninstall table and free the buffer */
|
||||
|
||||
acpi_tb_delete_tables_by_type(ACPI_TABLE_ID_DSDT);
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return_ACPI_STATUS(status);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: acpi_db_get_table_from_file
|
||||
*
|
||||
* PARAMETERS: filename - File where table is located
|
||||
* return_table - Where a pointer to the table is returned
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
* DESCRIPTION: Load an ACPI table from a file
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
acpi_status
|
||||
acpi_db_get_table_from_file(char *filename,
|
||||
struct acpi_table_header **return_table,
|
||||
u8 must_be_aml_file)
|
||||
{
|
||||
#ifdef ACPI_APPLICATION
|
||||
acpi_status status;
|
||||
struct acpi_new_table_desc *table_list_head;
|
||||
struct acpi_table_header *table;
|
||||
u8 is_aml_table = TRUE;
|
||||
|
||||
status = acpi_ut_read_table_from_file(filename, &table);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
return (status);
|
||||
}
|
||||
/* Load all ACPI tables in the list */
|
||||
|
||||
if (must_be_aml_file) {
|
||||
is_aml_table = acpi_ut_is_aml_table(table);
|
||||
if (!is_aml_table) {
|
||||
ACPI_EXCEPTION((AE_INFO, AE_OK,
|
||||
"Input for -e is not an AML table: "
|
||||
"\"%4.4s\" (must be DSDT/SSDT)",
|
||||
table->signature));
|
||||
return (AE_TYPE);
|
||||
}
|
||||
}
|
||||
table_list_head = list_head;
|
||||
while (table_list_head) {
|
||||
table = table_list_head->table;
|
||||
|
||||
if (is_aml_table) {
|
||||
|
||||
/* Attempt to recognize and install the table */
|
||||
|
||||
status = ae_local_load_table(table);
|
||||
status = acpi_load_table(table);
|
||||
if (ACPI_FAILURE(status)) {
|
||||
if (status == AE_ALREADY_EXISTS) {
|
||||
acpi_os_printf
|
||||
@@ -239,18 +152,12 @@ acpi_db_get_table_from_file(char *filename,
|
||||
return (status);
|
||||
}
|
||||
|
||||
acpi_tb_print_table_header(0, table);
|
||||
|
||||
fprintf(stderr,
|
||||
"Acpi table [%4.4s] successfully installed and loaded\n",
|
||||
table->signature);
|
||||
|
||||
table_list_head = table_list_head->next;
|
||||
}
|
||||
|
||||
acpi_gbl_acpi_hardware_present = FALSE;
|
||||
if (return_table) {
|
||||
*return_table = table;
|
||||
}
|
||||
|
||||
#endif /* ACPI_APPLICATION */
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
#include "accommon.h"
|
||||
#include "acdebug.h"
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
#include "acapps.h"
|
||||
#endif
|
||||
|
||||
#define _COMPONENT ACPI_CA_DEBUGGER
|
||||
ACPI_MODULE_NAME("dbinput")
|
||||
|
||||
@@ -621,9 +625,7 @@ static u32 acpi_db_get_line(char *input_buffer)
|
||||
|
||||
/* Uppercase the actual command */
|
||||
|
||||
if (acpi_gbl_db_args[0]) {
|
||||
acpi_ut_strupr(acpi_gbl_db_args[0]);
|
||||
}
|
||||
acpi_ut_strupr(acpi_gbl_db_args[0]);
|
||||
|
||||
count = i;
|
||||
if (count) {
|
||||
@@ -1048,11 +1050,17 @@ acpi_db_command_dispatch(char *input_buffer,
|
||||
acpi_db_close_debug_file();
|
||||
break;
|
||||
|
||||
case CMD_LOAD:
|
||||
case CMD_LOAD:{
|
||||
struct acpi_new_table_desc *list_head = NULL;
|
||||
|
||||
status =
|
||||
acpi_db_get_table_from_file(acpi_gbl_db_args[1], NULL,
|
||||
FALSE);
|
||||
status =
|
||||
ac_get_all_tables_from_file(acpi_gbl_db_args[1],
|
||||
ACPI_GET_ALL_TABLES,
|
||||
&list_head);
|
||||
if (ACPI_SUCCESS(status)) {
|
||||
acpi_db_load_tables(list_head);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_OPEN:
|
||||
|
||||
@@ -438,7 +438,7 @@ acpi_db_walk_for_predefined_names(acpi_handle obj_handle,
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
pathname = acpi_ns_get_external_pathname(node);
|
||||
pathname = acpi_ns_get_normalized_pathname(node, TRUE);
|
||||
if (!pathname) {
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@@ -382,6 +382,7 @@ acpi_status acpi_db_display_statistics(char *type_arg)
|
||||
acpi_gbl_node_type_count[i],
|
||||
acpi_gbl_obj_type_count[i]);
|
||||
}
|
||||
|
||||
acpi_os_printf("%16.16s % 10ld% 10ld\n", "Misc/Unknown",
|
||||
acpi_gbl_node_type_count_misc,
|
||||
acpi_gbl_obj_type_count_misc);
|
||||
|
||||
@@ -953,7 +953,7 @@ acpi_db_evaluate_one_predefined_name(acpi_handle obj_handle,
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
pathname = acpi_ns_get_external_pathname(node);
|
||||
pathname = acpi_ns_get_normalized_pathname(node, TRUE);
|
||||
if (!pathname) {
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
@@ -173,6 +173,7 @@ void acpi_db_dump_external_object(union acpi_object *obj_desc, u32 level)
|
||||
if (obj_desc->buffer.length > 16) {
|
||||
acpi_os_printf("\n");
|
||||
}
|
||||
|
||||
acpi_ut_debug_dump_buffer(ACPI_CAST_PTR
|
||||
(u8,
|
||||
obj_desc->buffer.pointer),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user