Skip to content

Commit

Permalink
Merge branch 'acpica'
Browse files Browse the repository at this point in the history
* acpica: (32 commits)
  ACPICA: Update version to 20170728
  ACPICA: Revert "Update resource descriptor handling"
  ACPICA: Resources: Allow _DMA method in walk resources
  ACPICA: Ensure all instances of AE_AML_INTERNAL have error messages
  ACPICA: Implement deferred resolution of reference package elements
  ACPICA: Debugger: Improve support for Alias objects
  ACPICA: Interpreter: Update handling for Alias operator
  ACPICA: EFI/EDK2: Cleanup to enable /WX for MSVC builds
  ACPICA: acpidump: Add DSDT/FACS instance support for Linux and EFI
  ACPICA: CLib: Add short multiply/shift support
  ACPICA: EFI/EDK2: Sort acpi.h inclusion order
  ACPICA: Add a comment, no functional change
  ACPICA: Namespace: Update/fix an error message
  ACPICA: iASL: Add support for the SDEI table
  ACPICA: Divergences: reduce access size definitions
  ACPICA: Update version to 20170629
  ACPICA: Update resource descriptor handling
  ACPICA: iasl: Update to IORT SMMUv3 disassembling
  ACPICA: Disassembler: skip parsing of incorrect external declarations
  ACPICA: iASL: Ensure that the target node is valid in acpi_ex_create_alias
  ...
  • Loading branch information
Rafael J. Wysocki committed Sep 3, 2017
2 parents 569dbb8 + 4a9673d commit b2a84ee
Show file tree
Hide file tree
Showing 55 changed files with 1,475 additions and 676 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpica/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ acpi-y := \
dsmthdat.o \
dsobject.o \
dsopcode.o \
dspkginit.o \
dsutils.o \
dswexec.o \
dswload.o \
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/acapps.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ ac_get_all_tables_from_file(char *filename,
u8 get_only_aml_tables,
struct acpi_new_table_desc **return_list_head);

void ac_delete_table_list(struct acpi_new_table_desc *list_head);

u8 ac_is_file_binary(FILE * file);

acpi_status ac_validate_table_header(FILE * file, long table_offset);
Expand Down
13 changes: 13 additions & 0 deletions drivers/acpi/acpica/acdispat.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,11 @@ acpi_ds_initialize_objects(u32 table_index,
* dsobject - Parser/Interpreter interface - object initialization and conversion
*/
acpi_status
acpi_ds_build_internal_object(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
union acpi_operand_object **obj_desc_ptr);

acpi_status
acpi_ds_build_internal_buffer_obj(struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 buffer_length,
Expand All @@ -258,6 +263,14 @@ acpi_ds_create_node(struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
union acpi_parse_object *op);

/*
* dspkginit - Package object initialization
*/
acpi_status
acpi_ds_init_package_element(u8 object_type,
union acpi_operand_object *source_object,
union acpi_generic_state *state, void *context);

/*
* dsutils - Parser/Interpreter interface utility routines
*/
Expand Down
7 changes: 4 additions & 3 deletions drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ struct acpi_namespace_node {
#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (install_method) */

#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */
#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
Expand Down Expand Up @@ -604,7 +605,7 @@ struct acpi_update_state {
* Pkg state - used to traverse nested package structures
*/
struct acpi_pkg_state {
ACPI_STATE_COMMON u16 index;
ACPI_STATE_COMMON u32 index;
union acpi_operand_object *source_object;
union acpi_operand_object *dest_object;
struct acpi_walk_state *walk_state;
Expand Down Expand Up @@ -867,7 +868,7 @@ struct acpi_parse_obj_named {

/* This version is used by the iASL compiler only */

#define ACPI_MAX_PARSEOP_NAME 20
#define ACPI_MAX_PARSEOP_NAME 20

struct acpi_parse_obj_asl {
ACPI_PARSE_COMMON union acpi_parse_object *child;
Expand Down Expand Up @@ -907,7 +908,7 @@ union acpi_parse_object {
struct asl_comment_state {
u8 comment_type;
u32 spaces_before;
union acpi_parse_object *latest_parse_node;
union acpi_parse_object *latest_parse_op;
union acpi_parse_object *parsing_paren_brace_node;
u8 capture_comments;
};
Expand Down
15 changes: 11 additions & 4 deletions drivers/acpi/acpica/acobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,9 @@ struct acpi_object_integer {
_type *pointer; \
u32 length;

struct acpi_object_string { /* Null terminated, ASCII characters only */
/* Null terminated, ASCII characters only */

struct acpi_object_string {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_BUFFER_INFO(char) /* String in AML stream or allocated string */
};

Expand Down Expand Up @@ -211,7 +213,9 @@ struct acpi_object_method {
union acpi_operand_object *notify_list[2]; /* Handlers for system/device notifies */\
union acpi_operand_object *handler; /* Handler for Address space */

struct acpi_object_notify_common { /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */

struct acpi_object_notify_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};

struct acpi_object_device {
Expand Down Expand Up @@ -258,7 +262,9 @@ ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_NOTIFY_INFO};
u8 access_length; /* For serial regions/fields */


struct acpi_object_field_common { /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
/* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */

struct acpi_object_field_common {
ACPI_OBJECT_COMMON_HEADER ACPI_COMMON_FIELD_INFO union acpi_operand_object *region_obj; /* Parent Operation Region object (REGION/BANK fields only) */
};

Expand Down Expand Up @@ -333,11 +339,12 @@ struct acpi_object_addr_handler {
struct acpi_object_reference {
ACPI_OBJECT_COMMON_HEADER u8 class; /* Reference Class */
u8 target_type; /* Used for Index Op */
u8 reserved;
u8 resolved; /* Reference has been resolved to a value */
void *object; /* name_op=>HANDLE to obj, index_op=>union acpi_operand_object */
struct acpi_namespace_node *node; /* ref_of or Namepath */
union acpi_operand_object **where; /* Target of Index */
u8 *index_pointer; /* Used for Buffers and Strings */
u8 *aml; /* Used for deferred resolution of the ref */
u32 value; /* Used for Local/Arg/Index/ddb_handle */
};

Expand Down
5 changes: 4 additions & 1 deletion drivers/acpi/acpica/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ void acpi_tb_release_temp_table(struct acpi_table_desc *table_desc);
acpi_status acpi_tb_validate_temp_table(struct acpi_table_desc *table_desc);

acpi_status
acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc, char *signature);
acpi_tb_verify_temp_table(struct acpi_table_desc *table_desc,
char *signature, u32 *table_index);

u8 acpi_tb_is_table_loaded(u32 table_index);

Expand Down Expand Up @@ -132,6 +133,8 @@ acpi_tb_install_and_load_table(acpi_physical_address address,

acpi_status acpi_tb_unload_table(u32 table_index);

void acpi_tb_notify_table(u32 event, void *table);

void acpi_tb_terminate(void);

acpi_status acpi_tb_delete_namespace_by_owner(u32 table_index);
Expand Down
9 changes: 8 additions & 1 deletion drivers/acpi/acpica/acutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ union acpi_generic_state *acpi_ut_create_update_state(union acpi_operand_object

union acpi_generic_state *acpi_ut_create_pkg_state(void *internal_object,
void *external_object,
u16 index);
u32 index);

acpi_status
acpi_ut_create_update_state_and_push(union acpi_operand_object *object,
Expand All @@ -538,6 +538,13 @@ acpi_status
acpi_ut_short_divide(u64 in_dividend,
u32 divisor, u64 *out_quotient, u32 *out_remainder);

acpi_status
acpi_ut_short_multiply(u64 in_multiplicand, u32 multiplier, u64 *outproduct);

acpi_status acpi_ut_short_shift_left(u64 operand, u32 count, u64 *out_result);

acpi_status acpi_ut_short_shift_right(u64 operand, u32 count, u64 *out_result);

/*
* utmisc
*/
Expand Down
37 changes: 32 additions & 5 deletions drivers/acpi/acpica/dbdisply.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ void acpi_db_decode_and_display_object(char *target, char *output_type)
}

else {
acpi_os_printf("Object (%p) Pathname: %s\n",
acpi_os_printf("Object %p: Namespace Node - Pathname: %s\n",
node, (char *)ret_buf.pointer);
}

Expand All @@ -326,7 +326,7 @@ void acpi_db_decode_and_display_object(char *target, char *output_type)

obj_desc = acpi_ns_get_attached_object(node);
if (obj_desc) {
acpi_os_printf("\nAttached Object (%p):\n", obj_desc);
acpi_os_printf("\nAttached Object %p:", obj_desc);
if (!acpi_os_readable
(obj_desc, sizeof(union acpi_operand_object))) {
acpi_os_printf
Expand All @@ -335,9 +335,36 @@ void acpi_db_decode_and_display_object(char *target, char *output_type)
return;
}

acpi_ut_debug_dump_buffer((void *)obj_desc,
sizeof(union acpi_operand_object),
display, ACPI_UINT32_MAX);
if (ACPI_GET_DESCRIPTOR_TYPE(((struct acpi_namespace_node *)
obj_desc)) ==
ACPI_DESC_TYPE_NAMED) {
acpi_os_printf(" Namespace Node - ");
status =
acpi_get_name((struct acpi_namespace_node *)
obj_desc,
ACPI_FULL_PATHNAME_NO_TRAILING,
&ret_buf);
if (ACPI_FAILURE(status)) {
acpi_os_printf
("Could not convert name to pathname\n");
} else {
acpi_os_printf("Pathname: %s",
(char *)ret_buf.pointer);
}

acpi_os_printf("\n");
acpi_ut_debug_dump_buffer((void *)obj_desc,
sizeof(struct
acpi_namespace_node),
display, ACPI_UINT32_MAX);
} else {
acpi_os_printf("\n");
acpi_ut_debug_dump_buffer((void *)obj_desc,
sizeof(union
acpi_operand_object),
display, ACPI_UINT32_MAX);
}

acpi_ex_dump_object_descriptor(obj_desc, 1);
}
}
Expand Down
2 changes: 2 additions & 0 deletions drivers/acpi/acpica/dsfield.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ acpi_ds_create_buffer_field(union acpi_parse_object *op,
/* Execute flag should always be set when this function is entered */

if (!(walk_state->parse_flags & ACPI_PARSE_EXECUTE)) {
ACPI_ERROR((AE_INFO, "Parse execute mode is not set"));
return_ACPI_STATUS(AE_AML_INTERNAL);
}

Expand Down Expand Up @@ -556,6 +557,7 @@ acpi_ds_init_field_objects(union acpi_parse_object *op,
return_ACPI_STATUS(AE_OK);
}

ACPI_ERROR((AE_INFO, "Parse deferred mode is not set"));
return_ACPI_STATUS(AE_AML_INTERNAL);
}

Expand Down
Loading

0 comments on commit b2a84ee

Please sign in to comment.