coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
|
#include <acpi/acpi.h>
#include <arch/io.h>
#include <commonlib/bsd/bcd.h>
#include <console/console.h>
#include <fallback.h>
#include <pc80/mc146818rtc.h>
#include <rtc.h>
#include <security/vboot/vbnv.h>
#include <security/vboot/vbnv_layout.h>
#include <types.h>
#include <version.h>
Go to the source code of this file.
Macros | |
#define | RTC_CONTROL_DEFAULT (RTC_24H) |
#define | RTC_FREQ_SELECT_DEFAULT (RTC_REF_CLCK_32KHZ | RTC_RATE_1024HZ) |
Functions | |
static void | cmos_reset_date (void) |
int | cmos_checksum_valid (int range_start, int range_end, int cks_loc) |
void | cmos_set_checksum (int range_start, int range_end, int cks_loc) |
int | cmos_error (void) |
static bool | __cmos_init (bool invalid) |
static void | cmos_init_vbnv (bool invalid) |
void | cmos_init (bool invalid) |
static void | wait_uip (void) |
static int | cmos_date_invalid (void) |
void | cmos_check_update_date (void) |
int | rtc_set (const struct rtc_time *time) |
int | rtc_get (struct rtc_time *time) |
void | set_boot_successful (void) |
#define RTC_CONTROL_DEFAULT (RTC_24H) |
Definition at line 65 of file mc146818rtc.c.
#define RTC_FREQ_SELECT_DEFAULT (RTC_REF_CLCK_32KHZ | RTC_RATE_1024HZ) |
Definition at line 66 of file mc146818rtc.c.
Definition at line 68 of file mc146818rtc.c.
References acpi_is_wakeup_s3(), BIOS_DEBUG, BIOS_WARNING, cmos_checksum_valid(), cmos_disable_rtc(), cmos_error(), cmos_lb_cks_valid(), cmos_read(), cmos_reset_date(), cmos_set_checksum(), cmos_write(), CONFIG, ENV_RAMSTAGE, PC_CKS_LOC, PC_CKS_RANGE_END, PC_CKS_RANGE_START, printk, RTC_CONTROL, RTC_CONTROL_DEFAULT, RTC_FREQ_SELECT, RTC_FREQ_SELECT_DEFAULT, RTC_INTR_FLAGS, RTC_VALID, and RTC_VRT.
Referenced by cmos_init(), and cmos_init_vbnv().
Definition at line 192 of file mc146818rtc.c.
References cmos_date_invalid(), cmos_read(), cmos_reset_date(), CONFIG, RTC_CLK_ALTCENTURY, RTC_CLK_YEAR, wait_uip(), and year.
Referenced by lpc_init(), and rtc_init().
int cmos_checksum_valid | ( | int | range_start, |
int | range_end, | ||
int | cks_loc | ||
) |
Definition at line 31 of file mc146818rtc.c.
References cmos_read(), and CONFIG.
Referenced by __cmos_init(), and cmos_lb_cks_valid().
|
static |
Definition at line 179 of file mc146818rtc.c.
References rtc_get(), and rtc_invalid().
Referenced by cmos_check_update_date().
int cmos_error | ( | void | ) |
Definition at line 60 of file mc146818rtc.c.
References cmos_read(), RTC_VALID, and RTC_VRT.
Referenced by __cmos_init(), do_normal_boot(), and sanitize_cmos().
Definition at line 156 of file mc146818rtc.c.
References __cmos_init(), cmos_init_vbnv(), CONFIG, and ENV_SMM.
Referenced by i82801dx_rtc_init(), i82801gx_rtc_init(), i82801ix_rtc_init(), i82801jx_rtc_init(), isa_init(), lpc_init(), pch_rtc_init(), rtc_init(), sb_rtc_init(), sc_init(), soc_rtc_init(), and verify_psp_transfer_buf().
Definition at line 141 of file mc146818rtc.c.
References __cmos_init(), read_vbnv_cmos(), save_vbnv_cmos(), vbnv, and VBOOT_VBNV_BLOCK_SIZE.
Referenced by cmos_init().
Definition at line 15 of file mc146818rtc.c.
References bcd2bin(), bcd_date::century, coreboot_build_date, bcd_date::day, bcd_date::month, rtc_set(), rtc_time::sec, bcd_date::weekday, and bcd_date::year.
Referenced by __cmos_init(), and cmos_check_update_date().
void cmos_set_checksum | ( | int | range_start, |
int | range_end, | ||
int | cks_loc | ||
) |
Definition at line 47 of file mc146818rtc.c.
References cmos_read(), and cmos_write().
Referenced by __cmos_init().
int rtc_get | ( | struct rtc_time * | time | ) |
Definition at line 224 of file mc146818rtc.c.
References bcd2bin(), cmos_read(), CONFIG, rtc_time::hour, rtc_time::mday, rtc_time::min, rtc_time::mon, RTC_CLK_ALTCENTURY, RTC_CLK_DAYOFMONTH, RTC_CLK_DAYOFWEEK, RTC_CLK_HOUR, RTC_CLK_MINUTE, RTC_CLK_MONTH, RTC_CLK_SECOND, RTC_CLK_YEAR, rtc_time::sec, wait_uip(), rtc_time::wday, and rtc_time::year.
Referenced by cmos_date_invalid().
int rtc_set | ( | const struct rtc_time * | time | ) |
Definition at line 210 of file mc146818rtc.c.
References bin2bcd(), cmos_write(), CONFIG, rtc_time::hour, rtc_time::mday, rtc_time::min, rtc_time::mon, RTC_CLK_ALTCENTURY, RTC_CLK_DAYOFMONTH, RTC_CLK_DAYOFWEEK, RTC_CLK_HOUR, RTC_CLK_MINUTE, RTC_CLK_MONTH, RTC_CLK_SECOND, RTC_CLK_YEAR, rtc_time::sec, rtc_time::wday, and rtc_time::year.
Referenced by cmos_reset_date().
Definition at line 248 of file mc146818rtc.c.
References CONFIG, inb(), outb(), RTC_BOOT_BYTE, RTC_BOOT_NORMAL, and RTC_PORT.
Referenced by acpi_resume().
Definition at line 172 of file mc146818rtc.c.
References cmos_read(), RTC_REG_A, and RTC_UIP.
Referenced by cmos_check_update_date(), and rtc_get().