diff mbox series

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

Message ID 20180903074320.8893-1-vaibhav@linux.ibm.com
State Superseded
Headers show
Series phb4/capp: Update the expected Eye-catcher for CAPP ucode lid | expand

Checks

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

Commit Message

Vaibhav Jain Sept. 3, 2018, 7:43 a.m. UTC
Currently on P9 load_capp_code() expects CAPP ucode lid header to have
eye-catcher magic of 'CAPPPSLL'. However the ucode lid available on a
FSP base system has 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'.

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
---
 hw/phb4.c      | 4 ++--
 include/capp.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Andrew Donnellan Sept. 3, 2018, 7:46 a.m. UTC | #1
On 03/09/18 17:43, Vaibhav Jain wrote:
> Currently on P9 load_capp_code() expects CAPP ucode lid header to have
> eye-catcher magic of 'CAPPPSLL'. However the ucode lid available on a
> FSP base system has 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'.
> 
> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>

Should this go to stable?

Is there anywhere where this change is documented? What about non-FSP 
systems?
Vaibhav Jain Sept. 3, 2018, 8:52 a.m. UTC | #2
Thanks for reviewing this patch Andrew,

Andrew Donnellan <andrew.donnellan@au1.ibm.com> writes:

> On 03/09/18 17:43, Vaibhav Jain wrote:
>> Currently on P9 load_capp_code() expects CAPP ucode lid header to have
>> eye-catcher magic of 'CAPPPSLL'. However the ucode lid available on a
>> FSP base system has 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'.
>> 
>> Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
>
> Should this go to stable?
Yes, will resend marking it to stable.

> Is there anywhere where this change is documented? What about non-FSP 
> systems?
Yes, as discussed offline CAPP ucode only lids for FSP based systems
have CAPPLIDH as the header magic. Hence this needs to be changed.

Openpower based systems dont use a lid and pnor partition data
containing capp ucode has magic 'CAPPULID'. So this condition is already
handled in capp_load_ucode() and openpower based systems are not
effected by this patch.
diff mbox series

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;