mirror of
https://github.com/acpica/acpica/
synced 2025-01-17 23:09:18 +03:00
Remove non-ANSI (//) Comments
date 2000.06.19.21.46.00; author rmoore1; state Exp;
This commit is contained in:
parent
4159cac894
commit
dcfd66da61
@ -1,5 +1,5 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: dbinput - user front-end to the AML debugger
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -37,9 +37,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -47,11 +47,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -85,7 +85,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -115,17 +115,17 @@
|
||||
|
||||
|
||||
|
||||
#include <acpi.h>
|
||||
#include <acapi.h>
|
||||
#include <amlcode.h>
|
||||
#include <parser.h>
|
||||
#include <tables.h>
|
||||
#include <namesp.h>
|
||||
#include <interp.h>
|
||||
#include <debugger.h>
|
||||
#include "acpi.h"
|
||||
#include "acxface.h"
|
||||
#include "amlcode.h"
|
||||
#include "parser.h"
|
||||
#include "tables.h"
|
||||
#include "namesp.h"
|
||||
#include "interp.h"
|
||||
#include "debugger.h"
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
|
||||
#define _COMPONENT DEBUGGER
|
||||
MODULE_NAME ("dbinput");
|
||||
@ -145,10 +145,10 @@ char *Filename = NULL;
|
||||
BOOLEAN OutputToFile = FALSE;
|
||||
|
||||
|
||||
UINT32 Gbl_DbDebugLevel = 0x0FFFFFFF;
|
||||
UINT32 Gbl_DbConsoleDebugLevel = DEBUG_DEFAULT;
|
||||
UINT8 Gbl_DbOutputFlags = DB_CONSOLE_OUTPUT;
|
||||
UINT32 Gbl_MethodBreakpoint = 0;
|
||||
UINT32 AcpiGbl_DbDebugLevel = 0x0FFFFFFF;
|
||||
UINT32 AcpiGbl_DbConsoleDebugLevel = DEBUG_DEFAULT;
|
||||
UINT8 AcpiGbl_DbOutputFlags = DB_CONSOLE_OUTPUT;
|
||||
UINT32 AcpiGbl_MethodBreakpoint = 0;
|
||||
|
||||
|
||||
BOOLEAN opt_tables = FALSE;
|
||||
@ -156,12 +156,12 @@ BOOLEAN opt_disasm = FALSE;
|
||||
BOOLEAN opt_stats = FALSE;
|
||||
BOOLEAN opt_parse_jit = FALSE;
|
||||
BOOLEAN opt_verbose = TRUE;
|
||||
|
||||
|
||||
|
||||
|
||||
/* This list of commands must match the string table below it */
|
||||
|
||||
enum AmlDebuggerCommands
|
||||
enum AcpiAmlDebuggerCommands
|
||||
{
|
||||
CMD_NOT_FOUND = 0,
|
||||
CMD_NULL,
|
||||
@ -206,13 +206,13 @@ enum AmlDebuggerCommands
|
||||
CMD_TERMINATE,
|
||||
CMD_THREADS,
|
||||
CMD_TREE,
|
||||
CMD_UNLOAD
|
||||
CMD_UNLOAD
|
||||
};
|
||||
|
||||
#define CMD_FIRST_VALID 2
|
||||
|
||||
|
||||
COMMAND_INFO Commands[] =
|
||||
COMMAND_INFO Commands[] =
|
||||
{
|
||||
{"<NOT FOUND>", 0},
|
||||
{"<NULL>", 0},
|
||||
@ -265,8 +265,8 @@ COMMAND_INFO Commands[] =
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbDisplayHelp
|
||||
*
|
||||
* FUNCTION: AcpiDbDisplayHelp
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -277,7 +277,7 @@ COMMAND_INFO Commands[] =
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbDisplayHelp (
|
||||
AcpiDbDisplayHelp (
|
||||
char *HelpType)
|
||||
{
|
||||
|
||||
@ -286,19 +286,19 @@ DbDisplayHelp (
|
||||
|
||||
if (!HelpType)
|
||||
{
|
||||
OsdPrintf ("ACPI CA Debugger Commands\n\n");
|
||||
OsdPrintf ("The following classes of commands are available. Help is available for\n");
|
||||
OsdPrintf ("each class by entering \"Help <ClassName>\"\n\n");
|
||||
OsdPrintf (" [GENERAL] General-Purpose Commands\n");
|
||||
OsdPrintf (" [NAMESPACE] Namespace Access Commands\n");
|
||||
OsdPrintf (" [METHOD] Control Method Execution Commands\n");
|
||||
OsdPrintf (" [FILE] File I/O Commands\n");
|
||||
AcpiOsdPrintf ("ACPI CA Debugger Commands\n\n");
|
||||
AcpiOsdPrintf ("The following classes of commands are available. Help is available for\n");
|
||||
AcpiOsdPrintf ("each class by entering \"Help <ClassName>\"\n\n");
|
||||
AcpiOsdPrintf (" [GENERAL] General-Purpose Commands\n");
|
||||
AcpiOsdPrintf (" [NAMESPACE] Namespace Access Commands\n");
|
||||
AcpiOsdPrintf (" [METHOD] Control Method Execution Commands\n");
|
||||
AcpiOsdPrintf (" [FILE] File I/O Commands\n");
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Parameter is the command class
|
||||
*
|
||||
* The idea here is to keep each class of commands smaller than a screenful
|
||||
@ -307,73 +307,73 @@ DbDisplayHelp (
|
||||
switch (HelpType[0])
|
||||
{
|
||||
case 'G':
|
||||
OsdPrintf ("\nGeneral-Purpose Commands\n\n");
|
||||
OsdPrintf ("Allocations Display list of current memory allocations\n");
|
||||
OsdPrintf ("Dump <Address>|<Namepath>\n");
|
||||
OsdPrintf (" [Byte|Word|Dword|Qword] Display ACPI objects or memory\n");
|
||||
OsdPrintf ("EnableAcpi Enable ACPI (hardware) mode\n");
|
||||
OsdPrintf ("Help This help screen\n");
|
||||
OsdPrintf ("History Display command history buffer\n");
|
||||
OsdPrintf ("Level [<DebugLevel>] [console] Get/Set debug level for file or console\n");
|
||||
OsdPrintf ("Quit or Exit Exit this command\n");
|
||||
OsdPrintf ("Stats [Allocations|Memory|Misc\n");
|
||||
OsdPrintf (" |Objects|Tables] Display namespace and memory statistics\n");
|
||||
OsdPrintf ("Tables Display info about loaded ACPI tables\n");
|
||||
OsdPrintf ("Unload Unload an ACPI table\n");
|
||||
OsdPrintf ("! <CommandNumber> Execute command from history buffer\n");
|
||||
OsdPrintf ("!! Execute last command again\n");
|
||||
AcpiOsdPrintf ("\nGeneral-Purpose Commands\n\n");
|
||||
AcpiOsdPrintf ("Allocations Display list of current memory allocations\n");
|
||||
AcpiOsdPrintf ("Dump <Address>|<Namepath>\n");
|
||||
AcpiOsdPrintf (" [Byte|Word|Dword|Qword] Display ACPI objects or memory\n");
|
||||
AcpiOsdPrintf ("EnableAcpi Enable ACPI (hardware) mode\n");
|
||||
AcpiOsdPrintf ("Help This help screen\n");
|
||||
AcpiOsdPrintf ("History Display command history buffer\n");
|
||||
AcpiOsdPrintf ("Level [<DebugLevel>] [console] Get/Set debug level for file or console\n");
|
||||
AcpiOsdPrintf ("Quit or Exit Exit this command\n");
|
||||
AcpiOsdPrintf ("Stats [Allocations|Memory|Misc\n");
|
||||
AcpiOsdPrintf (" |Objects|Tables] Display namespace and memory statistics\n");
|
||||
AcpiOsdPrintf ("Tables Display info about loaded ACPI tables\n");
|
||||
AcpiOsdPrintf ("Unload Unload an ACPI table\n");
|
||||
AcpiOsdPrintf ("! <CommandNumber> Execute command from history buffer\n");
|
||||
AcpiOsdPrintf ("!! Execute last command again\n");
|
||||
return;
|
||||
|
||||
case 'N':
|
||||
OsdPrintf ("\nNamespace Access Commands\n\n");
|
||||
OsdPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
|
||||
OsdPrintf ("Event <F|G> <Value> Generate Event (Fixed/GPE)\n");
|
||||
OsdPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
|
||||
OsdPrintf ("Find <Name> (? is wildcard) Find ACPI name(s) with wildcards\n");
|
||||
OsdPrintf ("Method Display list of loaded control methods\n");
|
||||
OsdPrintf ("Namespace [<Addr>|<Path>] [Depth] Display loaded namespace tree/subtree\n");
|
||||
OsdPrintf ("Notify <NamePath> <Value> Send a notification\n");
|
||||
OsdPrintf ("Objects <ObjectType> Display all objects of the given type\n");
|
||||
OsdPrintf ("Owner <OwnerId> [Depth] Display loaded namespace by object owner\n");
|
||||
OsdPrintf ("Prefix [<NamePath>] Set or Get current execution prefix\n");
|
||||
OsdPrintf ("Terminate Delete namespace and all internal objects\n");
|
||||
OsdPrintf ("Thread <Threads><Loops><NamePath> Spawn threads to execute method(s)\n");
|
||||
AcpiOsdPrintf ("\nNamespace Access Commands\n\n");
|
||||
AcpiOsdPrintf ("Debug <Namepath> [Arguments] Single Step a control method\n");
|
||||
AcpiOsdPrintf ("Event <F|G> <Value> Generate AcpiEvent (Fixed/GPE)\n");
|
||||
AcpiOsdPrintf ("Execute <Namepath> [Arguments] Execute control method\n");
|
||||
AcpiOsdPrintf ("Find <Name> (? is wildcard) Find ACPI name(s) with wildcards\n");
|
||||
AcpiOsdPrintf ("Method Display list of loaded control methods\n");
|
||||
AcpiOsdPrintf ("Namespace [<Addr>|<Path>] [Depth] Display loaded namespace tree/subtree\n");
|
||||
AcpiOsdPrintf ("Notify <NamePath> <Value> Send a notification\n");
|
||||
AcpiOsdPrintf ("Objects <ObjectType> Display all objects of the given type\n");
|
||||
AcpiOsdPrintf ("Owner <OwnerId> [Depth] Display loaded namespace by object owner\n");
|
||||
AcpiOsdPrintf ("Prefix [<NamePath>] Set or Get current execution prefix\n");
|
||||
AcpiOsdPrintf ("Terminate Delete namespace and all internal objects\n");
|
||||
AcpiOsdPrintf ("Thread <Threads><Loops><NamePath> Spawn threads to execute method(s)\n");
|
||||
return;
|
||||
|
||||
case 'M':
|
||||
OsdPrintf ("\nControl Method Execution Commands\n\n");
|
||||
OsdPrintf ("Arguments (or Args) Display method arguments\n");
|
||||
OsdPrintf ("Breakpoint <AmlOffset> Set an AML execution breakpoint\n");
|
||||
OsdPrintf ("Call Run to next control method invocation\n");
|
||||
OsdPrintf ("Go Allow method to run to completion\n");
|
||||
OsdPrintf ("Information Display info about the current method\n");
|
||||
OsdPrintf ("Into Step into (not over) a method call\n");
|
||||
OsdPrintf ("List [# of Aml Opcodes] Display method ASL statements\n");
|
||||
OsdPrintf ("Locals Display method local variables\n");
|
||||
OsdPrintf ("Results Display method result stack\n");
|
||||
OsdPrintf ("Set <A|L> <#> <Value> Set method data (Arguments/Locals)\n");
|
||||
OsdPrintf ("Stop Terminate control method\n");
|
||||
OsdPrintf ("Tree Display control method calling tree\n");
|
||||
OsdPrintf ("<Enter> Single step next AML opcode (over calls)\n");
|
||||
AcpiOsdPrintf ("\nControl Method Execution Commands\n\n");
|
||||
AcpiOsdPrintf ("Arguments (or Args) Display method arguments\n");
|
||||
AcpiOsdPrintf ("Breakpoint <AmlOffset> Set an AML execution breakpoint\n");
|
||||
AcpiOsdPrintf ("Call Run to next control method invocation\n");
|
||||
AcpiOsdPrintf ("Go Allow method to run to completion\n");
|
||||
AcpiOsdPrintf ("Information Display info about the current method\n");
|
||||
AcpiOsdPrintf ("Into Step into (not over) a method call\n");
|
||||
AcpiOsdPrintf ("List [# of AcpiAml Opcodes] Display method ASL statements\n");
|
||||
AcpiOsdPrintf ("Locals Display method local variables\n");
|
||||
AcpiOsdPrintf ("Results Display method result stack\n");
|
||||
AcpiOsdPrintf ("Set <A|L> <#> <Value> Set method data (Arguments/Locals)\n");
|
||||
AcpiOsdPrintf ("Stop Terminate control method\n");
|
||||
AcpiOsdPrintf ("Tree Display control method calling tree\n");
|
||||
AcpiOsdPrintf ("<Enter> Single step next AML opcode (over calls)\n");
|
||||
return;
|
||||
|
||||
case 'F':
|
||||
OsdPrintf ("\nFile I/O Commands\n\n");
|
||||
OsdPrintf ("Close Close debug output file\n");
|
||||
OsdPrintf ("Open <Output Filename> Open a file for debug output\n");
|
||||
OsdPrintf ("Load <Input Filename> Load ACPI table from a file\n");
|
||||
AcpiOsdPrintf ("\nFile I/O Commands\n\n");
|
||||
AcpiOsdPrintf ("Close Close debug output file\n");
|
||||
AcpiOsdPrintf ("Open <Output Filename> Open a file for debug output\n");
|
||||
AcpiOsdPrintf ("Load <Input Filename> Load ACPI table from a file\n");
|
||||
return;
|
||||
|
||||
default:
|
||||
OsdPrintf ("Unrecognized Command Class: %x\n", HelpType);
|
||||
AcpiOsdPrintf ("Unrecognized Command Class: %x\n", HelpType);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbGetNextToken
|
||||
*
|
||||
* FUNCTION: AcpiDbGetNextToken
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -384,7 +384,7 @@ DbDisplayHelp (
|
||||
*****************************************************************************/
|
||||
|
||||
char *
|
||||
DbGetNextToken (
|
||||
AcpiDbGetNextToken (
|
||||
char *String,
|
||||
char **Next)
|
||||
{
|
||||
@ -439,8 +439,8 @@ DbGetNextToken (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbGetLine
|
||||
*
|
||||
* FUNCTION: AcpiDbGetLine
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -452,7 +452,7 @@ DbGetNextToken (
|
||||
*****************************************************************************/
|
||||
|
||||
INT32
|
||||
DbGetLine (
|
||||
AcpiDbGetLine (
|
||||
char *InputBuffer)
|
||||
{
|
||||
UINT32 i;
|
||||
@ -468,7 +468,7 @@ DbGetLine (
|
||||
This = ParsedBuf;
|
||||
for (i = 0; i < DB_MAX_ARGS; i++)
|
||||
{
|
||||
Args[i] = DbGetNextToken (This, &Next);
|
||||
Args[i] = AcpiDbGetNextToken (This, &Next);
|
||||
if (!Args[i])
|
||||
{
|
||||
break;
|
||||
@ -477,7 +477,7 @@ DbGetLine (
|
||||
This = Next;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Uppercase the actual command */
|
||||
|
||||
if (Args[0])
|
||||
@ -494,8 +494,8 @@ DbGetLine (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbMatchCommand
|
||||
*
|
||||
* FUNCTION: AcpiDbMatchCommand
|
||||
*
|
||||
* PARAMETERS: UserCommand - User command line
|
||||
*
|
||||
@ -506,7 +506,7 @@ DbGetLine (
|
||||
*****************************************************************************/
|
||||
|
||||
INT32
|
||||
DbMatchCommand (
|
||||
AcpiDbMatchCommand (
|
||||
char *UserCommand)
|
||||
{
|
||||
UINT32 i;
|
||||
@ -532,10 +532,10 @@ DbMatchCommand (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbCommandDispatch
|
||||
*
|
||||
* PARAMETERS:
|
||||
* FUNCTION: AcpiDbCommandDispatch
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* RETURN: Status
|
||||
*
|
||||
@ -544,7 +544,7 @@ DbMatchCommand (
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
DbCommandDispatch (
|
||||
AcpiDbCommandDispatch (
|
||||
char *InputBuffer,
|
||||
ACPI_WALK_STATE *WalkState,
|
||||
ACPI_GENERIC_OP *Op)
|
||||
@ -558,20 +558,20 @@ DbCommandDispatch (
|
||||
|
||||
/* If AcpiTerminate has been called, terminate this thread */
|
||||
|
||||
if (Gbl_DbTerminateThreads)
|
||||
if (AcpiGbl_DbTerminateThreads)
|
||||
{
|
||||
return (AE_CTRL_TERMINATE);
|
||||
}
|
||||
|
||||
ParamCount = DbGetLine (InputBuffer);
|
||||
CommandIndex = DbMatchCommand (Args[0]);
|
||||
|
||||
ParamCount = AcpiDbGetLine (InputBuffer);
|
||||
CommandIndex = AcpiDbMatchCommand (Args[0]);
|
||||
Temp = 0;
|
||||
|
||||
/* Verify that we have the minimum number of params */
|
||||
|
||||
if (ParamCount < Commands[CommandIndex].MinArgs)
|
||||
{
|
||||
OsdPrintf ("%d parameters entered, [%s] requires %d parameters\n",
|
||||
AcpiOsdPrintf ("%d parameters entered, [%s] requires %d parameters\n",
|
||||
ParamCount, Commands[CommandIndex].Name, Commands[CommandIndex].MinArgs);
|
||||
return (AE_CTRL_TRUE);
|
||||
}
|
||||
@ -588,103 +588,103 @@ DbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_ALLOCATIONS:
|
||||
CmDumpCurrentAllocations ((UINT32) -1, NULL);
|
||||
AcpiCmDumpCurrentAllocations ((UINT32) -1, NULL);
|
||||
break;
|
||||
|
||||
case CMD_ARGS:
|
||||
case CMD_ARGUMENTS:
|
||||
DbDisplayArguments ();
|
||||
AcpiDbDisplayArguments ();
|
||||
break;
|
||||
|
||||
case CMD_BREAKPOINT:
|
||||
DbSetMethodBreakpoint (Args[1], WalkState, Op);
|
||||
AcpiDbSetMethodBreakpoint (Args[1], WalkState, Op);
|
||||
break;
|
||||
|
||||
case CMD_CALL:
|
||||
DbSetMethodCallBreakpoint (Op);
|
||||
AcpiDbSetMethodCallBreakpoint (Op);
|
||||
Status = AE_OK;
|
||||
break;
|
||||
|
||||
case CMD_CLOSE:
|
||||
DbCloseDebugFile ();
|
||||
AcpiDbCloseDebugFile ();
|
||||
break;
|
||||
|
||||
case CMD_DEBUG:
|
||||
DbExecute (Args[1], &Args[2], EX_SINGLE_STEP);
|
||||
AcpiDbExecute (Args[1], &Args[2], EX_SINGLE_STEP);
|
||||
break;
|
||||
|
||||
case CMD_DUMP:
|
||||
DbDecodeAndDisplayObject (Args[1], Args[2]);
|
||||
AcpiDbDecodeAndDisplayObject (Args[1], Args[2]);
|
||||
break;
|
||||
|
||||
case CMD_ENABLEACPI:
|
||||
Status = AcpiEnable();
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
OsdPrintf("AcpiEnable failed (0x%x)\n", Status);
|
||||
AcpiOsdPrintf("AcpiEnable failed (0x%x)\n", Status);
|
||||
return Status;
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_EVENT:
|
||||
OsdPrintf ("Event command not implemented\n");
|
||||
AcpiOsdPrintf ("Event command not implemented\n");
|
||||
break;
|
||||
|
||||
case CMD_EXECUTE:
|
||||
DbExecute (Args[1], &Args[2], EX_NO_SINGLE_STEP);
|
||||
AcpiDbExecute (Args[1], &Args[2], EX_NO_SINGLE_STEP);
|
||||
break;
|
||||
|
||||
case CMD_FIND:
|
||||
DbFindNameInNamespace (Args[1]);
|
||||
AcpiDbFindNameInNamespace (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_GO:
|
||||
Gbl_CmSingleStep = FALSE;
|
||||
AcpiGbl_CmSingleStep = FALSE;
|
||||
return (AE_OK);
|
||||
|
||||
case CMD_HELP:
|
||||
case CMD_HELP2:
|
||||
DbDisplayHelp (Args[1]);
|
||||
AcpiDbDisplayHelp (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_HISTORY:
|
||||
DbDisplayHistory ();
|
||||
AcpiDbDisplayHistory ();
|
||||
break;
|
||||
|
||||
case CMD_HISTORY_EXE:
|
||||
CommandLine = DbGetFromHistory (Args[1]);
|
||||
CommandLine = AcpiDbGetFromHistory (Args[1]);
|
||||
if (!CommandLine)
|
||||
{
|
||||
return AE_CTRL_TRUE;
|
||||
}
|
||||
|
||||
Status = DbCommandDispatch (CommandLine, WalkState, Op);
|
||||
Status = AcpiDbCommandDispatch (CommandLine, WalkState, Op);
|
||||
if (Status == AE_OK)
|
||||
Status = AE_CTRL_TRUE;
|
||||
return Status;
|
||||
break;
|
||||
|
||||
case CMD_HISTORY_LAST:
|
||||
CommandLine = DbGetFromHistory (NULL);
|
||||
CommandLine = AcpiDbGetFromHistory (NULL);
|
||||
if (!CommandLine)
|
||||
{
|
||||
return AE_CTRL_TRUE;
|
||||
}
|
||||
|
||||
Status = DbCommandDispatch (CommandLine, WalkState, Op);
|
||||
Status = AcpiDbCommandDispatch (CommandLine, WalkState, Op);
|
||||
if (Status == AE_OK)
|
||||
Status = AE_CTRL_TRUE;
|
||||
return Status;
|
||||
|
||||
case CMD_INFORMATION:
|
||||
DbDisplayMethodInfo (Op);
|
||||
AcpiDbDisplayMethodInfo (Op);
|
||||
break;
|
||||
|
||||
case CMD_INTO:
|
||||
if (Op)
|
||||
{
|
||||
Gbl_CmSingleStep = TRUE;
|
||||
Gbl_MethodBreakpoint = 0;
|
||||
AcpiGbl_CmSingleStep = TRUE;
|
||||
AcpiGbl_MethodBreakpoint = 0;
|
||||
return AE_OK;
|
||||
}
|
||||
break;
|
||||
@ -692,37 +692,37 @@ DbCommandDispatch (
|
||||
case CMD_LEVEL:
|
||||
if (ParamCount == 0)
|
||||
{
|
||||
OsdPrintf ("Current debug level for file output is: %8.8lX\n", Gbl_DbDebugLevel);
|
||||
OsdPrintf ("Current debug level for console output is: %8.8lX\n", Gbl_DbConsoleDebugLevel);
|
||||
AcpiOsdPrintf ("Current debug level for file output is: %8.8lX\n", AcpiGbl_DbDebugLevel);
|
||||
AcpiOsdPrintf ("Current debug level for console output is: %8.8lX\n", AcpiGbl_DbConsoleDebugLevel);
|
||||
}
|
||||
else if (ParamCount == 2)
|
||||
{
|
||||
Temp = Gbl_DbConsoleDebugLevel;
|
||||
Gbl_DbConsoleDebugLevel = STRTOUL (Args[1], NULL, 16);
|
||||
OsdPrintf ("Debug Level for console output was %8.8lX, now %8.8lX\n", Temp, Gbl_DbConsoleDebugLevel);
|
||||
Temp = AcpiGbl_DbConsoleDebugLevel;
|
||||
AcpiGbl_DbConsoleDebugLevel = STRTOUL (Args[1], NULL, 16);
|
||||
AcpiOsdPrintf ("Debug Level for console output was %8.8lX, now %8.8lX\n", Temp, AcpiGbl_DbConsoleDebugLevel);
|
||||
}
|
||||
else
|
||||
{
|
||||
Temp = Gbl_DbDebugLevel;
|
||||
Gbl_DbDebugLevel = STRTOUL (Args[1], NULL, 16);
|
||||
OsdPrintf ("Debug Level for file output was %8.8lX, now %8.8lX\n", Temp, Gbl_DbDebugLevel);
|
||||
Temp = AcpiGbl_DbDebugLevel;
|
||||
AcpiGbl_DbDebugLevel = STRTOUL (Args[1], NULL, 16);
|
||||
AcpiOsdPrintf ("Debug Level for file output was %8.8lX, now %8.8lX\n", Temp, AcpiGbl_DbDebugLevel);
|
||||
}
|
||||
break;
|
||||
|
||||
case CMD_LIST:
|
||||
DbDisassembleAml (Args[1], Op);
|
||||
AcpiDbDisassembleAml (Args[1], Op);
|
||||
break;
|
||||
|
||||
case CMD_LOAD:
|
||||
Status = DbLoadAcpiTable (Args[1]);
|
||||
Status = AcpiDbLoadAcpiTable (Args[1]);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return Status;
|
||||
}
|
||||
|
||||
DbSetOutputDestination (DB_REDIRECTABLE_OUTPUT);
|
||||
AcpiDbSetOutputDestination (DB_REDIRECTABLE_OUTPUT);
|
||||
Status = AcpiLoadNamespace ();
|
||||
DbSetOutputDestination (DB_CONSOLE_OUTPUT);
|
||||
AcpiDbSetOutputDestination (DB_CONSOLE_OUTPUT);
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
@ -731,48 +731,48 @@ DbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_LOCALS:
|
||||
DbDisplayLocals ();
|
||||
AcpiDbDisplayLocals ();
|
||||
break;
|
||||
|
||||
|
||||
case CMD_METHODS:
|
||||
DbDisplayObjects ("METHOD", Args[1]);
|
||||
AcpiDbDisplayObjects ("METHOD", Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_NAMESPACE:
|
||||
DbDumpNamespace (Args[1], Args[2]);
|
||||
AcpiDbDumpNamespace (Args[1], Args[2]);
|
||||
break;
|
||||
|
||||
case CMD_NOTIFY:
|
||||
Temp = STRTOUL (Args[2], NULL, 0);
|
||||
DbSendNotify (Args[1], Temp);
|
||||
AcpiDbSendNotify (Args[1], Temp);
|
||||
break;
|
||||
|
||||
case CMD_OBJECT:
|
||||
DbDisplayObjects (Args[1], Args[2]);
|
||||
AcpiDbDisplayObjects (Args[1], Args[2]);
|
||||
break;
|
||||
|
||||
case CMD_OPEN:
|
||||
DbOpenDebugFile (Args[1]);
|
||||
AcpiDbOpenDebugFile (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_OWNER:
|
||||
DbDumpNamespaceByOwner (Args[1], Args[2]);
|
||||
AcpiDbDumpNamespaceByOwner (Args[1], Args[2]);
|
||||
break;
|
||||
|
||||
case CMD_PREFIX:
|
||||
DbSetScope (Args[1]);
|
||||
AcpiDbSetScope (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_RESULTS:
|
||||
DbDisplayResults ();
|
||||
AcpiDbDisplayResults ();
|
||||
break;
|
||||
|
||||
|
||||
case CMD_SET:
|
||||
DbSetMethodData (Args[1], Args[2], Args[3]);
|
||||
AcpiDbSetMethodData (Args[1], Args[2], Args[3]);
|
||||
break;
|
||||
|
||||
case CMD_STATS:
|
||||
DbDisplayStatistics (Args[1]);
|
||||
AcpiDbDisplayStatistics (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_STOP:
|
||||
@ -780,28 +780,28 @@ DbCommandDispatch (
|
||||
break;
|
||||
|
||||
case CMD_TABLES:
|
||||
DbDisplayTableInfo (Args[1]);
|
||||
AcpiDbDisplayTableInfo (Args[1]);
|
||||
break;
|
||||
|
||||
case CMD_TERMINATE:
|
||||
DbSetOutputDestination (DB_REDIRECTABLE_OUTPUT);
|
||||
CmSubsystemShutdown ();
|
||||
AcpiDbSetOutputDestination (DB_REDIRECTABLE_OUTPUT);
|
||||
AcpiCmSubsystemShutdown ();
|
||||
|
||||
/* TBD: [Restructure] Need some way to re-initialize without re-creating the semaphores! */
|
||||
|
||||
// AcpiInitialize (NULL);
|
||||
/* AcpiInitialize (NULL); */
|
||||
break;
|
||||
|
||||
case CMD_THREADS:
|
||||
DbCreateExecutionThreads (Args[1], Args[2], Args[3]);
|
||||
AcpiDbCreateExecutionThreads (Args[1], Args[2], Args[3]);
|
||||
break;
|
||||
|
||||
case CMD_TREE:
|
||||
DbDisplayCallingTree ();
|
||||
AcpiDbDisplayCallingTree ();
|
||||
break;
|
||||
|
||||
case CMD_UNLOAD:
|
||||
DbUnloadAcpiTable (Args[1], Args[2]);
|
||||
AcpiDbUnloadAcpiTable (Args[1], Args[2]);
|
||||
break;
|
||||
|
||||
case CMD_EXIT:
|
||||
@ -813,34 +813,34 @@ DbCommandDispatch (
|
||||
|
||||
if (!OutputToFile)
|
||||
{
|
||||
DebugLevel = DEBUG_DEFAULT;
|
||||
AcpiDbgLevel = DEBUG_DEFAULT;
|
||||
}
|
||||
|
||||
/* Shutdown */
|
||||
|
||||
// CmSubsystemShutdown ();
|
||||
DbCloseDebugFile ();
|
||||
/* AcpiCmSubsystemShutdown (); */
|
||||
AcpiDbCloseDebugFile ();
|
||||
|
||||
Gbl_DbTerminateThreads = TRUE;
|
||||
AcpiGbl_DbTerminateThreads = TRUE;
|
||||
|
||||
return (AE_CTRL_TERMINATE);
|
||||
|
||||
case CMD_NOT_FOUND:
|
||||
OsdPrintf ("Unknown Command\n");
|
||||
AcpiOsdPrintf ("Unknown Command\n");
|
||||
return (AE_CTRL_TRUE);
|
||||
}
|
||||
|
||||
|
||||
/* Add all commands that come here to the history buffer */
|
||||
|
||||
DbAddToHistory (InputBuffer);
|
||||
AcpiDbAddToHistory (InputBuffer);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbExecuteThread
|
||||
*
|
||||
* FUNCTION: AcpiDbExecuteThread
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -852,7 +852,7 @@ DbCommandDispatch (
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbExecuteThread (
|
||||
AcpiDbExecuteThread (
|
||||
void *Context)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
@ -860,19 +860,19 @@ DbExecuteThread (
|
||||
|
||||
while (Status != AE_CTRL_TERMINATE)
|
||||
{
|
||||
Gbl_MethodExecuting = FALSE;
|
||||
Gbl_StepToNextCall = FALSE;
|
||||
AcpiGbl_MethodExecuting = FALSE;
|
||||
AcpiGbl_StepToNextCall = FALSE;
|
||||
|
||||
CmAcquireMutex (MTX_DEBUG_CMD_READY);
|
||||
Status = DbCommandDispatch (LineBuf, NULL, NULL);
|
||||
CmReleaseMutex (MTX_DEBUG_CMD_COMPLETE);
|
||||
AcpiCmAcquireMutex (MTX_DEBUG_CMD_READY);
|
||||
Status = AcpiDbCommandDispatch (LineBuf, NULL, NULL);
|
||||
AcpiCmReleaseMutex (MTX_DEBUG_CMD_COMPLETE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbSingleThread
|
||||
*
|
||||
* FUNCTION: AcpiDbSingleThread
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -884,24 +884,24 @@ DbExecuteThread (
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbSingleThread (
|
||||
AcpiDbSingleThread (
|
||||
void)
|
||||
{
|
||||
ACPI_STATUS Status = AE_OK;
|
||||
|
||||
|
||||
Gbl_MethodExecuting = FALSE;
|
||||
Gbl_StepToNextCall = FALSE;
|
||||
AcpiGbl_MethodExecuting = FALSE;
|
||||
AcpiGbl_StepToNextCall = FALSE;
|
||||
|
||||
Status = DbCommandDispatch (LineBuf, NULL, NULL);
|
||||
Status = AcpiDbCommandDispatch (LineBuf, NULL, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbUserCommands
|
||||
*
|
||||
* FUNCTION: AcpiDbUserCommands
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
@ -913,7 +913,7 @@ DbSingleThread (
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
DbUserCommands (
|
||||
AcpiDbUserCommands (
|
||||
char Prompt,
|
||||
ACPI_GENERIC_OP *Op)
|
||||
{
|
||||
@ -922,51 +922,51 @@ DbUserCommands (
|
||||
|
||||
/* TBD: [Restructure] Need a separate command line buffer for step mode */
|
||||
|
||||
while (!Gbl_DbTerminateThreads)
|
||||
while (!AcpiGbl_DbTerminateThreads)
|
||||
{
|
||||
/* Force output to console until a command is entered */
|
||||
|
||||
DbSetOutputDestination (DB_CONSOLE_OUTPUT);
|
||||
AcpiDbSetOutputDestination (DB_CONSOLE_OUTPUT);
|
||||
|
||||
/* Different prompt if method is executing */
|
||||
|
||||
if (!Gbl_MethodExecuting)
|
||||
if (!AcpiGbl_MethodExecuting)
|
||||
{
|
||||
OsdPrintf ("%1c ", DB_COMMAND_PROMPT);
|
||||
AcpiOsdPrintf ("%1c ", DB_COMMAND_PROMPT);
|
||||
}
|
||||
else
|
||||
{
|
||||
OsdPrintf ("%1c ", DB_EXECUTE_PROMPT);
|
||||
AcpiOsdPrintf ("%1c ", DB_EXECUTE_PROMPT);
|
||||
}
|
||||
|
||||
/* Get the user input line */
|
||||
|
||||
OsdGetLine (LineBuf);
|
||||
AcpiOsdGetLine (LineBuf);
|
||||
|
||||
|
||||
/* Check for single or multithreaded debug */
|
||||
|
||||
if (Gbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
|
||||
if (AcpiGbl_DebuggerConfiguration & DEBUGGER_MULTI_THREADED)
|
||||
{
|
||||
/*
|
||||
/*
|
||||
* Signal the debug thread that we have a command to execute,
|
||||
* and wait for the command to complete.
|
||||
*/
|
||||
|
||||
CmReleaseMutex (MTX_DEBUG_CMD_READY);
|
||||
CmAcquireMutex (MTX_DEBUG_CMD_COMPLETE);
|
||||
AcpiCmReleaseMutex (MTX_DEBUG_CMD_READY);
|
||||
AcpiCmAcquireMutex (MTX_DEBUG_CMD_COMPLETE);
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
/* Just call to the command line interpreter */
|
||||
|
||||
DbSingleThread ();
|
||||
AcpiDbSingleThread ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* Only this thread (the original thread) should actually terminate the subsystem,
|
||||
* because all the semaphores are deleted during termination
|
||||
*/
|
||||
@ -977,5 +977,5 @@ DbUserCommands (
|
||||
|
||||
|
||||
|
||||
#endif /* ACPI_DEBUG */
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* Module Name: dbutils - AML debugger utilities
|
||||
*
|
||||
*****************************************************************************/
|
||||
@ -37,9 +37,9 @@
|
||||
* The above copyright and patent license is granted only if the following
|
||||
* conditions are met:
|
||||
*
|
||||
* 3. Conditions
|
||||
* 3. Conditions
|
||||
*
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* 3.1. Redistribution of Source with Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification with rights to further distribute source must include
|
||||
* the above Copyright Notice, the above License, this list of Conditions,
|
||||
@ -47,11 +47,11 @@
|
||||
* Licensee must cause all Covered Code to which Licensee contributes to
|
||||
* contain a file documenting the changes Licensee made to create that Covered
|
||||
* Code and the date of any change. Licensee must include in that file the
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* documentation of any changes made by any predecessor Licensee. Licensee
|
||||
* must include a prominent statement that the modification is derived,
|
||||
* directly or indirectly, from Original Intel Code.
|
||||
*
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* 3.2. Redistribution of Source with no Rights to Further Distribute Source.
|
||||
* Redistribution of source code of any substantial portion of the Covered
|
||||
* Code or modification without rights to further distribute source must
|
||||
* include the following Disclaimer and Export Compliance provision in the
|
||||
@ -85,7 +85,7 @@
|
||||
* INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
|
||||
* UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
|
||||
* PARTICULAR PURPOSE.
|
||||
* PARTICULAR PURPOSE.
|
||||
*
|
||||
* 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
|
||||
* OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
|
||||
@ -114,25 +114,25 @@
|
||||
*****************************************************************************/
|
||||
|
||||
|
||||
#include <acpi.h>
|
||||
#include <parser.h>
|
||||
#include <amlcode.h>
|
||||
#include <namesp.h>
|
||||
#include <parser.h>
|
||||
#include <events.h>
|
||||
#include <interp.h>
|
||||
#include <debugger.h>
|
||||
#include "acpi.h"
|
||||
#include "parser.h"
|
||||
#include "amlcode.h"
|
||||
#include "namesp.h"
|
||||
#include "parser.h"
|
||||
#include "events.h"
|
||||
#include "interp.h"
|
||||
#include "debugger.h"
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
|
||||
#define _COMPONENT DEBUGGER
|
||||
MODULE_NAME ("dbutils");
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbSetOutputDestination
|
||||
*
|
||||
* FUNCTION: AcpiDbSetOutputDestination
|
||||
*
|
||||
* PARAMETERS: Address - Pointer to the buffer
|
||||
*
|
||||
@ -143,28 +143,28 @@
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbSetOutputDestination (
|
||||
AcpiDbSetOutputDestination (
|
||||
INT32 OutputFlags)
|
||||
{
|
||||
|
||||
Gbl_DbOutputFlags = (UINT8) OutputFlags;
|
||||
|
||||
AcpiGbl_DbOutputFlags = (UINT8) OutputFlags;
|
||||
|
||||
if (OutputFlags & DB_REDIRECTABLE_OUTPUT)
|
||||
{
|
||||
if (OutputToFile)
|
||||
{
|
||||
DebugLevel = Gbl_DbDebugLevel;
|
||||
AcpiDbgLevel = AcpiGbl_DbDebugLevel;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DebugLevel = Gbl_DbConsoleDebugLevel;
|
||||
AcpiDbgLevel = AcpiGbl_DbConsoleDebugLevel;
|
||||
}
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbDumpBuffer
|
||||
*
|
||||
* FUNCTION: AcpiDbDumpBuffer
|
||||
*
|
||||
* PARAMETERS: Address - Pointer to the buffer
|
||||
*
|
||||
@ -175,20 +175,20 @@ DbSetOutputDestination (
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbDumpBuffer (
|
||||
AcpiDbDumpBuffer (
|
||||
UINT32 Address)
|
||||
{
|
||||
|
||||
OsdPrintf ("\nLocation 0x%X:\n", Address);
|
||||
AcpiOsdPrintf ("\nLocation 0x%X:\n", Address);
|
||||
|
||||
DebugLevel |= TRACE_TABLES;
|
||||
CmDumpBuffer ((char *) Address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
|
||||
AcpiDbgLevel |= TRACE_TABLES;
|
||||
AcpiCmDumpBuffer ((char *) Address, 64, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbDumpObject
|
||||
*
|
||||
* FUNCTION: AcpiDbDumpObject
|
||||
*
|
||||
* PARAMETERS: MethodName - Method that returned the object
|
||||
* ReturnObj - The object to dump
|
||||
@ -200,7 +200,7 @@ DbDumpBuffer (
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbDumpObject (
|
||||
AcpiDbDumpObject (
|
||||
ACPI_OBJECT *ObjDesc,
|
||||
UINT32 Level)
|
||||
{
|
||||
@ -209,60 +209,60 @@ DbDumpObject (
|
||||
|
||||
if (!ObjDesc)
|
||||
{
|
||||
OsdPrintf ("[Null Object]\n");
|
||||
AcpiOsdPrintf ("[Null Object]\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < Level; i++)
|
||||
{
|
||||
OsdPrintf (" ");
|
||||
AcpiOsdPrintf (" ");
|
||||
}
|
||||
|
||||
switch (ObjDesc->Type)
|
||||
{
|
||||
case ACPI_TYPE_Any:
|
||||
case ACPI_TYPE_ANY:
|
||||
|
||||
OsdPrintf ("[Object Reference] Value: %p\n", ObjDesc->Reference.Handle);
|
||||
AcpiOsdPrintf ("[Object Reference] Value: %p\n", ObjDesc->Reference.Handle);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_Number:
|
||||
OsdPrintf ("[Number] Value: %ld (0x%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
|
||||
case ACPI_TYPE_NUMBER:
|
||||
AcpiOsdPrintf ("[Number] Value: %ld (0x%lX)\n", ObjDesc->Number.Value, ObjDesc->Number.Value);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_String:
|
||||
case ACPI_TYPE_STRING:
|
||||
|
||||
OsdPrintf ("[String] Value: ");
|
||||
AcpiOsdPrintf ("[String] Value: ");
|
||||
for (i = 0; i < ObjDesc->String.Length; i++)
|
||||
{
|
||||
OsdPrintf ("%c", ObjDesc->String.Pointer[i]);
|
||||
AcpiOsdPrintf ("%c", ObjDesc->String.Pointer[i]);
|
||||
}
|
||||
OsdPrintf ("\n");
|
||||
AcpiOsdPrintf ("\n");
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_Buffer:
|
||||
case ACPI_TYPE_BUFFER:
|
||||
|
||||
OsdPrintf ("[Buffer] Value: ");
|
||||
CmDumpBuffer ((char *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
|
||||
AcpiOsdPrintf ("[Buffer] Value: ");
|
||||
AcpiCmDumpBuffer ((char *) ObjDesc->Buffer.Pointer, ObjDesc->Buffer.Length, DB_DWORD_DISPLAY, _COMPONENT);
|
||||
break;
|
||||
|
||||
|
||||
case ACPI_TYPE_Package:
|
||||
case ACPI_TYPE_PACKAGE:
|
||||
|
||||
OsdPrintf ("[Package] Contains %d Elements: \n", ObjDesc->Package.Count);
|
||||
AcpiOsdPrintf ("[Package] Contains %d Elements: \n", ObjDesc->Package.Count);
|
||||
|
||||
for (i = 0; i < ObjDesc->Package.Count; i++)
|
||||
{
|
||||
DbDumpObject (&ObjDesc->Package.Elements[i], Level+1);
|
||||
AcpiDbDumpObject (&ObjDesc->Package.Elements[i], Level+1);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
|
||||
OsdPrintf ("[Unknown Type] 0x%X \n", ObjDesc->Type);
|
||||
AcpiOsdPrintf ("[Unknown Type] 0x%X \n", ObjDesc->Type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -270,10 +270,10 @@ DbDumpObject (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbPrepNamestring
|
||||
*
|
||||
* PARAMETERS:
|
||||
* FUNCTION: AcpiDbPrepNamestring
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
@ -282,7 +282,7 @@ DbDumpObject (
|
||||
*****************************************************************************/
|
||||
|
||||
void
|
||||
DbPrepNamestring (
|
||||
AcpiDbPrepNamestring (
|
||||
char *Name)
|
||||
{
|
||||
|
||||
@ -324,7 +324,7 @@ DbPrepNamestring (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
*
|
||||
* FUNCTION: AdSecondPassParse
|
||||
*
|
||||
* PARAMETERS: Root - Root of the parse tree
|
||||
@ -336,7 +336,7 @@ DbPrepNamestring (
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
DbSecondPassParse (
|
||||
AcpiDbSecondPassParse (
|
||||
ACPI_GENERIC_OP *Root)
|
||||
{
|
||||
ACPI_GENERIC_OP *Op = Root;
|
||||
@ -347,16 +347,16 @@ DbSecondPassParse (
|
||||
UINT32 BaseAmlOffset;
|
||||
|
||||
|
||||
OsdPrintf ("Pass two parse ....\n");
|
||||
AcpiOsdPrintf ("Pass two parse ....\n");
|
||||
|
||||
while (Op)
|
||||
{
|
||||
if (Op->Opcode == AML_MethodOp)
|
||||
if (Op->Opcode == AML_METHOD_OP)
|
||||
{
|
||||
Method = (ACPI_DEFERRED_OP *) Op;
|
||||
Status = PsParseAml (Op, Method->Body, Method->BodyLength, 0);
|
||||
Status = AcpiPsParseAml (Op, Method->Body, Method->BodyLength, 0);
|
||||
|
||||
|
||||
|
||||
BaseAmlOffset = (Method->Value.Arg)->AmlOffset + 1;
|
||||
StartOp = (Method->Value.Arg)->Next;
|
||||
SearchOp = StartOp;
|
||||
@ -364,17 +364,19 @@ DbSecondPassParse (
|
||||
while (SearchOp)
|
||||
{
|
||||
SearchOp->AmlOffset += BaseAmlOffset;
|
||||
SearchOp = PsGetDepthNext (StartOp, SearchOp);
|
||||
SearchOp = AcpiPsGetDepthNext (StartOp, SearchOp);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Op->Opcode == AML_RegionOp)
|
||||
if (Op->Opcode == AML_REGION_OP)
|
||||
{
|
||||
/* TBD: this isn't quite the right thing to do! */
|
||||
|
||||
// Method = (ACPI_DEFERRED_OP *) Op;
|
||||
// Status = PsParseAml (Op, Method->Body, Method->BodyLength);
|
||||
/* TBD: [Investigate] this isn't quite the right thing to do! */
|
||||
/*
|
||||
*
|
||||
* Method = (ACPI_DEFERRED_OP *) Op;
|
||||
* Status = AcpiPsParseAml (Op, Method->Body, Method->BodyLength);
|
||||
*/
|
||||
}
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
@ -382,7 +384,7 @@ DbSecondPassParse (
|
||||
return Status;
|
||||
}
|
||||
|
||||
Op = PsGetDepthNext (Root, Op);
|
||||
Op = AcpiPsGetDepthNext (Root, Op);
|
||||
}
|
||||
|
||||
return Status;
|
||||
@ -390,10 +392,10 @@ DbSecondPassParse (
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: DbLocalNsLookup
|
||||
*
|
||||
* PARAMETERS:
|
||||
* FUNCTION: AcpiDbLocalNsLookup
|
||||
*
|
||||
* PARAMETERS:
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
@ -402,7 +404,7 @@ DbSecondPassParse (
|
||||
*****************************************************************************/
|
||||
|
||||
NAME_TABLE_ENTRY *
|
||||
DbLocalNsLookup (
|
||||
AcpiDbLocalNsLookup (
|
||||
char *Name)
|
||||
{
|
||||
char *InternalPath;
|
||||
@ -410,32 +412,32 @@ DbLocalNsLookup (
|
||||
NAME_TABLE_ENTRY *Entry = NULL;
|
||||
|
||||
|
||||
DbPrepNamestring (Name);
|
||||
AcpiDbPrepNamestring (Name);
|
||||
|
||||
/* Build an internal namestring */
|
||||
|
||||
Status = NsInternalizeName (Name, &InternalPath);
|
||||
Status = AcpiNsInternalizeName (Name, &InternalPath);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
OsdPrintf ("Invalid namestring: %s\n", Name);
|
||||
AcpiOsdPrintf ("Invalid namestring: %s\n", Name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Lookup the name */
|
||||
|
||||
/* TBD: what scope do we use? */
|
||||
/* TBD: [Investigate] what scope do we use? */
|
||||
/* Use the root scope for the start of the search */
|
||||
|
||||
Status = NsLookup (NULL, InternalPath, ACPI_TYPE_Any, IMODE_Execute,
|
||||
Status = AcpiNsLookup (NULL, InternalPath, ACPI_TYPE_ANY, IMODE_EXECUTE,
|
||||
NS_NO_UPSEARCH | NS_DONT_OPEN_SCOPE, NULL, &Entry);
|
||||
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
OsdPrintf ("Could not locate name: %s %s\n", Name, CmFormatException (Status));
|
||||
AcpiOsdPrintf ("Could not locate name: %s %s\n", Name, AcpiCmFormatException (Status));
|
||||
}
|
||||
|
||||
|
||||
CmFree (InternalPath);
|
||||
AcpiCmFree (InternalPath);
|
||||
|
||||
return Entry;
|
||||
}
|
||||
@ -443,6 +445,6 @@ DbLocalNsLookup (
|
||||
|
||||
|
||||
|
||||
#endif /* ACPI_DEBUG */
|
||||
#endif /* ENABLE_DEBUGGER */
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user