summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorfsmp <fsmp@FreeBSD.org>1997-07-19 02:28:30 +0000
committerfsmp <fsmp@FreeBSD.org>1997-07-19 02:28:30 +0000
commit74f362861cfc4b8ce9dee920628ebe7eea9568d1 (patch)
treebcc20286fcda2447605387b95d7d1eb95fdd7609 /sys
parent95214909a04d38a8cd4aec51768d6d151b26ac9d (diff)
downloadFreeBSD-src-74f362861cfc4b8ce9dee920628ebe7eea9568d1.zip
FreeBSD-src-74f362861cfc4b8ce9dee920628ebe7eea9568d1.tar.gz
SMP or APIC_IO:
- Increased NIDT to 256. - Moved IPI vectors up above the linux compat vector. - Removed runtime setup of RTC vector.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/tsc.c31
-rw-r--r--sys/amd64/isa/clock.c31
-rw-r--r--sys/amd64/isa/intr_machdep.h58
-rw-r--r--sys/i386/i386/tsc.c31
-rw-r--r--sys/i386/isa/apic_ipl.s40
-rw-r--r--sys/i386/isa/clock.c31
-rw-r--r--sys/i386/isa/intr_machdep.h58
-rw-r--r--sys/isa/atrtc.c31
8 files changed, 206 insertions, 105 deletions
diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c
index 073fe87..426de51 100644
--- a/sys/amd64/amd64/tsc.c
+++ b/sys/amd64/amd64/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.89 1997/07/13 01:18:47 fsmp Exp $
+ * $Id: clock.c,v 1.90 1997/07/18 03:59:28 fsmp Exp $
*/
/*
@@ -831,17 +831,19 @@ resettodr()
}
#ifdef APIC_IO
-
/* XXX FIXME: from icu.s: */
+extern u_int ivectors[];
extern u_int vec[];
+
extern void vec8254 __P((void));
-extern void vecRTC __P((void));
-extern u_int ivectors[];
extern u_int Xintr8254;
-extern u_int XintrRTC;
extern u_int mask8254;
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove vevRTS stuff after several weeks of no problems */
+extern void vecRTC __P((void));
+extern u_int XintrRTC;
extern u_int maskRTC;
-
+#endif /* DO_RTC_VEC */
#endif /* APIC_IO */
/*
@@ -940,11 +942,12 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+
#ifdef APIC_IO
- /* RTC is traditionally on ISA IRQ8 */
+
+#ifdef DO_RTC_VEC
if ((x = isa_apic_pin(8)) < 0)
panic("APIC missing RTC connection");
-
vec[x] = (u_int)vecRTC;
XintrRTC = (u_int)ivectors[x]; /* XXX might need Xfastintr# */
maskRTC = (1 << x);
@@ -953,11 +956,23 @@ cpu_initclocks()
/* unit */ 0);
INTREN(maskRTC);
#else
+ if (isa_apic_pin(8) != 8)
+ panic("APIC RTC != 8");
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+#endif /* DO_RTC_VEC */
+
+#else /* APIC_IO */
+
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
+
#endif /* APIC_IO */
+
writertc(RTC_STATUSB, rtc_statusb);
#ifdef APIC_IO
diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c
index 073fe87..426de51 100644
--- a/sys/amd64/isa/clock.c
+++ b/sys/amd64/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.89 1997/07/13 01:18:47 fsmp Exp $
+ * $Id: clock.c,v 1.90 1997/07/18 03:59:28 fsmp Exp $
*/
/*
@@ -831,17 +831,19 @@ resettodr()
}
#ifdef APIC_IO
-
/* XXX FIXME: from icu.s: */
+extern u_int ivectors[];
extern u_int vec[];
+
extern void vec8254 __P((void));
-extern void vecRTC __P((void));
-extern u_int ivectors[];
extern u_int Xintr8254;
-extern u_int XintrRTC;
extern u_int mask8254;
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove vevRTS stuff after several weeks of no problems */
+extern void vecRTC __P((void));
+extern u_int XintrRTC;
extern u_int maskRTC;
-
+#endif /* DO_RTC_VEC */
#endif /* APIC_IO */
/*
@@ -940,11 +942,12 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+
#ifdef APIC_IO
- /* RTC is traditionally on ISA IRQ8 */
+
+#ifdef DO_RTC_VEC
if ((x = isa_apic_pin(8)) < 0)
panic("APIC missing RTC connection");
-
vec[x] = (u_int)vecRTC;
XintrRTC = (u_int)ivectors[x]; /* XXX might need Xfastintr# */
maskRTC = (1 << x);
@@ -953,11 +956,23 @@ cpu_initclocks()
/* unit */ 0);
INTREN(maskRTC);
#else
+ if (isa_apic_pin(8) != 8)
+ panic("APIC RTC != 8");
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+#endif /* DO_RTC_VEC */
+
+#else /* APIC_IO */
+
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
+
#endif /* APIC_IO */
+
writertc(RTC_STATUSB, rtc_statusb);
#ifdef APIC_IO
diff --git a/sys/amd64/isa/intr_machdep.h b/sys/amd64/isa/intr_machdep.h
index e9c0e84..c164799 100644
--- a/sys/amd64/isa/intr_machdep.h
+++ b/sys/amd64/isa/intr_machdep.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $Id: intr_machdep.h,v 1.7 1997/07/18 19:47:13 smp Exp smp $
+ * $Id: intr_machdep.h,v 1.5 1997/07/18 21:27:14 fsmp Exp $
*/
#ifndef _I386_ISA_INTR_MACHDEP_H_
@@ -51,7 +51,7 @@
APIC TPR priority vector levels:
0xff (255) +------------+
- | | 15 (highest)
+ | | 15 (IPIs: Xspuriousint)
0xf0 (240) +------------+
| | 14
0xe0 (224) +------------+
@@ -61,51 +61,53 @@
0xc0 (192) +------------+
| | 11
0xb0 (176) +------------+
- | | 10
+ | | 10 (IPIs: Xcpustop)
0xa0 (160) +------------+
- | | 9
+ | | 9 (IPIs: Xinvltlb)
0x90 (144) +------------+
- | | 8
+ | | 8 (linux compat @ vector 0x80)
0x80 (128) +------------+
| | 7
0x70 (112) +------------+
- | | 6 (IPIs: Xspuriousint)
+ | | 6
0x60 (96) +------------+
- | | 5 (IPIs: Xcpustop)
+ | | 5
0x50 (80) +------------+
- | | 4 (IPIs: Xinvltlb)
+ | | 4
0x40 (64) +------------+
- | | 3 (extended APIC hardware INTs: PCI)
+ | | 3 (upper APIC hardware INTs: PCI)
0x30 (48) +------------+
| | 2 (start of hardware INTs: ISA)
0x20 (32) +------------+
- | | 1 (lowest)
+ | | 1 (exceptions, traps, etc.)
0x10 (16) +------------+
- | | 0
+ | | 0 (exceptions, traps, etc.)
0x00 (0) +------------+
*/
-#define TPR_BLOCK_HWI 0x3f /* block hardware INTs via APIC TPR */
-#define TPR_BLOCK_XINVLTLB 0x4f /* block ? via APIC TPR */
-#define TPR_BLOCK_XCPUSTOP 0x5f /* block ? via APIC TPR */
+/* blocking values for local APIC Task Priority Register */
+#define TPR_BLOCK_HWI 0x3f /* hardware INTs */
+#define TPR_BLOCK_XINVLTLB 0x9f /* */
+#define TPR_BLOCK_XCPUSTOP 0xaf /* */
+#define TPR_BLOCK_ALL 0xff /* all INTs */
-/*
- * Note: this vector MUST be xxxx1111, 32 + 79 = 111 = 0x6f:
- * also remember i386/include/segments.h: #define NIDT 129
- */
-#define XSPURIOUSINT_OFFSET (ICU_OFFSET + 79)
+#ifdef TEST_TEST1
+/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */
+#define XTEST1_OFFSET (ICU_OFFSET + 31)
+#endif /** TEST_TEST1 */
/* TLB shootdowns */
-#define XINVLTLB_OFFSET (ICU_OFFSET + 32)
+#define XINVLTLB_OFFSET (ICU_OFFSET + 112)
/* IPI to signal CPUs to stop and wait for another CPU to restart them */
-#define XCPUSTOP_OFFSET (ICU_OFFSET + 48)
+#define XCPUSTOP_OFFSET (ICU_OFFSET + 128)
+
+/*
+ * Note: this vector MUST be xxxx1111, 32 + 223 = 255 = 0xff:
+ */
+#define XSPURIOUSINT_OFFSET (ICU_OFFSET + 223)
-#ifdef TEST_TEST1
-/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */
-#define XTEST1_OFFSET (ICU_OFFSET + 31)
-#endif /** TEST_TEST1 */
#ifndef LOCORE
@@ -151,12 +153,12 @@ inthand_t
inthand_t
Xinvltlb, /* TLB shootdowns */
- Xspuriousint, /* handle APIC "spurious INTs" */
- Xcpustop; /* stop & wait for another CPU to restart it */
+ Xcpustop, /* CPU stops & waits for another CPU to restart it */
+ Xspuriousint; /* handle APIC "spurious INTs" */
#ifdef TEST_TEST1
inthand_t
- Xtest1; /* 'fake' HWI in top of APIC prio 0x3x, 32+31 = 0x3f */
+ Xtest1; /* 'fake' HWI at top of APIC prio 0x3x, 32+31 = 0x3f */
#endif /** TEST_TEST1 */
struct isa_device;
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 073fe87..426de51 100644
--- a/sys/i386/i386/tsc.c
+++ b/sys/i386/i386/tsc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.89 1997/07/13 01:18:47 fsmp Exp $
+ * $Id: clock.c,v 1.90 1997/07/18 03:59:28 fsmp Exp $
*/
/*
@@ -831,17 +831,19 @@ resettodr()
}
#ifdef APIC_IO
-
/* XXX FIXME: from icu.s: */
+extern u_int ivectors[];
extern u_int vec[];
+
extern void vec8254 __P((void));
-extern void vecRTC __P((void));
-extern u_int ivectors[];
extern u_int Xintr8254;
-extern u_int XintrRTC;
extern u_int mask8254;
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove vevRTS stuff after several weeks of no problems */
+extern void vecRTC __P((void));
+extern u_int XintrRTC;
extern u_int maskRTC;
-
+#endif /* DO_RTC_VEC */
#endif /* APIC_IO */
/*
@@ -940,11 +942,12 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+
#ifdef APIC_IO
- /* RTC is traditionally on ISA IRQ8 */
+
+#ifdef DO_RTC_VEC
if ((x = isa_apic_pin(8)) < 0)
panic("APIC missing RTC connection");
-
vec[x] = (u_int)vecRTC;
XintrRTC = (u_int)ivectors[x]; /* XXX might need Xfastintr# */
maskRTC = (1 << x);
@@ -953,11 +956,23 @@ cpu_initclocks()
/* unit */ 0);
INTREN(maskRTC);
#else
+ if (isa_apic_pin(8) != 8)
+ panic("APIC RTC != 8");
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+#endif /* DO_RTC_VEC */
+
+#else /* APIC_IO */
+
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
+
#endif /* APIC_IO */
+
writertc(RTC_STATUSB, rtc_statusb);
#ifdef APIC_IO
diff --git a/sys/i386/isa/apic_ipl.s b/sys/i386/isa/apic_ipl.s
index 1aec3ce..c7612c8 100644
--- a/sys/i386/isa/apic_ipl.s
+++ b/sys/i386/isa/apic_ipl.s
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: apic_ipl.s,v 1.1 1997/05/24 17:02:04 smp Exp smp $
+ * $Id: apic_ipl.s,v 1.1 1997/07/18 22:54:17 smp Exp smp $
*/
.data
@@ -33,20 +33,23 @@
_Xintr8254:
.long _Xintr7
-/* this allows us to change the RTC clock APIC pin# assignment */
- .globl _XintrRTC
-_XintrRTC:
- .long _Xintr7
-
/* used by this file, microtime.s and clock.c */
.globl _mask8254
_mask8254:
.long 0
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove me after several weeks of no problems */
+/* this allows us to change the RTC clock APIC pin# assignment */
+ .globl _XintrRTC
+_XintrRTC:
+ .long _Xintr7
+
/* used by this file and clock.c */
.globl _maskRTC
_maskRTC:
.long 0
+#endif /* DO_RTC_VEC */
/* */
.globl _vec
@@ -91,6 +94,8 @@ _vec8254:
* generic vector function for RTC clock
*/
ALIGN_TEXT
+#ifdef DO_RTC_VEC
+
.globl _vecRTC
_vecRTC:
popl %eax
@@ -100,11 +105,26 @@ _vecRTC:
cli
movl _maskRTC,%eax /* lazy masking */
notl %eax
- andl %eax,iactive
+ andl %eax, iactive
MEXITCOUNT
movl _XintrRTC, %eax
jmp %eax /* XXX might need _Xfastintr# */
+#else /* DO_RTC_VEC */
+
+vec8:
+ popl %eax
+ pushfl
+ pushl $KCSEL
+ pushl %eax
+ cli
+ andl $~IRQ_BIT(8), iactive ; /* lazy masking */
+ MEXITCOUNT
+ jmp _Xintr8 /* XXX might need _Xfastintr8 */
+
+#endif /* DO_RTC_VEC */
+
+
/*
* The 'generic' vector stubs.
*/
@@ -117,7 +137,7 @@ __CONCAT(vec,irq_num): ; \
pushl $KCSEL ; \
pushl %eax ; \
cli ; \
- andl $~IRQ_BIT(irq_num),iactive ; /* lazy masking */ \
+ andl $~IRQ_BIT(irq_num), iactive ; /* lazy masking */ \
MEXITCOUNT ; \
jmp __CONCAT(_Xintr,irq_num)
@@ -130,7 +150,9 @@ __CONCAT(vec,irq_num): ; \
BUILD_VEC(5)
BUILD_VEC(6)
BUILD_VEC(7)
- BUILD_VEC(8) /* NOT specific in IO APIC hardware */
+#ifdef DO_RTC_VEC
+ BUILD_VEC(8)
+#endif /* DO__RTC_VEC */
BUILD_VEC(9)
BUILD_VEC(10)
BUILD_VEC(11)
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 073fe87..426de51 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.89 1997/07/13 01:18:47 fsmp Exp $
+ * $Id: clock.c,v 1.90 1997/07/18 03:59:28 fsmp Exp $
*/
/*
@@ -831,17 +831,19 @@ resettodr()
}
#ifdef APIC_IO
-
/* XXX FIXME: from icu.s: */
+extern u_int ivectors[];
extern u_int vec[];
+
extern void vec8254 __P((void));
-extern void vecRTC __P((void));
-extern u_int ivectors[];
extern u_int Xintr8254;
-extern u_int XintrRTC;
extern u_int mask8254;
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove vevRTS stuff after several weeks of no problems */
+extern void vecRTC __P((void));
+extern u_int XintrRTC;
extern u_int maskRTC;
-
+#endif /* DO_RTC_VEC */
#endif /* APIC_IO */
/*
@@ -940,11 +942,12 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+
#ifdef APIC_IO
- /* RTC is traditionally on ISA IRQ8 */
+
+#ifdef DO_RTC_VEC
if ((x = isa_apic_pin(8)) < 0)
panic("APIC missing RTC connection");
-
vec[x] = (u_int)vecRTC;
XintrRTC = (u_int)ivectors[x]; /* XXX might need Xfastintr# */
maskRTC = (1 << x);
@@ -953,11 +956,23 @@ cpu_initclocks()
/* unit */ 0);
INTREN(maskRTC);
#else
+ if (isa_apic_pin(8) != 8)
+ panic("APIC RTC != 8");
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+#endif /* DO_RTC_VEC */
+
+#else /* APIC_IO */
+
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
+
#endif /* APIC_IO */
+
writertc(RTC_STATUSB, rtc_statusb);
#ifdef APIC_IO
diff --git a/sys/i386/isa/intr_machdep.h b/sys/i386/isa/intr_machdep.h
index e9c0e84..c164799 100644
--- a/sys/i386/isa/intr_machdep.h
+++ b/sys/i386/isa/intr_machdep.h
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)isa_device.h 7.1 (Berkeley) 5/9/91
- * $Id: intr_machdep.h,v 1.7 1997/07/18 19:47:13 smp Exp smp $
+ * $Id: intr_machdep.h,v 1.5 1997/07/18 21:27:14 fsmp Exp $
*/
#ifndef _I386_ISA_INTR_MACHDEP_H_
@@ -51,7 +51,7 @@
APIC TPR priority vector levels:
0xff (255) +------------+
- | | 15 (highest)
+ | | 15 (IPIs: Xspuriousint)
0xf0 (240) +------------+
| | 14
0xe0 (224) +------------+
@@ -61,51 +61,53 @@
0xc0 (192) +------------+
| | 11
0xb0 (176) +------------+
- | | 10
+ | | 10 (IPIs: Xcpustop)
0xa0 (160) +------------+
- | | 9
+ | | 9 (IPIs: Xinvltlb)
0x90 (144) +------------+
- | | 8
+ | | 8 (linux compat @ vector 0x80)
0x80 (128) +------------+
| | 7
0x70 (112) +------------+
- | | 6 (IPIs: Xspuriousint)
+ | | 6
0x60 (96) +------------+
- | | 5 (IPIs: Xcpustop)
+ | | 5
0x50 (80) +------------+
- | | 4 (IPIs: Xinvltlb)
+ | | 4
0x40 (64) +------------+
- | | 3 (extended APIC hardware INTs: PCI)
+ | | 3 (upper APIC hardware INTs: PCI)
0x30 (48) +------------+
| | 2 (start of hardware INTs: ISA)
0x20 (32) +------------+
- | | 1 (lowest)
+ | | 1 (exceptions, traps, etc.)
0x10 (16) +------------+
- | | 0
+ | | 0 (exceptions, traps, etc.)
0x00 (0) +------------+
*/
-#define TPR_BLOCK_HWI 0x3f /* block hardware INTs via APIC TPR */
-#define TPR_BLOCK_XINVLTLB 0x4f /* block ? via APIC TPR */
-#define TPR_BLOCK_XCPUSTOP 0x5f /* block ? via APIC TPR */
+/* blocking values for local APIC Task Priority Register */
+#define TPR_BLOCK_HWI 0x3f /* hardware INTs */
+#define TPR_BLOCK_XINVLTLB 0x9f /* */
+#define TPR_BLOCK_XCPUSTOP 0xaf /* */
+#define TPR_BLOCK_ALL 0xff /* all INTs */
-/*
- * Note: this vector MUST be xxxx1111, 32 + 79 = 111 = 0x6f:
- * also remember i386/include/segments.h: #define NIDT 129
- */
-#define XSPURIOUSINT_OFFSET (ICU_OFFSET + 79)
+#ifdef TEST_TEST1
+/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */
+#define XTEST1_OFFSET (ICU_OFFSET + 31)
+#endif /** TEST_TEST1 */
/* TLB shootdowns */
-#define XINVLTLB_OFFSET (ICU_OFFSET + 32)
+#define XINVLTLB_OFFSET (ICU_OFFSET + 112)
/* IPI to signal CPUs to stop and wait for another CPU to restart them */
-#define XCPUSTOP_OFFSET (ICU_OFFSET + 48)
+#define XCPUSTOP_OFFSET (ICU_OFFSET + 128)
+
+/*
+ * Note: this vector MUST be xxxx1111, 32 + 223 = 255 = 0xff:
+ */
+#define XSPURIOUSINT_OFFSET (ICU_OFFSET + 223)
-#ifdef TEST_TEST1
-/* put a 'fake' HWI in top of APIC prio 0x3x, 32 + 31 = 63 = 0x3f */
-#define XTEST1_OFFSET (ICU_OFFSET + 31)
-#endif /** TEST_TEST1 */
#ifndef LOCORE
@@ -151,12 +153,12 @@ inthand_t
inthand_t
Xinvltlb, /* TLB shootdowns */
- Xspuriousint, /* handle APIC "spurious INTs" */
- Xcpustop; /* stop & wait for another CPU to restart it */
+ Xcpustop, /* CPU stops & waits for another CPU to restart it */
+ Xspuriousint; /* handle APIC "spurious INTs" */
#ifdef TEST_TEST1
inthand_t
- Xtest1; /* 'fake' HWI in top of APIC prio 0x3x, 32+31 = 0x3f */
+ Xtest1; /* 'fake' HWI at top of APIC prio 0x3x, 32+31 = 0x3f */
#endif /** TEST_TEST1 */
struct isa_device;
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 073fe87..426de51 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.89 1997/07/13 01:18:47 fsmp Exp $
+ * $Id: clock.c,v 1.90 1997/07/18 03:59:28 fsmp Exp $
*/
/*
@@ -831,17 +831,19 @@ resettodr()
}
#ifdef APIC_IO
-
/* XXX FIXME: from icu.s: */
+extern u_int ivectors[];
extern u_int vec[];
+
extern void vec8254 __P((void));
-extern void vecRTC __P((void));
-extern u_int ivectors[];
extern u_int Xintr8254;
-extern u_int XintrRTC;
extern u_int mask8254;
+#ifdef DO_RTC_VEC
+/** XXX FIXME: remove vevRTS stuff after several weeks of no problems */
+extern void vecRTC __P((void));
+extern u_int XintrRTC;
extern u_int maskRTC;
-
+#endif /* DO_RTC_VEC */
#endif /* APIC_IO */
/*
@@ -940,11 +942,12 @@ cpu_initclocks()
diag = rtcin(RTC_DIAG);
if (diag != 0)
printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS);
+
#ifdef APIC_IO
- /* RTC is traditionally on ISA IRQ8 */
+
+#ifdef DO_RTC_VEC
if ((x = isa_apic_pin(8)) < 0)
panic("APIC missing RTC connection");
-
vec[x] = (u_int)vecRTC;
XintrRTC = (u_int)ivectors[x]; /* XXX might need Xfastintr# */
maskRTC = (1 << x);
@@ -953,11 +956,23 @@ cpu_initclocks()
/* unit */ 0);
INTREN(maskRTC);
#else
+ if (isa_apic_pin(8) != 8)
+ panic("APIC RTC != 8");
+ register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
+ /* XXX */ (inthand2_t *)rtcintr, &stat_imask,
+ /* unit */ 0);
+ INTREN(IRQ8);
+#endif /* DO_RTC_VEC */
+
+#else /* APIC_IO */
+
register_intr(/* irq */ 8, /* XXX id */ 1, /* flags */ 0,
/* XXX */ (inthand2_t *)rtcintr, &stat_imask,
/* unit */ 0);
INTREN(IRQ8);
+
#endif /* APIC_IO */
+
writertc(RTC_STATUSB, rtc_statusb);
#ifdef APIC_IO
OpenPOWER on IntegriCloud