Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a62a7117 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki
Browse files

ACPICA: Implement deferred resolution of reference package elements

ACPICA commit 0c08790c56fdf0dc081ae869495a09d8c4230854

This change defers the resolution of package elements that
are named references until after the entire namespace has been
loaded from the definition block. This allows such references
to be in fact forward references for both module level code
and control methods.

Link: https://github.com/acpica/acpica/commit/0c08790c


Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 7ab58197
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ acpi-y := \
	dsmthdat.o	\
	dsobject.o	\
	dsopcode.o	\
	dspkginit.o	\
	dsutils.o	\
	dswexec.o	\
	dswload.o	\
+13 −0
Original line number Diff line number Diff line
@@ -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,
@@ -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
 */
+1 −1
Original line number Diff line number Diff line
@@ -605,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;
+2 −1
Original line number Diff line number Diff line
@@ -339,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 */
};

+1 −1
Original line number Diff line number Diff line
@@ -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,
Loading