PcAtChipsetPkg: RTC Runtime unable to get correct IO port by PCD
RTC runtime is unable to get dynamic PCD value after booting to OS using runtime services. Resolution: Cache the dynamic PCD value in RTC driver entry point Cc: Ray Ni <ray.ni@intel.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Gua Guo <gua.guo@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user