EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime

GetWakeupTime should return full time information, including
the daylight/timezone. Make use of the existing non-volatile
variables for that purpose. Moreover add an error checking
of possibly invalid parameters.
This partially fixes FWTS and SCT Set/GetWakeupTime tests on
Marvell platforms.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Marcin Wojtas 2021-05-24 05:54:41 +02:00 committed by mergify[bot]
parent fdf3666f01
commit b233eb1849
1 changed files with 11 additions and 0 deletions

View File

@ -143,6 +143,17 @@ GetWakeupTime (
OUT EFI_TIME *Time
)
{
if (Time == NULL || Enabled == NULL || Pending == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// Set these first so the RealTimeClockLib implementation
// can override them based on its own settings.
//
Time->TimeZone = mTimeSettings.TimeZone;
Time->Daylight = mTimeSettings.Daylight;
return LibGetWakeupTime (Enabled, Pending, Time);
}