summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-06 04:46:50 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-07-06 04:46:50 +0000
commit42c65073d2fff2b59be1a663bcda69e6033d248e (patch)
treee706496104f43800b0a7fbac178b18d4b33621f3 /MdeModulePkg
parentebcfa88032c9591ed319e5a838d003ca821512f5 (diff)
downloadedk2-platforms-42c65073d2fff2b59be1a663bcda69e6033d248e.tar.xz
Fix PcRtc Year calculation bug.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8757 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
index cf5ed0bf5a..d26e923605 100644
--- a/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -159,7 +159,6 @@ PcRtcInit (
Time.Year = RtcRead (RTC_ADDRESS_YEAR);
Century = RtcRead (RTC_ADDRESS_CENTURY);
- Time.Year = (UINT16) (Century * 100 + Time.Year);
//
// Set RTC configuration after get original time
@@ -283,7 +282,6 @@ PcRtcGetTime (
Time->Year = RtcRead (RTC_ADDRESS_YEAR);
Century = RtcRead (RTC_ADDRESS_CENTURY);
- Time->Year = (UINT16) (Century * 100 + Time->Year);
//
// Release RTC Lock.
@@ -511,7 +509,6 @@ PcRtcGetWakeupTime (
}
Century = RtcRead (RTC_ADDRESS_CENTURY);
- Time->Year = (UINT16) (Century * 100 + Time->Year);
//
// Release RTC Lock.
@@ -717,8 +714,8 @@ ConvertRtcTimeToEfiTime (
Time->Hour = CheckAndConvertBcd8ToDecimal8 (Time->Hour);
Time->Minute = CheckAndConvertBcd8ToDecimal8 (Time->Minute);
Time->Second = CheckAndConvertBcd8ToDecimal8 (Time->Second);
- Century = CheckAndConvertBcd8ToDecimal8 (Century);
}
+ Century = CheckAndConvertBcd8ToDecimal8 (Century);
if (Time->Year == 0xff || Time->Month == 0xff || Time->Day == 0xff ||
Time->Hour == 0xff || Time->Minute == 0xff || Time->Second == 0xff ||