Debugger: Add call to AcpiWalkNamespace.

In the "Resources" command, call this interface to exercise it.
This commit is contained in:
Robert Moore 2011-08-11 09:42:15 -07:00 committed by Lin Ming
parent fb97cf5c3f
commit c5f0b06303

View File

@ -141,6 +141,11 @@ AcpiDmTestResourceConversion (
ACPI_NAMESPACE_NODE *Node,
char *Name);
static ACPI_STATUS
AcpiDbResourceCallback (
ACPI_RESOURCE *Resource,
void *Context);
/*******************************************************************************
*
@ -768,6 +773,28 @@ Exit1:
}
/*******************************************************************************
*
* FUNCTION: AcpiDbResourceCallback
*
* PARAMETERS: ACPI_WALK_RESOURCE_CALLBACK
*
* RETURN: Status
*
* DESCRIPTION: Simple callback to exercise AcpiWalkResources
*
******************************************************************************/
static ACPI_STATUS
AcpiDbResourceCallback (
ACPI_RESOURCE *Resource,
void *Context)
{
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbDisplayResources
@ -851,6 +878,17 @@ GetCrs:
goto GetPrs;
}
/* This code is here to exercise the AcpiWalkResources interface */
Status = AcpiWalkResources (Node, METHOD_NAME__CRS,
AcpiDbResourceCallback, NULL);
if (ACPI_FAILURE (Status))
{
AcpiOsPrintf ("AcpiWalkResources failed: %s\n",
AcpiFormatException (Status));
goto GetPrs;
}
/* Get the _CRS resource list */
ReturnObj.Pointer = AcpiGbl_DbBuffer;