From 1973c39c82ae3c7124e603d92248e34dabfb0a61 Mon Sep 17 00:00:00 2001 From: Andrey Petrov Date: Wed, 22 Jun 2016 19:32:51 -0700 Subject: soc/intel/apollolake: Add handling of global reset in FspNotify stage Call basic FSP reset handling in FspNotify stage. Handling of reset requests for other stages need to be implemented as well. BUG=chrome-os-partner:54149 BRANCH=none TEST=with FSP that returns reset codes, do cold boot, check that reboot sequence occurs properly. Change-Id: I55542aa37e60edb17ca24ac358b61df72679b83e Signed-off-by: Andrey Petrov Reviewed-on: https://review.coreboot.org/15280 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/soc/intel/apollolake/chip.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/soc/intel/apollolake/chip.c') diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index ddb1374ddf..b5592e7453 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -160,9 +160,13 @@ static void fsp_notify_dummy(void *arg) { enum fsp_notify_phase ph = (enum fsp_notify_phase) arg; + enum fsp_status ret; - if (fsp_notify(ph) != FSP_SUCCESS) - printk(BIOS_CRIT, "FspNotify failed!\n"); + if ((ret = fsp_notify(ph)) != FSP_SUCCESS) { + printk(BIOS_CRIT, "FspNotify failed, ret = %x!\n", ret); + if (fsp_reset_requested(ret)) + fsp_handle_reset(ret); + } /* Call END_OF_FIRMWARE Notify after READY_TO_BOOT Notify */ if (ph == READY_TO_BOOT) fsp_notify_dummy((void *)END_OF_FIRMWARE); -- cgit v1.2.3