// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: exconcat - Concatenate-type AML operators * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acinterp.h" #include "amlresrc.h" #define _COMPONENT … ACPI_MODULE_NAME("exconcat") /* Local Prototypes */ static acpi_status acpi_ex_convert_to_object_type_string(union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc); /******************************************************************************* * * FUNCTION: acpi_ex_do_concatenate * * PARAMETERS: operand0 - First source object * operand1 - Second source object * actual_return_desc - Where to place the return object * walk_state - Current walk state * * RETURN: Status * * DESCRIPTION: Concatenate two objects with the ACPI-defined conversion * rules as necessary. * NOTE: * Per the ACPI spec (up to 6.1), Concatenate only supports Integer, * String, and Buffer objects. However, we support all objects here * as an extension. This improves the usefulness of both Concatenate * and the Printf/Fprintf macros. The extension returns a string * describing the object type for the other objects. * 02/2016. * ******************************************************************************/ acpi_status acpi_ex_do_concatenate(union acpi_operand_object *operand0, union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, struct acpi_walk_state *walk_state) { … } /******************************************************************************* * * FUNCTION: acpi_ex_convert_to_object_type_string * * PARAMETERS: obj_desc - Object to be converted * return_desc - Where to place the return object * * RETURN: Status * * DESCRIPTION: Convert an object of arbitrary type to a string object that * contains the namestring for the object. Used for the * concatenate operator. * ******************************************************************************/ static acpi_status acpi_ex_convert_to_object_type_string(union acpi_operand_object *obj_desc, union acpi_operand_object **result_desc) { … } /******************************************************************************* * * FUNCTION: acpi_ex_concat_template * * PARAMETERS: operand0 - First source object * operand1 - Second source object * actual_return_desc - Where to place the return object * walk_state - Current walk state * * RETURN: Status * * DESCRIPTION: Concatenate two resource templates * ******************************************************************************/ acpi_status acpi_ex_concat_template(union acpi_operand_object *operand0, union acpi_operand_object *operand1, union acpi_operand_object **actual_return_desc, struct acpi_walk_state *walk_state) { … }