From: "Marcin Wojtas" <mw@semihalf.com>
To: devel@edk2.groups.io
Cc: michael.d.kinney@intel.com, leif@nuviainc.com,
ardb+tianocore@kernel.org, Samer.El-Haj-Mahmoud@arm.com,
sunny.Wang@arm.com, gjb@semihalf.com, upstream@semihalf.com,
Marcin Wojtas <mw@semihalf.com>
Subject: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime
Date: Mon, 24 May 2021 05:54:41 +0200 [thread overview]
Message-ID: <20210524035441.2489465-1-mw@semihalf.com> (raw)
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>
---
EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c b/EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClock.c
index e59036badc..85650a6ede 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);
}
--
2.29.0
next reply other threads:[~2021-05-24 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 3:54 Marcin Wojtas [this message]
2021-05-24 6:25 ` [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime Sunny Wang
2021-06-02 7:41 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210524035441.2489465-1-mw@semihalf.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox