diff --git a/src/security/vboot/Kconfig b/src/security/vboot/Kconfig index 7e291e0c70..ef7c24d879 100644 --- a/src/security/vboot/Kconfig +++ b/src/security/vboot/Kconfig @@ -286,6 +286,14 @@ config VBOOT_EARLY_EC_SYNC significantly impact boot time, as this operation will be performed later in the boot flow if it is disabled here. +config VBOOT_EC_SYNC_ESOL + bool + default n + depends on VBOOT_EARLY_EC_SYNC && CHROMEOS_ENABLE_ESOL + help + Enables the display of early sign-of-life (eSOL) when the EC is slow + to update its firmware to inform the user that the update is happening. + config VBOOT_EC_EFS bool "Early firmware selection (EFS) EC" default n diff --git a/src/security/vboot/ec_sync.c b/src/security/vboot/ec_sync.c index ac65dbd189..47c21c7c23 100644 --- a/src/security/vboot/ec_sync.c +++ b/src/security/vboot/ec_sync.c @@ -518,6 +518,7 @@ vb2_error_t vb2ex_ec_disable_jump(void) */ vb2_error_t vb2ex_ec_update_image(enum vb2_firmware_selection select) { + vboot_show_ec_sync_esol(); return ec_update_image(select); } diff --git a/src/security/vboot/vboot_common.h b/src/security/vboot/vboot_common.h index 2399bf30ce..3e8e2edebd 100644 --- a/src/security/vboot/vboot_common.h +++ b/src/security/vboot/vboot_common.h @@ -74,6 +74,20 @@ static inline const struct cbfs_boot_device *vboot_get_cbfs_boot_device(void) } #endif +/* + * This function is called before updating the EC firmware image. + * This API must be implemented in the SoC/mainboard code to enable + * early sign-of-life (eSOL) during EC firmware update. + */ +#if CONFIG(VBOOT_EC_SYNC_ESOL) +void vboot_show_ec_sync_esol(void); +#else +static inline void vboot_show_ec_sync_esol(void) +{ + /* nop */ +} +#endif + void vboot_save_data(struct vb2_context *ctx); /*