[Skiboot] [PATCH] FSP: Remove flash hook after completing code update

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Fri Feb 7 02:06:22 AEDT 2020


In some corner cases, FSP may not respond to Deep IPL request after
code update -OR- it may delay processing MBOX command. In such cases
we may enter code update path again.. which is not required.
Hence clear flash hook after completing code update.

Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
 platforms/ibm-fsp/common.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
index b58b07337..10bbff556 100644
--- a/platforms/ibm-fsp/common.c
+++ b/platforms/ibm-fsp/common.c
@@ -200,6 +200,9 @@ int64_t ibm_fsp_cec_reboot(void)
 	    fsp_flash_term_hook() == OPAL_SUCCESS)
 		cmd = FSP_CMD_DEEP_REBOOT;
 
+	/* Clear flash hook */
+	fsp_flash_term_hook = NULL;
+
 	printf("FSP: Sending 0x%02x reboot command to FSP...\n", cmd);
 
 	/* If that failed, talk to the FSP */
@@ -228,6 +231,9 @@ int64_t ibm_fsp_cec_power_down(uint64_t request)
 	if (fsp_flash_term_hook)
 		fsp_flash_term_hook();
 
+	/* Clear flash hook */
+	fsp_flash_term_hook = NULL;
+
 	printf("FSP: Sending shutdown command to FSP...\n");
 
 	if (fsp_sync_msg(fsp_mkmsg(FSP_CMD_POWERDOWN_NORM, 1, request), true))
-- 
2.21.1



More information about the Skiboot mailing list