From: "Ard Biesheuvel" <ardb@kernel.org>
To: Marcin Wojtas <mw@semihalf.com>
Cc: edk2-devel-groups-io <devel@edk2.groups.io>,
Michael Kinney <michael.d.kinney@intel.com>,
Leif Lindholm <leif@nuviainc.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com>,
Sunny Wang <sunny.Wang@arm.com>,
Grzegorz Bernacki <gjb@semihalf.com>,
upstream@semihalf.com
Subject: Re: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime
Date: Wed, 2 Jun 2021 09:41:11 +0200 [thread overview]
Message-ID: <CAMj1kXHtwNTwpfz9V8OV4EebqHQts9vqC1L3Xt+7cA9BbMGmVw@mail.gmail.com> (raw)
In-Reply-To: <20210524035441.2489465-1-mw@semihalf.com>
On Mon, 24 May 2021 at 05:55, Marcin Wojtas <mw@semihalf.com> wrote:
>
> 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>
Merged as #1682
Thanks,
> ---
> 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
>
prev parent reply other threads:[~2021-06-02 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 3:54 [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime Marcin Wojtas
2021-05-24 6:25 ` Sunny Wang
2021-06-02 7:41 ` Ard Biesheuvel [this message]
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=CAMj1kXHtwNTwpfz9V8OV4EebqHQts9vqC1L3Xt+7cA9BbMGmVw@mail.gmail.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