public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 0/1] EmbeddedPkg: Fix multiple Virtual RTC issues
@ 2019-02-25 23:52 Pete Batard
  2019-02-25 23:52 ` [PATCH 1/1] " Pete Batard
  0 siblings, 1 reply; 3+ messages in thread
From: Pete Batard @ 2019-02-25 23:52 UTC (permalink / raw)
  To: edk2-devel

This patch fixes multiple issues in VirtualRealTimeClockLib.c:

1. Use of two separate variables (ElapsedSeconds and EpochSeconds) in
   LibGetTime(), where only a single one should have been used.

2. Possible underflow while sustracting TZ/DST offsets in LibSetTime()
   if the user sets a date that is very close to start of epoch.

3. Non substraction of elpased seconds since reset, which would lead to
   the following behaviour in UEFI shell (assuming for this example that
   exactly 5 minutes have elapsed since platform reset):

     Shell> time 12:00:00
     Shell> time
     12:05:01 (LOCAL)

   In other words, setting and immediately reading back the time would
   result in the returned value being offset by the time since reset.

   This last behaviour has been observed (and confirmed fixed) using an
   RPi3 platform.

Regards,

/Pete

Pete Batard (1):
  EmbeddedPkg: Fix multiple Virtual RTC issues

 .../VirtualRealTimeClockLib.c                 | 34 ++++++++++++++-----
 1 file changed, 25 insertions(+), 9 deletions(-)

-- 
2.17.0.windows.1



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-02-26  7:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-25 23:52 [PATCH 0/1] EmbeddedPkg: Fix multiple Virtual RTC issues Pete Batard
2019-02-25 23:52 ` [PATCH 1/1] " Pete Batard
2019-02-26  7:36   ` Ard Biesheuvel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox