diff options
author | Erik Schmauss <erik.schmauss@intel.com> | 2019-10-25 14:36:58 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-10-28 22:12:46 +0100 |
commit | 02b04f10b83639c41dc338e4d43652cab49748fc (patch) | |
tree | 91fead09f669c9a42195fd6c313b862ee6957d8c /drivers/acpi | |
parent | 760935064252d7a897707539bc4fb84e31f11829 (diff) | |
download | linux-02b04f10b83639c41dc338e4d43652cab49748fc.tar.bz2 |
ACPICA: acpiexec: initialize all simple types and field units from user input
ACPICA commit 367b363edc5fa1f93bbc14e4a1e05f34fef765a2
acpiexec allows a user to provide a file that indicates values to
initialize named objects during table load with the -fi option. This
can provide more accurate simulation by setting named objects to
values found during OS runtime.
Previously, this option only supported integer objects. This change
adds user initialization support for field units, strings, buffers,
and packages.
Link: https://github.com/acpica/acpica/commit/367b363e
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpica/dsfield.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/acpi/acpica/dsfield.c b/drivers/acpi/acpica/dsfield.c index 9151f00dfbdc..faa38a22263a 100644 --- a/drivers/acpi/acpica/dsfield.c +++ b/drivers/acpi/acpica/dsfield.c @@ -263,7 +263,6 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, union acpi_parse_object *child; #ifdef ACPI_EXEC_APP - u64 value = 0; union acpi_operand_object *result_desc; union acpi_operand_object *obj_desc; char *name_path; @@ -405,19 +404,17 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info, name_path = acpi_ns_get_external_pathname(info-> field_node); - obj_desc = - acpi_ut_create_integer_object - (value); if (ACPI_SUCCESS (ae_lookup_init_file_entry - (name_path, &value))) { + (name_path, &obj_desc))) { acpi_ex_write_data_to_field (obj_desc, acpi_ns_get_attached_object (info->field_node), &result_desc); + acpi_ut_remove_reference + (obj_desc); } - acpi_ut_remove_reference(obj_desc); ACPI_FREE(name_path); #endif } |