soc/intel/common/cse: Return usable error codes
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 <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/90272 Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
8795680828
commit
4f52ca6ba6
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue