summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2017-03-07 16:29:18 -0800
committerErik Schmauss <erik.schmauss@intel.com>2017-05-03 11:06:50 -0700
commit0372deae1e9a43c512a3bd3a7691088a52504629 (patch)
treeba0bc18fce3eb5cb92a5ba4ce2e79ddba629a240 /source
parent0e0a87111f280c197661689979b2c48443b0326c (diff)
downloadacpica-0372deae1e9a43c512a3bd3a7691088a52504629.tar.gz
Changing AcpiDmGetExternalMethodCount to AcpiDmGetUnresolvedExternalMethodCount.
This method has been changed to count methods that are not resolved at this point. Resolved methods do not need to be reparsed since the amount of arguments should be known after it is parsed in PsParseLoop. Signed-off-by: Erik Schmauss <erik.schmauss@intel.com>
Diffstat (limited to 'source')
-rw-r--r--source/common/adisasm.c4
-rw-r--r--source/common/dmextern.c26
-rw-r--r--source/include/acdisasm.h2
3 files changed, 19 insertions, 13 deletions
diff --git a/source/common/adisasm.c b/source/common/adisasm.c
index b3e978f59..a5a338529 100644
--- a/source/common/adisasm.c
+++ b/source/common/adisasm.c
@@ -537,7 +537,7 @@ AdDisassembleOneTable (
* the entire tree with the new information (namely, the
* number of arguments per method)
*/
- if (AcpiDmGetExternalMethodCount ())
+ if (AcpiDmGetUnresolvedExternalMethodCount ())
{
Status = AdReparseOneTable (Table, File, OwnerId);
if (ACPI_FAILURE (Status))
@@ -616,7 +616,7 @@ AdReparseOneTable (
fprintf (stderr,
"\nFound %u external control methods, "
"reparsing with new information\n",
- AcpiDmGetExternalMethodCount ());
+ AcpiDmGetUnresolvedExternalMethodCount ());
/* Reparse, rebuild namespace */
diff --git a/source/common/dmextern.c b/source/common/dmextern.c
index 818d2adc2..788f7139a 100644
--- a/source/common/dmextern.c
+++ b/source/common/dmextern.c
@@ -1082,23 +1082,28 @@ AcpiDmAddExternalsToNamespace (
/*******************************************************************************
*
- * FUNCTION: AcpiDmGetExternalMethodCount
+ * FUNCTION: AcpiDmGetUnresolvedExternalMethodCount
*
* PARAMETERS: None
*
- * RETURN: The number of control method externals in the external list
+ * RETURN: The number of unresolved control method externals in the
+ * external list
*
- * DESCRIPTION: Return the number of method externals that have been generated.
- * If any control method externals have been found, we must
- * re-parse the entire definition block with the new information
- * (number of arguments for the methods.) This is limitation of
- * AML, we don't know the number of arguments from the control
- * method invocation itself.
+ * DESCRIPTION: Return the number of unresolved external methods that have been
+ * generated. If any unresolved control method externals have been
+ * found, we must re-parse the entire definition block with the new
+ * information (number of arguments for the methods.)
+ * This is limitation of AML, we don't know the number of arguments
+ * from the control method invocation itself.
+ *
+ * Note: resolved external control methods are external control
+ * methods encoded with the AML_EXTERNAL_OP bytecode within the
+ * AML being disassembled.
*
******************************************************************************/
UINT32
-AcpiDmGetExternalMethodCount (
+AcpiDmGetUnresolvedExternalMethodCount (
void)
{
ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
@@ -1107,7 +1112,8 @@ AcpiDmGetExternalMethodCount (
while (External)
{
- if (External->Type == ACPI_TYPE_METHOD)
+ if (External->Type == ACPI_TYPE_METHOD &&
+ !(External->Flags & ACPI_EXT_ORIGIN_FROM_OPCODE))
{
Count++;
}
diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h
index 47b3cac83..5c5df4081 100644
--- a/source/include/acdisasm.h
+++ b/source/include/acdisasm.h
@@ -929,7 +929,7 @@ AcpiDmAddExternalsToNamespace (
void);
UINT32
-AcpiDmGetExternalMethodCount (
+AcpiDmGetUnresolvedExternalMethodCount (
void);
void