aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVasant Hegde <hegdevasant@linux.vnet.ibm.com>2018-06-15 16:05:31 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-06-18 22:13:43 -0500
commitded1f6e1abf5d5d1afdbf62e558ec9eca22f1658 (patch)
tree91b9598e64c74f6813c1962ef523cdbc204b1687 /hw
parentfca2b2b839a673a1e52fc6b19ee6d33b2dfbc003 (diff)
downloadskiboot-ded1f6e1abf5d5d1afdbf62e558ec9eca22f1658.zip
skiboot-ded1f6e1abf5d5d1afdbf62e558ec9eca22f1658.tar.gz
skiboot-ded1f6e1abf5d5d1afdbf62e558ec9eca22f1658.tar.bz2
fast-reboot: Disable on FSP IPL side change
If FSP changes next IPL side, then disable fast reboot. sample output: [ 620.196442259,5] FSP: Got sysparam update, param ID 0xf0000007 [ 620.196444501,5] CUPD: FW IPL side changed. Disable fast reboot [ 620.196445389,5] CUPD: Next IPL side : perm Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/fsp/fsp-codeupdate.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c
index f17703a..e38b187 100644
--- a/hw/fsp/fsp-codeupdate.c
+++ b/hw/fsp/fsp-codeupdate.c
@@ -206,6 +206,29 @@ static void get_platform_hmc_managed(void)
}
}
+static bool fw_ipl_side_update_notify(struct fsp_msg *msg)
+{
+ u32 param_id = msg->data.words[0];
+ int dlen = msg->data.words[1] & 0xffff;
+ uint32_t state = msg->data.words[2];
+
+ if (param_id != SYS_PARAM_FW_IPL_SIDE)
+ return false;
+
+ if (dlen != 4) {
+ prlog(PR_DEBUG,
+ "CUPD: Invalid sysparams notify len : 0x%x\n", dlen);
+ return false;
+ }
+
+ prlog(PR_NOTICE, "CUPD: FW IPL side changed. Disable fast reboot\n");
+ prlog(PR_NOTICE, "CUPD: Next IPL side : %s\n",
+ state == FW_IPL_SIDE_TEMP ? "temp" : "perm");
+
+ disable_fast_reboot("FSP IPL Side Change");
+ return true;
+}
+
static int64_t code_update_check_state(void)
{
switch(flash_state) {
@@ -1275,6 +1298,9 @@ void fsp_code_update_init(void)
/* Register for Class AA (FSP R/R) */
fsp_register_client(&fsp_cupd_client_rr, FSP_MCLASS_RR_EVENT);
+ /* Register for firmware IPL side update notification */
+ sysparam_add_update_notifier(fw_ipl_side_update_notify);
+
/* Flash hook */
fsp_flash_term_hook = NULL;