[RESEND] phb4/capp: Update the expected Eye-catcher for CAPP ucode lid

Message ID 20180903091237.14044-1-vaibhav@linux.ibm.com
State Accepted
Headers show
Series
  • [RESEND] phb4/capp: Update the expected Eye-catcher for CAPP ucode lid
Related show

Checks

Context Check Description
snowpatch_ozlabs/make_check success Test make_check on branch master
snowpatch_ozlabs/apply_patch success master/apply_patch Successfully applied

Commit Message

Vaibhav Jain Sept. 3, 2018, 9:12 a.m.
Currently on a FSP based P9 system load_capp_code() expects CAPP ucode
lid header to have eye-catcher magic of 'CAPPPSLL'. However skiboot
currently supports CAPP ucode only lids that have a eye-catcher magic
of 'CAPPLIDH'. This prevents skiboot from loading the ucode with this
error message:

CAPP: ucode header invalid

We fix this issue by updating load_capp_ucode() to use the eye-catcher
value of 'CAPPLIDH' instead of 'CAPPPSLL'.

Cc: stable
Fixes: e50764d4f2b1("capi: Load capp microcode")
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
Change-log:

Resend	-> Updated patch description & marked the patch to
	   stable. [Andrew]
---
 hw/phb4.c      | 4 ++--
 include/capp.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Andrew Donnellan Sept. 3, 2018, 9:26 a.m. | #1
On 03/09/18 19:12, Vaibhav Jain wrote:
> Currently on a FSP based P9 system load_capp_code() expects CAPP ucode
> lid header to have eye-catcher magic of 'CAPPPSLL'. However skiboot
> currently supports CAPP ucode only lids that have a eye-catcher magic
> of 'CAPPLIDH'. This prevents skiboot from loading the ucode with this
> error message:
> 
> CAPP: ucode header invalid
> 
> We fix this issue by updating load_capp_ucode() to use the eye-catcher
> value of 'CAPPLIDH' instead of 'CAPPPSLL'.
> 
> Cc: stable
> Fixes: e50764d4f2b1("capi: Load capp microcode")
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>

Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
> Change-log:
> 
> Resend	-> Updated patch description & marked the patch to
> 	   stable. [Andrew]
> ---
>   hw/phb4.c      | 4 ++--
>   include/capp.h | 2 +-
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/phb4.c b/hw/phb4.c
> index d1245dce..f9053f76 100644
> --- a/hw/phb4.c
> +++ b/hw/phb4.c
> @@ -3001,9 +3001,9 @@ static int64_t load_capp_ucode(struct phb4 *p)
>   	if (p->index != CAPP0_PHB_INDEX && p->index != CAPP1_PHB_INDEX)
>   		return OPAL_HARDWARE;
>   
> -	/* 0x4341505050534C4C = 'CAPPPSLL' in ASCII */
> +	/* 0x434150504c494448 = 'CAPPLIDH' in ASCII */
>   	rc = capp_load_ucode(p->chip_id, p->phb.opal_id, p->index,
> -			0x4341505050534C4C, PHB4_CAPP_REG_OFFSET(p),
> +			0x434150504c494448, PHB4_CAPP_REG_OFFSET(p),
>   			CAPP_APC_MASTER_ARRAY_ADDR_REG,
>   			CAPP_APC_MASTER_ARRAY_WRITE_REG,
>   			CAPP_SNP_ARRAY_ADDR_REG,
> diff --git a/include/capp.h b/include/capp.h
> index 597401d5..6ec3f7fe 100644
> --- a/include/capp.h
> +++ b/include/capp.h
> @@ -19,7 +19,7 @@
>   
>   /*
>    * eyecatcher PHB3:  'CAPPLIDH' in ASCII
> - * eyecatcher PHB4:  'CAPPPSLL' in ASCII
> + * eyecatcher PHB4:  'CAPPLIDH' in ASCII
>    */
>   struct capp_lid_hdr {
>   	be64 eyecatcher;
>
christophe lombard Sept. 4, 2018, 8:04 a.m. | #2
Le 03/09/2018 à 11:12, Vaibhav Jain a écrit :
> Currently on a FSP based P9 system load_capp_code() expects CAPP ucode
> lid header to have eye-catcher magic of 'CAPPPSLL'. However skiboot
> currently supports CAPP ucode only lids that have a eye-catcher magic
> of 'CAPPLIDH'. This prevents skiboot from loading the ucode with this
> error message:
> 
> CAPP: ucode header invalid
> 
> We fix this issue by updating load_capp_ucode() to use the eye-catcher
> value of 'CAPPLIDH' instead of 'CAPPPSLL'.
> 
> Cc: stable
> Fixes: e50764d4f2b1("capi: Load capp microcode")
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
> ---

Reviewed-by: Christophe Lombard <clombard@linux.vnet.ibm.com>
Stewart Smith Oct. 16, 2018, 7:54 a.m. | #3
Vaibhav Jain <vaibhav@linux.ibm.com> writes:
> Currently on a FSP based P9 system load_capp_code() expects CAPP ucode
> lid header to have eye-catcher magic of 'CAPPPSLL'. However skiboot
> currently supports CAPP ucode only lids that have a eye-catcher magic
> of 'CAPPLIDH'. This prevents skiboot from loading the ucode with this
> error message:
>
> CAPP: ucode header invalid
>
> We fix this issue by updating load_capp_ucode() to use the eye-catcher
> value of 'CAPPLIDH' instead of 'CAPPPSLL'.
>
> Cc: stable
> Fixes: e50764d4f2b1("capi: Load capp microcode")
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>

Thanks!

Merged to master as of d5ebd5519dcd1727bd2355d9e5aa4bfbcd7f3792
and to 6.0.x as of 0d42e9b441f283c88b39b0cf37bd3f108cebb42b

Patch

diff --git a/hw/phb4.c b/hw/phb4.c
index d1245dce..f9053f76 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3001,9 +3001,9 @@  static int64_t load_capp_ucode(struct phb4 *p)
 	if (p->index != CAPP0_PHB_INDEX && p->index != CAPP1_PHB_INDEX)
 		return OPAL_HARDWARE;
 
-	/* 0x4341505050534C4C = 'CAPPPSLL' in ASCII */
+	/* 0x434150504c494448 = 'CAPPLIDH' in ASCII */
 	rc = capp_load_ucode(p->chip_id, p->phb.opal_id, p->index,
-			0x4341505050534C4C, PHB4_CAPP_REG_OFFSET(p),
+			0x434150504c494448, PHB4_CAPP_REG_OFFSET(p),
 			CAPP_APC_MASTER_ARRAY_ADDR_REG,
 			CAPP_APC_MASTER_ARRAY_WRITE_REG,
 			CAPP_SNP_ARRAY_ADDR_REG,
diff --git a/include/capp.h b/include/capp.h
index 597401d5..6ec3f7fe 100644
--- a/include/capp.h
+++ b/include/capp.h
@@ -19,7 +19,7 @@ 
 
 /*
  * eyecatcher PHB3:  'CAPPLIDH' in ASCII
- * eyecatcher PHB4:  'CAPPPSLL' in ASCII
+ * eyecatcher PHB4:  'CAPPLIDH' in ASCII
  */
 struct capp_lid_hdr {
 	be64 eyecatcher;