aboutsummaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google/chromeos')
-rw-r--r--src/vendorcode/google/chromeos/vboot_common.c5
-rw-r--r--src/vendorcode/google/chromeos/vboot_common.h3
2 files changed, 8 insertions, 0 deletions
diff --git a/src/vendorcode/google/chromeos/vboot_common.c b/src/vendorcode/google/chromeos/vboot_common.c
index 448aad6db0..eef54174f6 100644
--- a/src/vendorcode/google/chromeos/vboot_common.c
+++ b/src/vendorcode/google/chromeos/vboot_common.c
@@ -92,10 +92,15 @@ int vboot_recovery_reason(void)
return sd->recovery_reason;
}
+void __attribute__((weak)) vboot_platform_prepare_reboot(void)
+{
+}
+
void vboot_reboot(void)
{
if (IS_ENABLED(CONFIG_CONSOLE_CBMEM_DUMP_TO_UART))
cbmem_dump_console();
+ vboot_platform_prepare_reboot();
hard_reset();
die("failed to reboot");
}
diff --git a/src/vendorcode/google/chromeos/vboot_common.h b/src/vendorcode/google/chromeos/vboot_common.h
index a658d62ab4..250b0e50ac 100644
--- a/src/vendorcode/google/chromeos/vboot_common.h
+++ b/src/vendorcode/google/chromeos/vboot_common.h
@@ -64,6 +64,9 @@ int vboot_retrieve_hash(void *digest, size_t digest_size);
*/
int vboot_platform_is_resuming(void);
+/* Allow the platform to do any clean up work when vboot requests a reboot. */
+void vboot_platform_prepare_reboot(void);
+
/* Main logic for verified boot. verstage() is the stage entry point
* while the verstage_main() is just the core logic. */
void verstage_main(void);