summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c')
-rw-r--r--EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
index 4210708cff..de6fbb40e6 100644
--- a/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
+++ b/EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
@@ -88,10 +88,18 @@ LibGetTime (
//
EpochSeconds = BUILD_EPOCH;
DEBUG ((
- DEBUG_VERBOSE,
+ DEBUG_INFO,
"LibGetTime: %s non volatile variable was not found - Using compilation time epoch.\n",
mEpochVariableName
));
+
+ EfiSetVariable (
+ (CHAR16 *)mEpochVariableName,
+ &gEfiCallerIdGuid,
+ EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS,
+ sizeof (EpochSeconds),
+ &EpochSeconds
+ );
}
Counter = GetPerformanceCounter ();
EpochSeconds += DivU64x64Remainder (Counter, Freq, &Remainder);