// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: exstoren - AML Interpreter object store support, * Store to Node (namespace object) * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acinterp.h" #include "amlcode.h" #define _COMPONENT … ACPI_MODULE_NAME("exstoren") /******************************************************************************* * * FUNCTION: acpi_ex_resolve_object * * PARAMETERS: source_desc_ptr - Pointer to the source object * target_type - Current type of the target * walk_state - Current walk state * * RETURN: Status, resolved object in source_desc_ptr. * * DESCRIPTION: Resolve an object. If the object is a reference, dereference * it and return the actual object in the source_desc_ptr. * ******************************************************************************/ acpi_status acpi_ex_resolve_object(union acpi_operand_object **source_desc_ptr, acpi_object_type target_type, struct acpi_walk_state *walk_state) { … } /******************************************************************************* * * FUNCTION: acpi_ex_store_object_to_object * * PARAMETERS: source_desc - Object to store * dest_desc - Object to receive a copy of the source * new_desc - New object if dest_desc is obsoleted * walk_state - Current walk state * * RETURN: Status * * DESCRIPTION: "Store" an object to another object. This may include * converting the source type to the target type (implicit * conversion), and a copy of the value of the source to * the target. * * The Assignment of an object to another (not named) object * is handled here. * The Source passed in will replace the current value (if any) * with the input value. * * When storing into an object the data is converted to the * target object type then stored in the object. This means * that the target object type (for an initialized target) will * not be changed by a store operation. * * This module allows destination types of Number, String, * Buffer, and Package. * * Assumes parameters are already validated. NOTE: source_desc * resolution (from a reference object) must be performed by * the caller if necessary. * ******************************************************************************/ acpi_status acpi_ex_store_object_to_object(union acpi_operand_object *source_desc, union acpi_operand_object *dest_desc, union acpi_operand_object **new_desc, struct acpi_walk_state *walk_state) { … }