Skip to content

Commit

Permalink
phb4: Print WOF registers on fence detect
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Russell Currey <[email protected]>
Reviewed-by: Vaibhav Jain <[email protected]>
Signed-off-by: Stewart Smith <[email protected]>
  • Loading branch information
ruscur authored and stewartsmith committed May 11, 2018
1 parent 92d1a4e commit d5d7966
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? */
Expand All @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit d5d7966

Please sign in to comment.