summaryrefslogtreecommitdiff
path: root/source/components/debugger/dbinput.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/debugger/dbinput.c')
-rw-r--r--source/components/debugger/dbinput.c36
1 files changed, 35 insertions, 1 deletions
diff --git a/source/components/debugger/dbinput.c b/source/components/debugger/dbinput.c
index d091d351b02c..c854cb37a7fe 100644
--- a/source/components/debugger/dbinput.c
+++ b/source/components/debugger/dbinput.c
@@ -208,6 +208,7 @@ enum AcpiExDebuggerCommands
CMD_EVALUATE,
CMD_EXECUTE,
CMD_EXIT,
+ CMD_FIELDS,
CMD_FIND,
CMD_GO,
CMD_HANDLERS,
@@ -287,6 +288,7 @@ static const ACPI_DB_COMMAND_INFO AcpiGbl_DbCommands[] =
{"EVALUATE", 1},
{"EXECUTE", 1},
{"EXIT", 0},
+ {"FIELDS", 1},
{"FIND", 1},
{"GO", 0},
{"HANDLERS", 0},
@@ -360,6 +362,7 @@ static const ACPI_DB_COMMAND_HELP AcpiGbl_DbCommandHelp[] =
{1, " Find <AcpiName> (? is wildcard)", "Find ACPI name(s) with wildcards\n"},
{1, " Integrity", "Validate namespace integrity\n"},
{1, " Methods", "Display list of loaded control methods\n"},
+ {1, " Fields <AddressSpaceId>", "Display list of loaded field units by space ID\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 summary of all objects or just given type\n"},
@@ -683,6 +686,22 @@ AcpiDbGetNextToken (
}
break;
+ case '{':
+
+ /* This is the start of a field unit, scan until closing brace */
+
+ String++;
+ Start = String;
+ Type = ACPI_TYPE_FIELD_UNIT;
+
+ /* Find end of buffer */
+
+ while (*String && (*String != '}'))
+ {
+ String++;
+ }
+ break;
+
case '[':
/* This is the start of a package, scan until closing bracket */
@@ -877,6 +896,7 @@ AcpiDbCommandDispatch (
ACPI_PARSE_OBJECT *Op)
{
UINT32 Temp;
+ UINT64 Temp64;
UINT32 CommandIndex;
UINT32 ParamCount;
char *CommandLine;
@@ -894,7 +914,6 @@ AcpiDbCommandDispatch (
ParamCount = AcpiDbGetLine (InputBuffer);
CommandIndex = AcpiDbMatchCommand (AcpiGbl_DbArgs[0]);
- Temp = 0;
/*
* We don't want to add the !! command to the history buffer. It
@@ -993,6 +1012,21 @@ AcpiDbCommandDispatch (
Status = AcpiDbFindNameInNamespace (AcpiGbl_DbArgs[1]);
break;
+ case CMD_FIELDS:
+
+ Status = AcpiUtStrtoul64 (AcpiGbl_DbArgs[1], &Temp64);
+
+ if (ACPI_FAILURE (Status) || Temp64 >= ACPI_NUM_PREDEFINED_REGIONS)
+ {
+ AcpiOsPrintf (
+ "Invalid adress space ID: must be between 0 and %u inclusive\n",
+ ACPI_NUM_PREDEFINED_REGIONS - 1);
+ return (AE_OK);
+ }
+
+ Status = AcpiDbDisplayFields ((UINT32) Temp64);
+ break;
+
case CMD_GO:
AcpiGbl_CmSingleStep = FALSE;