summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/vboot/vbnv.c5
-rw-r--r--src/vboot/vbnv.h2
-rw-r--r--src/vboot/vboot_logic.c4
3 files changed, 9 insertions, 2 deletions
diff --git a/src/vboot/vbnv.c b/src/vboot/vbnv.c
index 6537bf04dc..6667825f46 100644
--- a/src/vboot/vbnv.c
+++ b/src/vboot/vbnv.c
@@ -146,3 +146,8 @@ int vboot_wants_oprom(void)
vbnv_setup();
return (vbnv_data(BOOT_OFFSET) & BOOT_OPROM_NEEDED) ? 1 : 0;
}
+
+void vbnv_init(uint8_t *vbnv_copy)
+{
+ read_vbnv(vbnv_copy);
+}
diff --git a/src/vboot/vbnv.h b/src/vboot/vbnv.h
index 7a0bf92f40..5e5160a992 100644
--- a/src/vboot/vbnv.h
+++ b/src/vboot/vbnv.h
@@ -26,6 +26,8 @@ void regen_vbnv_crc(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);
+/* Initialize and read vbnv. This is used in the main vboot logic path. */
+void vbnv_init(uint8_t *vbnv_copy);
/* CMOS backend */
void read_vbnv_cmos(uint8_t *vbnv_copy);
diff --git a/src/vboot/vboot_logic.c b/src/vboot/vboot_logic.c
index 9145ad003e..d06faa740a 100644
--- a/src/vboot/vboot_logic.c
+++ b/src/vboot/vboot_logic.c
@@ -310,8 +310,8 @@ void verstage_main(void)
/* Set up context and work buffer */
vb2_init_work_context(&ctx);
- /* Read nvdata from a non-volatile storage. */
- read_vbnv(ctx.nvdata);
+ /* Initialize and read nvdata from non-volatile storage. */
+ vbnv_init(ctx.nvdata);
/* Set S3 resume flag if vboot should behave differently when selecting
* which slot to boot. This is only relevant to vboot if the platform