summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2015-03-23 20:50:22 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2015-03-23 20:50:22 +0000
commite1889e93daa29899af7af2806a2e7e69c79f1e7a (patch)
treeb4cd638f549713f5628a3acf1c207baf883fe9e2
parenta4f3534d28af7ff0e2552085cef1fb882d31d4b0 (diff)
Add an helper routine if defined(DDB), which might help figuring out why
PIC sometimes loses isp^Wqlw interrupts.
-rw-r--r--sys/arch/sgi/xbow/xbridge.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/sys/arch/sgi/xbow/xbridge.c b/sys/arch/sgi/xbow/xbridge.c
index bce52b1f7f5..6f61461c3a1 100644
--- a/sys/arch/sgi/xbow/xbridge.c
+++ b/sys/arch/sgi/xbow/xbridge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xbridge.c,v 1.93 2014/12/04 21:52:08 miod Exp $ */
+/* $OpenBSD: xbridge.c,v 1.94 2015/03/23 20:50:21 miod Exp $ */
/*
* Copyright (c) 2008, 2009, 2011 Miodrag Vallat.
@@ -3295,3 +3295,34 @@ xbridge_set_devio(struct xbpci_softc *xb, int dev, uint32_t devio, int final)
dev, final ? "final " : "", devio);
#endif
}
+
+#ifdef DDB
+void xbridge_ddb(void);
+void
+xbridge_ddb()
+{
+ struct xbpci_softc *xb;
+ unsigned int n, intrbit;
+
+ for (n = 0; n < xbpci_cd.cd_ndevs; n++) {
+ xb = xbpci_cd.cd_devs[n];
+ if (xb == NULL)
+ continue;
+
+ printf("%s: ISR %p IER %p xb_ier %p\n",
+ xb->xb_dev.dv_xname,
+ (void *)xbridge_read_reg(xb, BRIDGE_ISR),
+ (void *)xbridge_read_reg(xb, BRIDGE_IER),
+ (void *)xb->xb_ier);
+
+ printf("mode %p dev %p\n",
+ (void *)xbridge_read_reg(xb, BRIDGE_INT_MODE),
+ (void *)xbridge_read_reg(xb, BRIDGE_INT_DEV));
+
+ for (intrbit = 0; intrbit < 8; intrbit++)
+ printf("IRQ%u to %p\n", intrbit,
+ (void *)xbridge_read_reg(xb,
+ BRIDGE_INT_ADDR(intrbit)));
+ }
+}
+#endif