Setwakeuptime(), Setwakeuptime() summary, Prototype – Intel Extensible Firmware Interface User Manual
Page 207: Parameters, Description, Status codes returned

Services
— Runtime Services
Version 1.10
12/01/02
6-15
SetWakeupTime()
Summary
Sets the system wakeup alarm clock time.
Prototype
EFI_STATUS
SetWakeupTime (
IN
BOOLEAN
Enable,
IN
EFI_TIME
*Time OPTIONAL
);
Parameters
Enable
Enable or disable the wakeup alarm.
Time
If
Enable
is
TRUE
, the time to set the wakeup alarm for. Type
EFI_TIME
is defined in the
function description. If
Enable
is
FALSE
, then this parameter is optional, and may be
NULL
.
Description
Setting a system wakeup alarm causes the system to wake up or power on at the set time. When the
alarm fires, the alarm signal is latched until acknowledged by calling
SetWakeupTime()
to
disable the alarm. If the alarm fires before the system is put into a sleeping or off state, since the
alarm signal is latched the system will immediately wake up. If the alarm fires while the system is
off and there is insufficient power to power on the system, the system is powered on when power
is restored.
For an ACPI-aware operating system, this function only handles programming the wakeup alarm
for the desired wakeup time. The operating system still controls the wakeup event as it normally
would through the ACPI Power Management register set.
The resolution for the wakeup alarm is defined to be 1 second.
During runtime, if a PC-AT CMOS device is present in the platform the caller must synchronize
access to the device before calling
SetWakeupTime()
.
Status Codes Returned
EFI_SUCCESS
If
Enable
is
TRUE
, then the wakeup alarm was enabled. If
Enable
is
FALSE
, then the wakeup alarm was disabled.
EFI_INVALID_PARAMETER
A time field is out of range.
EFI_DEVICE_ERROR
The wakeup time could not be set due to a hardware error.
EFI_UNSUPPORTED
A wakeup timer is not supported on this platform.