3 Copyright (c) 2005, 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.
18 #include "RealTimeClock.h"
20 static PC_RTC_MODULE_GLOBALS mModuleGlobal
;
26 OUT EFI_TIME_CAPABILITIES
*Capabilities
32 TODO: Add function description
36 Time - TODO: add argument description
37 Capabilities - TODO: add argument description
41 TODO: add return values
45 return PcRtcGetTime (Time
, Capabilities
, &mModuleGlobal
);
57 TODO: Add function description
61 Time - TODO: add argument description
65 TODO: add return values
69 return PcRtcSetTime (Time
, &mModuleGlobal
);
74 PcRtcEfiGetWakeupTime (
83 TODO: Add function description
87 Enabled - TODO: add argument description
88 Pending - TODO: add argument description
89 Time - TODO: add argument description
93 TODO: add return values
97 return PcRtcGetWakeupTime (Enabled
, Pending
, Time
, &mModuleGlobal
);
102 PcRtcEfiSetWakeupTime (
110 TODO: Add function description
114 Enabled - TODO: add argument description
115 Time - TODO: add argument description
119 TODO: add return values
123 return PcRtcSetWakeupTime (Enabled
, Time
, &mModuleGlobal
);
128 InitializeRealTimeClock (
129 IN EFI_HANDLE ImageHandle
,
130 IN EFI_SYSTEM_TABLE
*SystemTable
142 // TODO: ImageHandle - add argument and description to function comment
143 // TODO: SystemTable - add argument and description to function comment
146 EFI_HANDLE NewHandle
;
149 EfiInitializeLock (&mModuleGlobal
.RtcLock
, TPL_HIGH_LEVEL
);
151 Status
= PcRtcInit (&mModuleGlobal
);
152 if (EFI_ERROR (Status
)) {
156 SystemTable
->RuntimeServices
->GetTime
= PcRtcEfiGetTime
;
157 SystemTable
->RuntimeServices
->SetTime
= PcRtcEfiSetTime
;
158 SystemTable
->RuntimeServices
->GetWakeupTime
= PcRtcEfiGetWakeupTime
;
159 SystemTable
->RuntimeServices
->SetWakeupTime
= PcRtcEfiSetWakeupTime
;
162 Status
= gBS
->InstallMultipleProtocolInterfaces (
164 &gEfiRealTimeClockArchProtocolGuid
,