summaryrefslogtreecommitdiff
path: root/PcAtChipsetPkg
diff options
context:
space:
mode:
authorerictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-17 06:43:01 +0000
committererictian <erictian@6f19259b-4bc3-4df7-8a09-765794883524>2011-11-17 06:43:01 +0000
commite02c57b63bfb48327c966adbcb2d25435a5cadcf (patch)
tree8dc1e374d70fd8fdde52d0e466b6c4965a306301 /PcAtChipsetPkg
parent99d23a9465873d8c5ef8aefce20397bf64063ab8 (diff)
downloadedk2-platforms-e02c57b63bfb48327c966adbcb2d25435a5cadcf.tar.xz
PcAtChipsetPkg: Do right sign extension to avoid a wrong daylight value saving into "RTC" variable
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
Diffstat (limited to 'PcAtChipsetPkg')
-rw-r--r--PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
index 882f2ea8cd..f874f3fb8f 100644
--- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
+++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c
@@ -1,7 +1,7 @@
/** @file
RTC Architectural Protocol GUID as defined in DxeCis 0.96.
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -414,7 +414,7 @@ PcRtcSetTime (
Global->Daylight = Time->Daylight;
TimerVar = Time->Daylight;
- TimerVar = (UINT32) ((TimerVar << 16) | Time->TimeZone);
+ TimerVar = (UINT32) ((TimerVar << 16) | (UINT16)(Time->TimeZone));
Status = EfiSetVariable (
L"RTC",
&gEfiCallerIdGuid,