summaryrefslogtreecommitdiff
path: root/src/soc/amd/common/vboot/vbnv_cmos.c
blob: 5baf923939e95b0c0856efb53c7b4f1b81b810d5 (plain)
1
2
3
4
5
6
7
8
9
10
/* SPDX-License-Identifier: GPL-2.0-only */

#include <security/vboot/vbnv.h>
#include <pc80/mc146818rtc.h>

int vbnv_cmos_failed(void)
{
	/* If CMOS power has failed, the century will be set to 0xff */
	return cmos_read(RTC_CLK_ALTCENTURY) == 0xff;
}