aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-07-12 12:06:40 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-13 10:19:45 +1000
commit877b9176b09edce9567ebcd7bce7347cc0edf600 (patch)
treee6dc6e1054f632cc255432dc87cf4cea8e0d56eb /hw
parent94186aa05229aa060cf80b91714bbaf0c331bd96 (diff)
downloadskiboot-877b9176b09edce9567ebcd7bce7347cc0edf600.zip
skiboot-877b9176b09edce9567ebcd7bce7347cc0edf600.tar.gz
skiboot-877b9176b09edce9567ebcd7bce7347cc0edf600.tar.bz2
phb4: Print more info when PHB fences
For now at PHBERR level. We don't have room in the diags data passed to Linux for these unfortunately. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb4.c44
1 files changed, 37 insertions, 7 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 4d93b81..6eed9ab 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -166,15 +166,45 @@ static inline void phb4_ioda_sel(struct phb4 *p, uint32_t table,
/* Check if AIB is fenced via PBCQ NFIR */
static bool phb4_fenced(struct phb4 *p)
{
- uint64_t nfir;
+ uint64_t nfir_p, nfir_n, err_aib;
+ uint64_t err_rpt0, err_rpt1;
- xscom_read(p->chip_id, p->pe_stk_xscom + 0x0, &nfir);
- if (nfir & PPC_BIT(16)) {
- p->flags |= PHB4_AIB_FENCED;
- p->state = PHB4_STATE_FENCED;
+ /* Already fenced ? */
+ if (p->flags & PHB4_AIB_FENCED)
return true;
- }
- return false;
+
+ /*
+ * An all 1's from the PHB indicates a PHB freeze/fence. We
+ * don't really differenciate them at this point.
+ */
+ if (in_be64(p->regs + PHB_CPU_LOADSTORE_STATUS)!= 0xfffffffffffffffful)
+ return false;
+
+ PHBERR(p, "PHB Freeze/Fence detected !\n");
+
+ /* We read the PCI and NEST FIRs and dump them */
+ xscom_read(p->chip_id,
+ p->pci_stk_xscom + XPEC_PCI_STK_PCI_FIR, &nfir_p);
+ xscom_read(p->chip_id,
+ p->pe_stk_xscom + XPEC_NEST_STK_PCI_NFIR, &nfir_n);
+ xscom_read(p->chip_id,
+ p->pe_stk_xscom + XPEC_NEST_STK_ERR_RPT0, &err_rpt0);
+ xscom_read(p->chip_id,
+ p->pe_stk_xscom + XPEC_NEST_STK_ERR_RPT1, &err_rpt1);
+ xscom_read(p->chip_id,
+ p->pci_stk_xscom + XPEC_PCI_STK_PBAIB_ERR_REPORT, &err_aib);
+
+ PHBERR(p, " PCI FIR=%016llx\n", nfir_p);
+ PHBERR(p, "NEST FIR=%016llx\n", nfir_n);
+ PHBERR(p, "ERR RPT0=%016llx\n", err_rpt0);
+ PHBERR(p, "ERR RPT1=%016llx\n", err_rpt1);
+ PHBERR(p, " AIB ERR=%016llx\n", err_aib);
+
+ /* Mark ourselves fenced */
+ p->flags |= PHB4_AIB_FENCED;
+ p->state = PHB4_STATE_FENCED;
+
+ return true;
}
/*