diff options
Diffstat (limited to 'source/components/namespace')
| -rw-r--r-- | source/components/namespace/nsdumpdv.c | 5 | ||||
| -rw-r--r-- | source/components/namespace/nseval.c | 24 | ||||
| -rw-r--r-- | source/components/namespace/nsload.c | 24 | ||||
| -rw-r--r-- | source/components/namespace/nsparse.c | 26 | ||||
| -rw-r--r-- | source/components/namespace/nsxfname.c | 22 |
5 files changed, 63 insertions, 38 deletions
diff --git a/source/components/namespace/nsdumpdv.c b/source/components/namespace/nsdumpdv.c index 92a772f2aa1c..6ab5ba5214e5 100644 --- a/source/components/namespace/nsdumpdv.c +++ b/source/components/namespace/nsdumpdv.c @@ -208,9 +208,8 @@ AcpiNsDumpOneDevice ( } ACPI_DEBUG_PRINT_RAW ((ACPI_DB_TABLES, - " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", - Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address), - Info->CurrentStatus)); + " HID: %s, ADR: %8.8X%8.8X\n", + Info->HardwareId.Value, ACPI_FORMAT_UINT64 (Info->Address))); ACPI_FREE (Info); } diff --git a/source/components/namespace/nseval.c b/source/components/namespace/nseval.c index b1e1af9a15ca..2a7eb8f595ad 100644 --- a/source/components/namespace/nseval.c +++ b/source/components/namespace/nseval.c @@ -429,6 +429,16 @@ AcpiNsEvaluate ( Status = AE_OK; } + else if (ACPI_FAILURE(Status)) + { + /* If ReturnObject exists, delete it */ + + if (Info->ReturnObject) + { + AcpiUtRemoveReference (Info->ReturnObject); + Info->ReturnObject = NULL; + } + } ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, "*** Completed evaluation of object %s ***\n", @@ -457,6 +467,17 @@ Cleanup: * DESCRIPTION: Execute all elements of the global module-level code list. * Each element is executed as a single control method. * + * NOTE: With this option enabled, each block of detected executable AML + * code that is 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 function executes the module-level code for all tables only after + * all of the tables have been loaded. It is a legacy option and is + * not compatible with other ACPI implementations. See AcpiNsLoadTable. + * + * This function will be removed when the legacy option is removed. + * ******************************************************************************/ void @@ -477,6 +498,9 @@ AcpiNsExecModuleCodeList ( Next = AcpiGbl_ModuleCodeList; if (!Next) { + ACPI_DEBUG_PRINT ((ACPI_DB_INIT_NAMES, + "Legacy MLC block list is empty\n")); + return_VOID; } diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index ad00d92fca8a..698d3a572326 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -270,23 +270,17 @@ Unlock: "**** 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 handles the legacy option that groups all module-level + * code blocks together and defers execution until all of the tables + * are loaded. Execute all of these blocks at this time. + * Execute any module-level code that was detected during the table + * load phase. * - * 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. + * Note: this option is deprecated and will be eliminated in the + * future. Use of this option can cause problems with AML code that + * depends upon in-order immediate execution of module-level code. */ - if (!AcpiGbl_ParseTableAsTermList && !AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } - + AcpiNsExecModuleCodeList (); return_ACPI_STATUS (Status); } diff --git a/source/components/namespace/nsparse.c b/source/components/namespace/nsparse.c index bb24bab91a8d..8e86ee4c5de9 100644 --- a/source/components/namespace/nsparse.c +++ b/source/components/namespace/nsparse.c @@ -171,8 +171,17 @@ * * RETURN: Status * - * DESCRIPTION: Load ACPI/AML table by executing the entire table as a - * TermList. + * DESCRIPTION: Load ACPI/AML table by executing the entire table as a single + * large control method. + * + * NOTE: The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. * ******************************************************************************/ @@ -403,8 +412,19 @@ AcpiNsParseTable ( ACPI_FUNCTION_TRACE (NsParseTable); - if (AcpiGbl_ParseTableAsTermList) + if (AcpiGbl_ExecuteTablesAsMethods) { + /* + * This case executes the AML table as one large control method. + * The point of this is to execute any module-level code in-place + * as the table is parsed. Some AML code depends on this behavior. + * + * It is a run-time option at this time, but will eventually become + * the default. + * + * Note: This causes the table to only have a single-pass parse. + * However, this is compatible with other ACPI implementations. + */ ACPI_DEBUG_PRINT_RAW ((ACPI_DB_PARSE, "%s: **** Start table execution pass\n", ACPI_GET_FUNCTION_NAME)); diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index d5b32eda9ca9..f94c0e45de03 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -376,7 +376,7 @@ AcpiNsCopyDeviceId ( * namespace node and possibly by running several standard * control methods (Such as in the case of a device.) * - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, + * For Device and Processor objects, run the Device _HID, _UID, _CID, * _CLS, _ADR, _SxW, and _SxD methods. * * Note: Allocates the return buffer, must be freed by the caller. @@ -385,8 +385,9 @@ AcpiNsCopyDeviceId ( * discovery namespace traversal. Therefore, no complex methods can be * executed, especially those that access operation regions. Therefore, do * not add any additional methods that could cause problems in this area. - * this was the fate of the _SUB method which was found to cause such - * problems and was removed (11/2015). + * Because of this reason support for the following methods has been removed: + * 1) _SUB method was removed (11/2015) + * 2) _STA method was removed (02/2018) * ******************************************************************************/ @@ -517,26 +518,13 @@ AcpiGetObjectInfo ( { /* * Get extra info for ACPI Device/Processor objects only: - * Run the _STA, _ADR and, SxW, and _SxD methods. + * Run the _ADR and, SxW, and _SxD methods. * * Notes: none of these methods are required, so they may or may * not be present for this device. The Info->Valid bitfield is used * to indicate which methods were found and run successfully. - * - * For _STA, if the method does not exist, then (as per the ACPI - * specification), the returned CurrentStatus flags will indicate - * that the device is present/functional/enabled. Otherwise, the - * CurrentStatus flags reflect the value returned from _STA. */ - /* Execute the Device._STA method */ - - Status = AcpiUtExecute_STA (Node, &Info->CurrentStatus); - if (ACPI_SUCCESS (Status)) - { - Valid |= ACPI_VALID_STA; - } - /* Execute the Device._ADR method */ Status = AcpiUtEvaluateNumericObject (METHOD_NAME__ADR, Node, |
