2016-01-26 02:13:27 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2016-07-25 20:48:03 +02:00
|
|
|
#ifndef __VBOOT_VBNV_H__
|
|
|
|
#define __VBOOT_VBNV_H__
|
2016-01-26 02:13:27 +01:00
|
|
|
|
|
|
|
#include <types.h>
|
|
|
|
|
|
|
|
/* Generic functions */
|
2016-06-29 20:26:27 +02:00
|
|
|
void read_vbnv(uint8_t *vbnv_copy);
|
2016-01-26 02:13:27 +01:00
|
|
|
void save_vbnv(const uint8_t *vbnv_copy);
|
|
|
|
int verify_vbnv(uint8_t *vbnv_copy);
|
2016-12-29 13:59:37 +01:00
|
|
|
void regen_vbnv_crc(uint8_t *vbnv_copy);
|
2016-01-26 02:13:27 +01:00
|
|
|
int get_recovery_mode_from_vbnv(void);
|
|
|
|
void set_recovery_mode_into_vbnv(int recovery_reason);
|
|
|
|
int vboot_wants_oprom(void);
|
|
|
|
|
|
|
|
/* CMOS backend */
|
|
|
|
void read_vbnv_cmos(uint8_t *vbnv_copy);
|
|
|
|
void save_vbnv_cmos(const uint8_t *vbnv_copy);
|
|
|
|
|
|
|
|
/* Flash backend */
|
|
|
|
void read_vbnv_flash(uint8_t *vbnv_copy);
|
|
|
|
void save_vbnv_flash(const uint8_t *vbnv_copy);
|
|
|
|
|
|
|
|
/* EC backend */
|
|
|
|
void read_vbnv_ec(uint8_t *vbnv_copy);
|
|
|
|
void save_vbnv_ec(const uint8_t *vbnv_copy);
|
|
|
|
|
2016-07-25 20:48:03 +02:00
|
|
|
#endif /* __VBOOT_VBNV_H__ */
|