From 23e8c6d2ba0d2236a94397e7b596ff0ee71f71d8 Mon Sep 17 00:00:00 2001 From: vit9696 Date: Wed, 1 May 2019 18:37:10 +0300 Subject: [PATCH] OpenCoreMisc: Add boot timestamp --- Platform/OpenCore/OpenCoreMisc.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Platform/OpenCore/OpenCoreMisc.c b/Platform/OpenCore/OpenCoreMisc.c index e3f7a5f1..aacfc76c 100644 --- a/Platform/OpenCore/OpenCoreMisc.c +++ b/Platform/OpenCore/OpenCoreMisc.c @@ -79,6 +79,7 @@ OcMiscEarlyInit ( EFI_STATUS Status; CHAR8 *ConfigData; UINT32 ConfigDataSize; + EFI_TIME BootTime; ConfigData = OcStorageReadFileUnicode ( Storage, @@ -134,6 +135,26 @@ OcMiscEarlyInit ( Config->Misc.Security.RequireSignature )); + Status = gRT->GetTime (&BootTime, NULL); + if (!EFI_ERROR (Status)) { + DEBUG (( + DEBUG_INFO, + "OC: Boot timestamp: - %04u.%02u.%02u %02u:%02u:%02u\n", + BootTime.Year, + BootTime.Month, + BootTime.Day, + BootTime.Hour, + BootTime.Minute, + BootTime.Second + )); + } else { + DEBUG (( + DEBUG_INFO, + "OC: Boot timestamp: - %r\n", + Status + )); + } + return EFI_SUCCESS; }