From 5a94869995416ad857d9db2c5941a6b786dde669 Mon Sep 17 00:00:00 2001 From: scottr Date: Wed, 12 Aug 1998 06:58:42 +0000 Subject: [PATCH] New framework for handling processor interrupts, derived in part from the hp300 port. - Interrupts 3-6 use this immediately. Interrupt 7 is a special case, and the VIA interrupts (1 and 2) will be addressed when that code is rototilled. - Modify the zs front end to register with the appropriate interrupt controller: through the PSC on the AV Quadras, and direct to interrupt 4 on the rest. Arrange to have the appropriate zsc_softc supplied to us at interrupt time. - Modify the direct ADB driver (and its PowerManager cousin) to call intr_dispatch(), rather than zshard(). XXX This is a kludge, but at least limits the brokenness to the ADB drivers, now. As a side effect, this should fix PR 5590. Thanks to Bill Studenmund for correctly determining the cause of the problem reported there. --- sys/arch/mac68k/include/intr.h | 7 ++++++- sys/arch/mac68k/mac68k/vectors.s | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/sys/arch/mac68k/include/intr.h b/sys/arch/mac68k/include/intr.h index cacb8fd5a9c0..31f559dbfa0c 100644 --- a/sys/arch/mac68k/include/intr.h +++ b/sys/arch/mac68k/include/intr.h @@ -1,4 +1,4 @@ -/* $NetBSD: intr.h,v 1.8 1997/11/07 07:33:18 scottr Exp $ */ +/* $NetBSD: intr.h,v 1.9 1998/08/12 06:58:42 scottr Exp $ */ /* * Copyright (C) 1997 Scott Reynolds @@ -137,6 +137,11 @@ extern volatile u_int8_t ssir; #define setsoftdtmgr() siron(SIR_DTMGR) #define setsoftadb() siron(SIR_ADB) +/* intr.c */ +void intr_establish __P((int (*)(void *), void *, int)); +void intr_disestablish __P((int)); +int intr_dispatch __P((int)); + /* locore.s */ int spl0 __P((void)); #endif /* _KERNEL */ diff --git a/sys/arch/mac68k/mac68k/vectors.s b/sys/arch/mac68k/mac68k/vectors.s index 34db321bae09..2b5f12a0887b 100644 --- a/sys/arch/mac68k/mac68k/vectors.s +++ b/sys/arch/mac68k/mac68k/vectors.s @@ -1,4 +1,4 @@ -| $NetBSD: vectors.s,v 1.9 1997/09/03 06:16:24 scottr Exp $ +| $NetBSD: vectors.s,v 1.10 1998/08/12 06:58:42 scottr Exp $ | Copyright (c) 1988 University of Utah | Copyright (c) 1990 Regents of the University of California. @@ -78,10 +78,10 @@ GLOBAL(vectab) VECTOR(spurintr) /* 24: spurious interrupt */ VECTOR(lev1intr) /* 25: level 1 interrupt autovector */ VECTOR(lev2intr) /* 26: level 2 interrupt autovector */ - VECTOR(lev3intr) /* 27: level 3 interrupt autovector */ - VECTOR(lev4intr) /* 28: level 4 interrupt autovector */ - VECTOR(lev5intr) /* 29: level 5 interrupt autovector */ - VECTOR(lev6intr) /* 30: level 6 interrupt autovector */ + VECTOR(intrhand) /* 27: level 3 interrupt autovector */ + VECTOR(intrhand) /* 28: level 4 interrupt autovector */ + VECTOR(intrhand) /* 29: level 5 interrupt autovector */ + VECTOR(intrhand) /* 30: level 6 interrupt autovector */ VECTOR(lev7intr) /* 31: level 7 interrupt autovector */ VECTOR(trap0) /* 32: syscalls */ VECTOR(trap1) /* 33: sigreturn syscall or breakpoint */