]> git.proxmox.com Git - mirror_edk2.git/commitdiff
PcAtChipsetPkg: Do right sign extension to avoid a wrong daylight value saving into...
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Nov 2011 06:43:01 +0000 (06:43 +0000)
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 17 Nov 2011 06:43:01 +0000 (06:43 +0000)
signed-off-by: erictian
reviewed-by: niruiyu

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12732 6f19259b-4bc3-4df7-8a09-765794883524

PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c

index 882f2ea8cd1ebbde69bdf54b60105a31e9449e65..f874f3fb8f74e9834acf1f05177229c558f2c761 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   RTC Architectural Protocol GUID as defined in DxeCis 0.96.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -414,7 +414,7 @@ PcRtcSetTime (
   Global->Daylight      = Time->Daylight;\r
 \r
   TimerVar = Time->Daylight;\r
-  TimerVar = (UINT32) ((TimerVar << 16) | Time->TimeZone);\r
+  TimerVar = (UINT32) ((TimerVar << 16) | (UINT16)(Time->TimeZone));\r
   Status =  EfiSetVariable (\r
               L"RTC",\r
               &gEfiCallerIdGuid,\r