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@intel.com>
Reviewed-on: https://review.coreboot.org/15853
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
diff --git a/src/drivers/intel/fsp2_0/notify.c b/src/drivers/intel/fsp2_0/notify.c
index f848986..880c44d 100644
--- a/src/drivers/intel/fsp2_0/notify.c
+++ b/src/drivers/intel/fsp2_0/notify.c
@@ -17,14 +17,14 @@
#include <string.h>
#include <timestamp.h>
-enum fsp_status fsp_notify(enum fsp_notify_phase phase)
+void fsp_notify(enum fsp_notify_phase phase)
{
enum fsp_status ret;
fsp_notify_fn fspnotify;
struct fsp_notify_params notify_params = { .phase = phase };
- if (!fsps_hdr.silicon_init_entry_offset)
- return FSP_NOT_FOUND;
+ if (!fsps_hdr.notify_phase_entry_offset)
+ die("Notify_phase_entry_offset is zero!\n");
fspnotify = (void*) (fsps_hdr.image_base +
fsps_hdr.notify_phase_entry_offset);
@@ -49,5 +49,10 @@
}
fsp_debug_after_notify(ret);
- return ret;
+ /* 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");
+ }
}