iPXE
|
RTC-based time source. More...
Go to the source code of this file.
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static unsigned int | rtc_readb (int address) |
Read RTC register. More... | |
static int | rtc_is_busy (void) |
Check if RTC update is in progress. More... | |
static unsigned int | rtc_readb_bcd (int address) |
Read RTC BCD register. More... | |
static time_t | rtc_read_time (void) |
Read RTC time. More... | |
static time_t | rtc_now (void) |
Get current time in seconds. More... | |
PROVIDE_TIME (rtc, time_now, rtc_now) | |
RTC-based time source.
Definition in file rtc_time.c.
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Read RTC register.
address | Register address |
data | Data |
Definition at line 43 of file rtc_time.c.
References address, CMOS_ADDRESS, CMOS_DATA, inb(), and outb.
Referenced by rtc_is_busy(), rtc_read_time(), and rtc_readb_bcd().
|
static |
Check if RTC update is in progress.
is_busy | RTC update is in progress |
Definition at line 53 of file rtc_time.c.
References rtc_readb(), RTC_STATUS_A, and RTC_STATUS_A_UPDATE_IN_PROGRESS.
Referenced by rtc_read_time().
|
static |
Read RTC BCD register.
address | Register address |
value | Value |
Definition at line 63 of file rtc_time.c.
References address, and rtc_readb().
Referenced by rtc_read_time().
|
static |
Read RTC time.
time | Time, in seconds |
Definition at line 75 of file rtc_time.c.
References address, DBGC, mktime(), RTC_HOUR, rtc_is_busy(), RTC_MDAY, RTC_MIN, RTC_MON, rtc_readb(), rtc_readb_bcd(), RTC_SEC, RTC_STATUS_A, RTC_STATUS_B, RTC_STATUS_B_24_HOUR, RTC_STATUS_B_BINARY, RTC_YEAR, tm::tm_hour, tm::tm_mday, tm::tm_min, tm::tm_mon, tm::tm_sec, and tm::tm_year.
Referenced by rtc_now().
|
static |
Get current time in seconds.
time | Time, in seconds |
Definition at line 126 of file rtc_time.c.
References rtc_read_time().