TianoCore EDK2 master
|
#include "PcRtc.h"
Go to the source code of this file.
Variables | |
UINTN | mRtcIndexRegister |
UINTN | mRtcTargetRegister |
UINT16 | mRtcDefaultYear |
UINT16 | mMinimalValidYear |
UINT16 | mMaximalValidYear |
UINTN | mDayOfMonth [] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
CHAR16 | mTimeZoneVariableName [] = L"RTC" |
RTC Architectural Protocol GUID as defined in DxeCis 0.96.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Inc. All rights reserved.
Copyright (c) 2018 - 2020, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PcRtc.c.
UINT8 CheckAndConvertBcd8ToDecimal8 | ( | IN UINT8 | Value | ) |
Checks an 8-bit BCD value, and converts to an 8-bit value if valid.
This function checks the 8-bit BCD value specified by Value. If valid, the function converts it to an 8-bit value and returns it. Otherwise, return 0xff.
Value | The 8-bit BCD value to check and convert |
Compare the Hour, Minute and Second of the From time and the To time.
Only compare H/M/S in EFI_TIME and ignore other fields here.
From | the first time |
To | the second time |
VOID ConvertEfiTimeToRtcTime | ( | IN OUT EFI_TIME * | Time, |
IN RTC_REGISTER_B | RegisterB | ||
) |
Converts time from EFI_TIME format defined by UEFI spec to RTC format.
This function converts time from EFI_TIME format defined by UEFI spec to RTC format. If data mode of RTC is BCD, then converts EFI_TIME to it. If RTC is in 12-hour format, then converts EFI_TIME to it.
Time | On input, the time data read from UEFI to convert On output, the time converted to RTC format |
RegisterB | Value of Register B of RTC, indicating data mode |
EFI_STATUS ConvertRtcTimeToEfiTime | ( | IN OUT EFI_TIME * | Time, |
IN RTC_REGISTER_B | RegisterB | ||
) |
Converts time read from RTC to EFI_TIME format defined by UEFI spec.
This function converts raw time data read from RTC to the EFI_TIME format defined by UEFI spec. If data mode of RTC is BCD, then converts it to decimal, If RTC is in 12-hour format, then converts it to 24-hour format.
Time | On input, the time data read from RTC to convert On output, the time converted to UEFI format |
RegisterB | Value of Register B of RTC, indicating data mode and hour format. |
EFI_INVALID_PARAMETER | Parameters passed in are invalid. |
EFI_SUCCESS | Convert RTC time to EFI time successfully. |
UINT8 GetCenturyRtcAddress | ( | VOID | ) |
Notification function of ACPI Table change.
This is a notification function registered on ACPI Table change event. It saves the Century address stored in ACPI FADT table.
Event | Event whose notification function is being invoked. |
Context | Pointer to the notification function's context. |
EFI_STATUS PcRtcGetTime | ( | OUT EFI_TIME * | Time, |
OUT EFI_TIME_CAPABILITIES *Capabilities | OPTIONAL, | ||
IN PC_RTC_MODULE_GLOBALS * | Global | ||
) |
Returns the current time and date information, and the time-keeping capabilities of the hardware platform.
Time | A pointer to storage to receive a snapshot of the current time. |
Capabilities | An optional pointer to a buffer to receive the real time clock device's capabilities. |
Global | For global use inside this module. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | Time is NULL. |
EFI_DEVICE_ERROR | The time could not be retrieved due to hardware error. |
EFI_STATUS PcRtcGetWakeupTime | ( | OUT BOOLEAN * | Enabled, |
OUT BOOLEAN * | Pending, | ||
OUT EFI_TIME * | Time, | ||
IN PC_RTC_MODULE_GLOBALS * | Global | ||
) |
Returns the current wakeup alarm clock setting.
Enabled | Indicates if the alarm is currently enabled or disabled. |
Pending | Indicates if the alarm signal is pending and requires acknowledgment. |
Time | The current alarm setting. |
Global | For global use inside this module. |
EFI_SUCCESS | The alarm settings were returned. |
EFI_INVALID_PARAMETER | Enabled is NULL. |
EFI_INVALID_PARAMETER | Pending is NULL. |
EFI_INVALID_PARAMETER | Time is NULL. |
EFI_DEVICE_ERROR | The wakeup time could not be retrieved due to a hardware error. |
EFI_UNSUPPORTED | A wakeup timer is not supported on this platform. |
EFI_STATUS PcRtcInit | ( | IN PC_RTC_MODULE_GLOBALS * | Global | ) |
EFI_STATUS PcRtcSetTime | ( | IN EFI_TIME * | Time, |
IN PC_RTC_MODULE_GLOBALS * | Global | ||
) |
Sets the current local time and date information.
Time | A pointer to the current time. |
Global | For global use inside this module. |
EFI_SUCCESS | The operation completed successfully. |
EFI_INVALID_PARAMETER | A time field is out of range. |
EFI_DEVICE_ERROR | The time could not be set due due to hardware error. |
EFI_STATUS PcRtcSetTimeZone | ( | IN INT16 | TimeZone, |
IN UINT8 | Daylight, | ||
IN PC_RTC_MODULE_GLOBALS * | Global | ||
) |
Sets the current local timezone & daylight information.
TimeZone | Timezone info. |
Daylight | Daylight info. |
Global | For global use inside this module. |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The variable could not be set due due to hardware error. |
EFI_STATUS PcRtcSetWakeupTime | ( | IN BOOLEAN | Enable, |
IN EFI_TIME *Time | OPTIONAL, | ||
IN PC_RTC_MODULE_GLOBALS * | Global | ||
) |
Sets the system wakeup alarm clock time.
Enabled | Enable or disable the wakeup alarm. |
Time | If Enable is TRUE, the time to set the wakeup alarm for. If Enable is FALSE, then this parameter is optional, and may be NULL. |
Global | For global use inside this module. |
EFI_SUCCESS | If Enable is TRUE, then the wakeup alarm was enabled. If Enable is FALSE, then the wakeup alarm was disabled. |
EFI_INVALID_PARAMETER | A time field is out of range. |
EFI_DEVICE_ERROR | The wakeup time could not be set due to a hardware error. |
EFI_UNSUPPORTED | A wakeup timer is not supported on this platform. |
EFI_STATUS RtcTimeFieldsValid | ( | IN EFI_TIME * | Time | ) |
EFI_STATUS RtcWaitToUpdate | ( | UINTN | Timeout | ) |
UINTN mDayOfMonth[] = { 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 } |
|
extern |
Definition at line 23 of file PcRtcEntry.c.
|
extern |
Definition at line 22 of file PcRtcEntry.c.
|
extern |
Definition at line 21 of file PcRtcEntry.c.
|
extern |
Definition at line 19 of file PcRtcEntry.c.
|
extern |
Definition at line 20 of file PcRtcEntry.c.