// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 /****************************************************************************** * * Module Name: psopinfo - AML opcode information functions and dispatch tables * * Copyright (C) 2000 - 2023, Intel Corp. * *****************************************************************************/ #include <acpi/acpi.h> #include "accommon.h" #include "acparser.h" #include "acopcode.h" #include "amlcode.h" #define _COMPONENT … ACPI_MODULE_NAME("psopinfo") static const u8 acpi_gbl_argument_count[] = …; /******************************************************************************* * * FUNCTION: acpi_ps_get_opcode_info * * PARAMETERS: opcode - The AML opcode * * RETURN: A pointer to the info about the opcode. * * DESCRIPTION: Find AML opcode description based on the opcode. * NOTE: This procedure must ALWAYS return a valid pointer! * ******************************************************************************/ const struct acpi_opcode_info *acpi_ps_get_opcode_info(u16 opcode) { … } /******************************************************************************* * * FUNCTION: acpi_ps_get_opcode_name * * PARAMETERS: opcode - The AML opcode * * RETURN: A pointer to the name of the opcode (ASCII String) * Note: Never returns NULL. * * DESCRIPTION: Translate an opcode into a human-readable string * ******************************************************************************/ const char *acpi_ps_get_opcode_name(u16 opcode) { … } /******************************************************************************* * * FUNCTION: acpi_ps_get_argument_count * * PARAMETERS: op_type - Type associated with the AML opcode * * RETURN: Argument count * * DESCRIPTION: Obtain the number of expected arguments for an AML opcode * ******************************************************************************/ u8 acpi_ps_get_argument_count(u32 op_type) { … } /* * This table is directly indexed by the opcodes It returns * an index into the opcode table (acpi_gbl_aml_op_info) */ const u8 acpi_gbl_short_op_index[256] = …; /* * This table is indexed by the second opcode of the extended opcode * pair. It returns an index into the opcode table (acpi_gbl_aml_op_info) */ const u8 acpi_gbl_long_op_index[NUM_EXTENDED_OPCODE] = …;