public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Pete Batard <pete@akeo.ie>
To: edk2-devel@lists.01.org
Subject: [PATCH 0/1] EmbeddedPkg: Fix multiple Virtual RTC issues
Date: Mon, 25 Feb 2019 23:52:01 +0000	[thread overview]
Message-ID: <20190225235202.2252-1-pete@akeo.ie> (raw)

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



             reply	other threads:[~2019-02-25 23:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 23:52 Pete Batard [this message]
2019-02-25 23:52 ` [PATCH 1/1] EmbeddedPkg: Fix multiple Virtual RTC issues Pete Batard
2019-02-26  7:36   ` 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=20190225235202.2252-1-pete@akeo.ie \
    --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