public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime
@ 2021-06-25  4:28 ????
  0 siblings, 0 replies; only message in thread
From: ???? @ 2021-06-25  4:28 UTC (permalink / raw)
  To: Ard Biesheuvel, Leif Lindholm; +Cc: sakamoto.kazuhiko, masami.hiramatsu, devel

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.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
---
 .../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;


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-25  4:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-25  4:28 [PATCH] Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime ????

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