瀏覽代碼

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 年之前
父節點
當前提交
c131fed73d
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      Silicon/NXP/Library/Pcf8563RealTimeClockLib/Pcf8563RealTimeClockLib.c

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