diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-02 12:22:33 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-02 12:22:33 +0000 |
commit | fc34a5067e904f3048424b99304dc66fa979cf49 (patch) | |
tree | 6d4e6fedaa0c6fe5c72ae20581c10f11b138af8f | |
parent | 14eeb8ccfb08bca3016156701a9d7444058aae95 (diff) |
Do not map psycho-only interrupts on sabres. Reading from undefined
registers and mapping strange INRs is not a good idea.
ok jason@
-rw-r--r-- | sys/arch/sparc64/dev/psycho.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index 9fd0054de69..54469c68201 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.33 2003/05/30 00:15:36 henric Exp $ */ +/* $OpenBSD: psycho.c,v 1.34 2003/06/02 12:22:32 henric Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -417,17 +417,19 @@ psycho_attach(struct device *parent, struct device *self, void *aux) psycho_set_intr(sc, 15, psycho_bus_a, psycho_psychoreg_vaddr(sc, pciaerr_int_map), psycho_psychoreg_vaddr(sc, pciaerr_clr_int)); - psycho_set_intr(sc, 15, psycho_bus_b, - psycho_psychoreg_vaddr(sc, pciberr_int_map), - psycho_psychoreg_vaddr(sc, pciberr_clr_int)); #if 0 psycho_set_intr(sc, 15, psycho_powerfail, psycho_psychoreg_vaddr(sc, power_int_map), psycho_psychoreg_vaddr(sc, power_clr_int)); #endif - psycho_set_intr(sc, 1, psycho_wakeup, - psycho_psychoreg_vaddr(sc, pwrmgt_int_map), - psycho_psychoreg_vaddr(sc, pwrmgt_clr_int)); + if (sc->sc_mode == PSYCHO_MODE_PSYCHO) { + psycho_set_intr(sc, 15, psycho_bus_b, + psycho_psychoreg_vaddr(sc, pciberr_int_map), + psycho_psychoreg_vaddr(sc, pciberr_clr_int)); + psycho_set_intr(sc, 1, psycho_wakeup, + psycho_psychoreg_vaddr(sc, pwrmgt_int_map), + psycho_psychoreg_vaddr(sc, pwrmgt_clr_int)); + } /* * Apparently a number of machines with psycho and psycho+ |