Commit eceeae41 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'acpi-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI updates from Rafael Wysocki:
 "These mostly update the ACPICA code in the kernel to upstream revision
  20170531 which covers all of the new material from ACPI 6.2, including
  new tables (WSMT, HMAT, PPTT), new subtables and definition changes
  for some existing tables (BGRT, HEST, SRAT, TPM2, PCCT), new resource
  descriptor macros for pin control, support for new predefined methods
  (_LSI, _LSR, _LSW, _HMA), fixes and cleanups.

  On top of that, an additional ACPICA change from Kees (which also is
  upstream already) switches all of the definitions of function pointer
  structures in ACPICA to use designated initializers so as to make the
  structure layout randomization GCC plugin work with it.

  The rest is a few fixes and cleanups in the EC driver, an xpower PMIC
  driver update, a new backlight blacklist entry, and update of the
  tables configfs interface and a messages formatting cleanup.

  Specifics:

   - Update the ACPICA code in the kernel to upstream revision revision
     20170531 (which covers all of the new material from ACPI 6.2)
     including:
      * Support for the PinFunction(), PinConfig(), PinGroup(),
        PinGroupFunction(), and PinGroupConfig() resource descriptors
        (Mika Westerberg).
      * Support for new subtables in HEST and SRAT, new notify value for
        HEST, header support for TPM2 table changes, and BGRT Status
        field update (Bob Moore).
      * Support for new PCCT subtables (David Box).
      * Support for _LSI, _LSR, _LSW, and _HMA as predefined methods
        (Erik Schmauss).
      * Support for the new WSMT, HMAT, and PPTT tables (Lv Zheng).
      * New UUID values for Processor Properties (Bob Moore).
      * New notify values for memory attributes and graceful shutdown
        (Bob Moore).
      * Fix related to the PCAT_COMPAT MADT flag (Janosch Hildebrand).
      * Resource to AML conversion fix for resources containing GPIOs
        (Mika Westerberg).
      * Disassembler-related updates (Bob Moore, David Box, Erik
        Schmauss).
      * Assorted fixes and cleanups (Bob Moore, Erik Schmauss, Lv Zheng,
        Cao Jin).

   - Modify ACPICA to always use designated initializers for function
     pointer structures to make the structure layout randomization GCC
     plugin work with it (Kees Cook).

   - Update the tables configfs interface to unload SSDTs on configfs
     entry removal (Jan Kiszka).

   - Add support for the GPI1 regulator to the xpower PMIC Operation
     Region handler (Hans de Goede).

   - Fix ACPI EC issues related to conflicting EC definitions in the
     ECDT and in the ACPI namespace (Lv Zheng, Carlo Caione, Chris
     Chiu).

   - Fix an interrupt storm issue in the EC driver and make its debug
     output work with dynamic debug as expected (Lv Zheng).

   - Add ACPI backlight quirk for Dell Precision 7510 (Shih-Yuan Lee).

   - Fix whitespace in pr_fmt() to align log entries properly in some
     places in the ACPI subsystem (Vincent Legoll)"

* tag 'acpi-4.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (63 commits)
  ACPI / EC: Add quirk for GL720VMK
  ACPI / EC: Fix media keys not working problem on some Asus laptops
  ACPI / EC: Add support to skip boot stage DSDT probe
  ACPI / EC: Enhance boot EC sanity check
  ACPI / video: Add quirks for the Dell Precision 7510
  ACPI: EC: Fix EC command visibility for dynamic debug
  ACPI: EC: Fix an EC event IRQ storming issue
  ACPICA: Use designated initializers
  ACPICA: Update version to 20170531
  ACPICA: Update a couple of debug output messages
  ACPICA: acpiexec: enhance local signal handler
  ACPICA: Simplify output for the ACPI Debug Object
  ACPICA: Unix application OSL: Correctly handle control-c (EINTR)
  ACPICA: Improvements for debug output only
  ACPICA: Disassembler: allow conflicting external declarations to be emitted.
  ACPICA: Disassembler: add external op to namespace on first pass
  ACPICA: Disassembler: prevent external op's from opening a new scope
  ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag
  ACPICA: Changing External to a named object
  ACPICA: Update two error messages to emit control method name
  ...
parents 408c9861 03471c06
......@@ -15,11 +15,15 @@
#include <linux/configfs.h>
#include <linux/acpi.h>
#include "acpica/accommon.h"
#include "acpica/actables.h"
static struct config_group *acpi_table_group;
struct acpi_table {
struct config_item cfg;
struct acpi_table_header *header;
u32 index;
};
static ssize_t acpi_table_aml_write(struct config_item *cfg,
......@@ -52,7 +56,11 @@ static ssize_t acpi_table_aml_write(struct config_item *cfg,
if (!table->header)
return -ENOMEM;
ret = acpi_load_table(table->header);
ACPI_INFO(("Host-directed Dynamic ACPI Table Load:"));
ret = acpi_tb_install_and_load_table(
ACPI_PTR_TO_PHYSADDR(table->header),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE,
&table->index);
if (ret) {
kfree(table->header);
table->header = NULL;
......@@ -215,8 +223,18 @@ static struct config_item *acpi_table_make_item(struct config_group *group,
return &table->cfg;
}
static void acpi_table_drop_item(struct config_group *group,
struct config_item *cfg)
{
struct acpi_table *table = container_of(cfg, struct acpi_table, cfg);
ACPI_INFO(("Host-directed Dynamic ACPI Table Unload"));
acpi_tb_unload_table(table->index);
}
struct configfs_group_operations acpi_table_group_ops = {
.make_item = acpi_table_make_item,
.drop_item = acpi_table_drop_item,
};
static struct config_item_type acpi_tables_type = {
......
......@@ -10,7 +10,7 @@
*/
/* #define DEBUG */
#define pr_fmt(fmt) "ACPI : AML: " fmt
#define pr_fmt(fmt) "ACPI: AML: " fmt
#include <linux/kernel.h>
#include <linux/module.h>
......
......@@ -172,6 +172,7 @@ acpi-y += \
utosi.o \
utownerid.o \
utpredef.o \
utresdecode.o \
utresrc.o \
utstate.o \
utstring.o \
......
......@@ -158,8 +158,8 @@ acpi_dm_finish_namespace_load(union acpi_parse_object *parse_tree_root,
acpi_owner_id owner_id);
void
acpi_dm_convert_resource_indexes(union acpi_parse_object *parse_tree_root,
struct acpi_namespace_node *namespace_root);
acpi_dm_convert_parse_objects(union acpi_parse_object *parse_tree_root,
struct acpi_namespace_node *namespace_root);
/*
* adfile
......
......@@ -315,6 +315,7 @@ ACPI_INIT_GLOBAL(u8, acpi_gbl_force_aml_disassembly, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_opt_verbose, TRUE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_dm_emit_external_opcodes, FALSE);
ACPI_INIT_GLOBAL(u8, acpi_gbl_do_disassembler_optimizations, TRUE);
ACPI_INIT_GLOBAL(ACPI_PARSE_OBJECT_LIST, *acpi_gbl_temp_list_head, NULL);
ACPI_GLOBAL(u8, acpi_gbl_dm_opt_disasm);
ACPI_GLOBAL(u8, acpi_gbl_dm_opt_listing);
......@@ -368,6 +369,8 @@ ACPI_GLOBAL(const char, *acpi_gbl_pld_vertical_position_list[]);
ACPI_GLOBAL(const char, *acpi_gbl_pld_horizontal_position_list[]);
ACPI_GLOBAL(const char, *acpi_gbl_pld_shape_list[]);
ACPI_INIT_GLOBAL(u8, acpi_gbl_disasm_flag, FALSE);
#endif
/*
......
......@@ -859,7 +859,7 @@ ACPI_PARSE_COMMON};
* and bytelists.
*/
struct acpi_parse_obj_named {
ACPI_PARSE_COMMON u8 *path;
ACPI_PARSE_COMMON char *path;
u8 *data; /* AML body or bytelist data */
u32 length; /* AML length */
u32 name; /* 4-byte name or zero if no name */
......@@ -1142,8 +1142,13 @@ struct acpi_port_info {
#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A
#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B
#define ACPI_RESOURCE_NAME_GPIO 0x8C
#define ACPI_RESOURCE_NAME_PIN_FUNCTION 0x8D
#define ACPI_RESOURCE_NAME_SERIAL_BUS 0x8E
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8E
#define ACPI_RESOURCE_NAME_PIN_CONFIG 0x8F
#define ACPI_RESOURCE_NAME_PIN_GROUP 0x90
#define ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION 0x91
#define ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG 0x92
#define ACPI_RESOURCE_NAME_LARGE_MAX 0x92
/*****************************************************************************
*
......@@ -1176,12 +1181,18 @@ struct acpi_external_list {
#define ACPI_EXT_INTERNAL_PATH_ALLOCATED 0x04 /* Deallocate internal path on completion */
#define ACPI_EXT_EXTERNAL_EMITTED 0x08 /* External() statement has been emitted */
#define ACPI_EXT_ORIGIN_FROM_OPCODE 0x10 /* External came from a External() opcode */
#define ACPI_EXT_CONFLICTING_DECLARATION 0x20 /* External has a conflicting declaration within AML */
struct acpi_external_file {
char *path;
struct acpi_external_file *next;
};
struct acpi_parse_object_list {
union acpi_parse_object *op;
struct acpi_parse_object_list *next;
};
/*****************************************************************************
*
* Debugger
......
......@@ -112,7 +112,7 @@
#define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA)
#define ARGP_ELSE_OP ARGP_LIST2 (ARGP_PKGLENGTH, ARGP_TERMLIST)
#define ARGP_EVENT_OP ARGP_LIST1 (ARGP_NAME)
#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAMESTRING, ARGP_BYTEDATA, ARGP_BYTEDATA)
#define ARGP_EXTERNAL_OP ARGP_LIST3 (ARGP_NAME, ARGP_BYTEDATA, ARGP_BYTEDATA)
#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_FIND_SET_LEFT_BIT_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_TARGET)
......
......@@ -581,6 +581,9 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
{{"_HID", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING)}},
{{"_HMA", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
{{"_HOT", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
......@@ -626,6 +629,19 @@ const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER | ACPI_RTYPE_STRING,
10, 0),
{{"_LSI", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},
PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0),
{{"_LSR", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},
PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1,
ACPI_RTYPE_BUFFER, 1, 0),
{{"_LSW",
METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_BUFFER),
METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
{{"_MAT", METHOD_0ARGS,
METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
......
......@@ -148,7 +148,10 @@ typedef enum {
ACPI_RSD_UINT16,
ACPI_RSD_UINT32,
ACPI_RSD_UINT64,
ACPI_RSD_WORDLIST
ACPI_RSD_WORDLIST,
ACPI_RSD_LABEL,
ACPI_RSD_SOURCE_LABEL,
} ACPI_RSDUMP_OPCODES;
/* restore default alignment */
......@@ -329,6 +332,11 @@ extern struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[];
extern struct acpi_rsconvert_info acpi_rs_convert_i2c_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_spi_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_uart_serial_bus[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_function[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_config[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_function[];
extern struct acpi_rsconvert_info acpi_rs_convert_pin_group_config[];
/* These resources require separate get/set tables */
......@@ -372,12 +380,17 @@ extern struct acpi_rsdump_info acpi_rs_dump_ext_address64[];
extern struct acpi_rsdump_info acpi_rs_dump_ext_irq[];
extern struct acpi_rsdump_info acpi_rs_dump_generic_reg[];
extern struct acpi_rsdump_info acpi_rs_dump_gpio[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_function[];
extern struct acpi_rsdump_info acpi_rs_dump_fixed_dma[];
extern struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[];
extern struct acpi_rsdump_info acpi_rs_dump_general_flags[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_config[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_function[];
extern struct acpi_rsdump_info acpi_rs_dump_pin_group_config[];
#endif
#endif /* __ACRESRC_H__ */
......@@ -85,6 +85,7 @@ extern const char *acpi_gbl_bpb_decode[];
extern const char *acpi_gbl_sb_decode[];
extern const char *acpi_gbl_fc_decode[];
extern const char *acpi_gbl_pt_decode[];
extern const char *acpi_gbl_ptyp_decode[];
#endif
/*
......
......@@ -313,6 +313,11 @@
* #A is the number of required arguments
* #T is the number of target operands
* #R indicates whether there is a return value
*
* These types are used for the top-level dispatch of the AML
* opcode. They group similar operators that can share common
* front-end code before dispatch to the final code that implements
* the operator.
*/
/*
......@@ -353,42 +358,42 @@
* The opcode Type is used in a dispatch table, do not change
* or add anything new without updating the table.
*/
#define AML_TYPE_EXEC_0A_0T_1R 0x00
#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* Monadic1 */
#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* Monadic2 */
#define AML_TYPE_EXEC_1A_1T_0R 0x03
#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* monadic2_r */
#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* Dyadic1 */
#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* Dyadic2 */
#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* dyadic2_r */
#define AML_TYPE_EXEC_2A_2T_1R 0x08
#define AML_TYPE_EXEC_3A_0T_0R 0x09
#define AML_TYPE_EXEC_3A_1T_1R 0x0A
#define AML_TYPE_EXEC_6A_0T_1R 0x0B
#define AML_TYPE_EXEC_0A_0T_1R 0x00 /* 0 Args, 0 Target, 1 ret_val */
#define AML_TYPE_EXEC_1A_0T_0R 0x01 /* 1 Args, 0 Target, 0 ret_val */
#define AML_TYPE_EXEC_1A_0T_1R 0x02 /* 1 Args, 0 Target, 1 ret_val */
#define AML_TYPE_EXEC_1A_1T_0R 0x03 /* 1 Args, 1 Target, 0 ret_val */
#define AML_TYPE_EXEC_1A_1T_1R 0x04 /* 1 Args, 1 Target, 1 ret_val */
#define AML_TYPE_EXEC_2A_0T_0R 0x05 /* 2 Args, 0 Target, 0 ret_val */
#define AML_TYPE_EXEC_2A_0T_1R 0x06 /* 2 Args, 0 Target, 1 ret_val */
#define AML_TYPE_EXEC_2A_1T_1R 0x07 /* 2 Args, 1 Target, 1 ret_val */
#define AML_TYPE_EXEC_2A_2T_1R 0x08 /* 2 Args, 2 Target, 1 ret_val */
#define AML_TYPE_EXEC_3A_0T_0R 0x09 /* 3 Args, 0 Target, 0 ret_val */
#define AML_TYPE_EXEC_3A_1T_1R 0x0A /* 3 Args, 1 Target, 1 ret_val */
#define AML_TYPE_EXEC_6A_0T_1R 0x0B /* 6 Args, 0 Target, 1 ret_val */
/* End of types used in dispatch table */
#define AML_TYPE_LITERAL 0x0B
#define AML_TYPE_CONSTANT 0x0C
#define AML_TYPE_METHOD_ARGUMENT 0x0D
#define AML_TYPE_LOCAL_VARIABLE 0x0E
#define AML_TYPE_DATA_TERM 0x0F
#define AML_TYPE_LITERAL 0x0C
#define AML_TYPE_CONSTANT 0x0D
#define AML_TYPE_METHOD_ARGUMENT 0x0E
#define AML_TYPE_LOCAL_VARIABLE 0x0F
#define AML_TYPE_DATA_TERM 0x10
/* Generic for an op that returns a value */
#define AML_TYPE_METHOD_CALL 0x10
#define AML_TYPE_METHOD_CALL 0x11
/* Miscellaneous types */
#define AML_TYPE_CREATE_FIELD 0x11
#define AML_TYPE_CREATE_OBJECT 0x12
#define AML_TYPE_CONTROL 0x13
#define AML_TYPE_NAMED_NO_OBJ 0x14
#define AML_TYPE_NAMED_FIELD 0x15
#define AML_TYPE_NAMED_SIMPLE 0x16
#define AML_TYPE_NAMED_COMPLEX 0x17
#define AML_TYPE_RETURN 0x18
#define AML_TYPE_UNDEFINED 0x19
#define AML_TYPE_BOGUS 0x1A
#define AML_TYPE_CREATE_FIELD 0x12
#define AML_TYPE_CREATE_OBJECT 0x13
#define AML_TYPE_CONTROL 0x14
#define AML_TYPE_NAMED_NO_OBJ 0x15
#define AML_TYPE_NAMED_FIELD 0x16
#define AML_TYPE_NAMED_SIMPLE 0x17
#define AML_TYPE_NAMED_COMPLEX 0x18
#define AML_TYPE_RETURN 0x19
#define AML_TYPE_UNDEFINED 0x1A
#define AML_TYPE_BOGUS 0x1B
/* AML Package Length encodings */
......
......@@ -65,6 +65,7 @@
#define ACPI_RESTAG_DRIVESTRENGTH "_DRS"
#define ACPI_RESTAG_ENDIANNESS "_END"
#define ACPI_RESTAG_FLOWCONTROL "_FLC"
#define ACPI_RESTAG_FUNCTION "_FUN"
#define ACPI_RESTAG_GRANULARITY "_GRA"
#define ACPI_RESTAG_INTERRUPT "_INT"
#define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */
......@@ -84,6 +85,8 @@
#define ACPI_RESTAG_PHASE "_PHA"
#define ACPI_RESTAG_PIN "_PIN"
#define ACPI_RESTAG_PINCONFIG "_PPI"
#define ACPI_RESTAG_PINCONFIG_TYPE "_TYP"
#define ACPI_RESTAG_PINCONFIG_VALUE "_VAL"
#define ACPI_RESTAG_POLARITY "_POL"
#define ACPI_RESTAG_REGISTERBITOFFSET "_RBO"
#define ACPI_RESTAG_REGISTERBITWIDTH "_RBW"
......@@ -404,6 +407,102 @@ struct aml_resource_uart_serialbus {
#define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */
#define AML_RESOURCE_UART_MIN_DATA_LEN 10
struct aml_resource_pin_function {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u8 pin_config;
u16 function_number;
u16 pin_table_offset;
u8 res_source_index;
u16 res_source_offset;
u16 vendor_offset;
u16 vendor_length;
/*
* Optional fields follow immediately:
* 1) PIN list (Words)
* 2) Resource Source String
* 3) Vendor Data bytes
*/
};
#define AML_RESOURCE_PIN_FUNCTION_REVISION 1 /* ACPI 6.2 */
struct aml_resource_pin_config {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u8 pin_config_type;
u32 pin_config_value;
u16 pin_table_offset;
u8 res_source_index;
u16 res_source_offset;
u16 vendor_offset;
u16 vendor_length;
/*
* Optional fields follow immediately:
* 1) PIN list (Words)
* 2) Resource Source String
* 3) Vendor Data bytes
*/
};
#define AML_RESOURCE_PIN_CONFIG_REVISION 1 /* ACPI 6.2 */
struct aml_resource_pin_group {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u16 pin_table_offset;
u16 label_offset;
u16 vendor_offset;
u16 vendor_length;
/*
* Optional fields follow immediately:
* 1) PIN list (Words)
* 2) Resource Label String
* 3) Vendor Data bytes
*/
};
#define AML_RESOURCE_PIN_GROUP_REVISION 1 /* ACPI 6.2 */
struct aml_resource_pin_group_function {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u16 function_number;
u8 res_source_index;
u16 res_source_offset;
u16 res_source_label_offset;
u16 vendor_offset;
u16 vendor_length;
/*
* Optional fields follow immediately:
* 1) Resource Source String
* 2) Resource Source Label String
* 3) Vendor Data bytes
*/
};
#define AML_RESOURCE_PIN_GROUP_FUNCTION_REVISION 1 /* ACPI 6.2 */
struct aml_resource_pin_group_config {
AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id;
u16 flags;
u8 pin_config_type;
u32 pin_config_value;
u8 res_source_index;
u16 res_source_offset;
u16 res_source_label_offset;
u16 vendor_offset;
u16 vendor_length;
/*
* Optional fields follow immediately:
* 1) Resource Source String
* 2) Resource Source Label String
* 3) Vendor Data bytes
*/
};
#define AML_RESOURCE_PIN_GROUP_CONFIG_REVISION 1 /* ACPI 6.2 */
/* restore default alignment */
#pragma pack()
......@@ -446,6 +545,11 @@ union aml_resource {
struct aml_resource_spi_serialbus spi_serial_bus;
struct aml_resource_uart_serialbus uart_serial_bus;
struct aml_resource_common_serialbus common_serial_bus;
struct aml_resource_pin_function pin_function;
struct aml_resource_pin_config pin_config;
struct aml_resource_pin_group pin_group;
struct aml_resource_pin_group_function pin_group_function;
struct aml_resource_pin_group_config pin_group_config;
/* Utility overlays */
......
......@@ -181,6 +181,18 @@ acpi_db_execute_method(struct acpi_db_method_info *info,
acpi_gbl_method_executing = FALSE;
if (ACPI_FAILURE(status)) {
if ((status == AE_ABORT_METHOD) || acpi_gbl_abort_method) {
/* Clear the abort and fall back to the debugger prompt */
ACPI_EXCEPTION((AE_INFO, status,
"Aborting top-level method"));
acpi_gbl_abort_method = FALSE;
status = AE_OK;
goto cleanup;
}
ACPI_EXCEPTION((AE_INFO, status,
"while executing %s from debugger",
info->pathname));
......
......@@ -448,7 +448,7 @@ void acpi_db_decode_locals(struct acpi_walk_state *walk_state)
if (display_locals) {
acpi_os_printf
("\nInitialized Local Variables for method [%4.4s]:\n",
("\nInitialized Local Variables for Method [%4.4s]:\n",
acpi_ut_get_node_name(node));
for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) {
......@@ -461,7 +461,7 @@ void acpi_db_decode_locals(struct acpi_walk_state *walk_state)
}
} else {
acpi_os_printf
("No Local Variables are initialized for method [%4.4s]\n",
("No Local Variables are initialized for Method [%4.4s]\n",
acpi_ut_get_node_name(node));
}
}
......@@ -515,7 +515,7 @@ void acpi_db_decode_arguments(struct acpi_walk_state *walk_state)
acpi_os_printf("Initialized Arguments for Method [%4.4s]: "
"(%X arguments defined for method invocation)\n",
acpi_ut_get_node_name(node),
obj_desc->method.param_count);
node->object->method.param_count);
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) {
obj_desc = walk_state->arguments[i].object;
......
......@@ -244,7 +244,7 @@ acpi_db_single_step(struct acpi_walk_state *walk_state,
if ((acpi_gbl_db_output_to_file) ||
(acpi_dbg_level & ACPI_LV_PARSE)) {
acpi_os_printf
("\n[AmlDebug] Next AML Opcode to execute:\n");
("\nAML Debug: Next AML Opcode to execute:\n");
}
/*
......
......@@ -82,7 +82,7 @@ acpi_ds_execute_arguments(struct acpi_namespace_node *node,
union acpi_parse_object *op;
struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE(ds_execute_arguments);
ACPI_FUNCTION_TRACE_PTR(ds_execute_arguments, aml_start);
/* Allocate a new parser op to be the root of the parsed tree */
......@@ -338,7 +338,8 @@ acpi_status acpi_ds_get_package_arguments(union acpi_operand_object *obj_desc)
return_ACPI_STATUS(AE_AML_INTERNAL);
}
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Package Arg Init\n"));
ACPI_DEBUG_PRINT((ACPI_DB_EXEC, "Package Argument Init, AML Ptr: %p\n",
obj_desc->package.aml_start));
/* Execute the AML code for the term_arg arguments */
......
......@@ -196,6 +196,7 @@ acpi_ds_dump_method_stack(acpi_status status,
op->common.next = NULL;
#ifdef ACPI_DISASSEMBLER
acpi_os_printf("Failed at ");
acpi_dm_disassemble(next_walk_state, op,
ACPI_UINT32_MAX);
#endif
......
......@@ -212,6 +212,7 @@ acpi_status
acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
{
u32 aml_offset;
acpi_name name = 0;
ACPI_FUNCTION_ENTRY();
......@@ -237,10 +238,13 @@ acpi_ds_method_error(acpi_status status, struct acpi_walk_state *walk_state)
walk_state->parser_state.
aml_start);
status = acpi_gbl_exception_handler(status,
walk_state->method_node ?
walk_state->method_node->
name.integer : 0,
if (walk_state->method_node) {
name = walk_state->method_node->name.integer;
} else if (walk_state->deferred_node) {
name = walk_state->deferred_node->name.integer;
}
status = acpi_gbl_exception_handler(status, name,
walk_state->opcode,
aml_offset, NULL);
acpi_ex_enter_interpreter();
......
......@@ -227,13 +227,12 @@ acpi_ds_init_buffer_field(u16 aml_opcode,
/* Entire field must fit within the current length of the buffer */
if ((bit_offset + bit_count) > (8 * (u32) buffer_desc->buffer.length)) {
if ((bit_offset + bit_count) > (8 * (u32)buffer_desc->buffer.length)) {
ACPI_ERROR((AE_INFO,
"Field [%4.4s] at %u exceeds Buffer [%4.4s] size %u (bits)",
acpi_ut_get_node_name(result_desc),
bit_offset + bit_count,
acpi_ut_get_node_name(buffer_desc->buffer.node),
8 * (u32) buffer_desc->buffer.length));
"Field [%4.4s] at bit offset/length %u/%u "
"exceeds size of target Buffer (%u bits)",
acpi_ut_get_node_name(result_desc), bit_offset,
bit_count, 8 * (u32)buffer_desc->buffer.length));
status = AE_AML_BUFFER_LIMIT;
goto cleanup;
}
......
......@@ -633,15 +633,6 @@ acpi_ds_create_operand(struct acpi_walk_state *walk_state,
if ((op_info->flags & AML_HAS_RETVAL) ||
(arg->common.flags & ACPI_PARSEOP_IN_STACK)) {
ACPI_DEBUG_PRINT((ACPI_DB_DISPATCH,
"Argument previously created, already stacked\n"));
acpi_db_display_argument_object(walk_state->
operands[walk_state->
num_operands -
1],
walk_state);
/*
* Use value that was already previously returned
* by the evaluation of this argument
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment