+ FLAG(l, PCI_ERR_CAP_ECRC_CHKC), FLAG(l, PCI_ERR_CAP_ECRC_CHKE),
+ FLAG(l, PCI_ERR_CAP_MULT_HDRC), FLAG(l, PCI_ERR_CAP_MULT_HDRE),
+ FLAG(l, PCI_ERR_CAP_TLP_PFX), FLAG(l, PCI_ERR_CAP_HDR_LOG));
+
+ l0 = get_conf_long(d, where + PCI_ERR_HEADER_LOG);
+ l1 = get_conf_long(d, where + PCI_ERR_HEADER_LOG + 4);
+ l2 = get_conf_long(d, where + PCI_ERR_HEADER_LOG + 8);
+ l3 = get_conf_long(d, where + PCI_ERR_HEADER_LOG + 12);
+ printf("\t\tHeaderLog: %08x %08x %08x %08x\n", l0, l1, l2, l3);
+
+ if (type == PCI_EXP_TYPE_ROOT_PORT || type == PCI_EXP_TYPE_ROOT_EC)
+ {
+ if (!config_fetch(d, where + PCI_ERR_ROOT_COMMAND, 12))
+ return;
+
+ l = get_conf_long(d, where + PCI_ERR_ROOT_COMMAND);
+ printf("\t\tRootCmd: CERptEn%c NFERptEn%c FERptEn%c\n",
+ FLAG(l, PCI_ERR_ROOT_CMD_COR_EN),
+ FLAG(l, PCI_ERR_ROOT_CMD_NONFATAL_EN),
+ FLAG(l, PCI_ERR_ROOT_CMD_FATAL_EN));
+
+ l = get_conf_long(d, where + PCI_ERR_ROOT_STATUS);
+ printf("\t\tRootSta: CERcvd%c MultCERcvd%c UERcvd%c MultUERcvd%c\n"
+ "\t\t\t FirstFatal%c NonFatalMsg%c FatalMsg%c IntMsg %d\n",
+ FLAG(l, PCI_ERR_ROOT_COR_RCV),
+ FLAG(l, PCI_ERR_ROOT_MULTI_COR_RCV),
+ FLAG(l, PCI_ERR_ROOT_UNCOR_RCV),
+ FLAG(l, PCI_ERR_ROOT_MULTI_UNCOR_RCV),
+ FLAG(l, PCI_ERR_ROOT_FIRST_FATAL),
+ FLAG(l, PCI_ERR_ROOT_NONFATAL_RCV),
+ FLAG(l, PCI_ERR_ROOT_FATAL_RCV),
+ PCI_ERR_MSG_NUM(l));
+
+ w = get_conf_word(d, where + PCI_ERR_ROOT_COR_SRC);
+ printf("\t\tErrorSrc: ERR_COR: %04x ", w);
+
+ w = get_conf_word(d, where + PCI_ERR_ROOT_SRC);
+ printf("ERR_FATAL/NONFATAL: %04x\n", w);
+ }
+}
+
+static void cap_dpc(struct device *d, int where)
+{
+ u16 l;
+
+ printf("Downstream Port Containment\n");
+ if (verbose < 2)
+ return;
+
+ if (!config_fetch(d, where + PCI_DPC_CAP, 8))
+ return;
+
+ l = get_conf_word(d, where + PCI_DPC_CAP);
+ printf("\t\tDpcCap:\tINT Msg #%d, RPExt%c PoisonedTLP%c SwTrigger%c RP PIO Log %d, DL_ActiveErr%c\n",
+ PCI_DPC_CAP_INT_MSG(l), FLAG(l, PCI_DPC_CAP_RP_EXT), FLAG(l, PCI_DPC_CAP_TLP_BLOCK),
+ FLAG(l, PCI_DPC_CAP_SW_TRIGGER), PCI_DPC_CAP_RP_LOG(l), FLAG(l, PCI_DPC_CAP_DL_ACT_ERR));
+
+ l = get_conf_word(d, where + PCI_DPC_CTL);
+ printf("\t\tDpcCtl:\tTrigger:%x Cmpl%c INT%c ErrCor%c PoisonedTLP%c SwTrigger%c DL_ActiveErr%c\n",
+ PCI_DPC_CTL_TRIGGER(l), FLAG(l, PCI_DPC_CTL_CMPL), FLAG(l, PCI_DPC_CTL_INT),
+ FLAG(l, PCI_DPC_CTL_ERR_COR), FLAG(l, PCI_DPC_CTL_TLP), FLAG(l, PCI_DPC_CTL_SW_TRIGGER),
+ FLAG(l, PCI_DPC_CTL_DL_ACTIVE));
+
+ l = get_conf_word(d, where + PCI_DPC_STATUS);
+ printf("\t\tDpcSta:\tTrigger%c Reason:%02x INT%c RPBusy%c TriggerExt:%02x RP PIO ErrPtr:%02x\n",
+ FLAG(l, PCI_DPC_STS_TRIGGER), PCI_DPC_STS_REASON(l), FLAG(l, PCI_DPC_STS_INT),
+ FLAG(l, PCI_DPC_STS_RP_BUSY), PCI_DPC_STS_TRIGGER_EXT(l), PCI_DPC_STS_PIO_FEP(l));