diff options
author | Marcin Wojtas <mw@semihalf.com> | 2021-05-24 05:54:41 +0200 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-06-02 07:16:28 +0000 |
commit | b233eb1849ac01bdd5b24ea84460a2e481a4c5a9 (patch) | |
tree | 5ddd72bdd0f349323d6779889f22c17c271e4a21 /EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | |
parent | fdf3666f01a2dd02d83a808f609b9c744a74c652 (diff) | |
download | edk2-b233eb1849ac01bdd5b24ea84460a2e481a4c5a9.zip edk2-b233eb1849ac01bdd5b24ea84460a2e481a4c5a9.tar.gz edk2-b233eb1849ac01bdd5b24ea84460a2e481a4c5a9.tar.bz2 |
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>
Diffstat (limited to 'EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c')
-rw-r--r-- | EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c index e59036b..85650a6 100644 --- a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c +++ b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c @@ -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);
}
|