FreeBSD/sys/contrib/dev/acpica/components/parser/psopinfo.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiPsGetOpcodeInfo
 *
 * 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!
 *
 ******************************************************************************/
AcpiPsGetOpcodeInfo
PARAMETERS:  Opcode              - The AML opcode

A pointer to the info about the opcode.

Find AML opcode description based on the opcode.
NOTE: This procedure must ALWAYS return a valid pointer!
AcpiPsGetOpcodeInfo PARAMETERS : Opcode - The AML opcode A pointer to the info about the opcode . Find AML opcode description based on the opcode . NOTE : This procedure must ALWAYS return a valid pointer!
const ACPI_OPCODE_INFO *
AcpiPsGetOpcodeInfo (
    UINT16                  Opcode)
{
#ifdef ACPI_DEBUG_OUTPUT
    const char              *OpcodeName = "Unknown AML opcode";
#endif
    ACPI_FUNCTION_NAME (PsGetOpcodeInfo);
    if (!(Opcode & 0xFF00))
    {
        return (&AcpiGbl_AmlOpInfo [AcpiGbl_ShortOpIndex [(UINT8) Opcode]]);
    }
    if (((Opcode & 0xFF00) == AML_EXTENDED_OPCODE) &&
        (((UINT8) Opcode) <= MAX_EXTENDED_OPCODE))
    {
        return (&AcpiGbl_AmlOpInfo [AcpiGbl_LongOpIndex [(UINT8) Opcode]]);
    }
#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
#include <contrib/dev/acpica/compiler/asldefine.h>
    switch (Opcode)
    {
    case AML_RAW_DATA_BYTE:
        OpcodeName = "-Raw Data Byte-";
        break;
    case AML_RAW_DATA_WORD:
        OpcodeName = "-Raw Data Word-";
        break;
    case AML_RAW_DATA_DWORD:
        OpcodeName = "-Raw Data Dword-";
        break;
    case AML_RAW_DATA_QWORD:
        OpcodeName = "-Raw Data Qword-";
        break;
    case AML_RAW_DATA_BUFFER:
        OpcodeName = "-Raw Data Buffer-";
        break;
    case AML_RAW_DATA_CHAIN:
        OpcodeName = "-Raw Data Buffer Chain-";
        break;
    case AML_PACKAGE_LENGTH:
        OpcodeName = "-Package Length-";
        break;
    case AML_UNASSIGNED_OPCODE:
        OpcodeName = "-Unassigned Opcode-";
        break;
    case AML_DEFAULT_ARG_OP:
        OpcodeName = "-Default Arg-";
        break;
    default:
        break;
    }
#endif
    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
        "%s [%4.4X]\n", OpcodeName, Opcode));
    return (&AcpiGbl_AmlOpInfo [_UNK]);
}
const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo ( UINT16 Opcode ) { #ifdef ACPI_DEBUG_OUTPUT const char * OpcodeName = " " ; #endif ACPI_FUNCTION_NAME ( PsGetOpcodeInfo ) ; if ( ! ( Opcode & 0xFF00 ) ) { return ( & AcpiGbl_AmlOpInfo [ AcpiGbl_ShortOpIndex [ ( UINT8 ) Opcode ] ] ) ; } if ( ( ( Opcode & 0xFF00 ) == AML_EXTENDED_OPCODE ) && ( ( ( UINT8 ) Opcode ) <= MAX_EXTENDED_OPCODE ) ) { return ( & AcpiGbl_AmlOpInfo [ AcpiGbl_LongOpIndex [ ( UINT8 ) Opcode ] ] ) ; } #if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT #include <contrib/dev/acpica/compiler/asldefine.h> switch ( Opcode ) { case AML_RAW_DATA_BYTE : OpcodeName = " " ; break ; case AML_RAW_DATA_WORD : OpcodeName = " " ; break ; case AML_RAW_DATA_DWORD : OpcodeName = " " ; break ; case AML_RAW_DATA_QWORD : OpcodeName = " " ; break ; case AML_RAW_DATA_BUFFER : OpcodeName = " " ; break ; case AML_RAW_DATA_CHAIN : OpcodeName = " " ; break ; case AML_PACKAGE_LENGTH : OpcodeName = " " ; break ; case AML_UNASSIGNED_OPCODE : OpcodeName = " " ; break ; case AML_DEFAULT_ARG_OP : OpcodeName = " " ; break ; default : break ; } #endif ACPI_DEBUG_PRINT ( ( ACPI_DB_EXEC , " \n " , OpcodeName , Opcode ) ) ; return ( & AcpiGbl_AmlOpInfo [ _UNK ] ) ; }
FUNCTION:    AcpiPsGetOpcodeInfo
 PARAMETERS:  Opcode              - The AML opcode
FUNCTION : AcpiPsGetOpcodeInfo PARAMETERS : Opcode - The AML opcode
/*
     * Detect normal 8-bit opcode or extended 16-bit opcode
     */ /* Simple (8-bit) opcode: 0-255, can't index beyond table  */ /* Valid extended (16-bit) opcode */ /* Unknown AML opcode */