]> git.proxmox.com Git - mirror_edk2.git/commit
EmbeddedPkg: Only print LibGetTime message about compile time epoch once
authorRebecca Cran <rebecca@nuviainc.com>
Fri, 5 Mar 2021 16:11:16 +0000 (09:11 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Mon, 8 Mar 2021 12:28:20 +0000 (12:28 +0000)
commit94fa95c8746c553324e8b69ea4a74af670075324
tree28c8f20db17d5d7059663c7362cc2d82337b005a
parentd28a68153492ce3e64fb0535674e11e7f46a88a8
EmbeddedPkg: Only print LibGetTime message about compile time epoch once

The message "LibGetTime: RtcEpochSeconds non volatile variable was not
found - Using compilation time epoch." can be printed a very large
number of times, causing log files to become excessively large. This is
because the RtcEpochSeconds variable only gets set if LibSetTime is
called, for example by running 'time 12:00' in the UEFI Shell.

Avoid this by setting RtcEpochSeconds to BUILD_EPOCH (EpochSeconds)
after printing the message. It's set to a volatile variable so the
message will be displayed on future boots and not hidden.

Commit 44ae214591e58af468eacb7b873eaa0bc187c4fa reduced the verbosity of
the message to DEBUG_VERBOSE. Revert it back to DEBUG_INFO so it's more
prominent now that it doesn't get printed so frequently.

Signed-off-by: Rebecca Cran <rebecca@nuviainc.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c