AcpiExec: Add option to perform additional tests.

add -ei option to enable additional acpica interface tests.
This commit is contained in:
Robert Moore 2012-07-08 13:52:34 -07:00
parent b1bf45d9f8
commit 2e674261e8
3 changed files with 38 additions and 28 deletions

View File

@ -140,6 +140,7 @@ extern BOOLEAN AcpiGbl_IgnoreErrors;
extern UINT8 AcpiGbl_RegionFillValue;
extern UINT8 AcpiGbl_UseHwReducedFadt;
extern BOOLEAN AcpiGbl_DisplayRegionAccess;
extern BOOLEAN AcpiGbl_DoInterfaceTests;
/* Check for unexpected exceptions */

View File

@ -610,49 +610,52 @@ AeMiscellaneousTests (
#endif /* !ACPI_REDUCED_HARDWARE */
/*
* Tests for AcpiLoadTable and AcpiUnloadParentTable
*/
if (AcpiGbl_DoInterfaceTests)
{
/*
* Tests for AcpiLoadTable and AcpiUnloadParentTable
*/
/* Attempt unload of DSDT, should fail */
/* Attempt unload of DSDT, should fail */
Status = AcpiGetHandle (NULL, "\\_SB_", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiGetHandle (NULL, "\\_SB_", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_STATUS (AcpiUnloadParentTable, Status, AE_TYPE);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_STATUS (AcpiUnloadParentTable, Status, AE_TYPE);
/* Load and unload SSDT4 */
/* Load and unload SSDT4 */
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
AE_CHECK_OK (AcpiLoadTable, Status);
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
AE_CHECK_OK (AcpiLoadTable, Status);
Status = AcpiGetHandle (NULL, "\\_T96", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiGetHandle (NULL, "\\_T96", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_OK (AcpiUnloadParentTable, Status);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_OK (AcpiUnloadParentTable, Status);
/* Re-load SSDT4 */
/* Re-load SSDT4 */
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
AE_CHECK_OK (AcpiLoadTable, Status);
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt4Code);
AE_CHECK_OK (AcpiLoadTable, Status);
/* Unload and re-load SSDT2 (SSDT2 is in the XSDT) */
/* Unload and re-load SSDT2 (SSDT2 is in the XSDT) */
Status = AcpiGetHandle (NULL, "\\_T99", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiGetHandle (NULL, "\\_T99", &Handle);
AE_CHECK_OK (AcpiGetHandle, Status);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_OK (AcpiUnloadParentTable, Status);
Status = AcpiUnloadParentTable (Handle);
AE_CHECK_OK (AcpiUnloadParentTable, Status);
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt2Code);
AE_CHECK_OK (AcpiLoadTable, Status);
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt2Code);
AE_CHECK_OK (AcpiLoadTable, Status);
/* Load OEM9 table (causes table override) */
/* Load OEM9 table (causes table override) */
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt3Code);
AE_CHECK_OK (AcpiLoadTable, Status);
Status = AcpiLoadTable ((ACPI_TABLE_HEADER *) Ssdt3Code);
AE_CHECK_OK (AcpiLoadTable, Status);
}
AeHardwareInterfaces ();

View File

@ -128,6 +128,7 @@ BOOLEAN AcpiGbl_IgnoreErrors = FALSE;
BOOLEAN AcpiGbl_DbOpt_NoRegionSupport = FALSE;
BOOLEAN AcpiGbl_DebugTimeout = FALSE;
UINT8 AcpiGbl_UseHwReducedFadt = FALSE;
BOOLEAN AcpiGbl_DoInterfaceTests = FALSE;
static UINT8 AcpiGbl_BatchMode = 0;
static char BatchBuffer[128];
@ -171,6 +172,7 @@ usage (void)
printf ("\n");
ACPI_OPTION ("-ef", "Enable display of final memory statistics");
ACPI_OPTION ("-ei", "Enable additional tests for ACPICA interfaces");
ACPI_OPTION ("-em", "Enable Interpreter Serialized Mode");
ACPI_OPTION ("-es", "Enable Interpreter Slack Mode");
ACPI_OPTION ("-et", "Enable debug semaphore timeout");
@ -537,6 +539,10 @@ main (
#endif
break;
case 'i':
AcpiGbl_DoInterfaceTests = TRUE;
break;
case 'm':
AcpiGbl_AllMethodsSerialized = TRUE;
printf ("Enabling AML Interpreter serialized mode\n");