diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c index 292c25def7..b999a2eafe 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -141,6 +141,11 @@ PcRtcInit ( // Status = RtcWaitToUpdate (PcdGet32 (PcdRealTimeClockUpdateTimeout)); if (EFI_ERROR (Status)) { + // + // Set the variable with default value if the RTC is functioning incorrectly. + // + Global->SavedTimeZone = EFI_UNSPECIFIED_TIMEZONE; + Global->Daylight = 0; if (!EfiAtRuntime ()) { EfiReleaseLock (&Global->RtcLock); } diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c index 16f74b83c9..9cf3988705 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c @@ -137,9 +137,7 @@ InitializePcRtc ( EfiInitializeLock (&mModuleGlobal.RtcLock, TPL_CALLBACK); Status = PcRtcInit (&mModuleGlobal); - if (EFI_ERROR (Status)) { - return Status; - } + ASSERT_EFI_ERROR (Status); gRT->GetTime = PcRtcEfiGetTime; gRT->SetTime = PcRtcEfiSetTime;