From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web08.10012.1622619686165993593 for ; Wed, 02 Jun 2021 00:41:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HxTzDalY; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 69BF56139A for ; Wed, 2 Jun 2021 07:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1622619685; bh=lHMjbGrSYly6s7f/z4WTWuJw4rnYkWvA+X+C9oaP3Xk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HxTzDalY+QmSYZfN2XrImhwbkmQ0IQNholS3uG3Mcjd9kwTyWx7ZEMIpVW+LiTrmR 8CjLNe3pqPzVxU1r4NRzlkJaeIUZjTavGtg1UoCjW+o0l1ajZqbeaPcfQOpreTvvVD SZMndQo7D8K0GdQsc+83Ooi/C29ozA0Yvpj9hYNuDCnns/6kTsg0Oe+uAigi7vLLUd 61tKsMBwaoYydPuwM5ZMDc2FC95Nu+fldgBeJCqdpuDZhvvhNhTDjkeA8Hdr+g58GY 5MDWlLTrhhOTCKoz9X6+Tztu4IDcBlHZKjlom5mG7P52B0oF5x53D1Jsh72jycIQmU BbWv7dac2i5Sw== Received: by mail-lj1-f175.google.com with SMTP id s25so1353500ljo.11 for ; Wed, 02 Jun 2021 00:41:25 -0700 (PDT) X-Gm-Message-State: AOAM532X0c2muU+9+FE9HoxhcktIGEWpJb/w7uRsaWm4wtM/7Uu4D9Vt sP0ly6mbrRhtdOTf5FTvGrXLIwuRJ4uZzofs6gQ= X-Google-Smtp-Source: ABdhPJyhHrn1ThJoqvsh4kPZixpPDiNRq0s5XaGiPGxQAwD6jD+avjGKWKOzzfNeEsDw2soEIKuwgpUT2SsKx9HLE7c= X-Received: by 2002:a2e:a485:: with SMTP id h5mr12253756lji.247.1622619682695; Wed, 02 Jun 2021 00:41:22 -0700 (PDT) MIME-Version: 1.0 References: <20210524035441.2489465-1-mw@semihalf.com> In-Reply-To: <20210524035441.2489465-1-mw@semihalf.com> From: "Ard Biesheuvel" Date: Wed, 2 Jun 2021 09:41:11 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] EmbeddedPkg/RealTimeClockRuntimeDxe: Improve GetWakeupTime To: Marcin Wojtas Cc: edk2-devel-groups-io , Michael Kinney , Leif Lindholm , Ard Biesheuvel , Samer El-Haj-Mahmoud , Sunny Wang , Grzegorz Bernacki , upstream@semihalf.com Content-Type: text/plain; charset="UTF-8" On Mon, 24 May 2021 at 05:55, Marcin Wojtas 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 Reviewed-by: Ard Biesheuvel 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 >