summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2022-01-01 17:20:00 +0100
committerSubrata Banik <subratabanik@google.com>2022-01-02 12:33:23 +0000
commit2b1f8d41292013fb9d977a8cd1a39ab0b337cf98 (patch)
treecea577ed2836683cb6d2ca45618ee0ba046a3b3e /src/drivers/intel
parent346bb0b01063c740a5517717457885308bb5e660 (diff)
drivers/intel/fsp2_0: Print return value when dying
When coreboot goes to die because FSP returned an error, log the return value in the message printed by `die()` or `die_with_post_code()`. Change-Id: I6b9ea60534a20429f15132007c1f5770760481af Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60637 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <felixsinger@posteo.net> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Subrata Banik <subratabanik@google.com>
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/fsp2_0/memory_init.c3
-rw-r--r--src/drivers/intel/fsp2_0/notify.c6
-rw-r--r--src/drivers/intel/fsp2_0/temp_ram_exit.c6
3 files changed, 5 insertions, 10 deletions
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index c1a7377ed5..3c1a088bf0 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -309,9 +309,8 @@ static void do_fsp_memory_init(const struct fspm_context *context, bool s3wake)
/* Handle any errors returned by FspMemoryInit */
fsp_handle_reset(status);
if (status != FSP_SUCCESS) {
- printk(BIOS_CRIT, "FspMemoryInit returned 0x%08x\n", status);
die_with_post_code(POST_RAM_FAILURE,
- "FspMemoryInit returned an error!\n");
+ "FspMemoryInit returned with error 0x%08x!\n", status);
}
do_fsp_post_memory_init(s3wake, fsp_version);
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
index 311ce46f19..9a0f23a778 100644
--- a/src/drivers/intel/fsp2_0/notify.c
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -50,10 +50,8 @@ static void fsp_notify(enum fsp_notify_phase phase)
/* Handle any errors returned by FspNotify */
fsp_handle_reset(ret);
- if (ret != FSP_SUCCESS) {
- printk(BIOS_SPEW, "FspNotify returned 0x%08x\n", ret);
- die("FspNotify returned an error!\n");
- }
+ if (ret != FSP_SUCCESS)
+ die("FspNotify returned with error 0x%08x!\n", ret);
/* Allow the platform to run something after FspNotify */
platform_fsp_notify_status(phase);
diff --git a/src/drivers/intel/fsp2_0/temp_ram_exit.c b/src/drivers/intel/fsp2_0/temp_ram_exit.c
index 5d7cbd4ebb..2192543575 100644
--- a/src/drivers/intel/fsp2_0/temp_ram_exit.c
+++ b/src/drivers/intel/fsp2_0/temp_ram_exit.c
@@ -29,10 +29,8 @@ static void fsp_temp_ram_exit(void)
printk(BIOS_DEBUG, "Calling TempRamExit: %p\n", temp_ram_exit);
status = temp_ram_exit(NULL);
- if (status != FSP_SUCCESS) {
- printk(BIOS_CRIT, "TempRamExit returned 0x%08x\n", status);
- die("TempRamExit returned an error!\n");
- }
+ if (status != FSP_SUCCESS)
+ die("TempRamExit returned with error 0x%08x!\n", status);
cbfs_unmap(mapping);
}