diff options
Diffstat (limited to 'sys/contrib/dev/acpica/dmutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/dmutils.c | 56 |
1 files changed, 55 insertions, 1 deletions
diff --git a/sys/contrib/dev/acpica/dmutils.c b/sys/contrib/dev/acpica/dmutils.c index d65fded0574b..a8281810ed5e 100644 --- a/sys/contrib/dev/acpica/dmutils.c +++ b/sys/contrib/dev/acpica/dmutils.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dmutils - AML disassembler utilities - * $Revision: 9 $ + * $Revision: 10 $ * ******************************************************************************/ @@ -118,6 +118,7 @@ #include "acpi.h" #include "amlcode.h" #include "acdisasm.h" +#include "acnamesp.h" #ifdef ACPI_DISASSEMBLER @@ -126,6 +127,9 @@ ACPI_MODULE_NAME ("dmutils") +ACPI_EXTERNAL_LIST *AcpiGbl_ExternalList = NULL; + + /* Data used in keeping track of fields */ #if 0 const char *AcpiGbl_FENames[ACPI_NUM_FIELD_NAMES] = @@ -289,6 +293,56 @@ const char *AcpiGbl_SIZDecode[4] = /******************************************************************************* * + * FUNCTION: AcpiDmAddToExternalList + * + * PARAMETERS: Path - Internal (AML) path to the object + * + * RETURN: None + * + * DESCRIPTION: Insert a new path into the list of Externals which will in + * turn be emitted as an External() declaration in the disassembled + * output. + * + ******************************************************************************/ + +void +AcpiDmAddToExternalList ( + char *Path) +{ + char *ExternalPath; + ACPI_EXTERNAL_LIST *NewExternal; + ACPI_STATUS Status; + + + if (!Path) + { + return; + } + + /* Externalize the ACPI path */ + + Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, Path, + NULL, &ExternalPath); + if (ACPI_SUCCESS (Status)) + { + /* Allocate and init a new External() descriptor */ + + NewExternal = ACPI_MEM_CALLOCATE (sizeof (ACPI_EXTERNAL_LIST)); + NewExternal->Path = ExternalPath; + + /* Link the new descriptor into the global list */ + + if (AcpiGbl_ExternalList) + { + NewExternal->Next = AcpiGbl_ExternalList; + } + AcpiGbl_ExternalList = NewExternal; + } +} + + +/******************************************************************************* + * * FUNCTION: AcpiDmDecodeAttribute * * PARAMETERS: Attribute - Attribute field of AccessAs keyword |