Kaynağa Gözat

Silicon/NXP/Pcf8563RealTimeClockLib: Clear Nanosecond field in GetTime

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.

Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
Reported-by: Kazuhiko Sakamoto <sakamoto.kazuhiko@socionext.com>
Masami Hiramatsu 2 yıl önce
ebeveyn
işleme
c131fed73d

+ 2 - 0
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;