diff options
author | fsmp <fsmp@FreeBSD.org> | 1997-07-13 01:18:51 +0000 |
---|---|---|
committer | fsmp <fsmp@FreeBSD.org> | 1997-07-13 01:18:51 +0000 |
commit | accf58cb2b6595c7903945f41416e4cacde4d44a (patch) | |
tree | 62c5f72ed9e4f613340bfae675fec9ff470dc583 /sys/isa | |
parent | 623a2c46bdefceb136efa83aba4c793ee5a9393b (diff) | |
download | FreeBSD-src-accf58cb2b6595c7903945f41416e4cacde4d44a.zip FreeBSD-src-accf58cb2b6595c7903945f41416e4cacde4d44a.tar.gz |
Cleanup old stop_cpus/restart_cpus() cruft.
new code for handling mixed-mode 8259/APIC programming without 'ExtInt'
new code to control other CPUs: stop_cpus()/restart_cpus()/_Xstopcpu
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/atrtc.c | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 6b1badb..f79882c 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.3 1997/06/25 20:37:29 smp Exp smp $ + * $Id: clock.c,v 1.88 1997/06/25 20:59:58 fsmp Exp $ */ /* @@ -66,6 +66,7 @@ #include <machine/ipl.h> #ifdef APIC_IO #include <machine/smp.h> +#include <machine/smptests.h> /** TEST_ALTTIMER */ #endif /* APIC_IO */ #include <i386/isa/icu.h> @@ -871,9 +872,11 @@ cpu_initclocks() /* Finish initializing 8253 timer 0. */ #ifdef APIC_IO +#if 0 #ifndef IO_ICU1 -#define IO_ICU1 0x20 +#define IO_ICU1 0x20 #endif /* IO_ICU1 */ +#endif /** 0 */ /* 8254 is traditionally on ISA IRQ0 */ if ((x = isa_apic_pin(0)) < 0) { @@ -882,14 +885,27 @@ cpu_initclocks() printf("APIC missing 8254 connection\n"); /* 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 */ +#ifdef TEST_ALTTIMER + /* + * re-initialize master 8259: + * reset; prog 4 bytes, single ICU, edge triggered + */ + outb(IO_ICU1, 0x13); + outb(IO_ICU1 + 1, NRSVIDT); /* start vector */ + outb(IO_ICU1 + 1, 0x00); /* ignore slave */ + outb(IO_ICU1 + 1, 0x03); /* auto EOI, 8086 */ + + outb(IO_ICU1 + 1, 0xfe); /* unmask INT0 */ +#else + x = inb(IO_ICU1 + 1); /* current mask in 8259 */ + x &= ~1; /* clear 8254 timer mask */ + outb(IO_ICU1 + 1, x); /* write new mask */ +#endif /* TEST_ALTTIMER */ /* 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 */ + x = 0; /* 8259 is on 0 */ } vec[x] = (u_int)vec8254; |