diff options
author | Vaibhav Jain <vaibhav@linux.ibm.com> | 2018-11-01 11:05:15 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2018-11-01 23:56:44 -0500 |
commit | 999246716d2da347aad46a28ed9899b832bffe6c (patch) | |
tree | bf957ca4a82bb15416e4af0b674fc7e17c623b3b /hw | |
parent | 9597a12ef4b3644e4b8644f659bec04ca139b7f9 (diff) | |
download | skiboot-999246716d2da347aad46a28ed9899b832bffe6c.zip skiboot-999246716d2da347aad46a28ed9899b832bffe6c.tar.gz skiboot-999246716d2da347aad46a28ed9899b832bffe6c.tar.bz2 |
phb4/capp: Only reset FIR bits that cause capp machine check
During CAPP recovery do_capp_recovery_scoms() will reset the CAPP Fir
register just after CAPP recovery is completed. This has an
unintentional side effect of preventing PRD from analyzing and
reporting this error. If PRD tries to read the CAPP FIR after opal has
already reset it, then it logs a critical error complaining "No active
error bits found".
To prevent this from happening we update do_capp_recovery_scoms() to
only reset fir bits that cause CAPP machine check (local xstop). This
is done by reading the CAPP Fir Action0/1 & Mask registers and
generating a mask which is then written on CAPP_FIR_CLEAR register.
Cc: stable
Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/phb4.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -3068,7 +3068,24 @@ static int do_capp_recovery_scoms(struct phb4 *p) /* Check if the recovery failed or passed */ if (reg & PPC_BIT(1)) { + uint64_t act0, act1, mask, fir; + + /* Use the Action0/1 and mask to only clear the bits + * that cause local checkstop. Other bits needs attention + * of the PRD daemon. + */ + xscom_read(p->chip_id, CAPP_FIR_ACTION0 + offset, &act0); + xscom_read(p->chip_id, CAPP_FIR_ACTION1 + offset, &act1); + xscom_read(p->chip_id, CAPP_FIR_MASK + offset, &mask); + xscom_read(p->chip_id, CAPP_FIR + offset, &fir); + + fir = ~(fir & ~mask & act0 & act1); PHBDBG(p, "Doing CAPP recovery scoms\n"); + + /* update capp fir clearing bits causing local checkstop */ + PHBDBG(p, "Resetting CAPP Fir with mask 0x%016llX\n", fir); + xscom_write(p->chip_id, CAPP_FIR_CLEAR + offset, fir); + /* disable snoops */ xscom_write(p->chip_id, SNOOP_CAPI_CONFIG + offset, 0); load_capp_ucode(p); |