3 Copyright (c) 2009, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "RealTimeClock.h"
17 PC_RTC_MODULE_GLOBALS mModuleGlobal
;
23 OUT EFI_TIME_CAPABILITIES
*Capabilities
29 TODO: Add function description
33 Time - TODO: add argument description
34 Capabilities - TODO: add argument description
38 TODO: add return values
42 return PcRtcGetTime (Time
, Capabilities
, &mModuleGlobal
);
54 TODO: Add function description
58 Time - TODO: add argument description
62 TODO: add return values
66 return PcRtcSetTime (Time
, &mModuleGlobal
);
71 PcRtcEfiGetWakeupTime (
80 TODO: Add function description
84 Enabled - TODO: add argument description
85 Pending - TODO: add argument description
86 Time - TODO: add argument description
90 TODO: add return values
94 return PcRtcGetWakeupTime (Enabled
, Pending
, Time
, &mModuleGlobal
);
99 PcRtcEfiSetWakeupTime (
107 TODO: Add function description
111 Enabled - TODO: add argument description
112 Time - TODO: add argument description
116 TODO: add return values
120 return PcRtcSetWakeupTime (Enabled
, Time
, &mModuleGlobal
);
125 InitializeRealTimeClock (
126 IN EFI_HANDLE ImageHandle
,
127 IN EFI_SYSTEM_TABLE
*SystemTable
139 // TODO: ImageHandle - add argument and description to function comment
140 // TODO: SystemTable - add argument and description to function comment
143 EFI_HANDLE NewHandle
;
145 EfiInitializeLock (&mModuleGlobal
.RtcLock
, TPL_HIGH_LEVEL
);
147 Status
= PcRtcInit (&mModuleGlobal
);
148 if (EFI_ERROR (Status
)) {
152 SystemTable
->RuntimeServices
->GetTime
= PcRtcEfiGetTime
;
153 SystemTable
->RuntimeServices
->SetTime
= PcRtcEfiSetTime
;
154 SystemTable
->RuntimeServices
->GetWakeupTime
= PcRtcEfiGetWakeupTime
;
155 SystemTable
->RuntimeServices
->SetWakeupTime
= PcRtcEfiSetWakeupTime
;
158 Status
= gBS
->InstallMultipleProtocolInterfaces (
160 &gEfiRealTimeClockArchProtocolGuid
,