From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by mx.groups.io with SMTP id smtpd.web11.27507.1627288100694840980 for ; Mon, 26 Jul 2021 01:28:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=SoS35Jom; spf=pass (domain: linaro.org, ip: 209.85.214.172, mailfrom: masami.hiramatsu@linaro.org) Received: by mail-pl1-f172.google.com with SMTP id i10so7582786pla.3 for ; Mon, 26 Jul 2021 01:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=If5WfJ1GifqbqArRhCsL2Nx3rAXsa4T9UtrmXpEdOlg=; b=SoS35Jom90vpL1esW1wq3iNny8MG2/kcP2IqqSHJ+4hvadN6ZsMDjU+zLspc9PkrCW 6TVJneqvkijlaxSuXHnkPIo/t9cE7j0M5Z6Z0h9N5pxpvOXSfRAnkUVczuGEJLMU17fr 63O5DWdXetj0IvVRkD8q2WkAsEfJU00uuZIhvZ4Cg4VKp+skA8meuFRBiNWZLzN35AB1 m8NPJXbdJMWkWaGyX+OycWPpOr32kPy1urBlw7C95ztxfyXQ3W+RnTHip8r/G6xGqvaM lnNcZeFF92THe7qq8vYH5ATjM2Eb3n2aMDyk08B4fS3+nATnWkRjz+EzAX5DhbSik73j 2jtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=If5WfJ1GifqbqArRhCsL2Nx3rAXsa4T9UtrmXpEdOlg=; b=LV5sC+Kb+m9aBvi7DuVlKPYGBM2W/qN4yzoLz+duLLC4nxEP7NAOpR04Vx9P0c10Mk fCtKwrA977AqLDXYKAAcqlwLppcVlHlTxp5wnbIrN7omlNUXQkmU+sNWqJwx1GO4vbOZ u/cLj65abrcZuE+GrEGunNmOGqoyDdWUehd1nMmfcaRHY1SzMLnSMJuke+QKB7yoqiP2 e7GsTOqBb3kR8QuLgFk0iIHqzZKiuoojKPytN6KD400TqrmNQplUKS7dHC0PeFJNmlIw uxrmtR8uwIFr7Vzy2w6kQIKlcl9YGkDSpRf4hUTa5w4mj1vaR/wUnxqo0iLMLmgNCV5t J5Dw== X-Gm-Message-State: AOAM531489uKmKMQ5WRgKcTiDi3w1jIzxnoi0xAPUpu66BXWTT5kcxFy szIHZvnsDwAhVjyBk+S+AIf+yQ== X-Google-Smtp-Source: ABdhPJzZJaWNKbQnZHmlZExJrqD1Nnx32QgvWr0g8s5SAbM2pAMtJbabAnD68ie0NvXmMqXbMOPHtQ== X-Received: by 2002:a17:90a:7489:: with SMTP id p9mr4558117pjk.182.1627288100310; Mon, 26 Jul 2021 01:28:20 -0700 (PDT) Return-Path: Received: from localhost.localdomain (122x208x150x49.ap122.ftth.ucom.ne.jp. [122.208.150.49]) by smtp.gmail.com with ESMTPSA id m18sm11570705pjq.32.2021.07.26.01.28.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jul 2021 01:28:20 -0700 (PDT) From: "Masami Hiramatsu" To: Ard Biesheuvel , Leif Lindholm , Sumit Garg 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 Message-Id: <162728809717.823177.18257352684706494891.stgit@localhost> X-Mailer: git-send-email 2.25.1 In-Reply-To: <162728807883.823177.7600899853841894479.stgit@localhost> References: <162728807883.823177.7600899853841894479.stgit@localhost> User-Agent: StGit/0.19 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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 Reported-by: Kazuhiko Sakamoto --- 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;