From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: matt.fleming@intel.com, linux-efi@vger.kernel.org,
James.Bottomley@hansenpartnership.com, roy.franz@linaro.org,
leif.lindholm@linaro.org, Alessandro Zummo <a.zummo@towertech.it>,
rtc-linux@googlegroups.com
Subject: [rtc-linux] Re: [PATCH v2] efi: rtc-efi: use correct EFI 'epoch'
Date: Sat, 13 Jun 2015 14:57:53 +0200 [thread overview]
Message-ID: <20150613125753.GJ3890@piout.net> (raw)
In-Reply-To: <1433841335-10453-1-git-send-email-ard.biesheuvel@linaro.org>
On 09/06/2015 at 11:15:35 +0200, Ard Biesheuvel wrote :
> The rtc-efi driver declares that the EFI 'epoch' is 1/1/1998, but
> the UEFI spec does not define it at all. It does define a range of
> [1900, 9999] for the 'Year' member of the EFI_TIME struct, so let's
> use 1900 as the minimum year and not 1998.
> Also, move the validation of the year to the convert_from_efi_time()
> routine where all other EFI_TIME fields are validated as well.
>
> This prevents rtc_read_time() failures when the RTC that backs the
> EFI time services is set to a date before 1998, e.g., when it has
> lost power.
>
> This also optimizes the compute_wday() routine, by replacing the for
> loop with a simple arithmetic expression, and by reusing the yearday
> value that we need to compute anyway when populating the
> rtc_time::tm_yday field.
>
> Cc: Alessandro Zummo <a.zummo@towertech.it>
> Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> Cc: rtc-linux@googlegroups.com
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Applied, thanks.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
prev parent reply other threads:[~2015-06-13 12:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-08 11:27 [rtc-linux] [PATCH] efi: rtc-efi: use correct EFI 'epoch' Ard Biesheuvel
2015-06-08 19:26 ` [rtc-linux] " James Bottomley
2015-06-08 20:15 ` Ard Biesheuvel
2015-06-08 20:27 ` James Bottomley
2015-06-08 21:27 ` Ard Biesheuvel
2015-06-09 9:15 ` [rtc-linux] [PATCH v2] " Ard Biesheuvel
2015-06-13 12:57 ` Alexandre Belloni [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-all 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=20150613125753.GJ3890@piout.net \
--to=alexandre.belloni@free-electrons.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=a.zummo@towertech.it \
--cc=ard.biesheuvel@linaro.org \
--cc=leif.lindholm@linaro.org \
--cc=linux-efi@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=roy.franz@linaro.org \
--cc=rtc-linux@googlegroups.com \
/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