| .. | .. |
|---|
| 3 | 3 | * |
|---|
| 4 | 4 | * Module Name: dsfield - Dispatcher field routines |
|---|
| 5 | 5 | * |
|---|
| 6 | | - * Copyright (C) 2000 - 2018, Intel Corp. |
|---|
| 6 | + * Copyright (C) 2000 - 2020, Intel Corp. |
|---|
| 7 | 7 | * |
|---|
| 8 | 8 | *****************************************************************************/ |
|---|
| 9 | 9 | |
|---|
| .. | .. |
|---|
| 149 | 149 | |
|---|
| 150 | 150 | if (walk_state->deferred_node) { |
|---|
| 151 | 151 | node = walk_state->deferred_node; |
|---|
| 152 | | - status = AE_OK; |
|---|
| 153 | 152 | } else { |
|---|
| 154 | 153 | /* Execute flag should always be set when this function is entered */ |
|---|
| 155 | 154 | |
|---|
| .. | .. |
|---|
| 178 | 177 | arg->common.value.string, ACPI_TYPE_ANY, |
|---|
| 179 | 178 | ACPI_IMODE_LOAD_PASS1, flags, |
|---|
| 180 | 179 | walk_state, &node); |
|---|
| 181 | | - if (ACPI_FAILURE(status)) { |
|---|
| 180 | + if ((walk_state->parse_flags & ACPI_PARSE_DISASSEMBLE) |
|---|
| 181 | + && status == AE_ALREADY_EXISTS) { |
|---|
| 182 | + status = AE_OK; |
|---|
| 183 | + } else if (ACPI_FAILURE(status)) { |
|---|
| 182 | 184 | ACPI_ERROR_NAMESPACE(walk_state->scope_info, |
|---|
| 183 | 185 | arg->common.value.string, status); |
|---|
| 184 | 186 | return_ACPI_STATUS(status); |
|---|
| .. | .. |
|---|
| 264 | 266 | union acpi_parse_object *child; |
|---|
| 265 | 267 | |
|---|
| 266 | 268 | #ifdef ACPI_EXEC_APP |
|---|
| 267 | | - u64 value = 0; |
|---|
| 268 | 269 | union acpi_operand_object *result_desc; |
|---|
| 269 | 270 | union acpi_operand_object *obj_desc; |
|---|
| 270 | 271 | char *name_path; |
|---|
| .. | .. |
|---|
| 406 | 407 | name_path = |
|---|
| 407 | 408 | acpi_ns_get_external_pathname(info-> |
|---|
| 408 | 409 | field_node); |
|---|
| 409 | | - obj_desc = |
|---|
| 410 | | - acpi_ut_create_integer_object |
|---|
| 411 | | - (value); |
|---|
| 412 | 410 | if (ACPI_SUCCESS |
|---|
| 413 | 411 | (ae_lookup_init_file_entry |
|---|
| 414 | | - (name_path, &value))) { |
|---|
| 412 | + (name_path, &obj_desc))) { |
|---|
| 415 | 413 | acpi_ex_write_data_to_field |
|---|
| 416 | 414 | (obj_desc, |
|---|
| 417 | 415 | acpi_ns_get_attached_object |
|---|
| 418 | 416 | (info->field_node), |
|---|
| 419 | 417 | &result_desc); |
|---|
| 418 | + acpi_ut_remove_reference |
|---|
| 419 | + (obj_desc); |
|---|
| 420 | 420 | } |
|---|
| 421 | | - acpi_ut_remove_reference(obj_desc); |
|---|
| 422 | 421 | ACPI_FREE(name_path); |
|---|
| 423 | 422 | #endif |
|---|
| 424 | 423 | } |
|---|
| .. | .. |
|---|
| 518 | 517 | info.region_node = region_node; |
|---|
| 519 | 518 | |
|---|
| 520 | 519 | status = acpi_ds_get_field_names(&info, walk_state, arg->common.next); |
|---|
| 520 | + if (ACPI_FAILURE(status)) { |
|---|
| 521 | + return_ACPI_STATUS(status); |
|---|
| 522 | + } |
|---|
| 523 | + |
|---|
| 524 | + if (info.region_node->object->region.space_id == |
|---|
| 525 | + ACPI_ADR_SPACE_PLATFORM_COMM) { |
|---|
| 526 | + region_node->object->field.internal_pcc_buffer = |
|---|
| 527 | + ACPI_ALLOCATE_ZEROED(info.region_node->object->region. |
|---|
| 528 | + length); |
|---|
| 529 | + if (!region_node->object->field.internal_pcc_buffer) { |
|---|
| 530 | + return_ACPI_STATUS(AE_NO_MEMORY); |
|---|
| 531 | + } |
|---|
| 532 | + } |
|---|
| 533 | + |
|---|
| 521 | 534 | return_ACPI_STATUS(status); |
|---|
| 522 | 535 | } |
|---|
| 523 | 536 | |
|---|
| .. | .. |
|---|
| 629 | 642 | } |
|---|
| 630 | 643 | |
|---|
| 631 | 644 | /* Name already exists, just ignore this error */ |
|---|
| 632 | | - |
|---|
| 633 | | - status = AE_OK; |
|---|
| 634 | 645 | } |
|---|
| 635 | 646 | |
|---|
| 636 | 647 | arg->common.node = node; |
|---|