ReactOS 0.4.15-dev-8127-g6338913
acdebug.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Name: acdebug.h - ACPI/AML debugger
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2022, Intel Corp.
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACDEBUG_H__
45#define __ACDEBUG_H__
46
47/* The debugger is used in conjunction with the disassembler most of time */
48
49#ifdef ACPI_DISASSEMBLER
50#include "acdisasm.h"
51#endif
52
53
54#define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */
55#define ACPI_DEBUG_LENGTH_FORMAT " (%.4X bits, %.3X bytes)"
56
58{
59 const char *Name; /* Command Name */
60 UINT8 MinArgs; /* Minimum arguments required */
61
63
65{
66 UINT8 LineCount; /* Number of help lines */
67 char *Invocation; /* Command Invocation */
68 char *Description; /* Command Description */
69
71
73{
74 const char *Name; /* Argument Name */
75
77
79{
83
85
86
87#define PARAM_LIST(pl) pl
88
89#define EX_NO_SINGLE_STEP 1
90#define EX_SINGLE_STEP 2
91#define EX_ALL 4
92
93
94/*
95 * dbxface - external debugger interfaces
96 */
99AcpiDbSingleStep (
100 ACPI_WALK_STATE *WalkState,
102 UINT32 OpType))
103
105void
106AcpiDbSignalBreakPoint (
107 ACPI_WALK_STATE *WalkState))
108
109
110/*
111 * dbcmds - debug commands and output routines
112 */
114AcpiDbConvertToNode (
115 char *InString);
116
117void
119 char *TableArg);
120
121void
123 char *BufferArg);
124
125void
127 char *Name);
128
129void
131 char *Name,
132 UINT32 Value);
133
134void
136 char *ActionArg,
137 char *InterfaceNameArg);
138
141 char *ObjectArg);
142
143void
145 char *EnableArg,
146 char *MethodArg,
147 char *OnceArg);
148
149void
151 void);
152
153void
155 char *ObjectArg);
156
158void
159AcpiDbDisplayGpes (
160 void))
161
162void
163AcpiDbDisplayHandlers (
164 void);
165
167void
168AcpiDbGenerateGpe (
169 char *GpeArg,
170 char *BlockArg))
171
173void
174AcpiDbGenerateSci (
175 void))
176
177void
178AcpiDbExecuteTest (
179 char *TypeArg);
180
181
182/*
183 * dbconvert - miscellaneous conversion routines
184 */
187 int HexChar,
189
192 char *String,
194
198 char *String,
200
201UINT8 *
203 ACPI_PLD_INFO *PldInfo);
204
205void
207 ACPI_OBJECT *ObjDesc);
208
209
210/*
211 * dbmethod - control method commands
212 */
213void
215 char *Location,
216 ACPI_WALK_STATE *WalkState,
218
219void
222
223void
225 char *TypeArg,
226 char *IndexArg,
227 char *ValueArg);
228
231 char *Name);
232
233void
235 char *Statements,
237
238void
240 void);
241
242void
244 char *NameSeg);
245
246
247/*
248 * dbnames - namespace commands
249 */
250void
252 char *Name);
253
254void
256 char *StartArg,
257 char *DepthArg);
258
259void
261 void);
262
263void
265 char *OwnerArg,
266 char *DepthArg);
267
270 char *NameArg);
271
272void
274 void);
275
278 char *ObjTypeArg,
279 char *DisplayCountArg);
280
281void
283 void);
284
285void
287 char *ObjectArg);
288
289void
291 void);
292
295 UINT32 AddressSpaceId);
296
297
298/*
299 * dbdisply - debug display commands
300 */
301void
304
305void
307 char *Target,
308 char *OutputType);
309
311void
312AcpiDbDisplayResultObject (
313 ACPI_OPERAND_OBJECT *ObjDesc,
314 ACPI_WALK_STATE *WalkState))
315
317AcpiDbDisplayAllMethods (
318 char *DisplayCountArg);
319
320void
322 void);
323
324void
326 void);
327
328void
330 void);
331
332void
334 void);
335
336void
338 char *ObjectArg);
339
341void
342AcpiDbDisplayArgumentObject (
343 ACPI_OPERAND_OBJECT *ObjDesc,
344 ACPI_WALK_STATE *WalkState))
345
346
347/*
348 * dbexec - debugger control method execution
349 */
350void
351AcpiDbExecute (
352 char *Name,
353 char **Args,
356
357void
359 char *MethodNameArg,
360 char **Arguments,
362
363void
365 char *NumThreadsArg,
366 char *NumLoopsArg,
367 char *MethodNameArg);
368
369void
372 ACPI_OBJECT *Objects);
373
374#ifdef ACPI_DBG_TRACK_ALLOCATIONS
375UINT32
376AcpiDbGetCacheInfo (
378#endif
379
380
381/*
382 * dbfileio - Debugger file I/O commands
383 */
386 char *UserArgument,
387 ACPI_DB_ARGUMENT_INFO *Arguments);
388
389void
391 void);
392
393void
395 char *Name);
396
399 char *Filename);
400
403 ACPI_NEW_TABLE_DESC *ListHead);
404
405
406/*
407 * dbhistry - debugger HISTORY command
408 */
409void
411 char *CommandLine);
412
413void
415 void);
416
417char *
419 char *CommandNumArg);
420
421char *
423 UINT32 CommanddNum);
424
425
426/*
427 * dbinput - user front-end to the AML debugger
428 */
431 char *InputBuffer,
432 ACPI_WALK_STATE *WalkState,
434
437 void *Context);
438
441 void);
442
443char *
445 char *String,
446 char **Next,
447 ACPI_OBJECT_TYPE *ReturnType);
448
449
450/*
451 * dbobject
452 */
453void
455 ACPI_OPERAND_OBJECT *ObjDesc);
456
457void
459 ACPI_OPERAND_OBJECT *ObjDesc,
460 ACPI_WALK_STATE *WalkState);
461
462void
464 ACPI_WALK_STATE *WalkState);
465
466void
468 ACPI_WALK_STATE *WalkState);
469
470void
473 ACPI_WALK_STATE *WalkState);
474
475
476/*
477 * dbstats - Generation and display of ACPI table statistics
478 */
479void
482 BOOLEAN IsMethod);
483
486 char *TypeArg);
487
488
489/*
490 * dbutils - AML debugger utilities
491 */
492void
494 UINT32 Where);
495
496void
498 ACPI_OBJECT *ObjDesc,
499 UINT32 Level);
500
501void
503 char *Name);
504
507 char *Name);
508
509void
512 char *Buffer);
513
514#endif /* __ACDEBUG_H__ */
unsigned char BOOLEAN
unsigned char UINT8
unsigned int UINT32
Type
Definition: Type.h:7
void AcpiDbDisplayMethodInfo(ACPI_PARSE_OBJECT *Op)
void AcpiDbCloseDebugFile(void)
void AcpiDbTrace(char *EnableArg, char *MethodArg, char *OnceArg)
void AcpiDbFindReferences(char *ObjectArg)
void AcpiDbUint32ToHexString(UINT32 Value, char *Buffer)
void AcpiDbCreateExecutionThread(char *MethodNameArg, char **Arguments, ACPI_OBJECT_TYPE *Types)
void AcpiDbDumpNamespace(char *StartArg, char *DepthArg)
ACPI_STATUS AcpiDbCommandDispatch(char *InputBuffer, ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op)
void AcpiDbSetMethodData(char *TypeArg, char *IndexArg, char *ValueArg)
struct acpi_db_argument_info ACPI_DB_ARGUMENT_INFO
void AcpiDbCheckPredefinedNames(void)
char * AcpiDbGetNextToken(char *String, char **Next, ACPI_OBJECT_TYPE *ReturnType)
ACPI_STATUS AcpiDbConvertToObject(ACPI_OBJECT_TYPE Type, char *String, ACPI_OBJECT *Object)
void AcpiDbPrepNamestring(char *Name)
ACPI_STATUS AcpiDbDisplayFields(UINT32 AddressSpaceId)
void AcpiDbDisplayObjectType(char *ObjectArg)
char ACPI_OBJECT_TYPE * Types
Definition: acdebug.h:354
void ACPI_SYSTEM_XFACE AcpiDbExecuteThread(void *Context)
struct acpi_db_command_help ACPI_DB_COMMAND_HELP
char * AcpiDbGetHistoryByIndex(UINT32 CommanddNum)
void AcpiDbDisplayCallingTree(void)
ACPI_STATUS AcpiDbDisplayObjects(char *ObjTypeArg, char *DisplayCountArg)
void AcpiDbDumpPldBuffer(ACPI_OBJECT *ObjDesc)
void AcpiDbDisplayArguments(void)
ACPI_STATUS AcpiDbSleep(char *ObjectArg)
void AcpiDbDisplayHistory(void)
ACPI_STATUS AcpiDbUserCommands(void)
void AcpiDbDisplayTemplate(char *BufferArg)
void AcpiDbEvaluatePredefinedNames(void)
void AcpiDbGenerateStatistics(ACPI_PARSE_OBJECT *Root, BOOLEAN IsMethod)
void AcpiDbCreateExecutionThreads(char *NumThreadsArg, char *NumLoopsArg, char *MethodNameArg)
void AcpiDbGetBusInfo(void)
ACPI_OBJECT_TYPE AcpiDbMatchArgument(char *UserArgument, ACPI_DB_ARGUMENT_INFO *Arguments)
void AcpiDbCheckIntegrity(void)
ACPI_STATUS AcpiDbHexCharToValue(int HexChar, UINT8 *ReturnValue)
ACPI_STATUS AcpiDbDisassembleMethod(char *Name)
void AcpiDbDisplayLocks(void)
struct acpi_db_execute_walk ACPI_DB_EXECUTE_WALK
void AcpiDbDeleteObjects(UINT32 Count, ACPI_OBJECT *Objects)
void AcpiDbSendNotify(char *Name, UINT32 Value)
void AcpiDbDumpMethodInfo(ACPI_STATUS Status, ACPI_WALK_STATE *WalkState)
void AcpiDbDecodeInternalObject(ACPI_OPERAND_OBJECT *ObjDesc)
void AcpiDbDisplayInterfaces(char *ActionArg, char *InterfaceNameArg)
void AcpiDbAddToHistory(char *CommandLine)
ACPI_STATUS AcpiDbFindNameInNamespace(char *NameArg)
void AcpiDbDisplayLocals(void)
UINT8 * AcpiDbEncodePldBuffer(ACPI_PLD_INFO *PldInfo)
ACPI_STATUS AcpiDbLoadTables(ACPI_NEW_TABLE_DESC *ListHead)
void AcpiDbDisplayResults(void)
void AcpiDbEvaluateAll(char *NameSeg)
void AcpiDbUnloadAcpiTable(char *Name)
void AcpiDbDumpNamespacePaths(void)
void AcpiDbDisassembleAml(char *Statements, ACPI_PARSE_OBJECT *Op)
void AcpiDbDisplayResources(char *ObjectArg)
void AcpiDbDisplayTableInfo(char *TableArg)
void AcpiDbOpenDebugFile(char *Name)
void AcpiDbSetMethodBreakpoint(char *Location, ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op)
void AcpiDbSetMethodCallBreakpoint(ACPI_PARSE_OBJECT *Op)
void AcpiDbDisplayInternalObject(ACPI_OPERAND_OBJECT *ObjDesc, ACPI_WALK_STATE *WalkState)
void AcpiDbSetScope(char *Name)
ACPI_STATUS AcpiDbDisplayStatistics(char *TypeArg)
ACPI_STATUS AcpiDbConvertToPackage(char *String, ACPI_OBJECT *Object)
void AcpiDbSetOutputDestination(UINT32 Where)
void AcpiDbDecodeLocals(ACPI_WALK_STATE *WalkState)
void AcpiDbDecodeArguments(ACPI_WALK_STATE *WalkState)
ACPI_STATUS AcpiDbLoadAcpiTable(char *Filename)
ACPI_NAMESPACE_NODE * AcpiDbLocalNsLookup(char *Name)
char * AcpiDbGetFromHistory(char *CommandNumArg)
struct acpi_db_command_info ACPI_DB_COMMAND_INFO
void AcpiDbDumpNamespaceByOwner(char *OwnerArg, char *DepthArg)
void AcpiDbDumpExternalObject(ACPI_OBJECT *ObjDesc, UINT32 Level)
void AcpiDbDecodeAndDisplayObject(char *Target, char *OutputType)
char ** Args
Definition: acdebug.h:353
#define ACPI_SYSTEM_XFACE
Definition: acenv.h:326
UINT32 void void ** ReturnValue
Definition: acevents.h:216
#define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype)
Definition: acpixf.h:432
#define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype)
Definition: acpixf.h:344
#define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype)
Definition: acpixf.h:435
UINT32 ACPI_OBJECT_TYPE
Definition: actypes.h:685
UINT32 ACPI_STATUS
Definition: actypes.h:460
#define ACPI_NAMESEG_SIZE
Definition: actypes.h:415
Definition: bufpool.h:45
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:939
Status
Definition: gdiplustypes.h:25
int Count
Definition: noreturn.cpp:7
OpType
Definition: simd.h:223
Definition: fatfs.h:173
root entry for file system trees
Definition: entries.h:148
const char * Name
Definition: acdebug.h:74
char * Description
Definition: acdebug.h:68
const char * Name
Definition: acdebug.h:59
char NameSeg[ACPI_NAMESEG_SIZE+1]
Definition: acdebug.h:82
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_Must_inspect_result_ _In_ WDFDEVICE _In_ WDFSTRING String
Definition: wdfdevice.h:2433
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR InputBuffer
Definition: wdfiotarget.h:953
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:413
_In_ WDFIOTARGET Target
Definition: wdfrequest.h:306
_IRQL_requires_same_ typedef _In_ ULONG _In_ UCHAR Level
Definition: wmitypes.h:56
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170