blob: 78ca8f66f37171dc2d1d8ee455a3714ac6870f13 [file] [log] [blame]
Duncan Laurie88b28ad2016-01-25 17:13:27 -08001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2016 Google Inc.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 */
15
Furquan Shaikh2a12e2e2016-07-25 11:48:03 -070016#ifndef __VBOOT_VBNV_H__
17#define __VBOOT_VBNV_H__
Duncan Laurie88b28ad2016-01-25 17:13:27 -080018
19#include <types.h>
20
21/* Generic functions */
Furquan Shaikhbe87f732016-06-29 11:26:27 -070022void read_vbnv(uint8_t *vbnv_copy);
Duncan Laurie88b28ad2016-01-25 17:13:27 -080023void save_vbnv(const uint8_t *vbnv_copy);
24int verify_vbnv(uint8_t *vbnv_copy);
25int get_recovery_mode_from_vbnv(void);
26void set_recovery_mode_into_vbnv(int recovery_reason);
27int vboot_wants_oprom(void);
28
29/* CMOS backend */
30void read_vbnv_cmos(uint8_t *vbnv_copy);
31void save_vbnv_cmos(const uint8_t *vbnv_copy);
Jagadish Krishnamoorthye2e561d2016-05-18 15:18:58 -070032void init_vbnv_cmos(int rtc_fail);
Duncan Laurie88b28ad2016-01-25 17:13:27 -080033
34/* Flash backend */
35void read_vbnv_flash(uint8_t *vbnv_copy);
36void save_vbnv_flash(const uint8_t *vbnv_copy);
37
38/* EC backend */
39void read_vbnv_ec(uint8_t *vbnv_copy);
40void save_vbnv_ec(const uint8_t *vbnv_copy);
41
Furquan Shaikh2a12e2e2016-07-25 11:48:03 -070042#endif /* __VBOOT_VBNV_H__ */