Skip to content

Commit 02b04f1

Browse files
Erik Schmaussrafaeljw
authored andcommitted
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: acpica/acpica@367b363e Signed-off-by: Erik Schmauss <[email protected]> Signed-off-by: Bob Moore <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 7609350 commit 02b04f1

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

drivers/acpi/acpica/dsfield.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,6 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
263263
union acpi_parse_object *child;
264264

265265
#ifdef ACPI_EXEC_APP
266-
u64 value = 0;
267266
union acpi_operand_object *result_desc;
268267
union acpi_operand_object *obj_desc;
269268
char *name_path;
@@ -405,19 +404,17 @@ acpi_ds_get_field_names(struct acpi_create_field_info *info,
405404
name_path =
406405
acpi_ns_get_external_pathname(info->
407406
field_node);
408-
obj_desc =
409-
acpi_ut_create_integer_object
410-
(value);
411407
if (ACPI_SUCCESS
412408
(ae_lookup_init_file_entry
413-
(name_path, &value))) {
409+
(name_path, &obj_desc))) {
414410
acpi_ex_write_data_to_field
415411
(obj_desc,
416412
acpi_ns_get_attached_object
417413
(info->field_node),
418414
&result_desc);
415+
acpi_ut_remove_reference
416+
(obj_desc);
419417
}
420-
acpi_ut_remove_reference(obj_desc);
421418
ACPI_FREE(name_path);
422419
#endif
423420
}

0 commit comments

Comments
 (0)