From 08b5200db7d182b10a32f67d4343e3f09617a09b Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Thu, 19 Jan 2023 11:32:25 -0700 Subject: soc/intel/common/cse_lite: Allow specific operation prior to update Some boards may want to perform a specific operation before the CSE FW update final operation begins. For instance, on Brya this new callback can be used to inform the end-user that an update is in progress. BUG=b:264648959 BRANCH=firmware-brya-14505.B TEST=Compilation success Change-Id: Ia4d32a71f3ae61d2e24197fee6b458512f7778a9 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/72097 Reviewed-by: Tarun Tuli Reviewed-by: Nick Vaccaro Reviewed-by: Bora Guvendik Reviewed-by: Anil Kumar K Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cse/cse_lite.c | 6 ++++++ src/soc/intel/common/block/include/intelblocks/cse.h | 3 +++ 2 files changed, 9 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index 8f4afae8ef..9866d55d78 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -378,6 +378,11 @@ __weak void cse_board_reset(void) /* Default weak implementation, does nothing. */ } +__weak void cse_fw_update_misc_oper(void) +{ + /* Default weak implementation, does nothing. */ +} + /* Set the CSE's next boot partition and issues system reset */ static enum cb_err cse_set_and_boot_from_next_bp(enum boot_partition_id bp) { @@ -784,6 +789,7 @@ static enum csme_failure_reason cse_trigger_fw_update(const struct cse_bp_info * goto error_exit; } + cse_fw_update_misc_oper(); rv = cse_update_rw(cse_bp_info, cse_cbfs_rw, size, target_rdev); error_exit: diff --git a/src/soc/intel/common/block/include/intelblocks/cse.h b/src/soc/intel/common/block/include/intelblocks/cse.h index 422f69c1c6..b031aa3390 100644 --- a/src/soc/intel/common/block/include/intelblocks/cse.h +++ b/src/soc/intel/common/block/include/intelblocks/cse.h @@ -500,6 +500,9 @@ void cse_fw_sync(void); /* Perform a board-specific reset sequence for CSE RO<->RW jump */ void cse_board_reset(void); +/* Perform a misc operation before CSE firmware update. */ +void cse_fw_update_misc_oper(void); + /* Trigger vboot recovery mode on a CSE error */ void cse_trigger_vboot_recovery(enum csme_failure_reason reason); -- cgit v1.2.3