summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake
diff options
context:
space:
mode:
authorSridhar Siricilla <sridhar.siricilla@intel.com>2022-02-23 23:36:45 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-03-14 15:51:12 +0000
commit6836da2e5a67e8efceb6704d6b7763c61e2df757 (patch)
treefac530baf1a10381deb41ed222643028a5806325 /src/soc/intel/apollolake
parent4b8079152a242296a53cf80f5b08dd2b1daf40ac (diff)
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 <sridhar.siricilla@intel.com> Change-Id: Ibedee748ed6d81436c6b125f2eb2722be3f5f8f0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62299 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake')
-rw-r--r--src/soc/intel/apollolake/cse.c2
1 files changed, 1 insertions, 1 deletions
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;
}