From 54b03569c3aaa7f03e0569223e0fb6d42bbdda56 Mon Sep 17 00:00:00 2001 From: Sridahr Siricilla Date: Fri, 18 Jun 2021 10:59:30 +0530 Subject: [PATCH] soc/intel/common: Check CSE Lite RW status The patch moves CSE Lite RW status check out of CSE RW update logic as the RW sanity check has to be done irrespective of CSE RW update logic is enabled or not. If coreboot detects CSE Lite RW status is not good, the coreboot triggers recovery. TEST=Verified boot on Brya Signed-off-by: Sridahr Siricilla Change-Id: I582b6cf24f8894c80ab461ca21f7c6e8caa738bc Reviewed-on: https://review.coreboot.org/c/coreboot/+/55619 Reviewed-by: Subrata Banik Reviewed-by: Furquan Shaikh Reviewed-by: Tim Wawrzynczak Tested-by: build bot (Jenkins) --- src/soc/intel/common/block/cse/cse_lite.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/soc/intel/common/block/cse/cse_lite.c b/src/soc/intel/common/block/cse/cse_lite.c index f5b4559f67..b2e70e6752 100644 --- a/src/soc/intel/common/block/cse/cse_lite.c +++ b/src/soc/intel/common/block/cse/cse_lite.c @@ -728,9 +728,6 @@ static uint8_t cse_fw_update(const struct cse_bp_info *cse_bp_info) return cse_trigger_fw_update(cse_bp_info, &source_metadata, &target_rdev); } - if (!cse_is_rw_bp_status_valid(cse_bp_info)) - return CSE_LITE_SKU_RW_JUMP_ERROR; - return 0; } @@ -768,6 +765,9 @@ void cse_fw_sync(void) cse_trigger_recovery(rv); } + if (!cse_is_rw_bp_status_valid(&cse_bp_info.bp_info)) + cse_trigger_recovery(CSE_LITE_SKU_RW_JUMP_ERROR); + if (!cse_boot_to_rw(&cse_bp_info.bp_info)) { printk(BIOS_ERR, "cse_lite: Failed to switch to RW\n"); cse_trigger_recovery(CSE_LITE_SKU_RW_SWITCH_ERROR);