summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/stoneyridge/pmutil.c
blob: 1db9d00a5de887bb8dab87cacdf954393dc4fd5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <acpi/acpi.h>
#include <soc/southbridge.h>
#include <amdblocks/acpimmio.h>
#include <security/vboot/vboot_common.h>
#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;
}