summaryrefslogtreecommitdiffstats
path: root/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
diff options
context:
space:
mode:
Diffstat (limited to 'PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c')
-rw-r--r--PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
index e6e9458d75..b600df4879 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtcEntry.c
@@ -16,8 +16,11 @@ EFI_HANDLE mHandle = NULL;
STATIC EFI_EVENT mVirtualAddrChangeEvent;
-UINTN mRtcIndexRegister;
-UINTN mRtcTargetRegister;
+UINTN mRtcIndexRegister;
+UINTN mRtcTargetRegister;
+UINT16 mRtcDefaultYear;
+UINT16 mMinimalValidYear;
+UINT16 mMaximalValidYear;
/**
Returns the current time and date information, and the time-keeping capabilities
@@ -164,8 +167,15 @@ InitializePcRtc (
if (FeaturePcdGet (PcdRtcUseMmio)) {
mRtcIndexRegister = (UINTN)PcdGet64 (PcdRtcIndexRegister64);
mRtcTargetRegister = (UINTN)PcdGet64 (PcdRtcTargetRegister64);
+ } else {
+ mRtcIndexRegister = (UINTN)PcdGet8 (PcdRtcIndexRegister);
+ mRtcTargetRegister = (UINTN)PcdGet8 (PcdRtcTargetRegister);
}
+ mRtcDefaultYear = PcdGet16 (PcdRtcDefaultYear);
+ mMinimalValidYear = PcdGet16 (PcdMinimalValidYear);
+ mMaximalValidYear = PcdGet16 (PcdMaximalValidYear);
+
Status = PcRtcInit (&mModuleGlobal);
ASSERT_EFI_ERROR (Status);