summaryrefslogtreecommitdiff
path: root/source/components/namespace/nsload.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/components/namespace/nsload.c')
-rw-r--r--source/components/namespace/nsload.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c
index b1b6afa70615..edd79327ff93 100644
--- a/source/components/namespace/nsload.c
+++ b/source/components/namespace/nsload.c
@@ -167,6 +167,24 @@ Unlock:
ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
"**** Completed Table Object Initialization\n"));
+ /*
+ * Execute any module-level code that was detected during the table load
+ * phase. Although illegal since ACPI 2.0, there are many machines that
+ * contain this type of code. Each block of detected executable AML code
+ * outside of any control method is wrapped with a temporary control
+ * method object and placed on a global list. The methods on this list
+ * are executed below.
+ *
+ * This case executes the module-level code for each table immediately
+ * after the table has been loaded. This provides compatibility with
+ * other ACPI implementations. Optionally, the execution can be deferred
+ * until later, see AcpiInitializeObjects.
+ */
+ if (!AcpiGbl_GroupModuleLevelCode)
+ {
+ AcpiNsExecModuleCodeList ();
+ }
+
return_ACPI_STATUS (Status);
}