coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
rtc.c File Reference
#include <intelblocks/pcr.h>
#include <intelblocks/rtc.h>
#include <soc/pcr_ids.h>
#include <pc80/mc146818rtc.h>
Include dependency graph for rtc.c:

Go to the source code of this file.

Macros

#define PCR_RTC_CONF   0x3400
 
#define PCR_RTC_CONF_UCMOS_EN   (1 << 2)
 
#define PCR_RTC_CONF_LCMOS_LOCK   (1 << 3)
 
#define PCR_RTC_CONF_UCMOS_LOCK   (1 << 4)
 
#define PCR_RTC_CONF_BILD   (1 << 31)
 
#define PCR_RTC_BUC   0x3414
 
#define PCR_RTC_BUC_TOP_SWAP   (1 << 0)
 

Functions

void enable_rtc_upper_bank (void)
 
__weak int soc_get_rtc_failed (void)
 
void rtc_init (void)
 
void rtc_conf_set_bios_interface_lockdown (void)
 

Macro Definition Documentation

◆ PCR_RTC_BUC

#define PCR_RTC_BUC   0x3414

Definition at line 15 of file rtc.c.

◆ PCR_RTC_BUC_TOP_SWAP

#define PCR_RTC_BUC_TOP_SWAP   (1 << 0)

Definition at line 16 of file rtc.c.

◆ PCR_RTC_CONF

#define PCR_RTC_CONF   0x3400

Definition at line 9 of file rtc.c.

◆ PCR_RTC_CONF_BILD

#define PCR_RTC_CONF_BILD   (1 << 31)

Definition at line 13 of file rtc.c.

◆ PCR_RTC_CONF_LCMOS_LOCK

#define PCR_RTC_CONF_LCMOS_LOCK   (1 << 3)

Definition at line 11 of file rtc.c.

◆ PCR_RTC_CONF_UCMOS_EN

#define PCR_RTC_CONF_UCMOS_EN   (1 << 2)

Definition at line 10 of file rtc.c.

◆ PCR_RTC_CONF_UCMOS_LOCK

#define PCR_RTC_CONF_UCMOS_LOCK   (1 << 4)

Definition at line 12 of file rtc.c.

Function Documentation

◆ enable_rtc_upper_bank()

void enable_rtc_upper_bank ( void  )

Definition at line 18 of file rtc.c.

References pcr_or32(), PCR_RTC_CONF, PCR_RTC_CONF_UCMOS_EN, and PID_RTC.

Referenced by bootblock_c_entry(), and bootblock_pch_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rtc_conf_set_bios_interface_lockdown()

void rtc_conf_set_bios_interface_lockdown ( void  )

Definition at line 37 of file rtc.c.

References pcr_rmw32(), PCR_RTC_CONF, PCR_RTC_CONF_BILD, and PID_RTC.

Here is the call graph for this function:

◆ rtc_init()

void rtc_init ( void  )

Definition at line 29 of file rtc.c.

References cmos_check_update_date(), cmos_init(), and soc_get_rtc_failed().

Referenced by lpc_soc_init(), mainboard_romstage_entry(), pmc_init(), pmc_soc_init(), rtc_boot_common(), and soc_pmc_enable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ soc_get_rtc_failed()

__weak int soc_get_rtc_failed ( void  )

Definition at line 24 of file rtc.c.

Referenced by rtc_init().

Here is the caller graph for this function: