Commit 7a4b8131 authored by Lin Ming's avatar Lin Ming Committed by Len Brown

ACPICA: Enhance implicit return mechanism

For Windows compatibility, return an implicit integer of value
zero for methods that have no executable code. A default implicit
value of zero is provided for methods. Lin Ming.
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent eeb4437e
......@@ -295,6 +295,22 @@ acpi_status acpi_ps_execute_method(struct acpi_evaluate_info *info)
goto cleanup;
}
/*
* Start method evaluation with an implicit return of zero.
* This is done for Windows compatibility.
*/
if (acpi_gbl_enable_interpreter_slack) {
walk_state->implicit_return_obj =
acpi_ut_create_internal_object(ACPI_TYPE_INTEGER);
if (!walk_state->implicit_return_obj) {
status = AE_NO_MEMORY;
acpi_ds_delete_walk_state(walk_state);
goto cleanup;
}
walk_state->implicit_return_obj->integer.value = 0;
}
/* Parse the AML */
status = acpi_ps_parse_aml(walk_state);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment