[Skiboot] [PATCH] fast-reboot: disable on FSP code update or unrecoverable HMI

Vasant Hegde hegdevasant at linux.vnet.ibm.com
Mon Oct 24 21:18:18 AEDT 2016


On 10/24/2016 11:58 AM, Stewart Smith wrote:
> Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
> ---
>   core/fast-reboot.c      | 18 ++++++++++++++++++
>   core/hmi.c              |  2 ++
>   hw/fsp/fsp-codeupdate.c |  2 ++
>   include/skiboot.h       |  1 +
>   4 files changed, 23 insertions(+)
>

.../...

> diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c
> index 2263bf36dcc8..ae1c4b6c5a42 100644
> --- a/hw/fsp/fsp-codeupdate.c
> +++ b/hw/fsp/fsp-codeupdate.c
> @@ -1126,6 +1126,8 @@ static int64_t fsp_opal_update_flash(struct opal_sg_list *list)
>   	struct opal_sg_entry *entry;
>   	int length, num_entries, result = 0, rc = OPAL_PARAMETER;
>
> +	disable_fast_reboot("FSP Code Update");

If kernel passes NULL then we cancel FW update request. I think we should check 
whether its FW update request or cancel request. May be something like below (it 
includes reordering of current code). ?




diff --git a/hw/fsp/fsp-codeupdate.c b/hw/fsp/fsp-codeupdate.c
index 2263bf3..3428869 100644
--- a/hw/fsp/fsp-codeupdate.c
+++ b/hw/fsp/fsp-codeupdate.c
@@ -1126,14 +1126,6 @@ static int64_t fsp_opal_update_flash(struct opal_sg_list 
*list)
         struct opal_sg_entry *entry;
         int length, num_entries, result = 0, rc = OPAL_PARAMETER;

-       /* Ensure that the sg list honors our alignment requirements */
-       rc = validate_sglist(list);
-       if (rc) {
-               log_simple_error(&e_info(OPAL_RC_CU_SG_LIST),
-                       "CUPD: sglist fails alignment requirements\n");
-               return rc;
-       }
-
         lock(&flash_lock);
         if (!list) {    /* Cancel update request */
                 fsp_flash_term_hook = NULL;
@@ -1141,6 +1133,17 @@ static int64_t fsp_opal_update_flash(struct opal_sg_list 
*list)
                 rc = OPAL_SUCCESS;
                 goto out;
         }
+
+       disable_fast_reboot("FSP Code Update");
+
+       /* Ensure that the sg list honors our alignment requirements */
+       rc = validate_sglist(list);
+       if (rc) {
+               log_simple_error(&e_info(OPAL_RC_CU_SG_LIST),
+                       "CUPD: sglist fails alignment requirements\n");
+               goto out;
+       }
+


-Vasant



More information about the Skiboot mailing list