summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/common/adisasm.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/common/adisasm.c')
-rw-r--r--sys/contrib/dev/acpica/common/adisasm.c57
1 files changed, 33 insertions, 24 deletions
diff --git a/sys/contrib/dev/acpica/common/adisasm.c b/sys/contrib/dev/acpica/common/adisasm.c
index 365b323..aff3373 100644
--- a/sys/contrib/dev/acpica/common/adisasm.c
+++ b/sys/contrib/dev/acpica/common/adisasm.c
@@ -5,7 +5,7 @@
*****************************************************************************/
/*
- * Copyright (C) 2000 - 2011, Intel Corp.
+ * Copyright (C) 2000 - 2012, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -376,7 +376,8 @@ AdAmlDisassemble (
AdDisassemblerHeader (Filename);
AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
Table->Signature);
- AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue\n */\n\n");
+ AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "
+ "FieldName : FieldValue\n */\n\n");
AcpiDmDumpDataTable (Table);
fprintf (stderr, "Acpi Data Table [%4.4s] decoded, written to \"%s\"\n",
@@ -403,15 +404,17 @@ AdAmlDisassemble (
AcpiOsPrintf ("*****/\n");
}
- /*
- * Load namespace from names created within control methods
- */
- AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode, OwnerId);
+ /* Load namespace from names created within control methods */
+
+ AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+ AcpiGbl_RootNode, OwnerId);
/*
- * Cross reference the namespace here, in order to generate External() statements
+ * Cross reference the namespace here, in order to
+ * generate External() statements
*/
- AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode, OwnerId);
+ AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
+ AcpiGbl_RootNode, OwnerId);
if (AslCompilerdebug)
{
@@ -422,24 +425,20 @@ AdAmlDisassemble (
AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot);
- /* Convert fixed-offset references to resource descriptors to symbolic references */
-
- AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
-
/*
- * If we found any external control methods, we must reparse the entire
- * tree with the new information (namely, the number of arguments per
- * method)
+ * If we found any external control methods, we must reparse
+ * the entire tree with the new information (namely, the
+ * number of arguments per method)
*/
if (AcpiDmGetExternalMethodCount ())
{
fprintf (stderr,
- "\nFound %u external control methods, reparsing with new information\n",
+ "\nFound %u external control methods, "
+ "reparsing with new information\n",
AcpiDmGetExternalMethodCount ());
- /*
- * Reparse, rebuild namespace. no need to xref namespace
- */
+ /* Reparse, rebuild namespace. no need to xref namespace */
+
AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);
@@ -456,7 +455,7 @@ AdAmlDisassemble (
Status = AcpiNsRootInitialize ();
AcpiDmAddExternalsToNamespace ();
- /* Parse table. No need to reload it, however (FALSE) */
+ /* Parse the table again. No need to reload it, however */
Status = AdParseTable (Table, NULL, FALSE, FALSE);
if (ACPI_FAILURE (Status))
@@ -477,6 +476,15 @@ AdAmlDisassemble (
}
}
+ /*
+ * Now that the namespace is finalized, we can perform namespace
+ * transforms.
+ *
+ * 1) Convert fixed-offset references to resource descriptors
+ * to symbolic references (Note: modifies namespace)
+ */
+ AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
+
/* Optional displays */
if (AcpiGbl_DbOpt_disasm)
@@ -502,11 +510,12 @@ Cleanup:
if (OutToFile && File)
{
+ if (AslCompilerdebug) /* Display final namespace, with transforms */
+ {
+ LsSetupNsList (File);
+ LsDisplayNamespace ();
+ }
-#ifdef ASL_DISASM_DEBUG
- LsSetupNsList (File);
- LsDisplayNamespace ();
-#endif
fclose (File);
AcpiOsRedirectOutput (stdout);
}
OpenPOWER on IntegriCloud