From d5d7966431af4c0782a57e81d650f99f14f69a48 Mon Sep 17 00:00:00 2001 From: Russell Currey Date: Thu, 10 May 2018 12:14:03 +1000 Subject: [PATCH] phb4: Print WOF registers on fence detect Without the WOF registers it's hard to figure out what went wrong first, so print those when we print the FIRs when a fence is detected. Suggested-by: Mike Perez Signed-off-by: Russell Currey Reviewed-by: Vaibhav Jain Signed-off-by: Stewart Smith --- hw/phb4.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/hw/phb4.c b/hw/phb4.c index f153ad02a1a9..18e1e0f1d897 100644 --- a/hw/phb4.c +++ b/hw/phb4.c @@ -2369,7 +2369,7 @@ static void phb4_dump_capp_err_regs(struct phb4 *p) /* Check if AIB is fenced via PBCQ NFIR */ static bool phb4_fenced(struct phb4 *p) { - uint64_t nfir_p, nfir_n, err_aib; + uint64_t nfir_p, nfir_p_wof, nfir_n, nfir_n_wof, err_aib; uint64_t err_rpt0, err_rpt1; /* Already fenced ? */ @@ -2388,8 +2388,12 @@ static bool phb4_fenced(struct phb4 *p) /* 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->pci_stk_xscom + XPEC_PCI_STK_PCI_FIR_WOF, &nfir_p_wof); 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_PCI_NFIR_WOF, &nfir_n_wof); xscom_read(p->chip_id, p->pe_stk_xscom + XPEC_NEST_STK_ERR_RPT0, &err_rpt0); xscom_read(p->chip_id, @@ -2398,7 +2402,9 @@ static bool phb4_fenced(struct phb4 *p) p->pci_stk_xscom + XPEC_PCI_STK_PBAIB_ERR_REPORT, &err_aib); PHBERR(p, " PCI FIR=%016llx\n", nfir_p); + PHBERR(p, " PCI FIR WOF=%016llx\n", nfir_p_wof); PHBERR(p, " NEST FIR=%016llx\n", nfir_n); + PHBERR(p, " NEST FIR WOF=%016llx\n", nfir_n_wof); PHBERR(p, " ERR RPT0=%016llx\n", err_rpt0); PHBERR(p, " ERR RPT1=%016llx\n", err_rpt1); PHBERR(p, " AIB ERR=%016llx\n", err_aib);