From dba8ed633106407ed519b88268727767de2f71b5 Mon Sep 17 00:00:00 2001 From: fsmp Date: Wed, 25 Jun 1997 21:00:00 +0000 Subject: Modified to use merged/renamed functions: - get_isa_apic_mask() -> isa_apic_mask() - get_isa_apic_irq() && get_eisa_apic_irq() -> isa_apic_pin() --- sys/amd64/amd64/tsc.c | 64 ++++++++++++++++++++++++--------------------------- sys/amd64/isa/clock.c | 64 ++++++++++++++++++++++++--------------------------- sys/amd64/isa/isa.c | 10 ++++---- sys/i386/i386/tsc.c | 64 ++++++++++++++++++++++++--------------------------- sys/i386/isa/clock.c | 64 ++++++++++++++++++++++++--------------------------- sys/i386/isa/isa.c | 10 ++++---- sys/isa/atrtc.c | 64 ++++++++++++++++++++++++--------------------------- 7 files changed, 160 insertions(+), 180 deletions(-) (limited to 'sys') diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 4ae5c36..6b1badb 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.86 1997/05/31 09:27:30 peter Exp $ + * $Id: clock.c,v 1.3 1997/06/25 20:37:29 smp Exp smp $ */ /* @@ -64,6 +64,9 @@ #include #include #include +#ifdef APIC_IO +#include +#endif /* APIC_IO */ #include #include @@ -826,9 +829,9 @@ resettodr() writertc(RTC_STATUSB, rtc_statusb); } -#if defined(APIC_IO) +#ifdef APIC_IO -/* from icu.s: */ +/* XXX FIXME: from icu.s: */ extern u_int vec[]; extern void vec8254 __P((void)); extern void vecRTC __P((void)); @@ -847,7 +850,7 @@ void cpu_initclocks() { int diag; -#if defined(APIC_IO) +#ifdef APIC_IO int x; #endif /* APIC_IO */ @@ -867,31 +870,26 @@ cpu_initclocks() } /* Finish initializing 8253 timer 0. */ -#if defined(APIC_IO) +#ifdef APIC_IO +#ifndef IO_ICU1 +#define IO_ICU1 0x20 +#endif /* IO_ICU1 */ + /* 8254 is traditionally on ISA IRQ0 */ - if ((x = get_isa_apic_irq(0)) < 0) { - /* - * bummer, this mb doesn't have the 8254 on ISA irq0, - * perhaps it's on the EISA bus... - */ - if ((x = get_eisa_apic_irq(0)) < 0) { - /* double bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); + if ((x = isa_apic_pin(0)) < 0) { + /* bummer, attempt to redirect thru the 8259 */ + if (bootverbose) + printf("APIC missing 8254 connection\n"); - /* allow 8254 timer to INTerrupt 8259 */ -#if !defined(IO_ICU1) -#define IO_ICU1 0x20 -#endif - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } + /* allow 8254 timer to INTerrupt 8259 */ + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ + + /* program IO APIC for type 3 INT on INT0 */ + if (ext_int_setup(0, 0) < 0) + panic("8254 redirect impossible!"); + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; @@ -907,6 +905,7 @@ cpu_initclocks() /* unit */ 0); INTREN(IRQ0); #endif /* APIC_IO */ + #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) /* * Finish setting up anti-jitter measures. @@ -925,13 +924,10 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#if defined(APIC_IO) +#ifdef APIC_IO /* RTC is traditionally on ISA IRQ8 */ - if ((x = get_isa_apic_irq(8)) < 0) { - if ((x = get_eisa_apic_irq(8)) < 0) { - panic("APIC missing RTC connection"); - } - } + 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# */ @@ -948,7 +944,7 @@ cpu_initclocks() #endif /* APIC_IO */ writertc(RTC_STATUSB, rtc_statusb); -#if defined(APIC_IO) +#ifdef APIC_IO printf("Enabled INTs: "); for (x = 0; x < 24; ++x) if ((imen & (1 << x)) == 0) diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 4ae5c36..6b1badb 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.86 1997/05/31 09:27:30 peter Exp $ + * $Id: clock.c,v 1.3 1997/06/25 20:37:29 smp Exp smp $ */ /* @@ -64,6 +64,9 @@ #include #include #include +#ifdef APIC_IO +#include +#endif /* APIC_IO */ #include #include @@ -826,9 +829,9 @@ resettodr() writertc(RTC_STATUSB, rtc_statusb); } -#if defined(APIC_IO) +#ifdef APIC_IO -/* from icu.s: */ +/* XXX FIXME: from icu.s: */ extern u_int vec[]; extern void vec8254 __P((void)); extern void vecRTC __P((void)); @@ -847,7 +850,7 @@ void cpu_initclocks() { int diag; -#if defined(APIC_IO) +#ifdef APIC_IO int x; #endif /* APIC_IO */ @@ -867,31 +870,26 @@ cpu_initclocks() } /* Finish initializing 8253 timer 0. */ -#if defined(APIC_IO) +#ifdef APIC_IO +#ifndef IO_ICU1 +#define IO_ICU1 0x20 +#endif /* IO_ICU1 */ + /* 8254 is traditionally on ISA IRQ0 */ - if ((x = get_isa_apic_irq(0)) < 0) { - /* - * bummer, this mb doesn't have the 8254 on ISA irq0, - * perhaps it's on the EISA bus... - */ - if ((x = get_eisa_apic_irq(0)) < 0) { - /* double bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); + if ((x = isa_apic_pin(0)) < 0) { + /* bummer, attempt to redirect thru the 8259 */ + if (bootverbose) + printf("APIC missing 8254 connection\n"); - /* allow 8254 timer to INTerrupt 8259 */ -#if !defined(IO_ICU1) -#define IO_ICU1 0x20 -#endif - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } + /* allow 8254 timer to INTerrupt 8259 */ + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ + + /* program IO APIC for type 3 INT on INT0 */ + if (ext_int_setup(0, 0) < 0) + panic("8254 redirect impossible!"); + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; @@ -907,6 +905,7 @@ cpu_initclocks() /* unit */ 0); INTREN(IRQ0); #endif /* APIC_IO */ + #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) /* * Finish setting up anti-jitter measures. @@ -925,13 +924,10 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#if defined(APIC_IO) +#ifdef APIC_IO /* RTC is traditionally on ISA IRQ8 */ - if ((x = get_isa_apic_irq(8)) < 0) { - if ((x = get_eisa_apic_irq(8)) < 0) { - panic("APIC missing RTC connection"); - } - } + 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# */ @@ -948,7 +944,7 @@ cpu_initclocks() #endif /* APIC_IO */ writertc(RTC_STATUSB, rtc_statusb); -#if defined(APIC_IO) +#ifdef APIC_IO printf("Enabled INTs: "); for (x = 0; x < 24; ++x) if ((imen & (1 << x)) == 0) diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index daa5491..31c8955 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.91 1997/06/08 17:14:42 ache Exp $ + * $Id: isa.c,v 1.2 1997/06/25 20:12:23 smp Exp smp $ */ /* @@ -55,7 +55,7 @@ #include #include #include -#if defined(APIC_IO) +#ifdef APIC_IO #include #include #endif /* APIC_IO */ @@ -520,7 +520,7 @@ config_isadev_c(isdp, mp, reconfig) } (*dp->attach)(isdp); if (isdp->id_irq) { -#if defined(APIC_IO) +#ifdef APIC_IO /* * Some motherboards use upper IRQs for traditional * ISA INTerrupt sources. In particular we have @@ -530,13 +530,13 @@ config_isadev_c(isdp, mp, reconfig) u_int apic_mask; int rirq; - apic_mask = get_isa_apic_mask(isdp->id_irq); + apic_mask = isa_apic_mask(isdp->id_irq); if (apic_mask != isdp->id_irq) { rirq = ffs(isdp->id_irq) - 1; isdp->id_irq = apic_mask; undirect_isa_irq(rirq); /* free for ISA */ } -#endif /* APIC_IO */ +#endif /* APIC_IO */ if (!isdp->id_conflicts || (!intr_registered(ffs(isdp->id_irq) - 1) && isdp->id_intr != NULL)) diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 4ae5c36..6b1badb 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.86 1997/05/31 09:27:30 peter Exp $ + * $Id: clock.c,v 1.3 1997/06/25 20:37:29 smp Exp smp $ */ /* @@ -64,6 +64,9 @@ #include #include #include +#ifdef APIC_IO +#include +#endif /* APIC_IO */ #include #include @@ -826,9 +829,9 @@ resettodr() writertc(RTC_STATUSB, rtc_statusb); } -#if defined(APIC_IO) +#ifdef APIC_IO -/* from icu.s: */ +/* XXX FIXME: from icu.s: */ extern u_int vec[]; extern void vec8254 __P((void)); extern void vecRTC __P((void)); @@ -847,7 +850,7 @@ void cpu_initclocks() { int diag; -#if defined(APIC_IO) +#ifdef APIC_IO int x; #endif /* APIC_IO */ @@ -867,31 +870,26 @@ cpu_initclocks() } /* Finish initializing 8253 timer 0. */ -#if defined(APIC_IO) +#ifdef APIC_IO +#ifndef IO_ICU1 +#define IO_ICU1 0x20 +#endif /* IO_ICU1 */ + /* 8254 is traditionally on ISA IRQ0 */ - if ((x = get_isa_apic_irq(0)) < 0) { - /* - * bummer, this mb doesn't have the 8254 on ISA irq0, - * perhaps it's on the EISA bus... - */ - if ((x = get_eisa_apic_irq(0)) < 0) { - /* double bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); + if ((x = isa_apic_pin(0)) < 0) { + /* bummer, attempt to redirect thru the 8259 */ + if (bootverbose) + printf("APIC missing 8254 connection\n"); - /* allow 8254 timer to INTerrupt 8259 */ -#if !defined(IO_ICU1) -#define IO_ICU1 0x20 -#endif - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } + /* allow 8254 timer to INTerrupt 8259 */ + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ + + /* program IO APIC for type 3 INT on INT0 */ + if (ext_int_setup(0, 0) < 0) + panic("8254 redirect impossible!"); + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; @@ -907,6 +905,7 @@ cpu_initclocks() /* unit */ 0); INTREN(IRQ0); #endif /* APIC_IO */ + #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) /* * Finish setting up anti-jitter measures. @@ -925,13 +924,10 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#if defined(APIC_IO) +#ifdef APIC_IO /* RTC is traditionally on ISA IRQ8 */ - if ((x = get_isa_apic_irq(8)) < 0) { - if ((x = get_eisa_apic_irq(8)) < 0) { - panic("APIC missing RTC connection"); - } - } + 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# */ @@ -948,7 +944,7 @@ cpu_initclocks() #endif /* APIC_IO */ writertc(RTC_STATUSB, rtc_statusb); -#if defined(APIC_IO) +#ifdef APIC_IO printf("Enabled INTs: "); for (x = 0; x < 24; ++x) if ((imen & (1 << x)) == 0) diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 4ae5c36..6b1badb 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.86 1997/05/31 09:27:30 peter Exp $ + * $Id: clock.c,v 1.3 1997/06/25 20:37:29 smp Exp smp $ */ /* @@ -64,6 +64,9 @@ #include #include #include +#ifdef APIC_IO +#include +#endif /* APIC_IO */ #include #include @@ -826,9 +829,9 @@ resettodr() writertc(RTC_STATUSB, rtc_statusb); } -#if defined(APIC_IO) +#ifdef APIC_IO -/* from icu.s: */ +/* XXX FIXME: from icu.s: */ extern u_int vec[]; extern void vec8254 __P((void)); extern void vecRTC __P((void)); @@ -847,7 +850,7 @@ void cpu_initclocks() { int diag; -#if defined(APIC_IO) +#ifdef APIC_IO int x; #endif /* APIC_IO */ @@ -867,31 +870,26 @@ cpu_initclocks() } /* Finish initializing 8253 timer 0. */ -#if defined(APIC_IO) +#ifdef APIC_IO +#ifndef IO_ICU1 +#define IO_ICU1 0x20 +#endif /* IO_ICU1 */ + /* 8254 is traditionally on ISA IRQ0 */ - if ((x = get_isa_apic_irq(0)) < 0) { - /* - * bummer, this mb doesn't have the 8254 on ISA irq0, - * perhaps it's on the EISA bus... - */ - if ((x = get_eisa_apic_irq(0)) < 0) { - /* double bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); + if ((x = isa_apic_pin(0)) < 0) { + /* bummer, attempt to redirect thru the 8259 */ + if (bootverbose) + printf("APIC missing 8254 connection\n"); - /* allow 8254 timer to INTerrupt 8259 */ -#if !defined(IO_ICU1) -#define IO_ICU1 0x20 -#endif - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } + /* allow 8254 timer to INTerrupt 8259 */ + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ + + /* program IO APIC for type 3 INT on INT0 */ + if (ext_int_setup(0, 0) < 0) + panic("8254 redirect impossible!"); + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; @@ -907,6 +905,7 @@ cpu_initclocks() /* unit */ 0); INTREN(IRQ0); #endif /* APIC_IO */ + #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) /* * Finish setting up anti-jitter measures. @@ -925,13 +924,10 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#if defined(APIC_IO) +#ifdef APIC_IO /* RTC is traditionally on ISA IRQ8 */ - if ((x = get_isa_apic_irq(8)) < 0) { - if ((x = get_eisa_apic_irq(8)) < 0) { - panic("APIC missing RTC connection"); - } - } + 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# */ @@ -948,7 +944,7 @@ cpu_initclocks() #endif /* APIC_IO */ writertc(RTC_STATUSB, rtc_statusb); -#if defined(APIC_IO) +#ifdef APIC_IO printf("Enabled INTs: "); for (x = 0; x < 24; ++x) if ((imen & (1 << x)) == 0) diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index daa5491..31c8955 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 - * $Id: isa.c,v 1.91 1997/06/08 17:14:42 ache Exp $ + * $Id: isa.c,v 1.2 1997/06/25 20:12:23 smp Exp smp $ */ /* @@ -55,7 +55,7 @@ #include #include #include -#if defined(APIC_IO) +#ifdef APIC_IO #include #include #endif /* APIC_IO */ @@ -520,7 +520,7 @@ config_isadev_c(isdp, mp, reconfig) } (*dp->attach)(isdp); if (isdp->id_irq) { -#if defined(APIC_IO) +#ifdef APIC_IO /* * Some motherboards use upper IRQs for traditional * ISA INTerrupt sources. In particular we have @@ -530,13 +530,13 @@ config_isadev_c(isdp, mp, reconfig) u_int apic_mask; int rirq; - apic_mask = get_isa_apic_mask(isdp->id_irq); + apic_mask = isa_apic_mask(isdp->id_irq); if (apic_mask != isdp->id_irq) { rirq = ffs(isdp->id_irq) - 1; isdp->id_irq = apic_mask; undirect_isa_irq(rirq); /* free for ISA */ } -#endif /* APIC_IO */ +#endif /* APIC_IO */ if (!isdp->id_conflicts || (!intr_registered(ffs(isdp->id_irq) - 1) && isdp->id_intr != NULL)) diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 4ae5c36..6b1badb 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.86 1997/05/31 09:27:30 peter Exp $ + * $Id: clock.c,v 1.3 1997/06/25 20:37:29 smp Exp smp $ */ /* @@ -64,6 +64,9 @@ #include #include #include +#ifdef APIC_IO +#include +#endif /* APIC_IO */ #include #include @@ -826,9 +829,9 @@ resettodr() writertc(RTC_STATUSB, rtc_statusb); } -#if defined(APIC_IO) +#ifdef APIC_IO -/* from icu.s: */ +/* XXX FIXME: from icu.s: */ extern u_int vec[]; extern void vec8254 __P((void)); extern void vecRTC __P((void)); @@ -847,7 +850,7 @@ void cpu_initclocks() { int diag; -#if defined(APIC_IO) +#ifdef APIC_IO int x; #endif /* APIC_IO */ @@ -867,31 +870,26 @@ cpu_initclocks() } /* Finish initializing 8253 timer 0. */ -#if defined(APIC_IO) +#ifdef APIC_IO +#ifndef IO_ICU1 +#define IO_ICU1 0x20 +#endif /* IO_ICU1 */ + /* 8254 is traditionally on ISA IRQ0 */ - if ((x = get_isa_apic_irq(0)) < 0) { - /* - * bummer, this mb doesn't have the 8254 on ISA irq0, - * perhaps it's on the EISA bus... - */ - if ((x = get_eisa_apic_irq(0)) < 0) { - /* double bummer, attempt to redirect thru the 8259 */ - if (bootverbose) - printf("APIC missing 8254 connection\n"); + if ((x = isa_apic_pin(0)) < 0) { + /* bummer, attempt to redirect thru the 8259 */ + if (bootverbose) + printf("APIC missing 8254 connection\n"); - /* allow 8254 timer to INTerrupt 8259 */ -#if !defined(IO_ICU1) -#define IO_ICU1 0x20 -#endif - x = inb(IO_ICU1 + 1); /* current mask in 8259 */ - x &= ~1; /* clear 8254 timer mask */ - outb(IO_ICU1 + 1, x); /* write new mask */ - - /* program IO APIC for type 3 INT on INT0 */ - if (ext_int_setup(0, 0) < 0) - panic("8254 redirect impossible!"); - x = 0; /* 8259 is on 0 */ - } + /* allow 8254 timer to INTerrupt 8259 */ + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ + + /* program IO APIC for type 3 INT on INT0 */ + if (ext_int_setup(0, 0) < 0) + panic("8254 redirect impossible!"); + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; @@ -907,6 +905,7 @@ cpu_initclocks() /* unit */ 0); INTREN(IRQ0); #endif /* APIC_IO */ + #if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP) /* * Finish setting up anti-jitter measures. @@ -925,13 +924,10 @@ cpu_initclocks() diag = rtcin(RTC_DIAG); if (diag != 0) printf("RTC BIOS diagnostic error %b\n", diag, RTCDG_BITS); -#if defined(APIC_IO) +#ifdef APIC_IO /* RTC is traditionally on ISA IRQ8 */ - if ((x = get_isa_apic_irq(8)) < 0) { - if ((x = get_eisa_apic_irq(8)) < 0) { - panic("APIC missing RTC connection"); - } - } + 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# */ @@ -948,7 +944,7 @@ cpu_initclocks() #endif /* APIC_IO */ writertc(RTC_STATUSB, rtc_statusb); -#if defined(APIC_IO) +#ifdef APIC_IO printf("Enabled INTs: "); for (x = 0; x < 24; ++x) if ((imen & (1 << x)) == 0) -- cgit v1.1