coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
vbnv_cmos.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <security/vboot/vbnv.h>
4 #include <pc80/mc146818rtc.h>
5 
6 int vbnv_cmos_failed(void)
7 {
8  /* If CMOS power has failed, the century will be set to 0xff */
9  return cmos_read(RTC_CLK_ALTCENTURY) == 0xff;
10 }
static unsigned char cmos_read(unsigned char addr)
Definition: mc146818rtc.h:105
#define RTC_CLK_ALTCENTURY
Definition: mc146818rtc.h:94
int vbnv_cmos_failed(void)
Definition: vbnv_cmos.c:6