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
This commit is contained in:
@@ -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.
|
||||
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;
|
||||
EFIAPI
|
||||
EFI_EVENT mEfiExitBootServicesEvent;
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
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
|
||||
);
|
||||
|
||||
EVT_NOTIFY_SIGNAL,
|
||||
TPL_NOTIFY,
|
||||
EnableAcpiCallback,
|
||||
NULL,
|
||||
&gEfiEventExitBootServicesGuid,
|
||||
&mEfiExitBootServicesEvent
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user