From 4f52ca6ba666dbebc7cc4e299d7b49796ac297d8 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Sat, 29 Nov 2025 20:37:06 +0000 Subject: [PATCH] soc/intel/common/cse: Return usable error codes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, cse_request_reset() returns 0 if the reset type is unsupported or CSE isn’t ready. This is the same as CSE_TX_RX_SUCCESS, which makes failures impossible to detect. Return CSE_TX_ERR_INPUT or CSE_TX_ERR_CSE_NOT_READY respectively, so we can detect errors. Change-Id: Idede7342157901946ba62ba6fcda6f304a4a3fd0 Signed-off-by: Sean Rhodes Reviewed-on: https://review.coreboot.org/c/coreboot/+/90272 Reviewed-by: Jérémy Compostella Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier --- src/soc/intel/common/block/cse/cse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index 1f519312ce..d02bb85b37 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -737,12 +737,12 @@ static int cse_request_reset(enum rst_req_type rst_type) if (!(rst_type == GLOBAL_RESET || rst_type == CSE_RESET_ONLY)) { printk(BIOS_ERR, "HECI: Unsupported reset type is requested\n"); - return 0; + return CSE_TX_ERR_INPUT; } if (!cse_is_global_reset_allowed() || !is_cse_enabled()) { printk(BIOS_ERR, "HECI: CSE does not meet required prerequisites\n"); - return 0; + return CSE_TX_ERR_CSE_NOT_READY; } heci_reset();