New "Sleep" command to simulate sleep

date	2004.05.11.22.03.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 16:17:44 +00:00
parent a195a988e8
commit fdbedec12b

View File

@ -1,7 +1,7 @@
/*******************************************************************************
*
* Module Name: dbcmds - debug commands and output routines
* $Revision: 1.111 $
* $Revision: 1.112 $
*
******************************************************************************/
@ -157,6 +157,37 @@ static ARGUMENT_INFO AcpiDbObjectTypes [] =
};
ACPI_STATUS
AcpiDbSleep (
char *ObjectArg)
{
ACPI_STATUS Status;
UINT8 SleepState;
SleepState = (UINT8) ACPI_STRTOUL (ObjectArg, NULL, 0);
AcpiOsPrintf ("**** Prepare to sleep ****\n");
Status = AcpiEnterSleepStatePrep (SleepState);
if (ACPI_FAILURE (Status))
{
return (Status);
}
AcpiOsPrintf ("**** Going to sleep ****\n");
Status = AcpiEnterSleepState (SleepState);
if (ACPI_FAILURE (Status))
{
return (Status);
}
AcpiOsPrintf ("**** returning from sleep ****\n");
Status = AcpiLeaveSleepState (SleepState);
return (Status);
}
/*******************************************************************************
*
* FUNCTION: AcpiDbWalkForReferences