summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-07-12 12:21:05 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-07-12 12:21:05 +0000
commitac1bdba169fd42a2a5a79ada6f9f2c6fe4decd94 (patch)
tree982aef2785bc999e9939097bc2c5efb97d06457d /sys
parent5f520f9ae6b4269fc27074602049e12757dc176a (diff)
Use the proper interrupt target ID on Oberon.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc64/dev/pyro.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/sys/arch/sparc64/dev/pyro.c b/sys/arch/sparc64/dev/pyro.c
index 146164c5abe..dad704e0491 100644
--- a/sys/arch/sparc64/dev/pyro.c
+++ b/sys/arch/sparc64/dev/pyro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pyro.c,v 1.12 2008/05/24 14:54:03 kettenis Exp $ */
+/* $OpenBSD: pyro.c,v 1.13 2008/07/12 12:21:04 kettenis Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -56,6 +56,17 @@ int pyro_debug = ~0;
#define DPRINTF(l, s)
#endif
+#define FIRE_INTRMAP_INT_CNTRL_NUM_MASK 0x000003c0
+#define FIRE_INTRMAP_INT_CNTRL_NUM0 0x00000040
+#define FIRE_INTRMAP_INT_CNTRL_NUM1 0x00000080
+#define FIRE_INTRMAP_INT_CNTRL_NUM2 0x00000100
+#define FIRE_INTRMAP_INT_CNTRL_NUM3 0x00000200
+#define FIRE_INTRMAP_T_JPID_SHIFT 26
+#define FIRE_INTRMAP_T_JPID_MASK 0x7c000000
+
+#define OBERON_INTRMAP_T_DESTID_SHIFT 21
+#define OBERON_INTRMAP_T_DESTID_MASK 0x7fe00000
+
extern struct sparc_pci_chipset _sparc_pci_chipset;
int pyro_match(struct device *, void *, void *);
@@ -505,7 +516,16 @@ _pyro_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle,
u_int64_t intrmap;
intrmap = *intrmapptr;
- intrmap |= (1LL << 6);
+ intrmap &= ~FIRE_INTRMAP_INT_CNTRL_NUM_MASK;
+ intrmap |= FIRE_INTRMAP_INT_CNTRL_NUM0;
+ if (sc->sc_oberon) {
+ intrmap &= ~OBERON_INTRMAP_T_DESTID_MASK;
+ intrmap |= CPU_JUPITERID <<
+ OBERON_INTRMAP_T_DESTID_SHIFT;
+ } else {
+ intrmap &= ~FIRE_INTRMAP_T_JPID_MASK;
+ intrmap |= CPU_UPAID << FIRE_INTRMAP_T_JPID_SHIFT;
+ }
intrmap |= INTMAP_V;
*intrmapptr = intrmap;
intrmap = *intrmapptr;