ReactOS 0.4.15-dev-7924-g5949c20
psopinfo.c File Reference
#include "acpi.h"
#include "accommon.h"
#include "acparser.h"
#include "acopcode.h"
#include "amlcode.h"
Include dependency graph for psopinfo.c:

Go to the source code of this file.

Macros

#define _COMPONENT   ACPI_PARSER
 

Functions

const ACPI_OPCODE_INFOAcpiPsGetOpcodeInfo (UINT16 Opcode)
 
const charAcpiPsGetOpcodeName (UINT16 Opcode)
 
UINT8 AcpiPsGetArgumentCount (UINT32 OpType)
 

Variables

static const UINT8 AcpiGbl_ArgumentCount [] = {0,1,1,1,1,2,2,2,2,3,3,6}
 
const UINT8 AcpiGbl_ShortOpIndex [256]
 
const UINT8 AcpiGbl_LongOpIndex [NUM_EXTENDED_OPCODE]
 

Macro Definition Documentation

◆ _COMPONENT

#define _COMPONENT   ACPI_PARSER

Definition at line 51 of file psopinfo.c.

Function Documentation

◆ AcpiPsGetArgumentCount()

UINT8 AcpiPsGetArgumentCount ( UINT32  OpType)

Definition at line 203 of file psopinfo.c.

205{
206
208 {
210 }
211
212 return (0);
213}
#define AML_TYPE_EXEC_6A_0T_1R
Definition: amlcode.h:364
static const UINT8 AcpiGbl_ArgumentCount[]
Definition: psopinfo.c:55
OpType
Definition: simd.h:223

Referenced by AcpiPsCreateOp().

◆ AcpiPsGetOpcodeInfo()

const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo ( UINT16  Opcode)

Definition at line 72 of file psopinfo.c.

74{
75#ifdef ACPI_DEBUG_OUTPUT
76 const char *OpcodeName = "Unknown AML opcode";
77#endif
78
79 ACPI_FUNCTION_NAME (PsGetOpcodeInfo);
80
81
82 /*
83 * Detect normal 8-bit opcode or extended 16-bit opcode
84 */
85 if (!(Opcode & 0xFF00))
86 {
87 /* Simple (8-bit) opcode: 0-255, can't index beyond table */
88
90 }
91
92 if (((Opcode & 0xFF00) == AML_EXTENDED_OPCODE) &&
94 {
95 /* Valid extended (16-bit) opcode */
96
98 }
99
100#if defined ACPI_ASL_COMPILER && defined ACPI_DEBUG_OUTPUT
101#include "asldefine.h"
102
103 switch (Opcode)
104 {
105 case AML_RAW_DATA_BYTE:
106 OpcodeName = "-Raw Data Byte-";
107 break;
108
109 case AML_RAW_DATA_WORD:
110 OpcodeName = "-Raw Data Word-";
111 break;
112
113 case AML_RAW_DATA_DWORD:
114 OpcodeName = "-Raw Data Dword-";
115 break;
116
117 case AML_RAW_DATA_QWORD:
118 OpcodeName = "-Raw Data Qword-";
119 break;
120
121 case AML_RAW_DATA_BUFFER:
122 OpcodeName = "-Raw Data Buffer-";
123 break;
124
125 case AML_RAW_DATA_CHAIN:
126 OpcodeName = "-Raw Data Buffer Chain-";
127 break;
128
129 case AML_PACKAGE_LENGTH:
130 OpcodeName = "-Package Length-";
131 break;
132
133 case AML_UNASSIGNED_OPCODE:
134 OpcodeName = "-Unassigned Opcode-";
135 break;
136
137 case AML_DEFAULT_ARG_OP:
138 OpcodeName = "-Default Arg-";
139 break;
140
141 default:
142 break;
143 }
144#endif
145
146 /* Unknown AML opcode */
147
149 "%s [%4.4X]\n", OpcodeName, Opcode));
150
151 return (&AcpiGbl_AmlOpInfo [_UNK]);
152}
unsigned char UINT8
const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES]
Definition: psopcode.c:188
#define MAX_EXTENDED_OPCODE
Definition: acopcode.h:47
#define _UNK
Definition: acopcode.h:54
#define ACPI_DEBUG_PRINT(pl)
Definition: acoutput.h:475
#define ACPI_DB_EXEC
Definition: acoutput.h:165
#define ACPI_FUNCTION_NAME(a)
Definition: acoutput.h:479
#define AML_EXTENDED_OPCODE
Definition: amlcode.h:156
_In_ PVOID _In_ ULONG Opcode
Definition: hubbusif.h:331
const UINT8 AcpiGbl_ShortOpIndex[256]
Definition: psopinfo.c:220
const UINT8 AcpiGbl_LongOpIndex[NUM_EXTENDED_OPCODE]
Definition: psopinfo.c:262

Referenced by AcpiDsBuildInternalObject(), AcpiDsCreateOperand(), AcpiDsExecBeginOp(), AcpiDsInitObjectFromOp(), AcpiDsIsResultUsed(), AcpiDsLoad1EndOp(), AcpiExResolveOperands(), AcpiPsAllocOp(), AcpiPsAppendArg(), AcpiPsCompleteFinalOp(), AcpiPsCompleteOp(), AcpiPsCompleteThisOp(), AcpiPsCreateOp(), AcpiPsGetAmlOpcode(), AcpiPsGetArg(), AcpiPsGetOpcodeName(), AcpiPsInitOp(), and AcpiPsParseLoop().

◆ AcpiPsGetOpcodeName()

const char * AcpiPsGetOpcodeName ( UINT16  Opcode)

Definition at line 169 of file psopinfo.c.

171{
172#if defined(ACPI_DISASSEMBLER) || defined (ACPI_DEBUG_OUTPUT)
173
174 const ACPI_OPCODE_INFO *Op;
175
176
178
179 /* Always guaranteed to return a valid pointer */
180
181 return (Op->Name);
182
183#else
184 return ("OpcodeName unavailable");
185
186#endif
187}
const ACPI_OPCODE_INFO * AcpiPsGetOpcodeInfo(UINT16 Opcode)
Definition: psopinfo.c:72

Referenced by AcpiDsEvalBankFieldOperands(), AcpiDsEvalBufferFieldOperands(), AcpiDsExecEndOp(), AcpiDsInitBufferField(), AcpiDsIsResultUsed(), AcpiDsLoad2EndOp(), AcpiExOpcode_0A_0T_1R(), AcpiExOpcode_1A_0T_0R(), AcpiExOpcode_1A_0T_1R(), AcpiExOpcode_1A_1T_1R(), AcpiExOpcode_2A_0T_0R(), AcpiExOpcode_2A_0T_1R(), AcpiExOpcode_2A_1T_1R(), AcpiExOpcode_2A_2T_1R(), AcpiExOpcode_3A_0T_0R(), AcpiExOpcode_3A_1T_1R(), AcpiExOpcode_6A_0T_1R(), AcpiExResolveOperands(), AcpiPsDeleteParseTree(), and AcpiPsParseLoop().

Variable Documentation

◆ AcpiGbl_ArgumentCount

const UINT8 AcpiGbl_ArgumentCount[] = {0,1,1,1,1,2,2,2,2,3,3,6}
static

Definition at line 55 of file psopinfo.c.

Referenced by AcpiPsGetArgumentCount().

◆ AcpiGbl_LongOpIndex

const UINT8 AcpiGbl_LongOpIndex[NUM_EXTENDED_OPCODE]
Initial value:
=
{
_UNK, 0x46, 0x47, _UNK, _UNK, _UNK, _UNK, _UNK,
_UNK, _UNK, 0x48, 0x49, _UNK, _UNK, _UNK, _UNK,
_UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, 0x7B,
0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f, 0x50, 0x51,
0x52, 0x53, 0x54, _UNK, _UNK, _UNK, _UNK, _UNK,
0x55, 0x56, 0x57, 0x7e, _UNK, _UNK, _UNK, _UNK,
0x58, 0x59, 0x5a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f,
0x7C,
}

Definition at line 262 of file psopinfo.c.

Referenced by AcpiPsGetOpcodeInfo().

◆ AcpiGbl_ShortOpIndex

const UINT8 AcpiGbl_ShortOpIndex[256]

Definition at line 220 of file psopinfo.c.

Referenced by AcpiPsGetOpcodeInfo().