aboutsummaryrefslogtreecommitdiff
path: root/src/vboot/vbnv.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-07-25 11:48:03 -0700
committerFurquan Shaikh <furquan@google.com>2016-07-28 00:36:00 +0200
commit2a12e2e8da2477d97b8774babd1a74dda65d11a0 (patch)
treec8bbdc94b777269dcdaa2c5070c61432b1001986 /src/vboot/vbnv.h
parentaf8ef2a810f97b762d30de2b6f30d6ffefa0ae0e (diff)
vboot: Separate vboot from chromeos
VBOOT_VERIFY_FIRMWARE should be independent of CHROMEOS. This allows use of verified boot library without having to stick to CHROMEOS. BUG=chrome-os-partner:55639 Change-Id: Ia2c328712caedd230ab295b8a613e3c1ed1532d9 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15867 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'src/vboot/vbnv.h')
-rw-r--r--src/vboot/vbnv.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/src/vboot/vbnv.h b/src/vboot/vbnv.h
new file mode 100644
index 0000000000..78ca8f66f3
--- /dev/null
+++ b/src/vboot/vbnv.h
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+
+#ifndef __VBOOT_VBNV_H__
+#define __VBOOT_VBNV_H__
+
+#include <types.h>
+
+/* Generic functions */
+void read_vbnv(uint8_t *vbnv_copy);
+void save_vbnv(const uint8_t *vbnv_copy);
+int verify_vbnv(uint8_t *vbnv_copy);
+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);
+void init_vbnv_cmos(int rtc_fail);
+
+/* 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);
+
+#endif /* __VBOOT_VBNV_H__ */