From cd1afeb3b06056c34f77bdb69c661a372c7dcd72 Mon Sep 17 00:00:00 2001 From: Jeroen Ruigrok/asmodai Date: Sun, 27 Feb 2005 12:44:43 +0000 Subject: [PATCH] Get rid off PC98 conditional code. --- sys/i386/icu/icu.h | 9 +---- sys/i386/icu/icu_vector.s | 10 +----- sys/i386/isa/icu.h | 9 +---- sys/i386/isa/icu_vector.s | 10 +----- sys/i386/isa/intr_machdep.c | 49 +--------------------------- sys/i386/isa/lptreg.h | 26 +-------------- sys/i386/isa/prof_machdep.c | 6 +--- sys/i386/isa/timerreg.h | 8 +---- sys/i386/isa/vector.s | 10 +----- sys/platform/pc32/icu/icu.h | 9 +---- sys/platform/pc32/icu/icu_vector.s | 10 +----- sys/platform/pc32/isa/icu.h | 9 +---- sys/platform/pc32/isa/icu_vector.s | 10 +----- sys/platform/pc32/isa/intr_machdep.c | 49 +--------------------------- sys/platform/pc32/isa/lptreg.h | 26 +-------------- sys/platform/pc32/isa/prof_machdep.c | 6 +--- sys/platform/pc32/isa/timerreg.h | 8 +---- sys/platform/pc32/isa/vector.s | 10 +----- 18 files changed, 18 insertions(+), 256 deletions(-) diff --git a/sys/i386/icu/icu.h b/sys/i386/icu/icu.h index b1d29e7f08..a615c38b84 100644 --- a/sys/i386/icu/icu.h +++ b/sys/i386/icu/icu.h @@ -35,7 +35,7 @@ * * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/isa/icu.h,v 1.18 1999/12/26 12:43:47 bde Exp $ - * $DragonFly: src/sys/i386/icu/Attic/icu.h,v 1.4 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/i386/icu/Attic/icu.h,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -84,13 +84,6 @@ void INTRDIS (u_int); #define IRQ6 0x0040 #define IRQ7 0x0080 /* lowest - parallel printer */ -#ifdef PC98 -#undef IRQ2 -#define IRQ2 0x0004 -#undef IRQ_SLAVE -#define IRQ_SLAVE 0x0080 -#endif - /* * Interrupt Control offset into Interrupt descriptor table (IDT) diff --git a/sys/i386/icu/icu_vector.s b/sys/i386/icu/icu_vector.s index 4e7f264c54..6fe74d0548 100644 --- a/sys/i386/icu/icu_vector.s +++ b/sys/i386/icu/icu_vector.s @@ -1,18 +1,10 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $ - * $DragonFly: src/sys/i386/icu/Attic/icu_vector.s,v 1.16 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/icu/Attic/icu_vector.s,v 1.17 2005/02/27 12:44:43 asmodai Exp $ */ -/* - * modified for PC98 by Kakefuda - */ - -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ -#endif #define ICU_EOI 0x20 /* XXX - define elsewhere */ diff --git a/sys/i386/isa/icu.h b/sys/i386/isa/icu.h index 7b94266878..f5576f4b1c 100644 --- a/sys/i386/isa/icu.h +++ b/sys/i386/isa/icu.h @@ -35,7 +35,7 @@ * * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/isa/icu.h,v 1.18 1999/12/26 12:43:47 bde Exp $ - * $DragonFly: src/sys/i386/isa/Attic/icu.h,v 1.4 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/i386/isa/Attic/icu.h,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -84,13 +84,6 @@ void INTRDIS (u_int); #define IRQ6 0x0040 #define IRQ7 0x0080 /* lowest - parallel printer */ -#ifdef PC98 -#undef IRQ2 -#define IRQ2 0x0004 -#undef IRQ_SLAVE -#define IRQ_SLAVE 0x0080 -#endif - /* * Interrupt Control offset into Interrupt descriptor table (IDT) diff --git a/sys/i386/isa/icu_vector.s b/sys/i386/isa/icu_vector.s index 83c0981d79..42faff77ef 100644 --- a/sys/i386/isa/icu_vector.s +++ b/sys/i386/isa/icu_vector.s @@ -1,18 +1,10 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $ - * $DragonFly: src/sys/i386/isa/Attic/icu_vector.s,v 1.16 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/icu_vector.s,v 1.17 2005/02/27 12:44:43 asmodai Exp $ */ -/* - * modified for PC98 by Kakefuda - */ - -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ -#endif #define ICU_EOI 0x20 /* XXX - define elsewhere */ diff --git a/sys/i386/isa/intr_machdep.c b/sys/i386/isa/intr_machdep.c index 4748aa119e..dcec9dad3d 100644 --- a/sys/i386/isa/intr_machdep.c +++ b/sys/i386/isa/intr_machdep.c @@ -35,7 +35,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/isa/intr_machdep.c,v 1.29.2.5 2001/10/14 06:54:27 luigi Exp $ - * $DragonFly: src/sys/i386/isa/Attic/intr_machdep.c,v 1.24 2005/02/01 22:41:25 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/intr_machdep.c,v 1.25 2005/02/27 12:44:43 asmodai Exp $ */ /* * This file contains an aggregated module marked: @@ -67,13 +67,7 @@ #include /** FAST_HI */ #include -#ifdef PC98 -#include -#include -#include -#else #include -#endif #include #if NISA > 0 @@ -92,13 +86,8 @@ #endif /* XXX should be in suitable include files */ -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#define ICU_SLAVEID 7 -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ #define ICU_SLAVEID 2 -#endif #ifdef APIC_IO /* @@ -181,16 +170,11 @@ static inthand_t *slowintr[ICU_LEN] = { #endif /* APIC_IO */ }; -#ifdef PC98 -#define NMI_PARITY 0x04 -#define NMI_EPARITY 0x02 -#else #define NMI_PARITY (1 << 7) #define NMI_IOCHAN (1 << 6) #define ENMI_WATCHDOG (1 << 7) #define ENMI_BUSTIMER (1 << 6) #define ENMI_IOSTATUS (1 << 5) -#endif /* * Handle a NMI, possibly a machine check. @@ -201,22 +185,6 @@ isa_nmi(cd) int cd; { int retval = 0; -#ifdef PC98 - int port = inb(0x33); - - log(LOG_CRIT, "NMI PC98 port = %x\n", port); - if (epson_machine_id == 0x20) - epson_outb(0xc16, epson_inb(0xc16) | 0x1); - if (port & NMI_PARITY) { - log(LOG_CRIT, "BASE RAM parity error, likely hardware failure."); - retval = 1; - } else if (port & NMI_EPARITY) { - log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware failure."); - retval = 1; - } else { - log(LOG_CRIT, "\nNMI Resume ??\n"); - } -#else /* IBM-PC */ int isa_port = inb(0x61); int eisa_port = inb(0x461); @@ -258,7 +226,6 @@ isa_nmi(cd) log(LOG_CRIT, "EISA I/O port status error."); retval = 1; } -#endif return(retval); } @@ -306,24 +273,14 @@ init_i8259(void) outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */ outb(IO_ICU1+ICU_IMR_OFFSET, IRQ_SLAVE); /* slave on line 7 */ -#ifdef PC98 -#ifdef AUTO_EOI_1 - outb(IO_ICU1+ICU_IMR_OFFSET, 0x1f); /* (master) auto EOI, 8086 mode */ -#else - outb(IO_ICU1+ICU_IMR_OFFSET, 0x1d); /* (master) 8086 mode */ -#endif -#else /* IBM-PC */ #ifdef AUTO_EOI_1 outb(IO_ICU1+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */ #else outb(IO_ICU1+ICU_IMR_OFFSET, 1); /* 8086 mode */ #endif -#endif /* PC98 */ outb(IO_ICU1+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */ outb(IO_ICU1, 0x0a); /* default to IRR on read */ -#ifndef PC98 outb(IO_ICU1, 0xc0 | (3 - 1)); /* pri order 3-7, 0-2 (com2 first) */ -#endif /* !PC98 */ #if NMCA > 0 if (MCA_system) @@ -334,15 +291,11 @@ init_i8259(void) outb(IO_ICU2+ICU_IMR_OFFSET, NRSVIDT+8); /* staring at this vector index */ outb(IO_ICU2+ICU_IMR_OFFSET, ICU_SLAVEID); /* my slave id is 7 */ -#ifdef PC98 - outb(IO_ICU2+ICU_IMR_OFFSET,9); /* 8086 mode */ -#else /* IBM-PC */ #ifdef AUTO_EOI_2 outb(IO_ICU2+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */ #else outb(IO_ICU2+ICU_IMR_OFFSET,1); /* 8086 mode */ #endif -#endif /* PC98 */ outb(IO_ICU2+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */ outb(IO_ICU2, 0x0a); /* default to IRR on read */ } diff --git a/sys/i386/isa/lptreg.h b/sys/i386/isa/lptreg.h index 81143f6942..58d79b65ec 100644 --- a/sys/i386/isa/lptreg.h +++ b/sys/i386/isa/lptreg.h @@ -7,7 +7,7 @@ * * form: @(#)lptreg.h 1.1 (Berkeley) 12/19/90 * $FreeBSD: src/sys/i386/isa/lptreg.h,v 1.7 1999/08/28 00:44:57 peter Exp $ - * $DragonFly: src/sys/i386/isa/Attic/lptreg.h,v 1.2 2003/06/17 04:28:37 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/lptreg.h,v 1.3 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -17,29 +17,6 @@ * Copyright (C) William Jolitz 1990 */ -/* - * modified for PC9801 by A.Kojima - * Kyoto University Microcomputer Club (KMC) - */ - -#ifdef PC98 -#define lpt_pstb_ctrl (-9) /* PSTB enable control */ -#define LPC_EN_PSTB 0xc /* PSTB enable */ -#define LPC_DIS_PSTB 0xd /* PSTB disable */ - -#define lpt_data 0 /* Data to/from printer (R/W) */ - -#define lpt_status 2 /* Status of printer (R) */ -#define LPS_NBSY 0x4 /* printer no ack of data */ - -#define lpt_control 6 /* Control printer (W) */ -#define LPC_MODE8255 0x82 /* 8255 mode */ -#define LPC_IRQ8 0x6 /* IRQ8 active */ -#define LPC_NIRQ8 0x7 /* IRQ8 inactive */ -#define LPC_PSTB 0xe /* PSTB active */ -#define LPC_NPSTB 0xf /* PSTB inactive */ - -#else /* IBM-PC */ #define lpt_data 0 /* Data to/from printer (R/W) */ #define lpt_status 1 /* Status of printer (R) */ @@ -55,4 +32,3 @@ #define LPC_NINIT 0x04 /* initialize printer */ #define LPC_SEL 0x08 /* printer selected */ #define LPC_ENA 0x10 /* enable IRQ */ -#endif diff --git a/sys/i386/isa/prof_machdep.c b/sys/i386/isa/prof_machdep.c index b558133f44..d77f914c16 100644 --- a/sys/i386/isa/prof_machdep.c +++ b/sys/i386/isa/prof_machdep.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/prof_machdep.c,v 1.14.2.1 2000/08/03 00:09:30 ps Exp $ - * $DragonFly: src/sys/i386/isa/Attic/prof_machdep.c,v 1.4 2003/08/15 18:37:15 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/prof_machdep.c,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ #ifdef GUPROF @@ -45,11 +45,7 @@ #include -#ifdef PC98 -#include -#else #include -#endif #include #ifdef GUPROF diff --git a/sys/i386/isa/timerreg.h b/sys/i386/isa/timerreg.h index 7cb4547c85..456c5e1e25 100644 --- a/sys/i386/isa/timerreg.h +++ b/sys/i386/isa/timerreg.h @@ -32,7 +32,7 @@ * * from: Header: timerreg.h,v 1.2 93/02/28 15:08:58 mccanne Exp * $FreeBSD: src/sys/i386/isa/timerreg.h,v 1.6 1999/08/28 00:45:04 peter Exp $ - * $DragonFly: src/sys/i386/isa/Attic/timerreg.h,v 1.3 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/timerreg.h,v 1.4 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -124,15 +124,9 @@ * Macros for specifying values to be written into a mode register. */ #define TIMER_CNTR0 (IO_TIMER1 + 0) /* timer 0 counter port */ -#ifdef PC98 -#define TIMER_CNTR1 0x3fdb /* timer 1 counter port */ -#define TIMER_CNTR2 (IO_TIMER1 + 4) /* timer 2 counter port */ -#define TIMER_MODE (IO_TIMER1 + 6) /* timer mode port */ -#else #define TIMER_CNTR1 (IO_TIMER1 + 1) /* timer 1 counter port */ #define TIMER_CNTR2 (IO_TIMER1 + 2) /* timer 2 counter port */ #define TIMER_MODE (IO_TIMER1 + 3) /* timer mode port */ -#endif #define TIMER_SEL0 0x00 /* select counter 0 */ #define TIMER_SEL1 0x40 /* select counter 1 */ #define TIMER_SEL2 0x80 /* select counter 2 */ diff --git a/sys/i386/isa/vector.s b/sys/i386/isa/vector.s index 2de2e4db00..969e92d7f8 100644 --- a/sys/i386/isa/vector.s +++ b/sys/i386/isa/vector.s @@ -1,21 +1,13 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/vector.s,v 1.32 1999/08/28 00:45:04 peter Exp $ - * $DragonFly: src/sys/i386/isa/Attic/vector.s,v 1.5 2003/08/07 21:17:23 dillon Exp $ - */ - -/* - * modified for PC98 by Kakefuda + * $DragonFly: src/sys/i386/isa/Attic/vector.s,v 1.6 2005/02/27 12:44:43 asmodai Exp $ */ #include "opt_auto_eoi.h" #include -#ifdef PC98 -#include -#else #include -#endif .data ALIGN_DATA diff --git a/sys/platform/pc32/icu/icu.h b/sys/platform/pc32/icu/icu.h index 67bc70b896..f1c4820033 100644 --- a/sys/platform/pc32/icu/icu.h +++ b/sys/platform/pc32/icu/icu.h @@ -35,7 +35,7 @@ * * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/isa/icu.h,v 1.18 1999/12/26 12:43:47 bde Exp $ - * $DragonFly: src/sys/platform/pc32/icu/icu.h,v 1.4 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/platform/pc32/icu/icu.h,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -84,13 +84,6 @@ void INTRDIS (u_int); #define IRQ6 0x0040 #define IRQ7 0x0080 /* lowest - parallel printer */ -#ifdef PC98 -#undef IRQ2 -#define IRQ2 0x0004 -#undef IRQ_SLAVE -#define IRQ_SLAVE 0x0080 -#endif - /* * Interrupt Control offset into Interrupt descriptor table (IDT) diff --git a/sys/platform/pc32/icu/icu_vector.s b/sys/platform/pc32/icu/icu_vector.s index 65ed718d8e..c6306e371d 100644 --- a/sys/platform/pc32/icu/icu_vector.s +++ b/sys/platform/pc32/icu/icu_vector.s @@ -1,18 +1,10 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $ - * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.16 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/icu/icu_vector.s,v 1.17 2005/02/27 12:44:43 asmodai Exp $ */ -/* - * modified for PC98 by Kakefuda - */ - -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ -#endif #define ICU_EOI 0x20 /* XXX - define elsewhere */ diff --git a/sys/platform/pc32/isa/icu.h b/sys/platform/pc32/isa/icu.h index b1221ee606..3a0e24e758 100644 --- a/sys/platform/pc32/isa/icu.h +++ b/sys/platform/pc32/isa/icu.h @@ -35,7 +35,7 @@ * * from: @(#)icu.h 5.6 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/isa/icu.h,v 1.18 1999/12/26 12:43:47 bde Exp $ - * $DragonFly: src/sys/platform/pc32/isa/Attic/icu.h,v 1.4 2003/08/26 21:42:19 rob Exp $ + * $DragonFly: src/sys/platform/pc32/isa/Attic/icu.h,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -84,13 +84,6 @@ void INTRDIS (u_int); #define IRQ6 0x0040 #define IRQ7 0x0080 /* lowest - parallel printer */ -#ifdef PC98 -#undef IRQ2 -#define IRQ2 0x0004 -#undef IRQ_SLAVE -#define IRQ_SLAVE 0x0080 -#endif - /* * Interrupt Control offset into Interrupt descriptor table (IDT) diff --git a/sys/platform/pc32/isa/icu_vector.s b/sys/platform/pc32/isa/icu_vector.s index b6a34c2e9e..1551a72ab2 100644 --- a/sys/platform/pc32/isa/icu_vector.s +++ b/sys/platform/pc32/isa/icu_vector.s @@ -1,18 +1,10 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/icu_vector.s,v 1.14.2.2 2000/07/18 21:12:42 dfr Exp $ - * $DragonFly: src/sys/platform/pc32/isa/Attic/icu_vector.s,v 1.16 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/Attic/icu_vector.s,v 1.17 2005/02/27 12:44:43 asmodai Exp $ */ -/* - * modified for PC98 by Kakefuda - */ - -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ -#endif #define ICU_EOI 0x20 /* XXX - define elsewhere */ diff --git a/sys/platform/pc32/isa/intr_machdep.c b/sys/platform/pc32/isa/intr_machdep.c index 7ae69fbf80..e8d3309c36 100644 --- a/sys/platform/pc32/isa/intr_machdep.c +++ b/sys/platform/pc32/isa/intr_machdep.c @@ -35,7 +35,7 @@ * * from: @(#)isa.c 7.2 (Berkeley) 5/13/91 * $FreeBSD: src/sys/i386/isa/intr_machdep.c,v 1.29.2.5 2001/10/14 06:54:27 luigi Exp $ - * $DragonFly: src/sys/platform/pc32/isa/intr_machdep.c,v 1.24 2005/02/01 22:41:25 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/intr_machdep.c,v 1.25 2005/02/27 12:44:43 asmodai Exp $ */ /* * This file contains an aggregated module marked: @@ -67,13 +67,7 @@ #include /** FAST_HI */ #include -#ifdef PC98 -#include -#include -#include -#else #include -#endif #include #if NISA > 0 @@ -92,13 +86,8 @@ #endif /* XXX should be in suitable include files */ -#ifdef PC98 -#define ICU_IMR_OFFSET 2 /* IO_ICU{1,2} + 2 */ -#define ICU_SLAVEID 7 -#else #define ICU_IMR_OFFSET 1 /* IO_ICU{1,2} + 1 */ #define ICU_SLAVEID 2 -#endif #ifdef APIC_IO /* @@ -181,16 +170,11 @@ static inthand_t *slowintr[ICU_LEN] = { #endif /* APIC_IO */ }; -#ifdef PC98 -#define NMI_PARITY 0x04 -#define NMI_EPARITY 0x02 -#else #define NMI_PARITY (1 << 7) #define NMI_IOCHAN (1 << 6) #define ENMI_WATCHDOG (1 << 7) #define ENMI_BUSTIMER (1 << 6) #define ENMI_IOSTATUS (1 << 5) -#endif /* * Handle a NMI, possibly a machine check. @@ -201,22 +185,6 @@ isa_nmi(cd) int cd; { int retval = 0; -#ifdef PC98 - int port = inb(0x33); - - log(LOG_CRIT, "NMI PC98 port = %x\n", port); - if (epson_machine_id == 0x20) - epson_outb(0xc16, epson_inb(0xc16) | 0x1); - if (port & NMI_PARITY) { - log(LOG_CRIT, "BASE RAM parity error, likely hardware failure."); - retval = 1; - } else if (port & NMI_EPARITY) { - log(LOG_CRIT, "EXTENDED RAM parity error, likely hardware failure."); - retval = 1; - } else { - log(LOG_CRIT, "\nNMI Resume ??\n"); - } -#else /* IBM-PC */ int isa_port = inb(0x61); int eisa_port = inb(0x461); @@ -258,7 +226,6 @@ isa_nmi(cd) log(LOG_CRIT, "EISA I/O port status error."); retval = 1; } -#endif return(retval); } @@ -306,24 +273,14 @@ init_i8259(void) outb(IO_ICU1+ICU_IMR_OFFSET, NRSVIDT); /* starting at this vector index */ outb(IO_ICU1+ICU_IMR_OFFSET, IRQ_SLAVE); /* slave on line 7 */ -#ifdef PC98 -#ifdef AUTO_EOI_1 - outb(IO_ICU1+ICU_IMR_OFFSET, 0x1f); /* (master) auto EOI, 8086 mode */ -#else - outb(IO_ICU1+ICU_IMR_OFFSET, 0x1d); /* (master) 8086 mode */ -#endif -#else /* IBM-PC */ #ifdef AUTO_EOI_1 outb(IO_ICU1+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */ #else outb(IO_ICU1+ICU_IMR_OFFSET, 1); /* 8086 mode */ #endif -#endif /* PC98 */ outb(IO_ICU1+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */ outb(IO_ICU1, 0x0a); /* default to IRR on read */ -#ifndef PC98 outb(IO_ICU1, 0xc0 | (3 - 1)); /* pri order 3-7, 0-2 (com2 first) */ -#endif /* !PC98 */ #if NMCA > 0 if (MCA_system) @@ -334,15 +291,11 @@ init_i8259(void) outb(IO_ICU2+ICU_IMR_OFFSET, NRSVIDT+8); /* staring at this vector index */ outb(IO_ICU2+ICU_IMR_OFFSET, ICU_SLAVEID); /* my slave id is 7 */ -#ifdef PC98 - outb(IO_ICU2+ICU_IMR_OFFSET,9); /* 8086 mode */ -#else /* IBM-PC */ #ifdef AUTO_EOI_2 outb(IO_ICU2+ICU_IMR_OFFSET, 2 | 1); /* auto EOI, 8086 mode */ #else outb(IO_ICU2+ICU_IMR_OFFSET,1); /* 8086 mode */ #endif -#endif /* PC98 */ outb(IO_ICU2+ICU_IMR_OFFSET, 0xff); /* leave interrupts masked */ outb(IO_ICU2, 0x0a); /* default to IRR on read */ } diff --git a/sys/platform/pc32/isa/lptreg.h b/sys/platform/pc32/isa/lptreg.h index 6c5fac2f4b..b03767fe66 100644 --- a/sys/platform/pc32/isa/lptreg.h +++ b/sys/platform/pc32/isa/lptreg.h @@ -7,7 +7,7 @@ * * form: @(#)lptreg.h 1.1 (Berkeley) 12/19/90 * $FreeBSD: src/sys/i386/isa/lptreg.h,v 1.7 1999/08/28 00:44:57 peter Exp $ - * $DragonFly: src/sys/platform/pc32/isa/lptreg.h,v 1.2 2003/06/17 04:28:37 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/lptreg.h,v 1.3 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -17,29 +17,6 @@ * Copyright (C) William Jolitz 1990 */ -/* - * modified for PC9801 by A.Kojima - * Kyoto University Microcomputer Club (KMC) - */ - -#ifdef PC98 -#define lpt_pstb_ctrl (-9) /* PSTB enable control */ -#define LPC_EN_PSTB 0xc /* PSTB enable */ -#define LPC_DIS_PSTB 0xd /* PSTB disable */ - -#define lpt_data 0 /* Data to/from printer (R/W) */ - -#define lpt_status 2 /* Status of printer (R) */ -#define LPS_NBSY 0x4 /* printer no ack of data */ - -#define lpt_control 6 /* Control printer (W) */ -#define LPC_MODE8255 0x82 /* 8255 mode */ -#define LPC_IRQ8 0x6 /* IRQ8 active */ -#define LPC_NIRQ8 0x7 /* IRQ8 inactive */ -#define LPC_PSTB 0xe /* PSTB active */ -#define LPC_NPSTB 0xf /* PSTB inactive */ - -#else /* IBM-PC */ #define lpt_data 0 /* Data to/from printer (R/W) */ #define lpt_status 1 /* Status of printer (R) */ @@ -55,4 +32,3 @@ #define LPC_NINIT 0x04 /* initialize printer */ #define LPC_SEL 0x08 /* printer selected */ #define LPC_ENA 0x10 /* enable IRQ */ -#endif diff --git a/sys/platform/pc32/isa/prof_machdep.c b/sys/platform/pc32/isa/prof_machdep.c index 41d5173079..269f27b84e 100644 --- a/sys/platform/pc32/isa/prof_machdep.c +++ b/sys/platform/pc32/isa/prof_machdep.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/prof_machdep.c,v 1.14.2.1 2000/08/03 00:09:30 ps Exp $ - * $DragonFly: src/sys/platform/pc32/isa/prof_machdep.c,v 1.4 2003/08/15 18:37:15 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/prof_machdep.c,v 1.5 2005/02/27 12:44:43 asmodai Exp $ */ #ifdef GUPROF @@ -45,11 +45,7 @@ #include -#ifdef PC98 -#include -#else #include -#endif #include #ifdef GUPROF diff --git a/sys/platform/pc32/isa/timerreg.h b/sys/platform/pc32/isa/timerreg.h index 212afa06ed..4a61f0a078 100644 --- a/sys/platform/pc32/isa/timerreg.h +++ b/sys/platform/pc32/isa/timerreg.h @@ -32,7 +32,7 @@ * * from: Header: timerreg.h,v 1.2 93/02/28 15:08:58 mccanne Exp * $FreeBSD: src/sys/i386/isa/timerreg.h,v 1.6 1999/08/28 00:45:04 peter Exp $ - * $DragonFly: src/sys/platform/pc32/isa/timerreg.h,v 1.3 2004/01/30 05:42:16 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/timerreg.h,v 1.4 2005/02/27 12:44:43 asmodai Exp $ */ /* @@ -124,15 +124,9 @@ * Macros for specifying values to be written into a mode register. */ #define TIMER_CNTR0 (IO_TIMER1 + 0) /* timer 0 counter port */ -#ifdef PC98 -#define TIMER_CNTR1 0x3fdb /* timer 1 counter port */ -#define TIMER_CNTR2 (IO_TIMER1 + 4) /* timer 2 counter port */ -#define TIMER_MODE (IO_TIMER1 + 6) /* timer mode port */ -#else #define TIMER_CNTR1 (IO_TIMER1 + 1) /* timer 1 counter port */ #define TIMER_CNTR2 (IO_TIMER1 + 2) /* timer 2 counter port */ #define TIMER_MODE (IO_TIMER1 + 3) /* timer mode port */ -#endif #define TIMER_SEL0 0x00 /* select counter 0 */ #define TIMER_SEL1 0x40 /* select counter 1 */ #define TIMER_SEL2 0x80 /* select counter 2 */ diff --git a/sys/platform/pc32/isa/vector.s b/sys/platform/pc32/isa/vector.s index afeb232a04..fb97fdf93e 100644 --- a/sys/platform/pc32/isa/vector.s +++ b/sys/platform/pc32/isa/vector.s @@ -1,21 +1,13 @@ /* * from: vector.s, 386BSD 0.1 unknown origin * $FreeBSD: src/sys/i386/isa/vector.s,v 1.32 1999/08/28 00:45:04 peter Exp $ - * $DragonFly: src/sys/platform/pc32/isa/Attic/vector.s,v 1.5 2003/08/07 21:17:23 dillon Exp $ - */ - -/* - * modified for PC98 by Kakefuda + * $DragonFly: src/sys/platform/pc32/isa/Attic/vector.s,v 1.6 2005/02/27 12:44:43 asmodai Exp $ */ #include "opt_auto_eoi.h" #include -#ifdef PC98 -#include -#else #include -#endif .data ALIGN_DATA -- 2.41.0