summaryrefslogtreecommitdiff
path: root/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
diff options
context:
space:
mode:
authorDavid Wei <david.wei@intel.com>2015-01-22 05:50:45 +0000
committerzwei4 <zwei4@Edk2>2015-01-22 05:50:45 +0000
commitd71c25cf2c7783024a3e9c57327f43654305838f (patch)
tree4a9c4b3bb7915bb2fae8ce02de2deb51ccea0cb6 /Vlv2TbltDevicePkg/PlatformDxe/Platform.c
parent83a276f61342d0b0d94e96f7d0636bf9474b5ed1 (diff)
Set RTC initial time to be BIOS Release time.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: David Wei <david.wei@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16639 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Vlv2TbltDevicePkg/PlatformDxe/Platform.c')
-rw-r--r--Vlv2TbltDevicePkg/PlatformDxe/Platform.c60
1 files changed, 40 insertions, 20 deletions
diff --git a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
index 0f3a414c5..760b8b00b 100644
--- a/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
+++ b/Vlv2TbltDevicePkg/PlatformDxe/Platform.c
@@ -1,15 +1,24 @@
/** @file
- Copyright (c) 2004 - 2014, 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 that accompanies this distribution.
- The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
-
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
-
+ Copyright (c) 2004 - 2015, 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 that accompanies this distribution.
+
+ The full text of the license may be found at
+
+ http://opensource.org/licenses/bsd-license.php.
+
+
+
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+
+
+
Module Name:
@@ -613,11 +622,11 @@ InitializePlatform (
EFI_STATUS Status;
UINTN VarSize;
EFI_HANDLE Handle = NULL;
-
EFI_EVENT mEfiExitBootServicesEvent;
-
- //
-mImageHandle = ImageHandle;
+ EFI_EVENT RtcEvent;
+ VOID *RtcCallbackReg = NULL;
+
+ mImageHandle = ImageHandle;
Status = gBS->InstallProtocolInterface (
&Handle,
@@ -789,13 +798,24 @@ mImageHandle = ImageHandle;
&mEfiExitBootServicesEvent
);
+ //
+ // Adjust RTC deafult time to be BIOS-built time.
+ //
+ Status = gBS->CreateEvent (
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
+ AdjustDefaultRtcTimeCallback,
+ NULL,
+ &RtcEvent
+ );
+ if (!EFI_ERROR (Status)) {
+ Status = gBS->RegisterProtocolNotify (
+ &gExitPmAuthProtocolGuid,
+ RtcEvent,
+ &RtcCallbackReg
+ );
-//
-// Tristae Lpc pins at last moment
-//
-if (mSystemConfiguration.TristateLpc == 1)
-{
-}
+ }
return EFI_SUCCESS;
}