[coreboot-gerrit] New patch to review for coreboot: drivers/intel/fsp2_0: FSP driver handles all FSP errors
Lee Leahy (leroy.p.leahy@intel.com)
gerrit at coreboot.org
Mon Jul 25 21:39:35 CEST 2016
Lee Leahy (leroy.p.leahy at intel.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15853
-gerrit
commit 0894da83014b328f8ab3d99c88d1e9191ffcac62
Author: Lee Leahy <leroy.p.leahy at intel.com>
Date: Sun Jul 24 18:18:52 2016 -0700
drivers/intel/fsp2_0: FSP driver handles all FSP errors
Move all FSP error handling into the FSP 2.0 driver. This removes the
need to implement error handling within the SOC code.
TEST=Build and run on Galileo Gen2
Change-Id: I4d548b4c90d369d3857c24f50f93e7db7e9d3028
Signed-off-by: Lee Leahy <leroy.p.leahy at intel.com>
---
src/drivers/intel/fsp2_0/memory_init.c | 6 ++----
src/drivers/intel/fsp2_0/notify.c | 6 ++++++
src/drivers/intel/fsp2_0/silicon_init.c | 9 +++++++--
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/drivers/intel/fsp2_0/memory_init.c b/src/drivers/intel/fsp2_0/memory_init.c
index 973967d..2307f28 100644
--- a/src/drivers/intel/fsp2_0/memory_init.c
+++ b/src/drivers/intel/fsp2_0/memory_init.c
@@ -277,13 +277,11 @@ static enum fsp_status do_fsp_memory_init(struct fsp_header *hdr, bool s3wake,
post_code(POST_FSP_MEMORY_INIT);
timestamp_add_now(TS_FSP_MEMORY_INIT_END);
+ /* Handle any errors returned by FspMemoryInit */
printk(BIOS_DEBUG, "FspMemoryInit returned 0x%08x\n", status);
-
- /* Handle any resets requested by FSPM. */
fsp_handle_reset(status);
-
if (status != FSP_SUCCESS)
- return status;
+ die("ERROR - FspMemoryInit returned an error!\n");
/* Display the MTRRs */
soc_display_mtrrs();
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
index 1c0a277..6558542 100644
--- a/src/drivers/intel/fsp2_0/notify.c
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -57,6 +57,12 @@ enum fsp_status fsp_notify(enum fsp_notify_phase phase)
post_code(POST_FSP_NOTIFY_BEFORE_FINALIZE);
}
+ /* Handle any errors returned by FspNotify */
+ printk(BIOS_DEBUG, "FspNotify returned: 0x%08x\n", ret);
+ fsp_handle_reset(ret);
+ if (ret != FSP_SUCCESS)
+ die("ERROR - FspNotify returned an error!\n");
+
/* Display the MTRRs */
soc_display_mtrrs();
diff --git a/src/drivers/intel/fsp2_0/silicon_init.c b/src/drivers/intel/fsp2_0/silicon_init.c
index 93ab5c9..831fba9 100644
--- a/src/drivers/intel/fsp2_0/silicon_init.c
+++ b/src/drivers/intel/fsp2_0/silicon_init.c
@@ -59,10 +59,15 @@ static enum fsp_status do_silicon_init(struct fsp_header *hdr)
timestamp_add_now(TS_FSP_SILICON_INIT_END);
post_code(POST_FSP_SILICON_INIT);
+ /* Handle any errors returned by FspSiliconInit */
printk(BIOS_DEBUG, "FspSiliconInit returned 0x%08x\n", status);
-
- /* Handle any resets requested by FSPS. */
fsp_handle_reset(status);
+ if (status != FSP_SUCCESS)
+ die("ERROR - FspSiliconINit returned an error!\n");
+
+ /* Display the HOBs */
+ if (IS_ENABLED(CONFIG_DISPLAY_HOBS))
+ fsp_display_hobs(fsp_get_hob_list());
/* Display the HOBs */
if (IS_ENABLED(CONFIG_DISPLAY_HOBS))
More information about the coreboot-gerrit
mailing list