ACPICA updates for v4.1-rc1
- Fix for a GPE handling regression on Dell Latitude D600 that caused GPE signaling to stop working on that machine, which appears to be due to a hardware glitch, but it used to work and it can be made work again in a relativly straightforward way (Rafael J Wysocki). - Fix for a mutex unlock regression related to the handling of ACPI tables introduced during the 3.16 development cycle (Octavian Purdila). - _REV modification to always return 2 which has been done by all versions of Windows since NT and the firmware people started to use it to distinguish between OSes in their AML and do some silly and wrong things on that basis (Bob Moore). - Fixes and cleanups related to the acpi_physicall_address data type including one stable-candidate fix for an issue occasionally occuring on 64-bit machines running 32-bit kernels where using offsets provided by the firmware may lead to address overflows (Lv Zheng). - External() opcode support infrastructure needed for recompiling disassembled ACPI tables in some cases including interpreter modification to ignore that opcode (Bob Moore). - Support for the "Windows 2015" string in _OSI (Bob Moore). - GPE debug interface change to return values read from hardware registers (Lv Zheng). - Removal of the __DATE__ macro usage in tools (Rasmus Villemoes). - Assorted minor fixes and cleanups (Lv Zheng, Rickard Strandqvist, Bob Moore). / -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABCAAGBQJVMFyLAAoJEILEb/54YlRxCdgQAK5C0mkWOYgvNr5/Mur3bhgJ kwa/IDRWKFB6EU4vIEK5sVR4IHGknbRo4XskVt5aHTLgSHWY/ArvACs0nruCR9+s hvlwqtWuZlqlDNQrP9XuP10CjDvbhEijWo05TmfeI52Rt50aUa+4yrHtO/F5he6l DtrPZDzW+N3sEt4gBbqVp4nHNVo2O8JGvoaYAM+ASGW7xxQgNNjt+HTqFarDdVCq MCalceHgzlxWSMY5sCs2xsdJzbc9P0n6dZisByuFZvujMv8QvQ5LZv0s4Ty/XZMK deU5ziY5SoYlzruHll8UtSbXP4RW9V7hTly01i5zbKxy8gPvDDhjliulYJoVGg5T DiAOUp7qpbksdrR3fXn8C1LF1+0UcW2yD9mOb3WVAoMj4r9ngxxi0btA1OurZI/Y BGBeUxQSoAb0tzPUU1FQin0wwTBUC+o/ZGlf1ECkezCPr7CRlpi1e64Ws46/8vt9 sA78u7fLnTl/H4EIeg2qAT98J9AnQxbXncwuoZ5inr/tDxl5ER5zpQK4EfO/H+nC 8j7x3j8kQ/AEs4wEleQYAG6HXFu6GLw2cuhcKGnqW9cEI9xjiqDBfWWC1Vigkvou ScolTguT0u0d5d0wNQqPtcEyaGcYYDMZfpzO81bU/fFqtg++/i1gKXKPy77KdpV1 s9/RkrCv7tx2Dy5kcXpi =xUhi -----END PGP SIGNATURE----- Merge tag 'acpica-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPICA updates from Rafael Wysocki: "This updates the kernel's ACPICA code to upstream revision 20150410 and adds a fix for a GPE handling regression introduced during the 3.19 cycle on top of that. Included are two stable-candidate bug fixes (one of them fixing a 3.16 regression), multiple other fixes and a bunch of cleanups. Specifics: - Fix for a GPE handling regression on Dell Latitude D600 that caused GPE signaling to stop working on that machine, which appears to be due to a hardware glitch, but it used to work and it can be made work again in a relativly straightforward way (Rafael J Wysocki). - Fix for a mutex unlock regression related to the handling of ACPI tables introduced during the 3.16 development cycle (Octavian Purdila). - _REV modification to always return 2 which has been done by all versions of Windows since NT and the firmware people started to use it to distinguish between OSes in their AML and do some silly and wrong things on that basis (Bob Moore). - Fixes and cleanups related to the acpi_physicall_address data type including one stable-candidate fix for an issue occasionally occuring on 64-bit machines running 32-bit kernels where using offsets provided by the firmware may lead to address overflows (Lv Zheng). - External() opcode support infrastructure needed for recompiling disassembled ACPI tables in some cases including interpreter modification to ignore that opcode (Bob Moore). - Support for the "Windows 2015" string in _OSI (Bob Moore). - GPE debug interface change to return values read from hardware registers (Lv Zheng). - Removal of the __DATE__ macro usage in tools (Rasmus Villemoes). - Assorted minor fixes and cleanups (Lv Zheng, Rickard Strandqvist, Bob Moore)" * tag 'acpica-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) ACPICA: Store GPE register enable masks upfront ACPICA: Update version to 20150410. ACPICA: Fix a couple issues with the local printf module. ACPICA: Disassembler: Some cleanup of the table dump module. ACPICA: iASL: Add support for MSDM ACPI table. ACPICA: Update for SLIC ACPI table. ACPICA: Add "//" before ascii output of buffers. ACPICA: Remove unused internal AML opcode. ACPICA: Permanently set _REV to the value '2'. ACPICA: Add "Windows 2015" string to _OSI support. ACPICA: Add infrastructure for External() opcode. ACPICA: iASL: Enhancement for constant folding. ACPICA: iASL/Disassembler: Add option to assume table contains valid AML. ACPICA: Update AML Debugger global variables. ACPICA: Update Resource descriptor dump module. ACPICA: Fix a sscanf format string. ACPICA: Casting changes around acpi_physical_address/acpi_size. ACPICA: Resources: Correct conditional compilation definitions. ACPICA: Utilities: Correct conditional compilation definitions. ACPICA: Tables: Move an iasl specific table function to iasl source file. ...
This commit is contained in:
commit
0f5abd4020
43 changed files with 391 additions and 420 deletions
|
@ -64,15 +64,15 @@
|
||||||
/* Macros for signons and file headers */
|
/* Macros for signons and file headers */
|
||||||
|
|
||||||
#define ACPI_COMMON_SIGNON(utility_name) \
|
#define ACPI_COMMON_SIGNON(utility_name) \
|
||||||
"\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
|
"\n%s\n%s version %8.8X%s\n%s\n\n", \
|
||||||
ACPICA_NAME, \
|
ACPICA_NAME, \
|
||||||
utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
|
||||||
ACPICA_COPYRIGHT
|
ACPICA_COPYRIGHT
|
||||||
|
|
||||||
#define ACPI_COMMON_HEADER(utility_name, prefix) \
|
#define ACPI_COMMON_HEADER(utility_name, prefix) \
|
||||||
"%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
|
"%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
|
||||||
prefix, ACPICA_NAME, \
|
prefix, ACPICA_NAME, \
|
||||||
prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, __DATE__, \
|
prefix, utility_name, ((u32) ACPI_CA_VERSION), ACPI_WIDTH, \
|
||||||
prefix, ACPICA_COPYRIGHT, \
|
prefix, ACPICA_COPYRIGHT, \
|
||||||
prefix
|
prefix
|
||||||
|
|
||||||
|
|
|
@ -306,6 +306,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_db_output_flags, ACPI_DB_CONSOLE_OUTPUT);
|
||||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_no_resource_disassembly, FALSE);
|
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_ignore_noop_operator, FALSE);
|
||||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
|
ACPI_INIT_GLOBAL(u8, acpi_gbl_cstyle_disassembly, TRUE);
|
||||||
|
ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE);
|
||||||
|
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
|
ACPI_GLOBAL(u8, acpi_gbl_db_opt_disasm);
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
|
ACPI_GLOBAL(u8, acpi_gbl_db_opt_verbose);
|
||||||
|
@ -321,9 +322,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_db_terminate_threads, FALSE);
|
||||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
|
ACPI_INIT_GLOBAL(u8, acpi_gbl_abort_method, FALSE);
|
||||||
ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
|
ACPI_INIT_GLOBAL(u8, acpi_gbl_method_executing, FALSE);
|
||||||
|
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_tables);
|
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_ini_methods);
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_stats);
|
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_ini_methods);
|
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_region_support);
|
ACPI_GLOBAL(u8, acpi_gbl_db_opt_no_region_support);
|
||||||
ACPI_GLOBAL(u8, acpi_gbl_db_output_to_file);
|
ACPI_GLOBAL(u8, acpi_gbl_db_output_to_file);
|
||||||
ACPI_GLOBAL(char *, acpi_gbl_db_buffer);
|
ACPI_GLOBAL(char *, acpi_gbl_db_buffer);
|
||||||
|
|
|
@ -53,7 +53,7 @@ typedef u32 acpi_mutex_handle;
|
||||||
|
|
||||||
/* Total number of aml opcodes defined */
|
/* Total number of aml opcodes defined */
|
||||||
|
|
||||||
#define AML_NUM_OPCODES 0x81
|
#define AML_NUM_OPCODES 0x82
|
||||||
|
|
||||||
/* Forward declarations */
|
/* Forward declarations */
|
||||||
|
|
||||||
|
|
|
@ -63,23 +63,12 @@
|
||||||
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))
|
#define ACPI_SET64(ptr, val) (*ACPI_CAST64 (ptr) = (u64) (val))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* printf() format helpers. These macros are workarounds for the difficulties
|
* printf() format helper. This macros is a workaround for the difficulties
|
||||||
* with emitting 64-bit integers and 64-bit pointers with the same code
|
* with emitting 64-bit integers and 64-bit pointers with the same code
|
||||||
* for both 32-bit and 64-bit hosts.
|
* for both 32-bit and 64-bit hosts.
|
||||||
*/
|
*/
|
||||||
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
|
#define ACPI_FORMAT_UINT64(i) ACPI_HIDWORD(i), ACPI_LODWORD(i)
|
||||||
|
|
||||||
#if ACPI_MACHINE_WIDTH == 64
|
|
||||||
#define ACPI_FORMAT_NATIVE_UINT(i) ACPI_FORMAT_UINT64(i)
|
|
||||||
#define ACPI_FORMAT_TO_UINT(i) ACPI_FORMAT_UINT64(i)
|
|
||||||
#define ACPI_PRINTF_UINT "0x%8.8X%8.8X"
|
|
||||||
|
|
||||||
#else
|
|
||||||
#define ACPI_FORMAT_NATIVE_UINT(i) 0, (u32) (i)
|
|
||||||
#define ACPI_FORMAT_TO_UINT(i) (u32) (i)
|
|
||||||
#define ACPI_PRINTF_UINT "0x%8.8X"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Macros for moving data around to/from buffers that are possibly unaligned.
|
* Macros for moving data around to/from buffers that are possibly unaligned.
|
||||||
* If the hardware supports the transfer of unaligned data, just do the store.
|
* If the hardware supports the transfer of unaligned data, just do the store.
|
||||||
|
|
|
@ -111,6 +111,7 @@
|
||||||
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
|
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
|
||||||
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
|
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
|
||||||
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
|
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
|
||||||
|
#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA)
|
||||||
#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
|
#define ARGP_FATAL_OP ARGP_LIST3 (ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_TERMARG)
|
||||||
#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
|
#define ARGP_FIELD_OP ARGP_LIST4 (ARGP_PKGLENGTH, ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_FIELDLIST)
|
||||||
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
#define ARGP_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
|
||||||
|
@ -243,6 +244,7 @@
|
||||||
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
|
#define ARGI_DWORD_OP ARGI_INVALID_OPCODE
|
||||||
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
|
#define ARGI_ELSE_OP ARGI_INVALID_OPCODE
|
||||||
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
|
#define ARGI_EVENT_OP ARGI_INVALID_OPCODE
|
||||||
|
#define ARGI_EXTERNAL_OP ARGI_LIST3 (ARGI_STRING, ARGI_INTEGER, ARGI_INTEGER)
|
||||||
#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
|
#define ARGI_FATAL_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_INTEGER)
|
||||||
#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
|
#define ARGI_FIELD_OP ARGI_INVALID_OPCODE
|
||||||
#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
#define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF)
|
||||||
|
|
|
@ -299,11 +299,13 @@ acpi_rs_set_resource_length(acpi_rsdesc_size total_length,
|
||||||
union aml_resource *aml);
|
union aml_resource *aml);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rsdump
|
* rsdump - Debugger support
|
||||||
*/
|
*/
|
||||||
|
#ifdef ACPI_DEBUGGER
|
||||||
void acpi_rs_dump_resource_list(struct acpi_resource *resource);
|
void acpi_rs_dump_resource_list(struct acpi_resource *resource);
|
||||||
|
|
||||||
void acpi_rs_dump_irq_list(u8 * route_table);
|
void acpi_rs_dump_irq_list(u8 *route_table);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resource conversion tables
|
* Resource conversion tables
|
||||||
|
|
|
@ -68,11 +68,6 @@
|
||||||
#define ACPI_WALK_METHOD 0x01
|
#define ACPI_WALK_METHOD 0x01
|
||||||
#define ACPI_WALK_METHOD_RESTART 0x02
|
#define ACPI_WALK_METHOD_RESTART 0x02
|
||||||
|
|
||||||
/* Flags for iASL compiler only */
|
|
||||||
|
|
||||||
#define ACPI_WALK_CONST_REQUIRED 0x10
|
|
||||||
#define ACPI_WALK_CONST_OPTIONAL 0x20
|
|
||||||
|
|
||||||
struct acpi_walk_state {
|
struct acpi_walk_state {
|
||||||
struct acpi_walk_state *next; /* Next walk_state in list */
|
struct acpi_walk_state *next; /* Next walk_state in list */
|
||||||
u8 descriptor_type; /* To differentiate various internal objs */
|
u8 descriptor_type; /* To differentiate various internal objs */
|
||||||
|
|
|
@ -58,7 +58,9 @@ u8 *acpi_tb_scan_memory_for_rsdp(u8 *start_address, u32 length);
|
||||||
/*
|
/*
|
||||||
* tbdata - table data structure management
|
* tbdata - table data structure management
|
||||||
*/
|
*/
|
||||||
acpi_status acpi_tb_get_next_root_index(u32 *table_index);
|
acpi_status
|
||||||
|
acpi_tb_get_next_table_descriptor(u32 *table_index,
|
||||||
|
struct acpi_table_desc **table_desc);
|
||||||
|
|
||||||
void
|
void
|
||||||
acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
|
acpi_tb_init_table_descriptor(struct acpi_table_desc *table_desc,
|
||||||
|
@ -119,11 +121,6 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
||||||
u8 flags,
|
u8 flags,
|
||||||
u8 reload, u8 override, u32 *table_index);
|
u8 reload, u8 override, u32 *table_index);
|
||||||
|
|
||||||
acpi_status
|
|
||||||
acpi_tb_store_table(acpi_physical_address address,
|
|
||||||
struct acpi_table_header *table,
|
|
||||||
u32 length, u8 flags, u32 *table_index);
|
|
||||||
|
|
||||||
void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc);
|
void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc);
|
||||||
|
|
||||||
void acpi_tb_terminate(void);
|
void acpi_tb_terminate(void);
|
||||||
|
|
|
@ -502,6 +502,9 @@ const union acpi_predefined_info *acpi_ut_get_next_predefined_method(const union
|
||||||
|
|
||||||
const union acpi_predefined_info *acpi_ut_match_predefined_method(char *name);
|
const union acpi_predefined_info *acpi_ut_match_predefined_method(char *name);
|
||||||
|
|
||||||
|
void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes);
|
||||||
|
|
||||||
|
#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
|
||||||
const union acpi_predefined_info *acpi_ut_match_resource_name(char *name);
|
const union acpi_predefined_info *acpi_ut_match_resource_name(char *name);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -509,9 +512,8 @@ acpi_ut_display_predefined_method(char *buffer,
|
||||||
const union acpi_predefined_info *this_name,
|
const union acpi_predefined_info *this_name,
|
||||||
u8 multi_line);
|
u8 multi_line);
|
||||||
|
|
||||||
void acpi_ut_get_expected_return_types(char *buffer, u32 expected_btypes);
|
|
||||||
|
|
||||||
u32 acpi_ut_get_resource_bit_width(char *buffer, u16 types);
|
u32 acpi_ut_get_resource_bit_width(char *buffer, u16 types);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* utstate - Generic state creation/cache routines
|
* utstate - Generic state creation/cache routines
|
||||||
|
@ -539,14 +541,6 @@ acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
|
||||||
u16 action,
|
u16 action,
|
||||||
union acpi_generic_state **state_list);
|
union acpi_generic_state **state_list);
|
||||||
|
|
||||||
#ifdef ACPI_FUTURE_USAGE
|
|
||||||
acpi_status
|
|
||||||
acpi_ut_create_pkg_state_and_push(void *internal_object,
|
|
||||||
void *external_object,
|
|
||||||
u16 index,
|
|
||||||
union acpi_generic_state **state_list);
|
|
||||||
#endif /* ACPI_FUTURE_USAGE */
|
|
||||||
|
|
||||||
union acpi_generic_state *acpi_ut_create_control_state(void);
|
union acpi_generic_state *acpi_ut_create_control_state(void);
|
||||||
|
|
||||||
void acpi_ut_delete_generic_state(union acpi_generic_state *state);
|
void acpi_ut_delete_generic_state(union acpi_generic_state *state);
|
||||||
|
@ -570,7 +564,9 @@ const struct acpi_exception_info *acpi_ut_validate_exception(acpi_status
|
||||||
|
|
||||||
u8 acpi_ut_is_pci_root_bridge(char *id);
|
u8 acpi_ut_is_pci_root_bridge(char *id);
|
||||||
|
|
||||||
|
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
|
||||||
u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
|
u8 acpi_ut_is_aml_table(struct acpi_table_header *table);
|
||||||
|
#endif
|
||||||
|
|
||||||
acpi_status
|
acpi_status
|
||||||
acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
|
acpi_ut_walk_package_tree(union acpi_operand_object *source_object,
|
||||||
|
@ -629,15 +625,19 @@ acpi_ut_get_resource_end_tag(union acpi_operand_object *obj_desc, u8 **end_tag);
|
||||||
*/
|
*/
|
||||||
void acpi_ut_strupr(char *src_string);
|
void acpi_ut_strupr(char *src_string);
|
||||||
|
|
||||||
|
#ifdef ACPI_ASL_COMPILER
|
||||||
void acpi_ut_strlwr(char *src_string);
|
void acpi_ut_strlwr(char *src_string);
|
||||||
|
|
||||||
int acpi_ut_stricmp(char *string1, char *string2);
|
int acpi_ut_stricmp(char *string1, char *string2);
|
||||||
|
#endif
|
||||||
|
|
||||||
acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);
|
acpi_status acpi_ut_strtoul64(char *string, u32 base, u64 *ret_integer);
|
||||||
|
|
||||||
void acpi_ut_print_string(char *string, u16 max_length);
|
void acpi_ut_print_string(char *string, u16 max_length);
|
||||||
|
|
||||||
|
#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
|
||||||
void ut_convert_backslashes(char *pathname);
|
void ut_convert_backslashes(char *pathname);
|
||||||
|
#endif
|
||||||
|
|
||||||
u8 acpi_ut_valid_acpi_name(char *name);
|
u8 acpi_ut_valid_acpi_name(char *name);
|
||||||
|
|
||||||
|
@ -785,6 +785,8 @@ int acpi_ut_file_printf(ACPI_FILE file, const char *format, ...);
|
||||||
/*
|
/*
|
||||||
* utuuid -- UUID support functions
|
* utuuid -- UUID support functions
|
||||||
*/
|
*/
|
||||||
|
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
|
||||||
void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);
|
void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ACUTILS_H */
|
#endif /* _ACUTILS_H */
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
#define AML_PACKAGE_OP (u16) 0x12
|
#define AML_PACKAGE_OP (u16) 0x12
|
||||||
#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
|
#define AML_VAR_PACKAGE_OP (u16) 0x13 /* ACPI 2.0 */
|
||||||
#define AML_METHOD_OP (u16) 0x14
|
#define AML_METHOD_OP (u16) 0x14
|
||||||
|
#define AML_EXTERNAL_OP (u16) 0x15 /* ACPI 6.0 */
|
||||||
#define AML_DUAL_NAME_PREFIX (u16) 0x2e
|
#define AML_DUAL_NAME_PREFIX (u16) 0x2e
|
||||||
#define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f
|
#define AML_MULTI_NAME_PREFIX_OP (u16) 0x2f
|
||||||
#define AML_NAME_CHAR_SUBSEQ (u16) 0x30
|
#define AML_NAME_CHAR_SUBSEQ (u16) 0x30
|
||||||
|
@ -206,7 +207,6 @@
|
||||||
#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031
|
#define AML_INT_RESERVEDFIELD_OP (u16) 0x0031
|
||||||
#define AML_INT_ACCESSFIELD_OP (u16) 0x0032
|
#define AML_INT_ACCESSFIELD_OP (u16) 0x0032
|
||||||
#define AML_INT_BYTELIST_OP (u16) 0x0033
|
#define AML_INT_BYTELIST_OP (u16) 0x0033
|
||||||
#define AML_INT_STATICSTRING_OP (u16) 0x0034
|
|
||||||
#define AML_INT_METHODCALL_OP (u16) 0x0035
|
#define AML_INT_METHODCALL_OP (u16) 0x0035
|
||||||
#define AML_INT_RETURN_VALUE_OP (u16) 0x0036
|
#define AML_INT_RETURN_VALUE_OP (u16) 0x0036
|
||||||
#define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037
|
#define AML_INT_EVAL_SUBTREE_OP (u16) 0x0037
|
||||||
|
|
|
@ -446,7 +446,7 @@ acpi_ds_eval_region_operands(struct acpi_walk_state *walk_state,
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||||
obj_desc,
|
obj_desc,
|
||||||
ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address),
|
ACPI_FORMAT_UINT64(obj_desc->region.address),
|
||||||
obj_desc->region.length));
|
obj_desc->region.length));
|
||||||
|
|
||||||
/* Now the address and length are valid for this opregion */
|
/* Now the address and length are valid for this opregion */
|
||||||
|
@ -539,13 +539,12 @@ acpi_ds_eval_table_region_operands(struct acpi_walk_state *walk_state,
|
||||||
return_ACPI_STATUS(AE_NOT_EXIST);
|
return_ACPI_STATUS(AE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
obj_desc->region.address =
|
obj_desc->region.address = ACPI_PTR_TO_PHYSADDR(table);
|
||||||
(acpi_physical_address) ACPI_TO_INTEGER(table);
|
|
||||||
obj_desc->region.length = table->length;
|
obj_desc->region.length = table->length;
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||||
obj_desc,
|
obj_desc,
|
||||||
ACPI_FORMAT_NATIVE_UINT(obj_desc->region.address),
|
ACPI_FORMAT_UINT64(obj_desc->region.address),
|
||||||
obj_desc->region.length));
|
obj_desc->region.length));
|
||||||
|
|
||||||
/* Now the address and length are valid for this opregion */
|
/* Now the address and length are valid for this opregion */
|
||||||
|
|
|
@ -564,6 +564,17 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
|
||||||
acpi_operand_object,
|
acpi_operand_object,
|
||||||
acpi_gbl_root_node);
|
acpi_gbl_root_node);
|
||||||
status = AE_OK;
|
status = AE_OK;
|
||||||
|
} else if (parent_op->common.aml_opcode ==
|
||||||
|
AML_EXTERNAL_OP) {
|
||||||
|
|
||||||
|
/* TBD: May only be temporary */
|
||||||
|
|
||||||
|
obj_desc =
|
||||||
|
acpi_ut_create_string_object((acpi_size) name_length);
|
||||||
|
|
||||||
|
ACPI_STRNCPY(obj_desc->string.pointer,
|
||||||
|
name_string, name_length);
|
||||||
|
status = AE_OK;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* We just plain didn't find it -- which is a
|
* We just plain didn't find it -- which is a
|
||||||
|
|
|
@ -92,6 +92,7 @@ acpi_ev_update_gpe_enable_mask(struct acpi_gpe_event_info *gpe_event_info)
|
||||||
ACPI_SET_BIT(gpe_register_info->enable_for_run,
|
ACPI_SET_BIT(gpe_register_info->enable_for_run,
|
||||||
(u8)register_bit);
|
(u8)register_bit);
|
||||||
}
|
}
|
||||||
|
gpe_register_info->enable_mask = gpe_register_info->enable_for_run;
|
||||||
|
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
|
@ -123,7 +124,7 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
|
||||||
|
|
||||||
/* Enable the requested GPE */
|
/* Enable the requested GPE */
|
||||||
|
|
||||||
status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE_SAVE);
|
status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,7 +203,7 @@ acpi_ev_remove_gpe_reference(struct acpi_gpe_event_info *gpe_event_info)
|
||||||
if (ACPI_SUCCESS(status)) {
|
if (ACPI_SUCCESS(status)) {
|
||||||
status =
|
status =
|
||||||
acpi_hw_low_set_gpe(gpe_event_info,
|
acpi_hw_low_set_gpe(gpe_event_info,
|
||||||
ACPI_GPE_DISABLE_SAVE);
|
ACPI_GPE_DISABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
|
|
|
@ -272,7 +272,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
|
ACPI_DEBUG_PRINT((ACPI_DB_OPREGION,
|
||||||
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
||||||
®ion_obj->region.handler->address_space, handler,
|
®ion_obj->region.handler->address_space, handler,
|
||||||
ACPI_FORMAT_NATIVE_UINT(address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
acpi_ut_get_region_name(region_obj->region.
|
acpi_ut_get_region_name(region_obj->region.
|
||||||
space_id)));
|
space_id)));
|
||||||
|
|
||||||
|
|
|
@ -356,7 +356,8 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_byte) {
|
if (in_byte) {
|
||||||
local_event_status |= ACPI_EVENT_FLAG_ENABLED;
|
local_event_status |=
|
||||||
|
(ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fixed event currently active? */
|
/* Fixed event currently active? */
|
||||||
|
@ -369,7 +370,7 @@ acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_byte) {
|
if (in_byte) {
|
||||||
local_event_status |= ACPI_EVENT_FLAG_SET;
|
local_event_status |= ACPI_EVENT_FLAG_STATUS_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
(*event_status) = local_event_status;
|
(*event_status) = local_event_status;
|
||||||
|
|
|
@ -767,8 +767,8 @@ void acpi_ex_dump_operand(union acpi_operand_object *obj_desc, u32 depth)
|
||||||
acpi_os_printf("\n");
|
acpi_os_printf("\n");
|
||||||
} else {
|
} else {
|
||||||
acpi_os_printf(" base %8.8X%8.8X Length %X\n",
|
acpi_os_printf(" base %8.8X%8.8X Length %X\n",
|
||||||
ACPI_FORMAT_NATIVE_UINT(obj_desc->region.
|
ACPI_FORMAT_UINT64(obj_desc->region.
|
||||||
address),
|
address),
|
||||||
obj_desc->region.length);
|
obj_desc->region.length);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -263,17 +263,15 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD,
|
ACPI_DEBUG_PRINT_RAW((ACPI_DB_BFIELD,
|
||||||
" Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
|
" Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
|
||||||
acpi_ut_get_region_name(rgn_desc->region.
|
acpi_ut_get_region_name(rgn_desc->region.
|
||||||
space_id),
|
space_id),
|
||||||
rgn_desc->region.space_id,
|
rgn_desc->region.space_id,
|
||||||
obj_desc->common_field.access_byte_width,
|
obj_desc->common_field.access_byte_width,
|
||||||
obj_desc->common_field.base_byte_offset,
|
obj_desc->common_field.base_byte_offset,
|
||||||
field_datum_byte_offset, ACPI_CAST_PTR(void,
|
field_datum_byte_offset,
|
||||||
(rgn_desc->
|
ACPI_FORMAT_UINT64(rgn_desc->region.address +
|
||||||
region.
|
region_offset)));
|
||||||
address +
|
|
||||||
region_offset))));
|
|
||||||
|
|
||||||
/* Invoke the appropriate address_space/op_region handler */
|
/* Invoke the appropriate address_space/op_region handler */
|
||||||
|
|
||||||
|
|
|
@ -114,7 +114,18 @@ acpi_status acpi_ex_opcode_3A_0T_0R(struct acpi_walk_state *walk_state)
|
||||||
/* Might return while OS is shutting down, just continue */
|
/* Might return while OS is shutting down, just continue */
|
||||||
|
|
||||||
ACPI_FREE(fatal);
|
ACPI_FREE(fatal);
|
||||||
break;
|
goto cleanup;
|
||||||
|
|
||||||
|
case AML_EXTERNAL_OP:
|
||||||
|
/*
|
||||||
|
* If the interpreter sees this opcode, just ignore it. The External
|
||||||
|
* op is intended for use by disassemblers in order to properly
|
||||||
|
* disassemble control method invocations. The opcode or group of
|
||||||
|
* opcodes should be surrounded by an "if (0)" clause to ensure that
|
||||||
|
* AML interpreters never see the opcode.
|
||||||
|
*/
|
||||||
|
status = AE_OK;
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
|
|
|
@ -165,8 +165,8 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
* one page, which is similar to the original code that used a 4k
|
* one page, which is similar to the original code that used a 4k
|
||||||
* maximum window.
|
* maximum window.
|
||||||
*/
|
*/
|
||||||
page_boundary_map_length =
|
page_boundary_map_length = (acpi_size)
|
||||||
ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address;
|
(ACPI_ROUND_UP(address, ACPI_DEFAULT_PAGE_SIZE) - address);
|
||||||
if (page_boundary_map_length == 0) {
|
if (page_boundary_map_length == 0) {
|
||||||
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
|
page_boundary_map_length = ACPI_DEFAULT_PAGE_SIZE;
|
||||||
}
|
}
|
||||||
|
@ -177,12 +177,13 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
|
|
||||||
/* Create a new mapping starting at the address given */
|
/* Create a new mapping starting at the address given */
|
||||||
|
|
||||||
mem_info->mapped_logical_address = acpi_os_map_memory((acpi_physical_address) address, map_length);
|
mem_info->mapped_logical_address =
|
||||||
|
acpi_os_map_memory(address, map_length);
|
||||||
if (!mem_info->mapped_logical_address) {
|
if (!mem_info->mapped_logical_address) {
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_ERROR((AE_INFO,
|
||||||
"Could not map memory at 0x%8.8X%8.8X, size %u",
|
"Could not map memory at 0x%8.8X%8.8X, size %u",
|
||||||
ACPI_FORMAT_NATIVE_UINT(address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
(u32) map_length));
|
(u32)map_length));
|
||||||
mem_info->mapped_length = 0;
|
mem_info->mapped_length = 0;
|
||||||
return_ACPI_STATUS(AE_NO_MEMORY);
|
return_ACPI_STATUS(AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
@ -202,8 +203,7 @@ acpi_ex_system_memory_space_handler(u32 function,
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
|
"System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
|
||||||
bit_width, function,
|
bit_width, function, ACPI_FORMAT_UINT64(address)));
|
||||||
ACPI_FORMAT_NATIVE_UINT(address)));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform the memory read or write
|
* Perform the memory read or write
|
||||||
|
@ -318,8 +318,7 @@ acpi_ex_system_io_space_handler(u32 function,
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
ACPI_DEBUG_PRINT((ACPI_DB_INFO,
|
||||||
"System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
|
"System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
|
||||||
bit_width, function,
|
bit_width, function, ACPI_FORMAT_UINT64(address)));
|
||||||
ACPI_FORMAT_NATIVE_UINT(address)));
|
|
||||||
|
|
||||||
/* Decode the function parameter */
|
/* Decode the function parameter */
|
||||||
|
|
||||||
|
|
|
@ -89,6 +89,8 @@ u32 acpi_hw_get_gpe_register_bit(struct acpi_gpe_event_info *gpe_event_info)
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Enable or disable a single GPE in the parent enable register.
|
* DESCRIPTION: Enable or disable a single GPE in the parent enable register.
|
||||||
|
* The enable_mask field of the involved GPE register must be
|
||||||
|
* updated by the caller if necessary.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
@ -119,7 +121,7 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
|
||||||
/* Set or clear just the bit that corresponds to this GPE */
|
/* Set or clear just the bit that corresponds to this GPE */
|
||||||
|
|
||||||
register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info);
|
register_bit = acpi_hw_get_gpe_register_bit(gpe_event_info);
|
||||||
switch (action & ~ACPI_GPE_SAVE_MASK) {
|
switch (action) {
|
||||||
case ACPI_GPE_CONDITIONAL_ENABLE:
|
case ACPI_GPE_CONDITIONAL_ENABLE:
|
||||||
|
|
||||||
/* Only enable if the corresponding enable_mask bit is set */
|
/* Only enable if the corresponding enable_mask bit is set */
|
||||||
|
@ -149,9 +151,6 @@ acpi_hw_low_set_gpe(struct acpi_gpe_event_info *gpe_event_info, u32 action)
|
||||||
/* Write the updated enable mask */
|
/* Write the updated enable mask */
|
||||||
|
|
||||||
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
|
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
|
||||||
if (ACPI_SUCCESS(status) && (action & ACPI_GPE_SAVE_MASK)) {
|
|
||||||
gpe_register_info->enable_mask = (u8)enable_mask;
|
|
||||||
}
|
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -250,6 +249,17 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
|
||||||
local_event_status |= ACPI_EVENT_FLAG_WAKE_ENABLED;
|
local_event_status |= ACPI_EVENT_FLAG_WAKE_ENABLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* GPE currently enabled (enable bit == 1)? */
|
||||||
|
|
||||||
|
status = acpi_hw_read(&in_byte, &gpe_register_info->enable_address);
|
||||||
|
if (ACPI_FAILURE(status)) {
|
||||||
|
return (status);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (register_bit & in_byte) {
|
||||||
|
local_event_status |= ACPI_EVENT_FLAG_ENABLE_SET;
|
||||||
|
}
|
||||||
|
|
||||||
/* GPE currently active (status bit == 1)? */
|
/* GPE currently active (status bit == 1)? */
|
||||||
|
|
||||||
status = acpi_hw_read(&in_byte, &gpe_register_info->status_address);
|
status = acpi_hw_read(&in_byte, &gpe_register_info->status_address);
|
||||||
|
@ -258,7 +268,7 @@ acpi_hw_get_gpe_status(struct acpi_gpe_event_info * gpe_event_info,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (register_bit & in_byte) {
|
if (register_bit & in_byte) {
|
||||||
local_event_status |= ACPI_EVENT_FLAG_SET;
|
local_event_status |= ACPI_EVENT_FLAG_STATUS_SET;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set return value */
|
/* Set return value */
|
||||||
|
@ -286,10 +296,8 @@ acpi_hw_gpe_enable_write(u8 enable_mask,
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
|
||||||
|
gpe_register_info->enable_mask = enable_mask;
|
||||||
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
|
status = acpi_hw_write(enable_mask, &gpe_register_info->enable_address);
|
||||||
if (ACPI_SUCCESS(status)) {
|
|
||||||
gpe_register_info->enable_mask = enable_mask;
|
|
||||||
}
|
|
||||||
return (status);
|
return (status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -142,17 +142,17 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
|
||||||
byte_width = ACPI_DIV_8(bit_width);
|
byte_width = ACPI_DIV_8(bit_width);
|
||||||
last_address = address + byte_width - 1;
|
last_address = address + byte_width - 1;
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_IO, "Address %p LastAddress %p Length %X",
|
ACPI_DEBUG_PRINT((ACPI_DB_IO,
|
||||||
ACPI_CAST_PTR(void, address), ACPI_CAST_PTR(void,
|
"Address %8.8X%8.8X LastAddress %8.8X%8.8X Length %X",
|
||||||
last_address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
byte_width));
|
ACPI_FORMAT_UINT64(last_address), byte_width));
|
||||||
|
|
||||||
/* Maximum 16-bit address in I/O space */
|
/* Maximum 16-bit address in I/O space */
|
||||||
|
|
||||||
if (last_address > ACPI_UINT16_MAX) {
|
if (last_address > ACPI_UINT16_MAX) {
|
||||||
ACPI_ERROR((AE_INFO,
|
ACPI_ERROR((AE_INFO,
|
||||||
"Illegal I/O port address/length above 64K: %p/0x%X",
|
"Illegal I/O port address/length above 64K: %8.8X%8.8X/0x%X",
|
||||||
ACPI_CAST_PTR(void, address), byte_width));
|
ACPI_FORMAT_UINT64(address), byte_width));
|
||||||
return_ACPI_STATUS(AE_LIMIT);
|
return_ACPI_STATUS(AE_LIMIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,8 +181,8 @@ acpi_hw_validate_io_request(acpi_io_address address, u32 bit_width)
|
||||||
|
|
||||||
if (acpi_gbl_osi_data >= port_info->osi_dependency) {
|
if (acpi_gbl_osi_data >= port_info->osi_dependency) {
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_IO,
|
ACPI_DEBUG_PRINT((ACPI_DB_IO,
|
||||||
"Denied AML access to port 0x%p/%X (%s 0x%.4X-0x%.4X)",
|
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)",
|
||||||
ACPI_CAST_PTR(void, address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
byte_width, port_info->name,
|
byte_width, port_info->name,
|
||||||
port_info->start,
|
port_info->start,
|
||||||
port_info->end));
|
port_info->end));
|
||||||
|
|
|
@ -271,12 +271,11 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case ACPI_TYPE_PROCESSOR:
|
case ACPI_TYPE_PROCESSOR:
|
||||||
|
|
||||||
acpi_os_printf("ID %02X Len %02X Addr %p\n",
|
acpi_os_printf("ID %02X Len %02X Addr %8.8X%8.8X\n",
|
||||||
obj_desc->processor.proc_id,
|
obj_desc->processor.proc_id,
|
||||||
obj_desc->processor.length,
|
obj_desc->processor.length,
|
||||||
ACPI_CAST_PTR(void,
|
ACPI_FORMAT_UINT64(obj_desc->processor.
|
||||||
obj_desc->processor.
|
address));
|
||||||
address));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_TYPE_DEVICE:
|
case ACPI_TYPE_DEVICE:
|
||||||
|
@ -347,8 +346,9 @@ acpi_ns_dump_one_object(acpi_handle obj_handle,
|
||||||
space_id));
|
space_id));
|
||||||
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
|
if (obj_desc->region.flags & AOPOBJ_DATA_VALID) {
|
||||||
acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
|
acpi_os_printf(" Addr %8.8X%8.8X Len %.4X\n",
|
||||||
ACPI_FORMAT_NATIVE_UINT
|
ACPI_FORMAT_UINT64(obj_desc->
|
||||||
(obj_desc->region.address),
|
region.
|
||||||
|
address),
|
||||||
obj_desc->region.length);
|
obj_desc->region.length);
|
||||||
} else {
|
} else {
|
||||||
acpi_os_printf
|
acpi_os_printf
|
||||||
|
|
|
@ -646,7 +646,13 @@ const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES] = {
|
||||||
AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS),
|
AML_CLASS_INTERNAL, AML_TYPE_BOGUS, AML_HAS_ARGS),
|
||||||
/* 80 */ ACPI_OP("-ExtAccessField-", ARGP_CONNECTFIELD_OP,
|
/* 80 */ ACPI_OP("-ExtAccessField-", ARGP_CONNECTFIELD_OP,
|
||||||
ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY,
|
ARGI_CONNECTFIELD_OP, ACPI_TYPE_ANY,
|
||||||
AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0)
|
AML_CLASS_INTERNAL, AML_TYPE_BOGUS, 0),
|
||||||
|
|
||||||
|
/* ACPI 6.0 opcodes */
|
||||||
|
|
||||||
|
/* 81 */ ACPI_OP("External", ARGP_EXTERNAL_OP, ARGI_EXTERNAL_OP,
|
||||||
|
ACPI_TYPE_ANY, AML_CLASS_EXECUTE, /* ? */
|
||||||
|
AML_TYPE_EXEC_3A_0T_0R, AML_FLAGS_EXEC_3A_0T_0R)
|
||||||
|
|
||||||
/*! [End] no source code translation !*/
|
/*! [End] no source code translation !*/
|
||||||
};
|
};
|
||||||
|
|
|
@ -210,7 +210,7 @@ const u8 acpi_gbl_short_op_index[256] = {
|
||||||
/* 8 9 A B C D E F */
|
/* 8 9 A B C D E F */
|
||||||
/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
|
/* 0x00 */ 0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
|
||||||
/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
|
/* 0x08 */ 0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
|
||||||
/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
|
/* 0x10 */ 0x08, 0x09, 0x0a, 0x6F, 0x0b, 0x81, _UNK, _UNK,
|
||||||
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
/* 0x18 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
||||||
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
/* 0x20 */ _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
|
||||||
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
|
/* 0x28 */ _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* Module Name: rsdump - Functions to display the resource structures.
|
* Module Name: rsdump - AML debugger support for resource structures.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
@ -48,7 +48,10 @@
|
||||||
#define _COMPONENT ACPI_RESOURCES
|
#define _COMPONENT ACPI_RESOURCES
|
||||||
ACPI_MODULE_NAME("rsdump")
|
ACPI_MODULE_NAME("rsdump")
|
||||||
|
|
||||||
#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
|
/*
|
||||||
|
* All functions in this module are used by the AML Debugger only
|
||||||
|
*/
|
||||||
|
#if defined(ACPI_DEBUGGER)
|
||||||
/* Local prototypes */
|
/* Local prototypes */
|
||||||
static void acpi_rs_out_string(char *title, char *value);
|
static void acpi_rs_out_string(char *title, char *value);
|
||||||
|
|
||||||
|
@ -78,6 +81,116 @@ static void acpi_rs_dump_address_common(union acpi_resource_data *resource);
|
||||||
static void
|
static void
|
||||||
acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table);
|
acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table);
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: acpi_rs_dump_resource_list
|
||||||
|
*
|
||||||
|
* PARAMETERS: resource_list - Pointer to a resource descriptor list
|
||||||
|
*
|
||||||
|
* RETURN: None
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Dispatches the structure to the correct dump routine.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
|
||||||
|
{
|
||||||
|
u32 count = 0;
|
||||||
|
u32 type;
|
||||||
|
|
||||||
|
ACPI_FUNCTION_ENTRY();
|
||||||
|
|
||||||
|
/* Check if debug output enabled */
|
||||||
|
|
||||||
|
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Walk list and dump all resource descriptors (END_TAG terminates) */
|
||||||
|
|
||||||
|
do {
|
||||||
|
acpi_os_printf("\n[%02X] ", count);
|
||||||
|
count++;
|
||||||
|
|
||||||
|
/* Validate Type before dispatch */
|
||||||
|
|
||||||
|
type = resource_list->type;
|
||||||
|
if (type > ACPI_RESOURCE_TYPE_MAX) {
|
||||||
|
acpi_os_printf
|
||||||
|
("Invalid descriptor type (%X) in resource list\n",
|
||||||
|
resource_list->type);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sanity check the length. It must not be zero, or we loop forever */
|
||||||
|
|
||||||
|
if (!resource_list->length) {
|
||||||
|
acpi_os_printf
|
||||||
|
("Invalid zero length descriptor in resource list\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Dump the resource descriptor */
|
||||||
|
|
||||||
|
if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
|
||||||
|
acpi_rs_dump_descriptor(&resource_list->data,
|
||||||
|
acpi_gbl_dump_serial_bus_dispatch
|
||||||
|
[resource_list->data.
|
||||||
|
common_serial_bus.type]);
|
||||||
|
} else {
|
||||||
|
acpi_rs_dump_descriptor(&resource_list->data,
|
||||||
|
acpi_gbl_dump_resource_dispatch
|
||||||
|
[type]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Point to the next resource structure */
|
||||||
|
|
||||||
|
resource_list = ACPI_NEXT_RESOURCE(resource_list);
|
||||||
|
|
||||||
|
/* Exit when END_TAG descriptor is reached */
|
||||||
|
|
||||||
|
} while (type != ACPI_RESOURCE_TYPE_END_TAG);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: acpi_rs_dump_irq_list
|
||||||
|
*
|
||||||
|
* PARAMETERS: route_table - Pointer to the routing table to dump.
|
||||||
|
*
|
||||||
|
* RETURN: None
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Print IRQ routing table
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
void acpi_rs_dump_irq_list(u8 *route_table)
|
||||||
|
{
|
||||||
|
struct acpi_pci_routing_table *prt_element;
|
||||||
|
u8 count;
|
||||||
|
|
||||||
|
ACPI_FUNCTION_ENTRY();
|
||||||
|
|
||||||
|
/* Check if debug output enabled */
|
||||||
|
|
||||||
|
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
|
||||||
|
|
||||||
|
/* Dump all table elements, Exit on zero length element */
|
||||||
|
|
||||||
|
for (count = 0; prt_element->length; count++) {
|
||||||
|
acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
|
||||||
|
count);
|
||||||
|
acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
|
||||||
|
|
||||||
|
prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
|
||||||
|
prt_element, prt_element->length);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_rs_dump_descriptor
|
* FUNCTION: acpi_rs_dump_descriptor
|
||||||
|
@ -355,116 +468,6 @@ static void acpi_rs_dump_address_common(union acpi_resource_data *resource)
|
||||||
acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
|
acpi_rs_dump_descriptor(resource, acpi_rs_dump_general_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_rs_dump_resource_list
|
|
||||||
*
|
|
||||||
* PARAMETERS: resource_list - Pointer to a resource descriptor list
|
|
||||||
*
|
|
||||||
* RETURN: None
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Dispatches the structure to the correct dump routine.
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
|
|
||||||
{
|
|
||||||
u32 count = 0;
|
|
||||||
u32 type;
|
|
||||||
|
|
||||||
ACPI_FUNCTION_ENTRY();
|
|
||||||
|
|
||||||
/* Check if debug output enabled */
|
|
||||||
|
|
||||||
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Walk list and dump all resource descriptors (END_TAG terminates) */
|
|
||||||
|
|
||||||
do {
|
|
||||||
acpi_os_printf("\n[%02X] ", count);
|
|
||||||
count++;
|
|
||||||
|
|
||||||
/* Validate Type before dispatch */
|
|
||||||
|
|
||||||
type = resource_list->type;
|
|
||||||
if (type > ACPI_RESOURCE_TYPE_MAX) {
|
|
||||||
acpi_os_printf
|
|
||||||
("Invalid descriptor type (%X) in resource list\n",
|
|
||||||
resource_list->type);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sanity check the length. It must not be zero, or we loop forever */
|
|
||||||
|
|
||||||
if (!resource_list->length) {
|
|
||||||
acpi_os_printf
|
|
||||||
("Invalid zero length descriptor in resource list\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Dump the resource descriptor */
|
|
||||||
|
|
||||||
if (type == ACPI_RESOURCE_TYPE_SERIAL_BUS) {
|
|
||||||
acpi_rs_dump_descriptor(&resource_list->data,
|
|
||||||
acpi_gbl_dump_serial_bus_dispatch
|
|
||||||
[resource_list->data.
|
|
||||||
common_serial_bus.type]);
|
|
||||||
} else {
|
|
||||||
acpi_rs_dump_descriptor(&resource_list->data,
|
|
||||||
acpi_gbl_dump_resource_dispatch
|
|
||||||
[type]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Point to the next resource structure */
|
|
||||||
|
|
||||||
resource_list = ACPI_NEXT_RESOURCE(resource_list);
|
|
||||||
|
|
||||||
/* Exit when END_TAG descriptor is reached */
|
|
||||||
|
|
||||||
} while (type != ACPI_RESOURCE_TYPE_END_TAG);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_rs_dump_irq_list
|
|
||||||
*
|
|
||||||
* PARAMETERS: route_table - Pointer to the routing table to dump.
|
|
||||||
*
|
|
||||||
* RETURN: None
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Print IRQ routing table
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
void acpi_rs_dump_irq_list(u8 * route_table)
|
|
||||||
{
|
|
||||||
struct acpi_pci_routing_table *prt_element;
|
|
||||||
u8 count;
|
|
||||||
|
|
||||||
ACPI_FUNCTION_ENTRY();
|
|
||||||
|
|
||||||
/* Check if debug output enabled */
|
|
||||||
|
|
||||||
if (!ACPI_IS_DEBUG_ENABLED(ACPI_LV_RESOURCES, _COMPONENT)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, route_table);
|
|
||||||
|
|
||||||
/* Dump all table elements, Exit on zero length element */
|
|
||||||
|
|
||||||
for (count = 0; prt_element->length; count++) {
|
|
||||||
acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
|
|
||||||
count);
|
|
||||||
acpi_rs_dump_descriptor(prt_element, acpi_rs_dump_prt);
|
|
||||||
|
|
||||||
prt_element = ACPI_ADD_PTR(struct acpi_pci_routing_table,
|
|
||||||
prt_element, prt_element->length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_rs_out*
|
* FUNCTION: acpi_rs_out*
|
||||||
|
|
|
@ -113,9 +113,9 @@ acpi_tb_acquire_table(struct acpi_table_desc *table_desc,
|
||||||
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
|
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
|
||||||
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
|
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
|
||||||
|
|
||||||
table =
|
table = ACPI_CAST_PTR(struct acpi_table_header,
|
||||||
ACPI_CAST_PTR(struct acpi_table_header,
|
ACPI_PHYSADDR_TO_PTR(table_desc->
|
||||||
table_desc->address);
|
address));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -214,7 +214,8 @@ acpi_tb_acquire_temp_table(struct acpi_table_desc *table_desc,
|
||||||
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
|
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
|
||||||
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
|
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
|
||||||
|
|
||||||
table_header = ACPI_CAST_PTR(struct acpi_table_header, address);
|
table_header = ACPI_CAST_PTR(struct acpi_table_header,
|
||||||
|
ACPI_PHYSADDR_TO_PTR(address));
|
||||||
if (!table_header) {
|
if (!table_header) {
|
||||||
return (AE_NO_MEMORY);
|
return (AE_NO_MEMORY);
|
||||||
}
|
}
|
||||||
|
@ -398,14 +399,14 @@ acpi_tb_verify_temp_table(struct acpi_table_desc * table_desc, char *signature)
|
||||||
table_desc->length);
|
table_desc->length);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
|
ACPI_EXCEPTION((AE_INFO, AE_NO_MEMORY,
|
||||||
"%4.4s " ACPI_PRINTF_UINT
|
"%4.4s 0x%8.8X%8.8X"
|
||||||
" Attempted table install failed",
|
" Attempted table install failed",
|
||||||
acpi_ut_valid_acpi_name(table_desc->
|
acpi_ut_valid_acpi_name(table_desc->
|
||||||
signature.
|
signature.
|
||||||
ascii) ?
|
ascii) ?
|
||||||
table_desc->signature.ascii : "????",
|
table_desc->signature.ascii : "????",
|
||||||
ACPI_FORMAT_TO_UINT(table_desc->
|
ACPI_FORMAT_UINT64(table_desc->
|
||||||
address)));
|
address)));
|
||||||
goto invalidate_and_exit;
|
goto invalidate_and_exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -483,19 +484,23 @@ acpi_status acpi_tb_resize_root_table_list(void)
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_tb_get_next_root_index
|
* FUNCTION: acpi_tb_get_next_table_descriptor
|
||||||
*
|
*
|
||||||
* PARAMETERS: table_index - Where table index is returned
|
* PARAMETERS: table_index - Where table index is returned
|
||||||
|
* table_desc - Where table descriptor is returned
|
||||||
*
|
*
|
||||||
* RETURN: Status and table index.
|
* RETURN: Status and table index/descriptor.
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Allocate a new ACPI table entry to the global table list
|
* DESCRIPTION: Allocate a new ACPI table entry to the global table list
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
acpi_status acpi_tb_get_next_root_index(u32 *table_index)
|
acpi_status
|
||||||
|
acpi_tb_get_next_table_descriptor(u32 *table_index,
|
||||||
|
struct acpi_table_desc **table_desc)
|
||||||
{
|
{
|
||||||
acpi_status status;
|
acpi_status status;
|
||||||
|
u32 i;
|
||||||
|
|
||||||
/* Ensure that there is room for the table in the Root Table List */
|
/* Ensure that there is room for the table in the Root Table List */
|
||||||
|
|
||||||
|
@ -507,8 +512,16 @@ acpi_status acpi_tb_get_next_root_index(u32 *table_index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*table_index = acpi_gbl_root_table_list.current_table_count;
|
i = acpi_gbl_root_table_list.current_table_count;
|
||||||
acpi_gbl_root_table_list.current_table_count++;
|
acpi_gbl_root_table_list.current_table_count++;
|
||||||
|
|
||||||
|
if (table_index) {
|
||||||
|
*table_index = i;
|
||||||
|
}
|
||||||
|
if (table_desc) {
|
||||||
|
*table_desc = &acpi_gbl_root_table_list.tables[i];
|
||||||
|
}
|
||||||
|
|
||||||
return (AE_OK);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -187,8 +187,9 @@ acpi_tb_install_fixed_table(acpi_physical_address address,
|
||||||
status = acpi_tb_acquire_temp_table(&new_table_desc, address,
|
status = acpi_tb_acquire_temp_table(&new_table_desc, address,
|
||||||
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
|
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
|
ACPI_ERROR((AE_INFO,
|
||||||
ACPI_CAST_PTR(void, address)));
|
"Could not acquire table length at %8.8X%8.8X",
|
||||||
|
ACPI_FORMAT_UINT64(address)));
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,8 +247,9 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
||||||
|
|
||||||
status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags);
|
status = acpi_tb_acquire_temp_table(&new_table_desc, address, flags);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
ACPI_ERROR((AE_INFO, "Could not acquire table length at %p",
|
ACPI_ERROR((AE_INFO,
|
||||||
ACPI_CAST_PTR(void, address)));
|
"Could not acquire table length at %8.8X%8.8X",
|
||||||
|
ACPI_FORMAT_UINT64(address)));
|
||||||
return_ACPI_STATUS(status);
|
return_ACPI_STATUS(status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -258,9 +260,10 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
||||||
if (!reload &&
|
if (!reload &&
|
||||||
acpi_gbl_disable_ssdt_table_install &&
|
acpi_gbl_disable_ssdt_table_install &&
|
||||||
ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
|
ACPI_COMPARE_NAME(&new_table_desc.signature, ACPI_SIG_SSDT)) {
|
||||||
ACPI_INFO((AE_INFO, "Ignoring installation of %4.4s at %p",
|
ACPI_INFO((AE_INFO,
|
||||||
new_table_desc.signature.ascii, ACPI_CAST_PTR(void,
|
"Ignoring installation of %4.4s at %8.8X%8.8X",
|
||||||
address)));
|
new_table_desc.signature.ascii,
|
||||||
|
ACPI_FORMAT_UINT64(address)));
|
||||||
goto release_and_exit;
|
goto release_and_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -346,7 +349,6 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
||||||
*/
|
*/
|
||||||
acpi_tb_uninstall_table(&new_table_desc);
|
acpi_tb_uninstall_table(&new_table_desc);
|
||||||
*table_index = i;
|
*table_index = i;
|
||||||
(void)acpi_ut_release_mutex(ACPI_MTX_TABLES);
|
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -354,7 +356,7 @@ acpi_tb_install_standard_table(acpi_physical_address address,
|
||||||
|
|
||||||
/* Add the table to the global root table list */
|
/* Add the table to the global root table list */
|
||||||
|
|
||||||
status = acpi_tb_get_next_root_index(&i);
|
status = acpi_tb_get_next_table_descriptor(&i, NULL);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
goto release_and_exit;
|
goto release_and_exit;
|
||||||
}
|
}
|
||||||
|
@ -429,11 +431,11 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_INFO((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
|
ACPI_INFO((AE_INFO, "%4.4s 0x%8.8X%8.8X"
|
||||||
" %s table override, new table: " ACPI_PRINTF_UINT,
|
" %s table override, new table: 0x%8.8X%8.8X",
|
||||||
old_table_desc->signature.ascii,
|
old_table_desc->signature.ascii,
|
||||||
ACPI_FORMAT_TO_UINT(old_table_desc->address),
|
ACPI_FORMAT_UINT64(old_table_desc->address),
|
||||||
override_type, ACPI_FORMAT_TO_UINT(new_table_desc.address)));
|
override_type, ACPI_FORMAT_UINT64(new_table_desc.address)));
|
||||||
|
|
||||||
/* We can now uninstall the original table */
|
/* We can now uninstall the original table */
|
||||||
|
|
||||||
|
@ -453,43 +455,6 @@ void acpi_tb_override_table(struct acpi_table_desc *old_table_desc)
|
||||||
acpi_tb_release_temp_table(&new_table_desc);
|
acpi_tb_release_temp_table(&new_table_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_tb_store_table
|
|
||||||
*
|
|
||||||
* PARAMETERS: address - Table address
|
|
||||||
* table - Table header
|
|
||||||
* length - Table length
|
|
||||||
* flags - Install flags
|
|
||||||
* table_index - Where the table index is returned
|
|
||||||
*
|
|
||||||
* RETURN: Status and table index.
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Add an ACPI table to the global table list
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
|
|
||||||
acpi_status
|
|
||||||
acpi_tb_store_table(acpi_physical_address address,
|
|
||||||
struct acpi_table_header * table,
|
|
||||||
u32 length, u8 flags, u32 *table_index)
|
|
||||||
{
|
|
||||||
acpi_status status;
|
|
||||||
struct acpi_table_desc *table_desc;
|
|
||||||
|
|
||||||
status = acpi_tb_get_next_root_index(table_index);
|
|
||||||
if (ACPI_FAILURE(status)) {
|
|
||||||
return (status);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Initialize added table */
|
|
||||||
|
|
||||||
table_desc = &acpi_gbl_root_table_list.tables[*table_index];
|
|
||||||
acpi_tb_init_table_descriptor(table_desc, address, flags, table);
|
|
||||||
table_desc->pointer = table;
|
|
||||||
return (AE_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_tb_uninstall_table
|
* FUNCTION: acpi_tb_uninstall_table
|
||||||
|
@ -517,7 +482,7 @@ void acpi_tb_uninstall_table(struct acpi_table_desc *table_desc)
|
||||||
|
|
||||||
if ((table_desc->flags & ACPI_TABLE_ORIGIN_MASK) ==
|
if ((table_desc->flags & ACPI_TABLE_ORIGIN_MASK) ==
|
||||||
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) {
|
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL) {
|
||||||
ACPI_FREE(ACPI_CAST_PTR(void, table_desc->address));
|
ACPI_FREE(ACPI_PHYSADDR_TO_PTR(table_desc->address));
|
||||||
}
|
}
|
||||||
|
|
||||||
table_desc->address = ACPI_PTR_TO_PHYSADDR(NULL);
|
table_desc->address = ACPI_PTR_TO_PHYSADDR(NULL);
|
||||||
|
|
|
@ -127,18 +127,12 @@ acpi_tb_print_table_header(acpi_physical_address address,
|
||||||
{
|
{
|
||||||
struct acpi_table_header local_header;
|
struct acpi_table_header local_header;
|
||||||
|
|
||||||
/*
|
|
||||||
* The reason that we use ACPI_PRINTF_UINT and ACPI_FORMAT_TO_UINT is to
|
|
||||||
* support both 32-bit and 64-bit hosts/addresses in a consistent manner.
|
|
||||||
* The %p specifier does not emit uniform output on all hosts. On some,
|
|
||||||
* leading zeros are not supported.
|
|
||||||
*/
|
|
||||||
if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
|
if (ACPI_COMPARE_NAME(header->signature, ACPI_SIG_FACS)) {
|
||||||
|
|
||||||
/* FACS only has signature and length fields */
|
/* FACS only has signature and length fields */
|
||||||
|
|
||||||
ACPI_INFO((AE_INFO, "%-4.4s " ACPI_PRINTF_UINT " %06X",
|
ACPI_INFO((AE_INFO, "%-4.4s 0x%8.8X%8.8X %06X",
|
||||||
header->signature, ACPI_FORMAT_TO_UINT(address),
|
header->signature, ACPI_FORMAT_UINT64(address),
|
||||||
header->length));
|
header->length));
|
||||||
} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
|
} else if (ACPI_VALIDATE_RSDP_SIG(header->signature)) {
|
||||||
|
|
||||||
|
@ -149,9 +143,8 @@ acpi_tb_print_table_header(acpi_physical_address address,
|
||||||
header)->oem_id, ACPI_OEM_ID_SIZE);
|
header)->oem_id, ACPI_OEM_ID_SIZE);
|
||||||
acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
|
acpi_tb_fix_string(local_header.oem_id, ACPI_OEM_ID_SIZE);
|
||||||
|
|
||||||
ACPI_INFO((AE_INFO,
|
ACPI_INFO((AE_INFO, "RSDP 0x%8.8X%8.8X %06X (v%.2d %-6.6s)",
|
||||||
"RSDP " ACPI_PRINTF_UINT " %06X (v%.2d %-6.6s)",
|
ACPI_FORMAT_UINT64(address),
|
||||||
ACPI_FORMAT_TO_UINT(address),
|
|
||||||
(ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
|
(ACPI_CAST_PTR(struct acpi_table_rsdp, header)->
|
||||||
revision >
|
revision >
|
||||||
0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
|
0) ? ACPI_CAST_PTR(struct acpi_table_rsdp,
|
||||||
|
@ -165,9 +158,9 @@ acpi_tb_print_table_header(acpi_physical_address address,
|
||||||
acpi_tb_cleanup_table_header(&local_header, header);
|
acpi_tb_cleanup_table_header(&local_header, header);
|
||||||
|
|
||||||
ACPI_INFO((AE_INFO,
|
ACPI_INFO((AE_INFO,
|
||||||
"%-4.4s " ACPI_PRINTF_UINT
|
"%-4.4s 0x%8.8X%8.8X"
|
||||||
" %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
|
" %06X (v%.2d %-6.6s %-8.8s %08X %-4.4s %08X)",
|
||||||
local_header.signature, ACPI_FORMAT_TO_UINT(address),
|
local_header.signature, ACPI_FORMAT_UINT64(address),
|
||||||
local_header.length, local_header.revision,
|
local_header.length, local_header.revision,
|
||||||
local_header.oem_id, local_header.oem_table_id,
|
local_header.oem_id, local_header.oem_table_id,
|
||||||
local_header.oem_revision,
|
local_header.oem_revision,
|
||||||
|
|
|
@ -142,7 +142,7 @@ acpi_status acpi_tb_validate_rsdp(struct acpi_table_rsdp * rsdp)
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
|
acpi_status __init acpi_find_root_pointer(acpi_physical_address * table_address)
|
||||||
{
|
{
|
||||||
u8 *table_ptr;
|
u8 *table_ptr;
|
||||||
u8 *mem_rover;
|
u8 *mem_rover;
|
||||||
|
@ -200,7 +200,8 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
|
||||||
physical_address +=
|
physical_address +=
|
||||||
(u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
|
(u32) ACPI_PTR_DIFF(mem_rover, table_ptr);
|
||||||
|
|
||||||
*table_address = physical_address;
|
*table_address =
|
||||||
|
(acpi_physical_address) physical_address;
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -233,7 +234,7 @@ acpi_status __init acpi_find_root_pointer(acpi_size *table_address)
|
||||||
(ACPI_HI_RSDP_WINDOW_BASE +
|
(ACPI_HI_RSDP_WINDOW_BASE +
|
||||||
ACPI_PTR_DIFF(mem_rover, table_ptr));
|
ACPI_PTR_DIFF(mem_rover, table_ptr));
|
||||||
|
|
||||||
*table_address = physical_address;
|
*table_address = (acpi_physical_address) physical_address;
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -107,10 +107,10 @@ acpi_ut_add_address_range(acpi_adr_space_type space_id,
|
||||||
acpi_gbl_address_range_list[space_id] = range_info;
|
acpi_gbl_address_range_list[space_id] = range_info;
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
||||||
"\nAdded [%4.4s] address range: 0x%p-0x%p\n",
|
"\nAdded [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
|
||||||
acpi_ut_get_node_name(range_info->region_node),
|
acpi_ut_get_node_name(range_info->region_node),
|
||||||
ACPI_CAST_PTR(void, address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
ACPI_CAST_PTR(void, range_info->end_address)));
|
ACPI_FORMAT_UINT64(range_info->end_address)));
|
||||||
|
|
||||||
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
(void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE);
|
||||||
return_ACPI_STATUS(AE_OK);
|
return_ACPI_STATUS(AE_OK);
|
||||||
|
@ -160,15 +160,13 @@ acpi_ut_remove_address_range(acpi_adr_space_type space_id,
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
ACPI_DEBUG_PRINT((ACPI_DB_NAMES,
|
||||||
"\nRemoved [%4.4s] address range: 0x%p-0x%p\n",
|
"\nRemoved [%4.4s] address range: 0x%8.8X%8.8X-0x%8.8X%8.8X\n",
|
||||||
acpi_ut_get_node_name(range_info->
|
acpi_ut_get_node_name(range_info->
|
||||||
region_node),
|
region_node),
|
||||||
ACPI_CAST_PTR(void,
|
ACPI_FORMAT_UINT64(range_info->
|
||||||
range_info->
|
start_address),
|
||||||
start_address),
|
ACPI_FORMAT_UINT64(range_info->
|
||||||
ACPI_CAST_PTR(void,
|
end_address)));
|
||||||
range_info->
|
|
||||||
end_address)));
|
|
||||||
|
|
||||||
ACPI_FREE(range_info);
|
ACPI_FREE(range_info);
|
||||||
return_VOID;
|
return_VOID;
|
||||||
|
@ -245,16 +243,14 @@ acpi_ut_check_address_range(acpi_adr_space_type space_id,
|
||||||
region_node);
|
region_node);
|
||||||
|
|
||||||
ACPI_WARNING((AE_INFO,
|
ACPI_WARNING((AE_INFO,
|
||||||
"%s range 0x%p-0x%p conflicts with OpRegion 0x%p-0x%p (%s)",
|
"%s range 0x%8.8X%8.8X-0x%8.8X%8.8X conflicts with OpRegion 0x%8.8X%8.8X-0x%8.8X%8.8X (%s)",
|
||||||
acpi_ut_get_region_name(space_id),
|
acpi_ut_get_region_name(space_id),
|
||||||
ACPI_CAST_PTR(void, address),
|
ACPI_FORMAT_UINT64(address),
|
||||||
ACPI_CAST_PTR(void, end_address),
|
ACPI_FORMAT_UINT64(end_address),
|
||||||
ACPI_CAST_PTR(void,
|
ACPI_FORMAT_UINT64(range_info->
|
||||||
range_info->
|
start_address),
|
||||||
start_address),
|
ACPI_FORMAT_UINT64(range_info->
|
||||||
ACPI_CAST_PTR(void,
|
end_address),
|
||||||
range_info->
|
|
||||||
end_address),
|
|
||||||
pathname));
|
pathname));
|
||||||
ACPI_FREE(pathname);
|
ACPI_FREE(pathname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,14 @@ void acpi_ut_dump_buffer(u8 *buffer, u32 count, u32 display, u32 base_offset)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add comment characters so rest of line is ignored when
|
||||||
|
* compiled
|
||||||
|
*/
|
||||||
|
if (j == 0) {
|
||||||
|
acpi_os_printf("// ");
|
||||||
|
}
|
||||||
|
|
||||||
buf_char = buffer[(acpi_size) i + j];
|
buf_char = buffer[(acpi_size) i + j];
|
||||||
if (ACPI_IS_PRINT(buf_char)) {
|
if (ACPI_IS_PRINT(buf_char)) {
|
||||||
acpi_os_printf("%c", buf_char);
|
acpi_os_printf("%c", buf_char);
|
||||||
|
|
|
@ -102,12 +102,19 @@ const struct acpi_predefined_names acpi_gbl_pre_defined_names[] = {
|
||||||
{"_SB_", ACPI_TYPE_DEVICE, NULL},
|
{"_SB_", ACPI_TYPE_DEVICE, NULL},
|
||||||
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
{"_SI_", ACPI_TYPE_LOCAL_SCOPE, NULL},
|
||||||
{"_TZ_", ACPI_TYPE_DEVICE, NULL},
|
{"_TZ_", ACPI_TYPE_DEVICE, NULL},
|
||||||
{"_REV", ACPI_TYPE_INTEGER, (char *)ACPI_CA_SUPPORT_LEVEL},
|
/*
|
||||||
|
* March, 2015:
|
||||||
|
* The _REV object is in the process of being deprecated, because
|
||||||
|
* other ACPI implementations permanently return 2. Thus, it
|
||||||
|
* has little or no value. Return 2 for compatibility with
|
||||||
|
* other ACPI implementations.
|
||||||
|
*/
|
||||||
|
{"_REV", ACPI_TYPE_INTEGER, ACPI_CAST_PTR(char, 2)},
|
||||||
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
{"_OS_", ACPI_TYPE_STRING, ACPI_OS_NAME},
|
||||||
{"_GL_", ACPI_TYPE_MUTEX, (char *)1},
|
{"_GL_", ACPI_TYPE_MUTEX, ACPI_CAST_PTR(char, 1)},
|
||||||
|
|
||||||
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
||||||
{"_OSI", ACPI_TYPE_METHOD, (char *)1},
|
{"_OSI", ACPI_TYPE_METHOD, ACPI_CAST_PTR(char, 1)},
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Table terminator */
|
/* Table terminator */
|
||||||
|
|
|
@ -75,6 +75,7 @@ u8 acpi_ut_is_pci_root_bridge(char *id)
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ut_is_aml_table
|
* FUNCTION: acpi_ut_is_aml_table
|
||||||
|
@ -102,6 +103,7 @@ u8 acpi_ut_is_aml_table(struct acpi_table_header *table)
|
||||||
|
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
|
|
|
@ -100,6 +100,7 @@ static struct acpi_interface_info acpi_default_supported_interfaces[] = {
|
||||||
{"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
|
{"Windows 2009", NULL, 0, ACPI_OSI_WIN_7}, /* Windows 7 and Server 2008 R2 - Added 09/2009 */
|
||||||
{"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
|
{"Windows 2012", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8 and Server 2012 - Added 08/2012 */
|
||||||
{"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
|
{"Windows 2013", NULL, 0, ACPI_OSI_WIN_8}, /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
|
||||||
|
{"Windows 2015", NULL, 0, ACPI_OSI_WIN_10}, /* Windows 10 - Added 03/2015 */
|
||||||
|
|
||||||
/* Feature Group Strings */
|
/* Feature Group Strings */
|
||||||
|
|
||||||
|
|
|
@ -357,11 +357,11 @@ int
|
||||||
acpi_ut_vsnprintf(char *string,
|
acpi_ut_vsnprintf(char *string,
|
||||||
acpi_size size, const char *format, va_list args)
|
acpi_size size, const char *format, va_list args)
|
||||||
{
|
{
|
||||||
u8 base = 10;
|
u8 base;
|
||||||
u8 type = 0;
|
u8 type;
|
||||||
s32 width = -1;
|
s32 width;
|
||||||
s32 precision = -1;
|
s32 precision;
|
||||||
char qualifier = 0;
|
char qualifier;
|
||||||
u64 number;
|
u64 number;
|
||||||
char *pos;
|
char *pos;
|
||||||
char *end;
|
char *end;
|
||||||
|
@ -380,6 +380,9 @@ acpi_ut_vsnprintf(char *string,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type = 0;
|
||||||
|
base = 10;
|
||||||
|
|
||||||
/* Process sign */
|
/* Process sign */
|
||||||
|
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -47,39 +47,6 @@
|
||||||
#define _COMPONENT ACPI_UTILITIES
|
#define _COMPONENT ACPI_UTILITIES
|
||||||
ACPI_MODULE_NAME("utstate")
|
ACPI_MODULE_NAME("utstate")
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
*
|
|
||||||
* FUNCTION: acpi_ut_create_pkg_state_and_push
|
|
||||||
*
|
|
||||||
* PARAMETERS: object - Object to be added to the new state
|
|
||||||
* action - Increment/Decrement
|
|
||||||
* state_list - List the state will be added to
|
|
||||||
*
|
|
||||||
* RETURN: Status
|
|
||||||
*
|
|
||||||
* DESCRIPTION: Create a new state and push it
|
|
||||||
*
|
|
||||||
******************************************************************************/
|
|
||||||
acpi_status
|
|
||||||
acpi_ut_create_pkg_state_and_push(void *internal_object,
|
|
||||||
void *external_object,
|
|
||||||
u16 index,
|
|
||||||
union acpi_generic_state **state_list)
|
|
||||||
{
|
|
||||||
union acpi_generic_state *state;
|
|
||||||
|
|
||||||
ACPI_FUNCTION_ENTRY();
|
|
||||||
|
|
||||||
state =
|
|
||||||
acpi_ut_create_pkg_state(internal_object, external_object, index);
|
|
||||||
if (!state) {
|
|
||||||
return (AE_NO_MEMORY);
|
|
||||||
}
|
|
||||||
|
|
||||||
acpi_ut_push_generic_state(state_list, state);
|
|
||||||
return (AE_OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: acpi_ut_push_generic_state
|
* FUNCTION: acpi_ut_push_generic_state
|
||||||
|
@ -92,7 +59,6 @@ acpi_ut_create_pkg_state_and_push(void *internal_object,
|
||||||
* DESCRIPTION: Push a state object onto a state stack
|
* DESCRIPTION: Push a state object onto a state stack
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
void
|
void
|
||||||
acpi_ut_push_generic_state(union acpi_generic_state **list_head,
|
acpi_ut_push_generic_state(union acpi_generic_state **list_head,
|
||||||
union acpi_generic_state *state)
|
union acpi_generic_state *state)
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#define _COMPONENT ACPI_COMPILER
|
#define _COMPONENT ACPI_COMPILER
|
||||||
ACPI_MODULE_NAME("utuuid")
|
ACPI_MODULE_NAME("utuuid")
|
||||||
|
|
||||||
|
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
|
||||||
/*
|
/*
|
||||||
* UUID support functions.
|
* UUID support functions.
|
||||||
*
|
*
|
||||||
|
@ -94,3 +95,4 @@ void acpi_ut_convert_string_to_uuid(char *in_string, u8 *uuid_buffer)
|
||||||
1]);
|
1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||||
|
|
||||||
#define ACPI_CA_VERSION 0x20150204
|
#define ACPI_CA_VERSION 0x20150410
|
||||||
|
|
||||||
#include <acpi/acconfig.h>
|
#include <acpi/acconfig.h>
|
||||||
#include <acpi/actypes.h>
|
#include <acpi/actypes.h>
|
||||||
|
@ -431,13 +431,13 @@ ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_load_tables(void))
|
||||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
|
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init acpi_reallocate_root_table(void))
|
||||||
|
|
||||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
ACPI_EXTERNAL_RETURN_STATUS(acpi_status __init
|
||||||
acpi_find_root_pointer(acpi_size * rsdp_address))
|
acpi_find_root_pointer(acpi_physical_address *
|
||||||
|
rsdp_address))
|
||||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||||
acpi_get_table_header(acpi_string signature,
|
acpi_get_table_header(acpi_string signature,
|
||||||
u32 instance,
|
u32 instance,
|
||||||
struct acpi_table_header
|
struct acpi_table_header
|
||||||
*out_table_header))
|
*out_table_header))
|
||||||
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
ACPI_EXTERNAL_RETURN_STATUS(acpi_status
|
||||||
acpi_get_table(acpi_string signature, u32 instance,
|
acpi_get_table(acpi_string signature, u32 instance,
|
||||||
struct acpi_table_header
|
struct acpi_table_header
|
||||||
|
|
|
@ -73,6 +73,7 @@
|
||||||
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
|
#define ACPI_SIG_LPIT "LPIT" /* Low Power Idle Table */
|
||||||
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
#define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */
|
||||||
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
|
||||||
|
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
|
||||||
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
|
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
|
||||||
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
|
||||||
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
|
||||||
|
@ -845,7 +846,8 @@ struct acpi_lpit_header {
|
||||||
|
|
||||||
enum acpi_lpit_type {
|
enum acpi_lpit_type {
|
||||||
ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
|
ACPI_LPIT_TYPE_NATIVE_CSTATE = 0x00,
|
||||||
ACPI_LPIT_TYPE_SIMPLE_IO = 0x01
|
ACPI_LPIT_TYPE_SIMPLE_IO = 0x01,
|
||||||
|
ACPI_LPIT_TYPE_RESERVED = 0x02 /* 2 and above are reserved */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Masks for Flags field above */
|
/* Masks for Flags field above */
|
||||||
|
@ -933,6 +935,21 @@ struct acpi_table_mchi {
|
||||||
u8 pci_function;
|
u8 pci_function;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* MSDM - Microsoft Data Management table
|
||||||
|
*
|
||||||
|
* Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
|
||||||
|
* November 29, 2011. Copyright 2011 Microsoft
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
/* Basic MSDM table is only the common ACPI header */
|
||||||
|
|
||||||
|
struct acpi_table_msdm {
|
||||||
|
struct acpi_table_header header; /* Common ACPI table header */
|
||||||
|
};
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* MTMR - MID Timer Table
|
* MTMR - MID Timer Table
|
||||||
|
@ -959,10 +976,9 @@ struct acpi_mtmr_entry {
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* SLIC - Software Licensing Description Table
|
* SLIC - Software Licensing Description Table
|
||||||
* Version 1
|
|
||||||
*
|
*
|
||||||
* Conforms to "OEM Activation 2.0 for Windows Vista Operating Systems",
|
* Conforms to "Microsoft Software Licensing Tables (SLIC and MSDM)",
|
||||||
* Copyright 2006
|
* November 29, 2011. Copyright 2011 Microsoft
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
@ -972,52 +988,6 @@ struct acpi_table_slic {
|
||||||
struct acpi_table_header header; /* Common ACPI table header */
|
struct acpi_table_header header; /* Common ACPI table header */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Common SLIC subtable header */
|
|
||||||
|
|
||||||
struct acpi_slic_header {
|
|
||||||
u32 type;
|
|
||||||
u32 length;
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Values for Type field above */
|
|
||||||
|
|
||||||
enum acpi_slic_type {
|
|
||||||
ACPI_SLIC_TYPE_PUBLIC_KEY = 0,
|
|
||||||
ACPI_SLIC_TYPE_WINDOWS_MARKER = 1,
|
|
||||||
ACPI_SLIC_TYPE_RESERVED = 2 /* 2 and greater are reserved */
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* SLIC Subtables, correspond to Type in struct acpi_slic_header
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* 0: Public Key Structure */
|
|
||||||
|
|
||||||
struct acpi_slic_key {
|
|
||||||
struct acpi_slic_header header;
|
|
||||||
u8 key_type;
|
|
||||||
u8 version;
|
|
||||||
u16 reserved;
|
|
||||||
u32 algorithm;
|
|
||||||
char magic[4];
|
|
||||||
u32 bit_length;
|
|
||||||
u32 exponent;
|
|
||||||
u8 modulus[128];
|
|
||||||
};
|
|
||||||
|
|
||||||
/* 1: Windows Marker Structure */
|
|
||||||
|
|
||||||
struct acpi_slic_marker {
|
|
||||||
struct acpi_slic_header header;
|
|
||||||
u32 version;
|
|
||||||
char oem_id[ACPI_OEM_ID_SIZE]; /* ASCII OEM identification */
|
|
||||||
char oem_table_id[ACPI_OEM_TABLE_ID_SIZE]; /* ASCII OEM table identification */
|
|
||||||
char windows_flag[8];
|
|
||||||
u32 slic_version;
|
|
||||||
u8 reserved[16];
|
|
||||||
u8 signature[128];
|
|
||||||
};
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* SPCR - Serial Port Console Redirection table
|
* SPCR - Serial Port Console Redirection table
|
||||||
|
|
|
@ -199,9 +199,29 @@ typedef int s32;
|
||||||
typedef s32 acpi_native_int;
|
typedef s32 acpi_native_int;
|
||||||
|
|
||||||
typedef u32 acpi_size;
|
typedef u32 acpi_size;
|
||||||
|
|
||||||
|
#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
|
||||||
|
|
||||||
|
/*
|
||||||
|
* OSPMs can define this to shrink the size of the structures for 32-bit
|
||||||
|
* none PAE environment. ASL compiler may always define this to generate
|
||||||
|
* 32-bit OSPM compliant tables.
|
||||||
|
*/
|
||||||
typedef u32 acpi_io_address;
|
typedef u32 acpi_io_address;
|
||||||
typedef u32 acpi_physical_address;
|
typedef u32 acpi_physical_address;
|
||||||
|
|
||||||
|
#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||||
|
|
||||||
|
/*
|
||||||
|
* It is reported that, after some calculations, the physical addresses can
|
||||||
|
* wrap over the 32-bit boundary on 32-bit PAE environment.
|
||||||
|
* https://bugzilla.kernel.org/show_bug.cgi?id=87971
|
||||||
|
*/
|
||||||
|
typedef u64 acpi_io_address;
|
||||||
|
typedef u64 acpi_physical_address;
|
||||||
|
|
||||||
|
#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
|
||||||
|
|
||||||
#define ACPI_MAX_PTR ACPI_UINT32_MAX
|
#define ACPI_MAX_PTR ACPI_UINT32_MAX
|
||||||
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
|
#define ACPI_SIZE_MAX ACPI_UINT32_MAX
|
||||||
|
|
||||||
|
@ -713,33 +733,32 @@ typedef u32 acpi_event_type;
|
||||||
* The encoding of acpi_event_status is illustrated below.
|
* The encoding of acpi_event_status is illustrated below.
|
||||||
* Note that a set bit (1) indicates the property is TRUE
|
* Note that a set bit (1) indicates the property is TRUE
|
||||||
* (e.g. if bit 0 is set then the event is enabled).
|
* (e.g. if bit 0 is set then the event is enabled).
|
||||||
* +-------------+-+-+-+-+
|
* +-------------+-+-+-+-+-+
|
||||||
* | Bits 31:4 |3|2|1|0|
|
* | Bits 31:5 |4|3|2|1|0|
|
||||||
* +-------------+-+-+-+-+
|
* +-------------+-+-+-+-+-+
|
||||||
* | | | | |
|
* | | | | | |
|
||||||
* | | | | +- Enabled?
|
* | | | | | +- Enabled?
|
||||||
* | | | +--- Enabled for wake?
|
* | | | | +--- Enabled for wake?
|
||||||
* | | +----- Set?
|
* | | | +----- Status bit set?
|
||||||
* | +------- Has a handler?
|
* | | +------- Enable bit set?
|
||||||
* +------------- <Reserved>
|
* | +--------- Has a handler?
|
||||||
|
* +--------------- <Reserved>
|
||||||
*/
|
*/
|
||||||
typedef u32 acpi_event_status;
|
typedef u32 acpi_event_status;
|
||||||
|
|
||||||
#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00
|
#define ACPI_EVENT_FLAG_DISABLED (acpi_event_status) 0x00
|
||||||
#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
|
#define ACPI_EVENT_FLAG_ENABLED (acpi_event_status) 0x01
|
||||||
#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
|
#define ACPI_EVENT_FLAG_WAKE_ENABLED (acpi_event_status) 0x02
|
||||||
#define ACPI_EVENT_FLAG_SET (acpi_event_status) 0x04
|
#define ACPI_EVENT_FLAG_STATUS_SET (acpi_event_status) 0x04
|
||||||
#define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x08
|
#define ACPI_EVENT_FLAG_ENABLE_SET (acpi_event_status) 0x08
|
||||||
|
#define ACPI_EVENT_FLAG_HAS_HANDLER (acpi_event_status) 0x10
|
||||||
|
#define ACPI_EVENT_FLAG_SET ACPI_EVENT_FLAG_STATUS_SET
|
||||||
|
|
||||||
/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */
|
/* Actions for acpi_set_gpe, acpi_gpe_wakeup, acpi_hw_low_set_gpe */
|
||||||
|
|
||||||
#define ACPI_GPE_ENABLE 0
|
#define ACPI_GPE_ENABLE 0
|
||||||
#define ACPI_GPE_DISABLE 1
|
#define ACPI_GPE_DISABLE 1
|
||||||
#define ACPI_GPE_CONDITIONAL_ENABLE 2
|
#define ACPI_GPE_CONDITIONAL_ENABLE 2
|
||||||
#define ACPI_GPE_SAVE_MASK 4
|
|
||||||
|
|
||||||
#define ACPI_GPE_ENABLE_SAVE (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK)
|
|
||||||
#define ACPI_GPE_DISABLE_SAVE (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK)
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* GPE info flags - Per GPE
|
* GPE info flags - Per GPE
|
||||||
|
@ -1251,6 +1270,7 @@ struct acpi_memory_list {
|
||||||
#define ACPI_OSI_WIN_VISTA_SP2 0x0A
|
#define ACPI_OSI_WIN_VISTA_SP2 0x0A
|
||||||
#define ACPI_OSI_WIN_7 0x0B
|
#define ACPI_OSI_WIN_7 0x0B
|
||||||
#define ACPI_OSI_WIN_8 0x0C
|
#define ACPI_OSI_WIN_8 0x0C
|
||||||
|
#define ACPI_OSI_WIN_10 0x0D
|
||||||
|
|
||||||
/* Definitions of file IO */
|
/* Definitions of file IO */
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@
|
||||||
#define ACPI_LARGE_NAMESPACE_NODE
|
#define ACPI_LARGE_NAMESPACE_NODE
|
||||||
#define ACPI_DATA_TABLE_DISASSEMBLY
|
#define ACPI_DATA_TABLE_DISASSEMBLY
|
||||||
#define ACPI_SINGLE_THREADED
|
#define ACPI_SINGLE_THREADED
|
||||||
|
#define ACPI_32BIT_PHYSICAL_ADDRESS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* acpi_exec configuration. Multithreaded with full AML debugger */
|
/* acpi_exec configuration. Multithreaded with full AML debugger */
|
||||||
|
|
|
@ -1156,7 +1156,7 @@ osl_table_name_from_file(char *filename, char *signature, u32 *instance)
|
||||||
/* Extract instance number */
|
/* Extract instance number */
|
||||||
|
|
||||||
if (isdigit((int)filename[ACPI_NAME_SIZE])) {
|
if (isdigit((int)filename[ACPI_NAME_SIZE])) {
|
||||||
sscanf(&filename[ACPI_NAME_SIZE], "%d", instance);
|
sscanf(&filename[ACPI_NAME_SIZE], "%u", instance);
|
||||||
} else if (strlen(filename) != ACPI_NAME_SIZE) {
|
} else if (strlen(filename) != ACPI_NAME_SIZE) {
|
||||||
return (AE_BAD_SIGNATURE);
|
return (AE_BAD_SIGNATURE);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -146,6 +146,6 @@ void acpi_os_unmap_memory(void *where, acpi_size length)
|
||||||
acpi_size page_size;
|
acpi_size page_size;
|
||||||
|
|
||||||
page_size = acpi_os_get_page_size();
|
page_size = acpi_os_get_page_size();
|
||||||
offset = (acpi_physical_address) where % page_size;
|
offset = ACPI_TO_INTEGER(where) % page_size;
|
||||||
munmap((u8 *)where - offset, (length + offset));
|
munmap((u8 *)where - offset, (length + offset));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue