// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: exoparg1 - AML execution - opcodes with 1 argument * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acparser.h" #include "acdispat.h" #include "acinterp.h" #include "amlcode.h" #include "acnamesp.h" #define _COMPONENT … ACPI_MODULE_NAME("exoparg1") /*! * Naming convention for AML interpreter execution routines. * * The routines that begin execution of AML opcodes are named with a common * convention based upon the number of arguments, the number of target operands, * and whether or not a value is returned: * * AcpiExOpcode_xA_yT_zR * * Where: * * xA - ARGUMENTS: The number of arguments (input operands) that are * required for this opcode type (0 through 6 args). * yT - TARGETS: The number of targets (output operands) that are required * for this opcode type (0, 1, or 2 targets). * zR - RETURN VALUE: Indicates whether this opcode type returns a value * as the function return (0 or 1). * * The AcpiExOpcode* functions are called via the Dispatcher component with * fully resolved operands. !*/ /******************************************************************************* * * FUNCTION: acpi_ex_opcode_0A_0T_1R * * PARAMETERS: walk_state - Current state (contains AML opcode) * * RETURN: Status * * DESCRIPTION: Execute operator with no operands, one return value * ******************************************************************************/ acpi_status acpi_ex_opcode_0A_0T_1R(struct acpi_walk_state *walk_state) { … } /******************************************************************************* * * FUNCTION: acpi_ex_opcode_1A_0T_0R * * PARAMETERS: walk_state - Current state (contains AML opcode) * * RETURN: Status * * DESCRIPTION: Execute Type 1 monadic operator with numeric operand on * object stack * ******************************************************************************/ acpi_status acpi_ex_opcode_1A_0T_0R(struct acpi_walk_state *walk_state) { … } #ifdef _OBSOLETE_CODE /* Was originally used for Load() operator */ /******************************************************************************* * * FUNCTION: acpi_ex_opcode_1A_1T_0R * * PARAMETERS: walk_state - Current state (contains AML opcode) * * RETURN: Status * * DESCRIPTION: Execute opcode with one argument, one target, and no * return value. * ******************************************************************************/ acpi_status acpi_ex_opcode_1A_1T_0R(struct acpi_walk_state *walk_state) { acpi_status status = AE_OK; union acpi_operand_object **operand = &walk_state->operands[0]; ACPI_FUNCTION_TRACE_STR(ex_opcode_1A_1T_0R, acpi_ps_get_opcode_name(walk_state->opcode)); /* Examine the AML opcode */ switch (walk_state->opcode) { #ifdef _OBSOLETE_CODE case AML_LOAD_OP: status = acpi_ex_load_op(operand[0], operand[1], walk_state); break; #endif default: /* Unknown opcode */ ACPI_ERROR((AE_INFO, "Unknown AML opcode 0x%X", walk_state->opcode)); status = AE_AML_BAD_OPCODE; goto cleanup; } cleanup: return_ACPI_STATUS(status); } #endif /******************************************************************************* * * FUNCTION: acpi_ex_opcode_1A_1T_1R * * PARAMETERS: walk_state - Current state (contains AML opcode) * * RETURN: Status * * DESCRIPTION: Execute opcode with one argument, one target, and a * return value. * January 2022: Added Load operator, with new ACPI 6.4 * semantics. * ******************************************************************************/ acpi_status acpi_ex_opcode_1A_1T_1R(struct acpi_walk_state *walk_state) { … } /******************************************************************************* * * FUNCTION: acpi_ex_opcode_1A_0T_1R * * PARAMETERS: walk_state - Current state (contains AML opcode) * * RETURN: Status * * DESCRIPTION: Execute opcode with one argument, no target, and a return value * ******************************************************************************/ acpi_status acpi_ex_opcode_1A_0T_1R(struct acpi_walk_state *walk_state) { … }