From 6836da2e5a67e8efceb6704d6b7763c61e2df757 Mon Sep 17 00:00:00 2001 From: Sridhar Siricilla Date: Wed, 23 Feb 2022 23:36:45 +0530 Subject: soc/intel/common: Implement error codes for for heci_send_receive() The patch implements below changes: 1. Implements different error codes and use them in appropriate failure scenarios of below functions: a. heci_send() b. recv_one_message() c. heci_receive() 2. As heci_send_receive() is updated to return appropriate error codes in different error scenarios of sending and receiving the HECI commands. As the function is updated to return 0 when success, and non-zero values in the failure scenarios, so all caller function have been updated. BUG=b:220652101 TEST=Verified CSE RX and TX APIs return error codes appropriately in the simulated error scenarios. Signed-off-by: Sridhar Siricilla Change-Id: Ibedee748ed6d81436c6b125f2eb2722be3f5f8f0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62299 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/apollolake/cse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/cse.c b/src/soc/intel/apollolake/cse.c index 7d1e6e7b75..0f11809297 100644 --- a/src/soc/intel/apollolake/cse.c +++ b/src/soc/intel/apollolake/cse.c @@ -78,7 +78,7 @@ static int read_cse_file(const char *path, void *buff, size_t *size, reply_size = sizeof(rmsg); - if (!heci_send_receive(&msg, sizeof(msg), &rmsg, &reply_size, HECI_MKHI_ADDR)) { + if (heci_send_receive(&msg, sizeof(msg), &rmsg, &reply_size, HECI_MKHI_ADDR)) { printk(BIOS_ERR, "HECI: Failed to read file\n"); return 0; } -- cgit v1.2.3