aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos/vbnv.h
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-06-27 16:19:09 -0700
committerFurquan Shaikh <furquan@google.com>2016-06-29 07:59:44 +0200
commit165b6cf5c1192439838df83158c92313451f7777 (patch)
tree866886d32768b3a3a691d2aea9ab084a6fd04d0e /src/vendorcode/google/chromeos/vbnv.h
parentc30bfcaa9ebbe4d3e2ea0cac11784e13e56fe281 (diff)
vbnv: Do not silently reset cache in read_vbnv
Currently, read_vbnv performs a reset of the vbnv cache if it is not valid. However, this information is not passed up to the vboot layer, thus resulting in missed write-back of vbnv cache to storage if vboot does not update the cache itself. Update read_vbnv to return a value depending upon whether it wants a write-back to be performed when save is called. Return value: 0 = No write-back required 1 = Write-back of VBNV cache is required. Change-Id: I239939d5f9731d89a9d53fe662321b93fc1ab113 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/15457 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/vendorcode/google/chromeos/vbnv.h')
-rw-r--r--src/vendorcode/google/chromeos/vbnv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/vendorcode/google/chromeos/vbnv.h b/src/vendorcode/google/chromeos/vbnv.h
index 5d21cc8481..a66d687fe5 100644
--- a/src/vendorcode/google/chromeos/vbnv.h
+++ b/src/vendorcode/google/chromeos/vbnv.h
@@ -19,7 +19,12 @@
#include <types.h>
/* Generic functions */
-void read_vbnv(uint8_t *vbnv_copy);
+/*
+ * Return value for read_vbnv:
+ * 1 = write-back of vbnv copy is required.
+ * 0 = otherwise
+ */
+int 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);