diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2013-08-23 18:01:58 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2013-08-23 18:01:58 +0000 |
commit | 59ce063597ddbda74269a45aba8187dece2fe00a (patch) | |
tree | 89234dd9f502de2faaf4a280ccd0d3785a7ae96f /source/components/debugger | |
parent | dbded195f9840f9044a6828c8877c6bf0a956482 (diff) | |
download | src-59ce063597ddbda74269a45aba8187dece2fe00a.tar.gz src-59ce063597ddbda74269a45aba8187dece2fe00a.zip |
Notes
Diffstat (limited to 'source/components/debugger')
-rw-r--r-- | source/components/debugger/dbcmds.c | 8 | ||||
-rw-r--r-- | source/components/debugger/dbfileio.c | 9 | ||||
-rw-r--r-- | source/components/debugger/dbinput.c | 28 | ||||
-rw-r--r-- | source/components/debugger/dbnames.c | 31 |
4 files changed, 66 insertions, 10 deletions
diff --git a/source/components/debugger/dbcmds.c b/source/components/debugger/dbcmds.c index 307644bb31a2..be35763cd469 100644 --- a/source/components/debugger/dbcmds.c +++ b/source/components/debugger/dbcmds.c @@ -1211,6 +1211,14 @@ AcpiDbGenerateGpe ( (void) AcpiEvGpeDispatch (NULL, GpeEventInfo, GpeNumber); } + +void +AcpiDbGenerateSci ( + void) +{ + AcpiEvSciDispatch (); +} + #endif /* !ACPI_REDUCED_HARDWARE */ #endif /* ACPI_DEBUGGER */ diff --git a/source/components/debugger/dbfileio.c b/source/components/debugger/dbfileio.c index 3a8ece70455b..3ba9653ddc9a 100644 --- a/source/components/debugger/dbfileio.c +++ b/source/components/debugger/dbfileio.c @@ -142,7 +142,8 @@ AcpiDbOpenDebugFile ( } AcpiOsPrintf ("Debug output file %s opened\n", Name); - ACPI_STRCPY (AcpiGbl_DbDebugFilename, Name); + ACPI_STRNCPY (AcpiGbl_DbDebugFilename, Name, + sizeof (AcpiGbl_DbDebugFilename)); AcpiGbl_DbOutputToFile = TRUE; #endif @@ -274,11 +275,9 @@ AcpiDbReadTable ( fseek (fp, 0, SEEK_SET); - /* The RSDT, FACS and S3PT tables do not have standard ACPI headers */ + /* The RSDP table does not have standard ACPI header */ - if (ACPI_COMPARE_NAME (TableHeader.Signature, "RSD ") || - ACPI_COMPARE_NAME (TableHeader.Signature, "FACS") || - ACPI_COMPARE_NAME (TableHeader.Signature, "S3PT")) + if (ACPI_COMPARE_NAME (TableHeader.Signature, "RSD ")) { *TableLength = FileSize; StandardHeader = FALSE; diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c index e7d88bcae3af..511e5855d405 100644 --- a/source/components/debugger/dbinput.c +++ b/source/components/debugger/dbinput.c @@ -132,12 +132,14 @@ enum AcpiExDebuggerCommands CMD_OPEN, CMD_OSI, CMD_OWNER, + CMD_PATHS, CMD_PREDEFINED, CMD_PREFIX, CMD_QUIT, CMD_REFERENCES, CMD_RESOURCES, CMD_RESULTS, + CMD_SCI, CMD_SET, CMD_SLEEP, CMD_STATS, @@ -203,12 +205,14 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] = {"OPEN", 1}, {"OSI", 0}, {"OWNER", 1}, + {"PATHS", 0}, {"PREDEFINED", 0}, {"PREFIX", 0}, {"QUIT", 0}, {"REFERENCES", 1}, {"RESOURCES", 0}, {"RESULTS", 0}, + {"SCI", 0}, {"SET", 3}, {"SLEEP", 0}, {"STATS", 1}, @@ -259,22 +263,19 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {0, "\nNamespace Access Commands:", "\n"}, {1, " Businfo", "Display system bus info\n"}, {1, " Disassemble <Method>", "Disassemble a control method\n"}, - {1, " Event <F|G> <Value>", "Generate AcpiEvent (Fixed/GPE)\n"}, {1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"}, - {1, " Gpe <GpeNum> <GpeBlock>", "Simulate a GPE\n"}, - {1, " Gpes", "Display info on all GPEs\n"}, {1, " Integrity", "Validate namespace integrity\n"}, {1, " Methods", "Display list of loaded control methods\n"}, {1, " Namespace [Object] [Depth]", "Display loaded namespace tree/subtree\n"}, {1, " Notify <Object> <Value>", "Send a notification on Object\n"}, {1, " Objects <ObjectType>", "Display all objects of the given type\n"}, {1, " Owner <OwnerId> [Depth]", "Display loaded namespace by object owner\n"}, + {1, " Paths", "Display full pathnames of namespace objects\n"}, {1, " Predefined", "Check all predefined names\n"}, {1, " Prefix [<NamePath>]", "Set or Get current execution prefix\n"}, {1, " References <Addr>", "Find all references to object at addr\n"}, {1, " Resources [DeviceName]", "Display Device resources (no arg = all devices)\n"}, {1, " Set N <NamedObject> <Value>", "Set value for named integer\n"}, - {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, {1, " Template <Object>", "Format/dump a Buffer/ResourceTemplate\n"}, {1, " Terminate", "Delete namespace and all internal objects\n"}, {1, " Type <Object>", "Display object type\n"}, @@ -288,7 +289,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {5, " Execute <Namepath> [Arguments]", "Execute control method\n"}, {1, " Hex Integer", "Integer method argument\n"}, {1, " \"Ascii String\"", "String method argument\n"}, - {1, " (Byte List)", "Buffer method argument\n"}, + {1, " (Hex Byte List)", "Buffer method argument\n"}, {1, " [Package Element List]", "Package method argument\n"}, {1, " Go", "Allow method to run to completion\n"}, {1, " Information", "Display info about the current method\n"}, @@ -303,6 +304,13 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] = {1, " Tree", "Display control method calling tree\n"}, {1, " <Enter>", "Single step next AML opcode (over calls)\n"}, + {0, "\nHardware Related Commands:", "\n"}, + {1, " Event <F|G> <Value>", "Generate AcpiEvent (Fixed/GPE)\n"}, + {1, " Gpe <GpeNum> <GpeBlock>", "Simulate a GPE\n"}, + {1, " Gpes", "Display info on all GPEs\n"}, + {1, " Sci", "Generate an SCI\n"}, + {1, " Sleep [SleepState]", "Simulate sleep/wake sequence(s) (0-5)\n"}, + {0, "\nFile I/O Commands:", "\n"}, {1, " Close", "Close debug output file\n"}, {1, " Load <Input Filename>", "Load ACPI table from a file\n"}, @@ -1002,6 +1010,11 @@ AcpiDbCommandDispatch ( AcpiDbDumpNamespaceByOwner (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2]); break; + case CMD_PATHS: + + AcpiDbDumpNamespacePaths (); + break; + case CMD_PREDEFINED: AcpiDbCheckPredefinedNames (); @@ -1027,6 +1040,11 @@ AcpiDbCommandDispatch ( AcpiDbDisplayResults (); break; + case CMD_SCI: + + AcpiDbGenerateSci (); + break; + case CMD_SET: AcpiDbSetMethodData (AcpiGbl_DbArgs[1], AcpiGbl_DbArgs[2], diff --git a/source/components/debugger/dbnames.c b/source/components/debugger/dbnames.c index 1e1543ce9b6d..e3c6d710a940 100644 --- a/source/components/debugger/dbnames.c +++ b/source/components/debugger/dbnames.c @@ -256,6 +256,37 @@ AcpiDbDumpNamespace ( /******************************************************************************* * + * FUNCTION: AcpiDbDumpNamespacePaths + * + * PARAMETERS: None + * + * RETURN: None + * + * DESCRIPTION: Dump entire namespace with full object pathnames and object + * type information. Alternative to "namespace" command. + * + ******************************************************************************/ + +void +AcpiDbDumpNamespacePaths ( + void) +{ + + AcpiDbSetOutputDestination (ACPI_DB_DUPLICATE_OUTPUT); + AcpiOsPrintf ("ACPI Namespace (from root):\n"); + + /* Display the entire namespace */ + + AcpiDbSetOutputDestination (ACPI_DB_REDIRECTABLE_OUTPUT); + AcpiNsDumpObjectPaths (ACPI_TYPE_ANY, ACPI_DISPLAY_SUMMARY, + ACPI_UINT32_MAX, ACPI_OWNER_ID_MAX, AcpiGbl_RootNode); + + AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT); +} + + +/******************************************************************************* + * * FUNCTION: AcpiDbDumpNamespaceByOwner * * PARAMETERS: OwnerArg - Owner ID whose nodes will be displayed |