summaryrefslogtreecommitdiff
path: root/src/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/security')
-rw-r--r--src/security/vboot/vbnv.h2
-rw-r--r--src/security/vboot/vbnv_cmos.c6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/security/vboot/vbnv.h b/src/security/vboot/vbnv.h
index c4112a2b29..49d1f12f63 100644
--- a/src/security/vboot/vbnv.h
+++ b/src/security/vboot/vbnv.h
@@ -23,6 +23,8 @@ void vbnv_reset(uint8_t *vbnv_copy);
/* Initialize the vbnv CMOS backing store. The vbnv_copy pointer is used for
optional temporary storage in the init function. */
void vbnv_init_cmos(uint8_t *vbnv_copy);
+/* Platform-specific CMOS init function, called by vbnv_init_cmos(). */
+void vbnv_platform_init_cmos(void);
/* Return non-zero if CMOS power was lost. */
int vbnv_cmos_failed(void);
void read_vbnv_cmos(uint8_t *vbnv_copy);
diff --git a/src/security/vboot/vbnv_cmos.c b/src/security/vboot/vbnv_cmos.c
index 35e4c410da..5073509fc9 100644
--- a/src/security/vboot/vbnv_cmos.c
+++ b/src/security/vboot/vbnv_cmos.c
@@ -67,8 +67,14 @@ void save_vbnv_cmos(const uint8_t *vbnv_copy)
cmos_write(vbnv_copy[i], CONFIG_VBOOT_VBNV_OFFSET + 14 + i);
}
+void __weak vbnv_platform_init_cmos(void)
+{
+}
+
void vbnv_init_cmos(uint8_t *vbnv_copy)
{
+ vbnv_platform_init_cmos();
+
/* If no CMOS failure just defer to the normal read path for checking
vbnv contents' integrity. */
if (!vbnv_cmos_failed())