From: "Masami Hiramatsu" <masami.hiramatsu@linaro.org>
To: Ard Biesheuvel <ard.biesheuvel@arm.com>,
Leif Lindholm <leif@nuviainc.com>,
Sumit Garg <sumit.garg@linaro.org>
Cc: sakamoto.kazuhiko@socionext.com, masami.hiramatsu@linaro.org,
devel@edk2.groups.io
Subject: [edk2-platforms PATCH v2 2/2] Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime
Date: Mon, 26 Jul 2021 17:28:17 +0900 [thread overview]
Message-ID: <162728809717.823177.18257352684706494891.stgit@localhost> (raw)
In-Reply-To: <162728807883.823177.7600899853841894479.stgit@localhost>
Clear unsupported Nanosecond field of the EFI_TIME data structure.
Without this fix, date/time commands on UEFI shell fail to set
because of the invaild parameter error.
This is tested on the SynQuacer DeveloperBox platform which also
uses 'Pcf8563' RTC chip.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
---
Changes in v2:
- Update changelog.
---
.../Pcf8563RealTimeClockLib.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
index 7310fecb39..b79ea89fea 100644
--- a/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
+++ b/Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c
@@ -117,6 +117,8 @@ LibGetTime (
return EFI_DEVICE_ERROR;
}
+ Time->Nanosecond = 0;
+
if ((DateTime.VL_seconds & PCF8563_CLOCK_INVALID) != 0) {
Time->Second = 0;
Time->Minute = 0;
next prev parent reply other threads:[~2021-07-26 8:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-26 8:27 [edk2-platforms PATCH v2 0/2] Fix some issues on SynQuacer Masami Hiramatsu
2021-07-26 8:28 ` [edk2-platforms PATCH v2 1/2] Silicon/SynQuacer/OpteeRngDxe: Fix invalid parameter check Masami Hiramatsu
2021-07-26 8:28 ` Masami Hiramatsu [this message]
2021-07-28 10:44 ` [edk2-devel] [edk2-platforms PATCH v2 0/2] Fix some issues on SynQuacer Ard Biesheuvel
2021-07-28 10:51 ` Masami Hiramatsu
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=162728809717.823177.18257352684706494891.stgit@localhost \
--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