diff options
Diffstat (limited to 'src/soc/amd/common/vboot/vbnv_cmos.c')
-rw-r--r-- | src/soc/amd/common/vboot/vbnv_cmos.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/amd/common/vboot/vbnv_cmos.c b/src/soc/amd/common/vboot/vbnv_cmos.c new file mode 100644 index 0000000000..5baf923939 --- /dev/null +++ b/src/soc/amd/common/vboot/vbnv_cmos.c @@ -0,0 +1,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; +} |