Fix PcRtc Year calculation bug.

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8757 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
lgao4 2009-07-06 04:46:50 +00:00
parent ebcfa88032
commit 42c65073d2
1 changed files with 1 additions and 4 deletions

View File

@ -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 ||