Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenacdebug.h
Go to the documentation of this file.
00001 /****************************************************************************** 00002 * 00003 * Name: acdebug.h - ACPI/AML debugger 00004 * 00005 *****************************************************************************/ 00006 00007 /****************************************************************************** 00008 * 00009 * 1. Copyright Notice 00010 * 00011 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. 00012 * All rights reserved. 00013 * 00014 * 2. License 00015 * 00016 * 2.1. This is your license from Intel Corp. under its intellectual property 00017 * rights. You may have additional license terms from the party that provided 00018 * you this software, covering your right to use that party's intellectual 00019 * property rights. 00020 * 00021 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 00022 * copy of the source code appearing in this file ("Covered Code") an 00023 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 00024 * base code distributed originally by Intel ("Original Intel Code") to copy, 00025 * make derivatives, distribute, use and display any portion of the Covered 00026 * Code in any form, with the right to sublicense such rights; and 00027 * 00028 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 00029 * license (with the right to sublicense), under only those claims of Intel 00030 * patents that are infringed by the Original Intel Code, to make, use, sell, 00031 * offer to sell, and import the Covered Code and derivative works thereof 00032 * solely to the minimum extent necessary to exercise the above copyright 00033 * license, and in no event shall the patent license extend to any additions 00034 * to or modifications of the Original Intel Code. No other license or right 00035 * is granted directly or by implication, estoppel or otherwise; 00036 * 00037 * The above copyright and patent license is granted only if the following 00038 * conditions are met: 00039 * 00040 * 3. Conditions 00041 * 00042 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 00043 * Redistribution of source code of any substantial portion of the Covered 00044 * Code or modification with rights to further distribute source must include 00045 * the above Copyright Notice, the above License, this list of Conditions, 00046 * and the following Disclaimer and Export Compliance provision. In addition, 00047 * Licensee must cause all Covered Code to which Licensee contributes to 00048 * contain a file documenting the changes Licensee made to create that Covered 00049 * Code and the date of any change. Licensee must include in that file the 00050 * documentation of any changes made by any predecessor Licensee. Licensee 00051 * must include a prominent statement that the modification is derived, 00052 * directly or indirectly, from Original Intel Code. 00053 * 00054 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 00055 * Redistribution of source code of any substantial portion of the Covered 00056 * Code or modification without rights to further distribute source must 00057 * include the following Disclaimer and Export Compliance provision in the 00058 * documentation and/or other materials provided with distribution. In 00059 * addition, Licensee may not authorize further sublicense of source of any 00060 * portion of the Covered Code, and must include terms to the effect that the 00061 * license from Licensee to its licensee is limited to the intellectual 00062 * property embodied in the software Licensee provides to its licensee, and 00063 * not to intellectual property embodied in modifications its licensee may 00064 * make. 00065 * 00066 * 3.3. Redistribution of Executable. Redistribution in executable form of any 00067 * substantial portion of the Covered Code or modification must reproduce the 00068 * above Copyright Notice, and the following Disclaimer and Export Compliance 00069 * provision in the documentation and/or other materials provided with the 00070 * distribution. 00071 * 00072 * 3.4. Intel retains all right, title, and interest in and to the Original 00073 * Intel Code. 00074 * 00075 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 00076 * Intel shall be used in advertising or otherwise to promote the sale, use or 00077 * other dealings in products derived from or relating to the Covered Code 00078 * without prior written authorization from Intel. 00079 * 00080 * 4. Disclaimer and Export Compliance 00081 * 00082 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 00083 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 00084 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 00085 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 00086 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 00087 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 00088 * PARTICULAR PURPOSE. 00089 * 00090 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 00091 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 00092 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 00093 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 00094 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 00095 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 00096 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 00097 * LIMITED REMEDY. 00098 * 00099 * 4.3. Licensee shall not export, either directly or indirectly, any of this 00100 * software or system incorporating such software without first obtaining any 00101 * required license or other approval from the U. S. Department of Commerce or 00102 * any other agency or department of the United States Government. In the 00103 * event Licensee exports any such software from the United States or 00104 * re-exports any such software from a foreign destination, Licensee shall 00105 * ensure that the distribution and export/re-export of the software is in 00106 * compliance with all laws, regulations, orders, or other restrictions of the 00107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 00108 * any of its subsidiaries will export/re-export any technical data, process, 00109 * software, or service, directly or indirectly, to any country for which the 00110 * United States government or any agency thereof requires an export license, 00111 * other governmental approval, or letter of assurance, without first obtaining 00112 * such license, approval or letter. 00113 * 00114 *****************************************************************************/ 00115 00116 #ifndef __ACDEBUG_H__ 00117 #define __ACDEBUG_H__ 00118 00119 00120 #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ 00121 00122 typedef struct CommandInfo 00123 { 00124 char *Name; /* Command Name */ 00125 UINT8 MinArgs; /* Minimum arguments required */ 00126 00127 } COMMAND_INFO; 00128 00129 typedef struct ArgumentInfo 00130 { 00131 char *Name; /* Argument Name */ 00132 00133 } ARGUMENT_INFO; 00134 00135 typedef struct acpi_execute_walk 00136 { 00137 UINT32 Count; 00138 UINT32 MaxCount; 00139 00140 } ACPI_EXECUTE_WALK; 00141 00142 00143 #define PARAM_LIST(pl) pl 00144 #define DBTEST_OUTPUT_LEVEL(lvl) if (AcpiGbl_DbOpt_verbose) 00145 #define VERBOSE_PRINT(fp) DBTEST_OUTPUT_LEVEL(lvl) {\ 00146 AcpiOsPrintf PARAM_LIST(fp);} 00147 00148 #define EX_NO_SINGLE_STEP 1 00149 #define EX_SINGLE_STEP 2 00150 00151 00152 /* 00153 * dbxface - external debugger interfaces 00154 */ 00155 ACPI_STATUS 00156 AcpiDbInitialize ( 00157 void); 00158 00159 void 00160 AcpiDbTerminate ( 00161 void); 00162 00163 ACPI_STATUS 00164 AcpiDbSingleStep ( 00165 ACPI_WALK_STATE *WalkState, 00166 ACPI_PARSE_OBJECT *Op, 00167 UINT32 OpType); 00168 00169 00170 /* 00171 * dbcmds - debug commands and output routines 00172 */ 00173 ACPI_NAMESPACE_NODE * 00174 AcpiDbConvertToNode ( 00175 char *InString); 00176 00177 void 00178 AcpiDbDisplayTableInfo ( 00179 char *TableArg); 00180 00181 void 00182 AcpiDbUnloadAcpiTable ( 00183 char *TableArg, 00184 char *InstanceArg); 00185 00186 void 00187 AcpiDbSendNotify ( 00188 char *Name, 00189 UINT32 Value); 00190 00191 void 00192 AcpiDbDisplayInterfaces ( 00193 char *ActionArg, 00194 char *InterfaceNameArg); 00195 00196 ACPI_STATUS 00197 AcpiDbSleep ( 00198 char *ObjectArg); 00199 00200 void 00201 AcpiDbDisplayLocks ( 00202 void); 00203 00204 void 00205 AcpiDbDisplayResources ( 00206 char *ObjectArg); 00207 00208 void 00209 AcpiDbDisplayGpes ( 00210 void); 00211 00212 void 00213 AcpiDbDisplayHandlers ( 00214 void); 00215 00216 void 00217 AcpiDbGenerateGpe ( 00218 char *GpeArg, 00219 char *BlockArg); 00220 00221 00222 /* 00223 * dbmethod - control method commands 00224 */ 00225 void 00226 AcpiDbSetMethodBreakpoint ( 00227 char *Location, 00228 ACPI_WALK_STATE *WalkState, 00229 ACPI_PARSE_OBJECT *Op); 00230 00231 void 00232 AcpiDbSetMethodCallBreakpoint ( 00233 ACPI_PARSE_OBJECT *Op); 00234 00235 void 00236 AcpiDbSetMethodData ( 00237 char *TypeArg, 00238 char *IndexArg, 00239 char *ValueArg); 00240 00241 ACPI_STATUS 00242 AcpiDbDisassembleMethod ( 00243 char *Name); 00244 00245 void 00246 AcpiDbDisassembleAml ( 00247 char *Statements, 00248 ACPI_PARSE_OBJECT *Op); 00249 00250 void 00251 AcpiDbBatchExecute ( 00252 char *CountArg); 00253 00254 00255 /* 00256 * dbnames - namespace commands 00257 */ 00258 void 00259 AcpiDbSetScope ( 00260 char *Name); 00261 00262 void 00263 AcpiDbDumpNamespace ( 00264 char *StartArg, 00265 char *DepthArg); 00266 00267 void 00268 AcpiDbDumpNamespaceByOwner ( 00269 char *OwnerArg, 00270 char *DepthArg); 00271 00272 ACPI_STATUS 00273 AcpiDbFindNameInNamespace ( 00274 char *NameArg); 00275 00276 void 00277 AcpiDbCheckPredefinedNames ( 00278 void); 00279 00280 ACPI_STATUS 00281 AcpiDbDisplayObjects ( 00282 char *ObjTypeArg, 00283 char *DisplayCountArg); 00284 00285 void 00286 AcpiDbCheckIntegrity ( 00287 void); 00288 00289 void 00290 AcpiDbFindReferences ( 00291 char *ObjectArg); 00292 00293 void 00294 AcpiDbGetBusInfo ( 00295 void); 00296 00297 00298 /* 00299 * dbdisply - debug display commands 00300 */ 00301 void 00302 AcpiDbDisplayMethodInfo ( 00303 ACPI_PARSE_OBJECT *Op); 00304 00305 void 00306 AcpiDbDecodeAndDisplayObject ( 00307 char *Target, 00308 char *OutputType); 00309 00310 void 00311 AcpiDbDisplayResultObject ( 00312 ACPI_OPERAND_OBJECT *ObjDesc, 00313 ACPI_WALK_STATE *WalkState); 00314 00315 ACPI_STATUS 00316 AcpiDbDisplayAllMethods ( 00317 char *DisplayCountArg); 00318 00319 void 00320 AcpiDbDisplayArguments ( 00321 void); 00322 00323 void 00324 AcpiDbDisplayLocals ( 00325 void); 00326 00327 void 00328 AcpiDbDisplayResults ( 00329 void); 00330 00331 void 00332 AcpiDbDisplayCallingTree ( 00333 void); 00334 00335 void 00336 AcpiDbDisplayObjectType ( 00337 char *ObjectArg); 00338 00339 void 00340 AcpiDbDisplayArgumentObject ( 00341 ACPI_OPERAND_OBJECT *ObjDesc, 00342 ACPI_WALK_STATE *WalkState); 00343 00344 00345 /* 00346 * dbexec - debugger control method execution 00347 */ 00348 void 00349 AcpiDbExecute ( 00350 char *Name, 00351 char **Args, 00352 ACPI_OBJECT_TYPE *Types, 00353 UINT32 Flags); 00354 00355 void 00356 AcpiDbCreateExecutionThreads ( 00357 char *NumThreadsArg, 00358 char *NumLoopsArg, 00359 char *MethodNameArg); 00360 00361 #ifdef ACPI_DBG_TRACK_ALLOCATIONS 00362 UINT32 00363 AcpiDbGetCacheInfo ( 00364 ACPI_MEMORY_LIST *Cache); 00365 #endif 00366 00367 00368 /* 00369 * dbfileio - Debugger file I/O commands 00370 */ 00371 ACPI_OBJECT_TYPE 00372 AcpiDbMatchArgument ( 00373 char *UserArgument, 00374 ARGUMENT_INFO *Arguments); 00375 00376 void 00377 AcpiDbCloseDebugFile ( 00378 void); 00379 00380 void 00381 AcpiDbOpenDebugFile ( 00382 char *Name); 00383 00384 ACPI_STATUS 00385 AcpiDbLoadAcpiTable ( 00386 char *Filename); 00387 00388 ACPI_STATUS 00389 AcpiDbGetTableFromFile ( 00390 char *Filename, 00391 ACPI_TABLE_HEADER **Table); 00392 00393 ACPI_STATUS 00394 AcpiDbReadTableFromFile ( 00395 char *Filename, 00396 ACPI_TABLE_HEADER **Table); 00397 00398 00399 /* 00400 * dbhistry - debugger HISTORY command 00401 */ 00402 void 00403 AcpiDbAddToHistory ( 00404 char *CommandLine); 00405 00406 void 00407 AcpiDbDisplayHistory ( 00408 void); 00409 00410 char * 00411 AcpiDbGetFromHistory ( 00412 char *CommandNumArg); 00413 00414 00415 /* 00416 * dbinput - user front-end to the AML debugger 00417 */ 00418 ACPI_STATUS 00419 AcpiDbCommandDispatch ( 00420 char *InputBuffer, 00421 ACPI_WALK_STATE *WalkState, 00422 ACPI_PARSE_OBJECT *Op); 00423 00424 void ACPI_SYSTEM_XFACE 00425 AcpiDbExecuteThread ( 00426 void *Context); 00427 00428 ACPI_STATUS 00429 AcpiDbUserCommands ( 00430 char Prompt, 00431 ACPI_PARSE_OBJECT *Op); 00432 00433 char * 00434 AcpiDbGetNextToken ( 00435 char *String, 00436 char **Next, 00437 ACPI_OBJECT_TYPE *ReturnType); 00438 00439 00440 /* 00441 * dbstats - Generation and display of ACPI table statistics 00442 */ 00443 void 00444 AcpiDbGenerateStatistics ( 00445 ACPI_PARSE_OBJECT *Root, 00446 BOOLEAN IsMethod); 00447 00448 ACPI_STATUS 00449 AcpiDbDisplayStatistics ( 00450 char *TypeArg); 00451 00452 00453 /* 00454 * dbutils - AML debugger utilities 00455 */ 00456 void 00457 AcpiDbSetOutputDestination ( 00458 UINT32 Where); 00459 00460 void 00461 AcpiDbDumpExternalObject ( 00462 ACPI_OBJECT *ObjDesc, 00463 UINT32 Level); 00464 00465 void 00466 AcpiDbPrepNamestring ( 00467 char *Name); 00468 00469 ACPI_NAMESPACE_NODE * 00470 AcpiDbLocalNsLookup ( 00471 char *Name); 00472 00473 void 00474 AcpiDbUInt32ToHexString ( 00475 UINT32 Value, 00476 char *Buffer); 00477 00478 #endif /* __ACDEBUG_H__ */ Generated on Sat May 26 2012 04:25:51 for ReactOS by
1.7.6.1
|