From 42c65073d2fff2b59be1a663bcda69e6033d248e Mon Sep 17 00:00:00 2001 From: lgao4 Date: Mon, 6 Jul 2009 04:46:50 +0000 Subject: Fix PcRtc Year calculation bug. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8757 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Universal/PcatRealTimeClockRuntimeDxe/PcRtc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'MdeModulePkg') 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 || -- cgit v1.2.3