⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbinput.c

📁 acpi tools for linux include acpiexec and acpixtract
💻 C
📖 第 1 页 / 共 3 页
字号:
        AcpiOsPrintf ("Methods                             Display list of loaded control methods\n");        AcpiOsPrintf ("Namespace [Object] [Depth]          Display loaded namespace tree/subtree\n");        AcpiOsPrintf ("Notify <Object> <Value>             Send a notification on Object\n");        AcpiOsPrintf ("Objects <ObjectType>                Display all objects of the given type\n");        AcpiOsPrintf ("Owner <OwnerId> [Depth]             Display loaded namespace by object owner\n");        AcpiOsPrintf ("Prefix [<NamePath>]                 Set or Get current execution prefix\n");        AcpiOsPrintf ("References <Addr>                   Find all references to object at addr\n");        AcpiOsPrintf ("Resources <Device>                  Get and display Device resources\n");        AcpiOsPrintf ("Set N <NamedObject> <Value>         Set value for named integer\n");        AcpiOsPrintf ("Sleep <SleepState>                  Simulate sleep/wake sequence\n");        AcpiOsPrintf ("Terminate                           Delete namespace and all internal objects\n");        AcpiOsPrintf ("Type <Object>                       Display object type\n");        return;    case 'M':        AcpiOsPrintf ("\nControl Method Execution Commands\n\n");        AcpiOsPrintf ("Arguments (or Args)                 Display method arguments\n");        AcpiOsPrintf ("Breakpoint <AmlOffset>              Set an AML execution breakpoint\n");        AcpiOsPrintf ("Call                                Run to next control method invocation\n");        AcpiOsPrintf ("Debug <Namepath> [Arguments]        Single Step a control method\n");        AcpiOsPrintf ("Execute <Namepath> [Arguments]      Execute control method\n");        AcpiOsPrintf ("Go                                  Allow method to run to completion\n");        AcpiOsPrintf ("Information                         Display info about the current method\n");        AcpiOsPrintf ("Into                                Step into (not over) a method call\n");        AcpiOsPrintf ("List [# of Aml Opcodes]             Display method ASL statements\n");        AcpiOsPrintf ("Locals                              Display method local variables\n");        AcpiOsPrintf ("Results                             Display method result stack\n");        AcpiOsPrintf ("Set <A|L> <#> <Value>               Set method data (Arguments/Locals)\n");        AcpiOsPrintf ("Stop                                Terminate control method\n");        AcpiOsPrintf ("Thread <Threads><Loops><NamePath>   Spawn threads to execute method(s)\n");        AcpiOsPrintf ("Trace <method name>                 Trace method execution\n");        AcpiOsPrintf ("Tree                                Display control method calling tree\n");        AcpiOsPrintf ("<Enter>                             Single step next AML opcode (over calls)\n");        return;    case 'F':        AcpiOsPrintf ("\nFile I/O Commands\n\n");        AcpiOsPrintf ("Close                               Close debug output file\n");        AcpiOsPrintf ("Open <Output Filename>              Open a file for debug output\n");        AcpiOsPrintf ("Load <Input Filename>               Load ACPI table from a file\n");        return;    default:        AcpiOsPrintf ("Unrecognized Command Class: %s\n", HelpType);        return;    }}/******************************************************************************* * * FUNCTION:    AcpiDbGetNextToken * * PARAMETERS:  String          - Command buffer *              Next            - Return value, end of next token * * RETURN:      Pointer to the start of the next token. * * DESCRIPTION: Command line parsing.  Get the next token on the command line * ******************************************************************************/static char *AcpiDbGetNextToken (    char                    *String,    char                    **Next){    char                    *Start;    /* At end of buffer? */    if (!String || !(*String))    {        return (NULL);    }    /* Get rid of any spaces at the beginning */    if (*String == ' ')    {        while (*String && (*String == ' '))        {            String++;        }        if (!(*String))        {            return (NULL);        }    }    Start = String;    /* Find end of token */    while (*String && (*String != ' '))    {        String++;    }    if (!(*String))    {        *Next = NULL;    }    else    {        *String = 0;        *Next = String + 1;    }    return (Start);}/******************************************************************************* * * FUNCTION:    AcpiDbGetLine * * PARAMETERS:  InputBuffer         - Command line buffer * * RETURN:      Count of arguments to the command * * DESCRIPTION: Get the next command line from the user.  Gets entire line *              up to the next newline * ******************************************************************************/static UINT32AcpiDbGetLine (    char                    *InputBuffer){    UINT32                  i;    UINT32                  Count;    char                    *Next;    char                    *This;    ACPI_STRCPY (AcpiGbl_DbParsedBuf, InputBuffer);    This = AcpiGbl_DbParsedBuf;    for (i = 0; i < ACPI_DEBUGGER_MAX_ARGS; i++)    {        AcpiGbl_DbArgs[i] = AcpiDbGetNextToken (This, &Next);        if (!AcpiGbl_DbArgs[i])        {            break;        }        This = Next;    }    /* Uppercase the actual command */    if (AcpiGbl_DbArgs[0])    {        AcpiUtStrupr (AcpiGbl_DbArgs[0]);    }    Count = i;    if (Count)    {        Count--;  /* Number of args only */    }    return (Count);}/******************************************************************************* * * FUNCTION:    AcpiDbMatchCommand * * PARAMETERS:  UserCommand             - User command line * * RETURN:      Index into command array, -1 if not found * * DESCRIPTION: Search command array for a command match * ******************************************************************************/static UINT32AcpiDbMatchCommand (    char                    *UserCommand){    UINT32                  i;    if (!UserCommand || UserCommand[0] == 0)    {        return (CMD_NULL);    }    for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)    {        if (ACPI_STRSTR (AcpiGbl_DbCommands[i].Name, UserCommand) ==                         AcpiGbl_DbCommands[i].Name)        {            return (i);        }    }    /* Command not recognized */    return (CMD_NOT_FOUND);}/******************************************************************************* * * FUNCTION:    AcpiDbCommandDispatch * * PARAMETERS:  InputBuffer         - Command line buffer *              WalkState           - Current walk *              Op                  - Current (executing) parse op * * RETURN:      Status * * DESCRIPTION: Command dispatcher. * ******************************************************************************/ACPI_STATUSAcpiDbCommandDispatch (    char                    *InputBuffer,    ACPI_WALK_STATE         *WalkState,    ACPI_PARSE_OBJECT       *Op){    UINT32                  Temp;    UINT32                  CommandIndex;    UINT32                  ParamCount;    char                    *CommandLine;    ACPI_STATUS             Status = AE_CTRL_TRUE;    /* If AcpiTerminate has been called, terminate this thread */    if (AcpiGbl_DbTerminateThreads)    {        return (AE_CTRL_TERMINATE);    }    ParamCount = AcpiDbGetLine (InputBuffer);    CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);    Temp = 0;    /* Verify that we have the minimum number of params */    if (ParamCount < AcpiGbl_DbCommands[CommandIndex].MinArgs)    {        AcpiOsPrintf ("%d parameters entered, [%s] requires %d parameters\n",            ParamCount, AcpiGbl_DbCommands[CommandIndex].Name,            AcpiGbl_DbCommands[CommandIndex].MinArgs);        return (AE_CTRL_TRUE);    }    /* Decode and dispatch the command */    switch (CommandIndex)    {    case CMD_NULL:        if (Op)        {            return (AE_OK);        }        break;    case CMD_ALLOCATIONS:#ifdef ACPI_DBG_TRACK_ALLOCATIONS        AcpiUtDumpAllocations ((UINT32) -1, NULL);#endif        break;    case CMD_ARGS:    case CMD_ARGUMENTS:        AcpiDbDisplayArguments ();        break;    case CMD_BREAKPOINT:        AcpiDbSetMethodBreakpoint (AcpiGbl_DbArgs[1], WalkState, Op);        break;    case CMD_BUSINFO:        AcpiDbGetBusInfo ();        break;    case CMD_CALL:        AcpiDbSetMethodCallBreakpoint (Op);        Status = AE_OK;        break;    case CMD_CLOSE:        AcpiDbCloseDebugFile ();        break;    case CMD_DEBUG:        AcpiDbExecute (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2], EX_SINGLE_STEP);        break;    case CMD_DISASSEMBLE:        (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);        break;    case CMD_DUMP:        AcpiDbDecodeAndDisplayObject (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);        break;    case CMD_ENABLEACPI:        Status = AcpiEnable();        if (ACPI_FAILURE(Status))        {            AcpiOsPrintf("AcpiEnable failed (Status=%X)\n", Status);            return (Status);        }        break;    case CMD_EVENT:        AcpiOsPrintf ("Event command not implemented\n");        break;    case CMD_EXECUTE:        AcpiDbExecute (AcpiGbl_DbArgs[1],            &AcpiGbl_DbArgs[2], EX_NO_SINGLE_STEP);        break;    case CMD_FIND:        Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);        break;    case CMD_GO:        AcpiGbl_CmSingleStep = FALSE;        return (AE_OK);    case CMD_GPE:        AcpiDbGenerateGpe (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]);        break;    case CMD_GPES:        AcpiDbDisplayGpes ();        break;    case CMD_HELP:    case CMD_HELP2:        AcpiDbDisplayHelp (AcpiGbl_DbArgs[1]);        break;    case CMD_HISTORY:        AcpiDbDisplayHistory ();        break;    case CMD_HISTORY_EXE:        CommandLine = AcpiDbGetFromHistory (AcpiGbl_DbArgs[1]);        if (!CommandLine)        {            return (AE_CTRL_TRUE);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -