mirror of
https://github.com/acpica/acpica/
synced 2025-01-27 19:55:25 +03:00
Add option to disable method return value validation and repair.
Runtime option can be used to disable return value repair if this is causing a problem on a particular machine. Also added an option to AcpiExec (-dr) to set this disable flag.
This commit is contained in:
parent
b6aa2c7f27
commit
a4b5938821
@ -288,14 +288,20 @@ AcpiNsCheckPredefinedNames (
|
||||
}
|
||||
|
||||
/*
|
||||
* 1) We have a return value, but if one wasn't expected, just exit, this is
|
||||
* not a problem. For example, if the "Implicit Return" feature is
|
||||
* enabled, methods will always return a value.
|
||||
* Return value validation and possible repair.
|
||||
*
|
||||
* 2) If the return value can be of any type, then we cannot perform any
|
||||
* validation, exit.
|
||||
* 1) Don't perform return value validation/repair if this feature
|
||||
* has been disabled via a global option.
|
||||
*
|
||||
* 2) We have a return value, but if one wasn't expected, just exit,
|
||||
* this is not a problem. For example, if the "Implicit Return"
|
||||
* feature is enabled, methods will always return a value.
|
||||
*
|
||||
* 3) If the return value can be of any type, then we cannot perform
|
||||
* any validation, just exit.
|
||||
*/
|
||||
if ((!Predefined->Info.ExpectedBtypes) ||
|
||||
if (AcpiGbl_DisableAutoRepair ||
|
||||
(!Predefined->Info.ExpectedBtypes) ||
|
||||
(Predefined->Info.ExpectedBtypes == ACPI_RTYPE_ALL))
|
||||
{
|
||||
goto Cleanup;
|
||||
|
@ -200,6 +200,12 @@ UINT8 ACPI_INIT_GLOBAL (AcpiGbl_CopyDsdtLocally, FALSE);
|
||||
*/
|
||||
UINT8 ACPI_INIT_GLOBAL (AcpiGbl_TruncateIoAddresses, FALSE);
|
||||
|
||||
/*
|
||||
* Disable runtime checking and repair of values returned by control methods.
|
||||
* Use only if the repair is causing a problem on a particular machine.
|
||||
*/
|
||||
UINT8 ACPI_INIT_GLOBAL (AcpiGbl_DisableAutoRepair, FALSE);
|
||||
|
||||
|
||||
/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
|
||||
|
||||
|
@ -148,6 +148,7 @@ extern UINT32 AcpiGbl_TraceFlags;
|
||||
extern UINT8 AcpiGbl_EnableAmlDebugObject;
|
||||
extern UINT8 AcpiGbl_CopyDsdtLocally;
|
||||
extern UINT8 AcpiGbl_TruncateIoAddresses;
|
||||
extern UINT8 AcpiGbl_DisableAutoRepair;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -165,6 +165,7 @@ usage (void)
|
||||
printf (" -da Disable method abort on error\n");
|
||||
printf (" -di Disable execution of STA/INI methods during init\n");
|
||||
printf (" -do Disable Operation Region address simulation\n");
|
||||
printf (" -dr Disable repair of method return values\n");
|
||||
printf (" -dt Disable allocation tracking (performance)\n");
|
||||
printf ("\n");
|
||||
|
||||
@ -505,6 +506,10 @@ main (
|
||||
AcpiGbl_DbOpt_NoRegionSupport = TRUE;
|
||||
break;
|
||||
|
||||
case 'r':
|
||||
AcpiGbl_DisableAutoRepair = TRUE;
|
||||
break;
|
||||
|
||||
case 't':
|
||||
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
|
||||
AcpiGbl_DisableMemTracking = TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user