summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1998-06-25 00:40:32 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1998-06-25 00:40:32 +0000
commit642005b94205521448bc4a7dfb76449e08cb47fc (patch)
treeeb148c0f88962621c8c56536091ec19269a7bf8f /sys
parent297503128aad815596b1b2326314c37a8c997fe2 (diff)
Kill PCVT_NETBSD and PCVT_FREEBSD. We no longer have to modify pcvt
when we increase the OpenBSD version and our pcvt is now meaningfully diffable against the NetBSD one.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_conf.h99
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_drv.c456
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_ext.c72
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_hdr.h215
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_kbd.c15
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_out.c49
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_sup.c19
7 files changed, 18 insertions, 907 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_conf.h b/sys/arch/i386/isa/pcvt/pcvt_conf.h
index 5cebb135fc7..fac999d95b3 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_conf.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_conf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_conf.h,v 1.11 1998/03/08 00:47:43 deraadt Exp $ */
+/* $OpenBSD: pcvt_conf.h,v 1.12 1998/06/25 00:40:24 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -53,70 +53,6 @@
*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------
- *
- * from: Onno van der Linden c/o frank@fwi.uva.nl
- *
- * Here's an idea how to automatically detect the version of NetBSD pcvt is
- * being compiled on:
- *
- * NetBSD 1.0 : NetBSD1_0 defined as 1 in <sys/param.h>
- * NetBSD 1.0A: NetBSD1_0 defined as 2 in <sys/param.h>
- *
- * The NetBSDx_y defines are mutual exclusive.
- *
- * This leads to something like this in pcvt_hdr.h (#elif is possible too):
- *
- *---------------------------------------------------------------------------*/
-
-#ifndef PCVT_NETBSD /* let user force it if needed... */
-#ifdef NetBSD0_8
-#error "NetBSD version 0.8 no longer supported, sorry!"
-#endif
-
-#ifdef NetBSD0_9
-#error "NetBSD version 0.9 no longer supported, sorry!"
-#endif
-
-#ifdef NetBSD1_0
-#if NetBSD1_0 > 1
-#define PCVT_NETBSD 102
-#else
-#define PCVT_NETBSD 100
-#endif
-#endif
-
-#ifdef NetBSD1_1
-#define PCVT_NETBSD (110 + (NetBSD1_1 - 1))
-#endif
-
-#ifdef NetBSD1_2
-#define PCVT_NETBSD (120 + (NetBSD1_2 - 1))
-#endif
-
-#ifdef OpenBSD2_0
-#define PCVT_OPENBSD (200 + (OpenBSD2_0 - 1))
-#endif
-
-#ifdef OpenBSD2_1
-#define PCVT_OPENBSD (210 + (OpenBSD2_1 - 1))
-#endif
-
-#ifdef OpenBSD2_2
-#define PCVT_OPENBSD (220 + (OpenBSD2_2 - 1))
-#endif
-
-#ifdef OpenBSD2_3
-#define PCVT_OPENBSD (230 + (OpenBSD2_3 - 1))
-#endif
-
-#ifndef PCVT_NETBSD
-#define PCVT_NETBSD PCVT_OPENBSD
-#endif
-
-#endif
-
-
-/*---------------------------------------------------------------------------
* Note that each of the options below should rather be overriden by the
* kernel config file instead of this .h file - this allows for different
* definitions in different kernels compiled at the same machine
@@ -139,39 +75,6 @@
*---------------------------------------------------------------------------*/
/* -------------------------------------------------------------------- */
-/* -------------------- OPERATING SYSTEM ------------------------------ */
-/* -------------------------------------------------------------------- */
-
-/*
- * one of the following options must be set in the kernel config file:
- *
- *======================================================================*
- * N e t B S D *
- *======================================================================*
- *
- * options "PCVT_NETBSD=xxx" enables support for NetBSD
- *
- * select:
- * PCVT_NETBSD = 100 for NetBSD 1.0
- * PCVT_NETBSD = 101 for NetBSD-current before Apr. 21 '95
- * PCVT_NETBSD = 102 for NetBSD-current after Apr. 21 '95
- *
- *
- *======================================================================*
- * F r e e B S D *
- *======================================================================*
- *
- * options "PCVT_FREEBSD=xxx" enables support for FreeBSD
- *
- * select:
- * PCVT_FREEBSD = 200 for FreeBSD 2.0-Release
- * PCVT_FREEBSD = 210 for FreeBSD 2.0.5-Release
- * (yes, its 210 for 2.0.5 !!!)
- * (aaand yes, its 210 for 2.1 !!!)
- *
- */
-
-/* -------------------------------------------------------------------- */
/* ---------------- USER PREFERENCE DRIVER OPTIONS -------------------- */
/* -------------------------------------------------------------------- */
diff --git a/sys/arch/i386/isa/pcvt/pcvt_drv.c b/sys/arch/i386/isa/pcvt/pcvt_drv.c
index 2f76c9c6d5a..a9cb747e479 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_drv.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_drv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_drv.c,v 1.19 1998/02/22 21:35:33 niklas Exp $ */
+/* $OpenBSD: pcvt_drv.c,v 1.20 1998/06/25 00:40:25 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -102,78 +102,27 @@ static nrow;
static void vgapelinit(void); /* read initial VGA DAC palette */
int getchar(void);
-#if PCVT_FREEBSD > 205
-static struct kern_devconf kdc_vt[];
-static inline void
-vt_registerdev(struct isa_device *id, const char *name);
-static char vt_description[];
-#define VT_DESCR_LEN 40
-#endif /* PCVT_FREEBSD > 205 */
-
-#if PCVT_NETBSD > 100
void pccnpollc(Dev_t, int);
-#endif
-#if PCVT_NETBSD > 100
int pcprobe(struct device *, void *, void *);
-#endif
-#if PCVT_NETBSD > 9
void pcattach(struct device *, struct device *, void *);
-#endif
-#if PCVT_NETBSD > 100 /* NetBSD-current Feb 20 1995 */
int
pcprobe(struct device *parent, void *match, void *aux)
-#else /* !PCVT_NETBSD > 100 */
-
-#if PCVT_NETBSD > 9
-int
-pcprobe(struct device *parent, struct device *self, void *aux)
-#else /* !PCVT_NETBSD > 9 */
-int
-pcprobe(struct isa_device *dev)
-#endif /* PCVT_NETBSD > 9 */
-
-#endif /* PCVT_NETBSD > 100 */
{
+
kbd_code_init();
-#if PCVT_NETBSD > 9
((struct isa_attach_args *)aux)->ia_iosize = 16;
return 1;
-#else /* !PCVT_NETBSD > 9 */
-
-#if PCVT_NETBSD || PCVT_FREEBSD
- return (16);
-#else
- return 1;
-#endif /* PCVT_NETBSD || PCVT_FREEBSD */
-
-#endif /* PCVT_NETBSD > 9 */
-
}
-#if PCVT_NETBSD > 9
void
pcattach(struct device *parent, struct device *self, void *aux)
{
struct isa_attach_args *ia = aux;
-
-#if PCVT_NETBSD > 101
struct vt_softc *sc = (void *) self;
-#else /* !PCVT_NETBSD > 101 */
- static struct intrhand vthand;
-#endif /* PCVT_NETBSD > 101 */
-
-#else /* !PCVT_NETBSD > 9 */
-int
-pcattach(struct isa_device *dev)
-{
-#endif /* PCVT_NETBSD > 9 */
-
-#if PCVT_NETBSD >= 120
int maj;
-#endif
int i;
if(do_initialization)
@@ -181,13 +130,7 @@ pcattach(struct isa_device *dev)
vt_coldmalloc(); /* allocate memory for screens */
-#if PCVT_NETBSD || PCVT_FREEBSD
-
-#if PCVT_NETBSD > 9
printf(": ");
-#else
- printf("vt%d: ", dev->id_unit);
-#endif /* PCVT_NETBSD > 9 */
switch(adaptor_type)
{
@@ -217,7 +160,7 @@ pcattach(struct isa_device *dev)
break;
}
- if(color == 0)
+ if (color == 0)
printf(", mono");
else
printf(", color");
@@ -241,132 +184,29 @@ pcattach(struct isa_device *dev)
printf("kbd\n");
-#if PCVT_NETBSD || (PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
-
-#if PCVT_NETBSD >= 120
for (maj = 0; maj < nchrdev; maj++) {
if ((u_int)cdevsw[maj].d_open == (u_int)pcopen)
break;
}
-#endif /* PCVT_NETBSD >= 120 */
for(i = 0; i < totalscreens; i++)
{
-
-#if PCVT_NETBSD > 100
- vs[i].vs_tty = ttymalloc();
-#if PCVT_NETBSD >= 120
- vs[i].vs_tty->t_dev = makedev(maj, i);
- tty_attach(vs[i].vs_tty);
-#endif /* PCVT_NETBSD >= 120 */
-#else /* !PCVT_NETBSD > 100 */
-
-#if PCVT_NETBSD
- pc_tty[i] = ttymalloc();
- vs[i].vs_tty = pc_tty[i];
-#else /* !PCVT_NETBSD */
- pccons[i] = ttymalloc(pccons[i]);
- vs[i].vs_tty = pccons[i];
-#endif /* PCVT_NETBSD */
-
-#endif /* PCVT_NETBSD > 100 */
-
+ vs[i].vs_tty = ttymalloc();
+ vs[i].vs_tty->t_dev = makedev(maj, i);
+ tty_attach(vs[i].vs_tty);
}
#if PCVT_EMU_MOUSE
-#if PCVT_NETBSD
pc_tty[totalscreens] = ttymalloc(); /* the mouse emulator tty */
-#else /* !PCVT_NETBSD */
- /* the mouse emulator tty */
- pc_tty[totalscreens] = ttymalloc(pccons[totalscreens]);
-#endif /* PCVT_NETBSD */
#endif /* PCVT_EMU_MOUSE */
-#if PCVT_NETBSD
pcconsp = vs[0].vs_tty;
-#else /* !PCVT_NETBSD */
- pcconsp = pccons[0];
-#endif /* PCVT_NETBSD */
-
-#endif /* #if PCVT_NETBSD || (PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200) */
-
-#else /* !PCVT_NETBSD && !PCVT_FREEBSD*/
-
- switch(adaptor_type)
- {
- case MDA_ADAPTOR:
- printf(" <mda");
- break;
-
- case CGA_ADAPTOR:
- printf(" <cga");
- break;
-
- case EGA_ADAPTOR:
- printf(" <ega");
- break;
-
- case VGA_ADAPTOR:
- printf(" <%s,", (char *)vga_string(vga_type));
- if(can_do_132col)
- printf("80/132 col");
- else
- printf("80 col");
- vgapelinit();
- break;
-
- default:
- printf(" <unknown");
- break;
- }
-
- if(color == 0)
- printf(",mono");
- else
- printf(",color");
-
- printf(",%d scr,", totalscreens);
-
- switch(keyboard_type)
- {
- case KB_AT:
- printf("at-");
- break;
-
- case KB_MFII:
- printf("mf2-");
- break;
-
- default:
- printf("unknown ");
- break;
- }
-
- printf("kbd,[R%s]>", PCVT_REL);
-
-#endif /* PCVT_NETBSD || PCVT_FREEBSD */
-
-#if !PCVT_NETBSD && !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
- for(i = 0; i < totalscreens; i++)
- vs[i].vs_tty = &pccons[i];
-#endif /* !PCVT_NETBSD && !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200) */
async_update();
-#if PCVT_FREEBSD > 205
- /* mark the device busy now if we are the console */
- kdc_vt[dev->id_unit].kdc_state =
- pcvt_is_console? DC_IDLE: DC_BUSY;
- vt_registerdev(dev, (char *)vga_string(vga_type));
-#endif /* PCVT_FREEBSD > 205 */
-
-#if PCVT_NETBSD > 9
-
-#if PCVT_NETBSD > 101
sc->sc_ih = isa_intr_establish(ia->ia_ic, ia->ia_irq, IST_EDGE,
IPL_TTY, pcintr, (void *)0, sc->sc_dev.dv_xname);
-#if PCVT_NETBSD > 110
/*
* Look for children of the keyboard controller.
* XXX Really should decouple keyboard controller
@@ -374,51 +214,10 @@ pcattach(struct isa_device *dev)
*/
while (config_found(self, ia->ia_ic, NULL) != NULL)
/* will break when no more children */ ;
-#endif /* PCVT_NETBSD > 110 */
-#else /* PCVT_NETBSD > 100 */
- vthand.ih_fun = pcrint;
- vthand.ih_arg = 0;
- vthand.ih_level = IPL_TTY;
- intr_establish(ia->ia_irq, &vthand);
-#endif /* PCVT_NETBSD > 100 */
-
-#else /* PCVT_NETBSD > 9 */
-
- return 1;
-
-#endif /* PCVT_NETBSD > 9 */
-
}
/* had a look at the friedl driver */
-#if !PCVT_NETBSD
-
-struct tty *
-get_pccons(Dev_t dev)
-{
- register int i = minor(dev);
-
-#if PCVT_EMU_MOUSE
- if(i == totalscreens)
-#if !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
- return(&pccons[i]);
-#else
- return(pccons[i]);
-#endif /* !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200) */
-#endif /* PCVT_EMU_MOUSE */
-
- if(i >= PCVT_NSCREENS)
- return(NULL);
-#if !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
- return(&pccons[i]);
-#else
- return(pccons[i]);
-#endif
-}
-
-#else
-
struct tty *
get_pccons(Dev_t dev)
{
@@ -435,7 +234,6 @@ get_pccons(Dev_t dev)
return(vs[i].vs_tty);
}
-#endif /* !PCVT_NETBSD */
/*---------------------------------------------------------------------------*
* /dev/ttyc0, /dev/ttyc1, etc.
@@ -480,11 +278,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
if ((tp->t_state & TS_ISOPEN) == 0)
{
-
-#if !(PCVT_FREEBSD > 114)
tp->t_state |= TS_WOPEN;
-#endif /* !(PCVT_FREEBSD > 114) */
-
ttychars(tp);
tp->t_iflag = TTYDEF_IFLAG;
tp->t_oflag = TTYDEF_OFLAG;
@@ -503,11 +297,7 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
if ((tp->t_state & TS_ISOPEN) == 0) /* is this a "cold" open ? */
winsz = 1; /* yes, set winsize later */
-#if PCVT_NETBSD || (PCVT_FREEBSD >= 200)
retval = ((*linesw[tp->t_line].l_open)(dev, tp));
-#else
- retval = ((*linesw[tp->t_line].l_open)(dev, tp, flag));
-#endif /* PCVT_NETBSD || (PCVT_FREEBSD >= 200) */
if(winsz == 1
#if PCVT_EMU_MOUSE
@@ -533,14 +323,6 @@ pcopen(Dev_t dev, int flag, int mode, struct proc *p)
splx(s);
}
-#if PCVT_FREEBSD > 205
- if(retval == 0)
- {
- /* XXX currently, only one vt device is supported */
- kdc_vt[0].kdc_state = DC_BUSY;
- }
-#endif
-
return(retval);
}
@@ -582,14 +364,6 @@ pcclose(Dev_t dev, int flag, int mode, struct proc *p)
reset_usl_modes(vsx);
-#if PCVT_FREEBSD > 205
- if(!pcvt_is_console)
- {
- /* XXX currently, only one vt device is supported */
- kdc_vt[0].kdc_state = DC_IDLE;
- }
-#endif
-
return(0);
}
@@ -615,7 +389,6 @@ pcwrite(Dev_t dev, struct uio *uio, int flag)
return ((*linesw[tp->t_line].l_write)(tp, uio, flag));
}
-#if PCVT_NETBSD > 101
struct tty *
pctty(Dev_t dev)
{
@@ -626,7 +399,6 @@ pctty(Dev_t dev)
return tp;
}
-#endif /* PCVT_NETBSD > 101 */
int
pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
@@ -713,15 +485,8 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
if (data)
{
-
-#if PCVT_NETBSD
sysbeep(((int *)data)[0],
((int *)data)[1] * hz / 1000);
-#else /* PCVT_NETBSD */
- sysbeep(PCVT_SYSBEEPF / ((int *)data)[0],
- ((int *)data)[1] * hz / 3000);
-#endif /* PCVT_NETBSD */
-
}
else
{
@@ -744,21 +509,11 @@ pcioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
do_standard:
#endif /* PCVT_EMU_MOUSE */
-#if PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200
if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag, p)) >= 0)
return (error);
-#else
- if((error = (*linesw[tp->t_line].l_ioctl)(tp, cmd, data, flag)) >= 0)
- return(error);
-#endif /* PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200 */
-#if PCVT_NETBSD > 9
if((error = ttioctl(tp, cmd, data, flag, p)) >= 0)
return (error);
-#else
- if((error = ttioctl(tp, cmd, data, flag)) >= 0)
- return (error);
-#endif /* PCVT_NETBSD > 9 */
return (ENOTTY);
}
@@ -771,43 +526,6 @@ pcmmap(Dev_t dev, int offset, int nprot)
return i386_btop((0xa0000 + offset));
}
-#if PCVT_FREEBSD > 205
-struct tty *
-pcdevtotty(Dev_t dev)
-{
- return get_pccons(dev);
-}
-
-static char vt_descr[VT_DESCR_LEN] = "Graphics console: ";
-
-static struct kern_devconf kdc_vt[NVT] = {
- 0, 0, 0, /* filled in by dev_attach */
- "vt", 0, { MDDT_ISA, 0, "tty" },
- isa_generic_externalize, 0, 0, ISA_EXTERNALLEN,
- &kdc_isa0, /* parent */
- 0, /* parentdata */
- DC_UNCONFIGURED, /* until we know it better */
- vt_descr
-};
-
-static inline void
-vt_registerdev(struct isa_device *id, const char *name)
-{
- if(id->id_unit)
- kdc_vt[id->id_unit] = kdc_vt[0];
-
- kdc_vt[id->id_unit].kdc_unit = id->id_unit;
- kdc_vt[id->id_unit].kdc_isa = id;
-
- /* XXX only vt0 currently allowed */
- strncpy(vt_descr + sizeof("Graphics console: ") - 1,
- name,
- VT_DESCR_LEN - sizeof("Graphics console: "));
-
- dev_attach(&kdc_vt[id->id_unit]);
-}
-
-#endif /* PCVT_FREEBSD > 205 */
/*---------------------------------------------------------------------------*
*
@@ -869,13 +587,8 @@ static void pcvt_timeout (void *arg)
}
#endif
-#if PCVT_NETBSD > 101
int
pcintr(void *arg)
-#else
-int
-pcrint(void)
-#endif
{
#if PCVT_KBD_FIFO
@@ -965,12 +678,6 @@ pcrint(void)
}
-#if PCVT_NETBSD || PCVT_FREEBSD >= 200
-
-#if PCVT_NETBSD == 9
-extern void ttrstrt();
-#endif /* PCVT_NETBSD == 9 */
-
void
pcstart(register struct tty *tp)
{
@@ -1008,9 +715,6 @@ pcstart(register struct tty *tp)
tp->t_state |= TS_TIMEOUT;
timeout(ttrstrt, tp, 1);
-#if PCVT_FREEBSD >= 210 && !defined(TS_ASLEEP)
- ttwakeup(tp);
-#else
if (tp->t_outq.c_cc <= tp->t_lowat)
{
low:
@@ -1021,7 +725,6 @@ low:
}
selwakeup(&tp->t_wsel);
}
-#endif
out:
splx(s);
@@ -1032,102 +735,13 @@ pcstop(struct tty *tp, int flag)
{
}
-#else /* PCVT_NETBSD || PCVT_FREEBSD >= 200 */
-
-void
-pcstart(struct tty *tp)
-{
- int s;
- unsigned char c;
-
- s = spltty();
-
- if (tp->t_state & (TS_TIMEOUT|TS_BUSY|TS_TTSTOP))
- {
- goto out;
- }
-
- for(;;)
- {
-
-#if !(PCVT_FREEBSD > 114)
-
-#if !(PCVT_FREEBSD > 111)
- if (RB_LEN(&tp->t_out) <= tp->t_lowat)
-#else
- if (RB_LEN(tp->t_out) <= tp->t_lowat)
-#endif
- {
- if (tp->t_state&TS_ASLEEP)
- {
- tp->t_state &= ~TS_ASLEEP;
-#if !(PCVT_FREEBSD > 111)
- wakeup((caddr_t)&tp->t_out);
-#else
- wakeup((caddr_t)tp->t_out);
-#endif
- }
-
- if (tp->t_wsel)
- {
- selwakeup(tp->t_wsel, tp->t_state & TS_WCOLL);
- tp->t_wsel = 0;
- tp->t_state &= ~TS_WCOLL;
- }
- }
-
-#else /* PCVT_FREEBSD > 114 */
- if (tp->t_state & (TS_SO_OCOMPLETE | TS_SO_OLOWAT)
- || tp->t_wsel) {
- ttwwakeup(tp);
- }
-#endif /* !PCVT_FREEBSD > 114 */
-
-#if !(PCVT_FREEBSD > 111)
- if (RB_LEN(&tp->t_out) == 0)
-#else
- if (RB_LEN(tp->t_out) == 0)
-#endif
- {
- goto out;
- }
-
-#if !(PCVT_FREEBSD > 111)
- c = getc(&tp->t_out);
-#else
- c = getc(tp->t_out);
-#endif
-
- tp->t_state |= TS_BUSY; /* patch from Frank Maclachlan */
- splx(s);
- sput(&c, 0, 1, minor(tp->t_dev));
- spltty();
- tp->t_state &= ~TS_BUSY; /* patch from Frank Maclachlan */
- }
-out:
- splx(s);
-}
-
-#endif /* PCVT_NETBSD || PCVT_FREEBSD >= 200 */
/*---------------------------------------------------------------------------*
* /dev/console
*---------------------------------------------------------------------------*/
-#if !PCVT_NETBSD /* has moved to cons.c in netbsd-current */
-void
-consinit() /* init for kernel messages during boot */
-{
-}
-#endif /* PCVT_NETBSD */
-
-#if (PCVT_NETBSD > 101 || PCVT_FREEBSD > 205)
void
pccnprobe(struct consdev *cp)
-#else
-int
-pccnprobe(struct consdev *cp)
-#endif
{
int maj;
@@ -1149,46 +763,17 @@ pccnprobe(struct consdev *cp)
cp->cn_dev = makedev(maj, 0);
cp->cn_pri = CN_INTERNAL;
-
-#if !PCVT_NETBSD
-
-#if !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
- cp->cn_tp = &pccons[0];
-#else
- cp->cn_tp = pccons[0];
-#endif /* !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200) */
-
-#endif /* !PCVT_NETBSD */
-
-#if ((PCVT_NETBSD && (PCVT_NETBSD <= 101)) || \
- (PCVT_FREEBSD && (PCVT_FREEBSD <= 205)))
- return 1;
-#endif
}
-#if (PCVT_NETBSD > 101 || PCVT_FREEBSD > 205)
void
pccninit(struct consdev *cp)
-#else
-int
-pccninit(struct consdev *cp)
-#endif
{
- pcvt_is_console = 1;
-#if ((PCVT_NETBSD && (PCVT_NETBSD <= 101)) || \
- (PCVT_FREEBSD && (PCVT_FREEBSD <= 205)))
- return 0;
-#endif
+ pcvt_is_console = 1;
}
-#if (PCVT_NETBSD > 101 || PCVT_FREEBSD > 205)
void
pccnputc(Dev_t dev, U_char c)
-#else
-int
-pccnputc(Dev_t dev, U_char c)
-#endif
{
#if PCVT_SW0CNOUTP
@@ -1206,11 +791,6 @@ pccnputc(Dev_t dev, U_char c)
sput((char *) &c, 1, 1, 0);
async_update();
-
-#if ((PCVT_NETBSD && (PCVT_NETBSD <= 101)) || \
- (PCVT_FREEBSD && (PCVT_FREEBSD <= 205)))
- return 0;
-#endif
}
int
@@ -1229,34 +809,17 @@ pccngetc(Dev_t dev)
splx(s);
async_update();
-#if ! (PCVT_FREEBSD >= 201)
/* this belongs to cons.c */
if (*cp == '\r')
return('\n');
-#endif /* ! (PCVT_FREEBSD >= 201) */
return (*cp);
}
-#if PCVT_FREEBSD >= 200
-int
-pccncheckc(Dev_t dev)
-{
- return (sgetc(1) != 0); /* did someone press the "Any" key? */
-}
-#endif /* PCVT_FREEBSD >= 200 */
-
-#if PCVT_NETBSD >= 100
void
pccnpollc(Dev_t dev, int on)
{
-#if PCVT_NETBSD > 110
struct vt_softc *sc = NULL; /* XXX not used */
-#else
-#if PCVT_NETBSD > 101
- struct vt_softc *sc = vtcd.cd_devs[0]; /* XXX */
-#endif
-#endif
kbd_polling = on;
if (!on) {
@@ -1269,16 +832,11 @@ pccnpollc(Dev_t dev, int on)
*/
s = spltty();
-#if PCVT_NETBSD > 101
pcintr(sc);
-#else
- pcrint();
-#endif
splx(s);
}
}
-#endif /* PCVT_NETBSD >= 100 */
/*---------------------------------------------------------------------------*
* Set line parameters
diff --git a/sys/arch/i386/isa/pcvt/pcvt_ext.c b/sys/arch/i386/isa/pcvt/pcvt_ext.c
index 5b0f7083a07..5a512bec0c4 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_ext.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_ext.c,v 1.13 1998/03/28 19:16:04 deraadt Exp $ */
+/* $OpenBSD: pcvt_ext.c,v 1.14 1998/06/25 00:40:26 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -2283,15 +2283,7 @@ switch_screen(int n, int oldgrafx, int newgrafx)
/* update global screen pointers/variables */
current_video_screen = n; /* current screen no */
-#if !PCVT_NETBSD && !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
- pcconsp = &pccons[n]; /* current tty */
-#elif PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200
- pcconsp = pccons[n]; /* current tty */
-#elif PCVT_NETBSD > 100
pcconsp = vs[n].vs_tty; /* current tty */
-#else
- pcconsp = pc_tty[n]; /* current tty */
-#endif
vsp = &vs[n]; /* current video state ptr */
@@ -2555,16 +2547,6 @@ vgapage(int new_screen)
{
/* we are committed */
vt_switch_pending = 0;
-
-#if PCVT_FREEBSD > 206
- /*
- * XXX: If pcvt is acting as the systems console,
- * avoid panics going to the debugger while we are in
- * process mode.
- */
- if(pcvt_is_console)
- cons_unavail = 0;
-#endif
}
}
return 0;
@@ -2641,16 +2623,6 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
vsp->proc = p;
vsp->pid = p->p_pid;
-#if PCVT_FREEBSD > 206
- /*
- * XXX: If pcvt is acting as the systems console,
- * avoid panics going to the debugger while we are in
- * process mode.
- */
- if(pcvt_is_console)
- cons_unavail = (newmode.mode == VT_PROCESS);
-#endif
-
splx(opri);
return 0;
@@ -2724,12 +2696,6 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
{
/* we are committed */
vt_switch_pending = 0;
-
-#if PCVT_FREEBSD > 206
- /* XXX */
- if(pcvt_is_console)
- cons_unavail = 0;
-#endif
}
return 0;
}
@@ -2742,11 +2708,6 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
vt_switch_pending = 0;
vsp->vt_status &= ~VT_WAIT_ACK;
-#if PCVT_FREEBSD > 206
- /* XXX */
- if(pcvt_is_console)
- cons_unavail = 1;
-#endif
return 0;
}
break;
@@ -2815,26 +2776,16 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
/* grant the process IO access; only allowed if euid == 0 */
{
-#if (PCVT_NETBSD <= 100) || defined(COMPAT_10) || defined(COMPAT_11)
-#if PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200
+#if defined(COMPAT_10) || defined(COMPAT_11)
struct trapframe *fp = (struct trapframe *)p->p_md.md_regs;
-#elif PCVT_NETBSD || (PCVT_FREEBSD && PCVT_FREEBSD > 102)
- struct trapframe *fp = (struct trapframe *)p->p_regs;
-#else
- struct syscframe *fp = (struct syscframe *)p->p_regs;
-#endif
#endif
- if(suser(p->p_ucred, &p->p_acflag) != 0)
+ if (suser(p->p_ucred, &p->p_acflag) != 0)
return (EPERM);
-#if (PCVT_NETBSD <= 100) || defined(COMPAT_10) || defined(COMPAT_11)
+#if defined(COMPAT_10) || defined(COMPAT_11)
/* This is done by i386_iopl(3) now. */
-#if PCVT_NETBSD || (PCVT_FREEBSD && PCVT_FREEBSD > 102)
fp->tf_eflags |= PSL_IOPL;
-#else
- fp->sf_eflags |= PSL_IOPL;
-#endif
#endif
return 0;
@@ -2844,18 +2795,10 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
/* abandon IO access permission */
{
-#if (PCVT_NETBSD <= 100) || defined(COMPAT_10) || defined(COMPAT_11)
+#if defined(COMPAT_10) || defined(COMPAT_11)
/* This is done by i386_iopl(3) now. */
-#if PCVT_NETBSD > 9 || PCVT_FREEBSD >= 200
struct trapframe *fp = (struct trapframe *)p->p_md.md_regs;
fp->tf_eflags &= ~PSL_IOPL;
-#elif PCVT_NETBSD || (PCVT_FREEBSD && PCVT_FREEBSD > 102)
- struct trapframe *fp = (struct trapframe *)p->p_regs;
- fp->tf_eflags &= ~PSL_IOPL;
-#else
- struct syscframe *fp = (struct syscframe *)p->p_regs;
- fp->sf_eflags &= ~PSL_IOPL;
-#endif
#endif
return 0;
}
@@ -2924,16 +2867,11 @@ usl_vt_ioctl(Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p)
int duration = *(int *)data >> 16;
int pitch = *(int *)data & 0xffff;
-#if PCVT_NETBSD
if(pitch != 0)
{
sysbeep(PCVT_SYSBEEPF / pitch,
duration * hz / 1000);
}
-#else /* PCVT_NETBSD */
- sysbeep(pitch, duration * hz / 3000);
-#endif /* PCVT_NETBSD */
-
}
else
{
diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
index d2277444682..8f8a118f477 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_hdr.h,v 1.18 1998/02/05 16:48:32 deraadt Exp $ */
+/* $OpenBSD: pcvt_hdr.h,v 1.19 1998/06/25 00:40:28 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -94,89 +94,28 @@
#include "pcvt_conf.h"
-#if PCVT_NETBSD > 9
#include <sys/device.h>
-#endif
-#if PCVT_NETBSD > 9
-#if PCVT_NETBSD > 101
#include <i386/isa/isa_machdep.h>
#include <dev/isa/isavar.h>
-#else
-#include <i386/isa/isavar.h>
-#endif
#include <machine/cpufunc.h>
#include <machine/intr.h>
-#else
-#include <i386/isa/isa_device.h>
-#endif
#include <i386/isa/icu.h>
-#if PCVT_NETBSD > 100
-#if PCVT_NETBSD > 101
#include <dev/isa/isareg.h>
-#else
-#include <i386/isa/isareg.h>
-#endif
-#else
-#include <i386/isa/isa.h>
-#endif
-#if PCVT_NETBSD > 9
#include <dev/cons.h>
-#if PCVT_NETBSD > 100
#include <dev/ic/mc146818reg.h>
#include <i386/isa/nvram.h>
-#endif
-#else
-#include <i386/i386/cons.h>
-#endif
-
-#if PCVT_NETBSD <= 9
-#include <machine/psl.h>
-#include <machine/frame.h>
-#endif /* PCVT_NETBSD <= 9 */
#include <machine/stdarg.h>
-#if PCVT_NETBSD > 9
#include "pcvt_ioctl.h"
-#else
-#include <machine/pcvt_ioctl.h>
-#endif
#include <machine/pc/display.h>
-#if PCVT_FREEBSD > 200
-#include <machine/clock.h>
-#include <machine/md_var.h>
-#endif
#include <vm/vm_kern.h>
-#if PCVT_FREEBSD > 205
-#include <sys/devconf.h>
-#endif
-
-/* perform option consistency checks */
-
-#if defined PCVT_FREEBSD && PCVT_FREEBSD == 1
-# undef PCVT_FREEBSD
-# define PCVT_FREEBSD 102 /* assume 1.0 release */
-#endif
-
-#if defined PCVT_NETBSD && PCVT_NETBSD == 1
-#undef PCVT_NETBSD
-#define PCVT_NETBSD 9 /* assume 0.9 release for now */
-#endif
-
-#if PCVT_FREEBSD + PCVT_NETBSD == 0
-# error "pcvt_hdr.h: You MUST define one of PCVT_{NET,FREE}BSD \
-in the config file"
-#elif (PCVT_FREEBSD && PCVT_NETBSD)
-# error "pcvt_hdr.h: You CAN only define *one* of PCVT_{NET,FREE}BSD \
-in the config file"
-#endif
-
#ifdef XSERVER
/* PCVT_NULLCHARS is mandatory for X server */
@@ -197,18 +136,8 @@ in the config file"
/* get the inline inb/outb back again ... */
-#if PCVT_NETBSD
-#if PCVT_NETBSD == 9
-#include <machine/cpufunc.h> /* NetBSD 0.9 [...and earlier -currents] */
-#else
#include <machine/pio.h> /* recent NetBSD -currents */
#define NEW_AVERUNNABLE /* averunnable changes for younger currents */
-#endif /* PCVT_NETBSD == 9 */
-#endif /* PCVT_NETBSD */
-
-#if PCVT_FREEBSD >= 200
-#define NEW_AVERUNNABLE /* new averunnable changes for FreeBSD 2.0 */
-#endif
#if PCVT_SCANSET !=1 && PCVT_SCANSET !=2
#error "Supported keyboard scancode sets are 1 and 2 only (for now)!!!"
@@ -296,18 +225,10 @@ in the config file"
* CMOS ram access to get the "Equipment Byte"
*---------------------------------------------------------------------------*/
-#if PCVT_NETBSD > 100
#define EQ_EGAVGA NVRAM_EQUIPMENT_EGAVGA
#define EQ_40COLOR NVRAM_EQUIPMENT_COLOR40
#define EQ_80COLOR NVRAM_EQUIPMENT_COLOR80
#define EQ_80MONO NVRAM_EQUIPMENT_MONO80
-#else
-#define RTC_EQUIPMENT 0x14 /* equipment byte in cmos ram */
-#define EQ_EGAVGA 0 /* reserved (= ega/vga) */
-#define EQ_40COLOR 1 /* display = 40 col color */
-#define EQ_80COLOR 2 /* display = 80 col color */
-#define EQ_80MONO 3 /* display = 80 col mono */
-#endif
/*---------------------------------------------------------------------------*
* VT220 -> internal color conversion table fields
@@ -646,21 +567,13 @@ in the config file"
/* screen memory start, monochrome */
#ifndef MONO_BUF
-# if PCVT_FREEBSD && (PCVT_FREEBSD > 102)
-# define MONO_BUF (KERNBASE+0xB0000)
-# else
# define MONO_BUF 0xfe0B0000 /* NetBSD-current: isa.h */
-# endif
#endif
/* screen memory start, color */
#ifndef CGA_BUF
-# if PCVT_FREEBSD && (PCVT_FREEBSD > 102)
-# define CGA_BUF (KERNBASE+0xB8000)
-# else
# define CGA_BUF 0xfe0B8000 /* NetBSD-current: isa.h */
-# endif
#endif
#define CHR 2 /* bytes per word in screen mem */
@@ -707,23 +620,11 @@ EXTERN u_short user_attr; /* character attributes */
#if !PCVT_EMU_MOUSE
-#if PCVT_NETBSD
EXTERN struct tty *pc_tty[PCVT_NSCREENS];
-#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
-EXTERN struct tty pccons[PCVT_NSCREENS];
-#else
-EXTERN struct tty *pccons[PCVT_NSCREENS];
-#endif /* PCVT_NETBSD */
#else /* PCVT_EMU_MOUSE */
-#if PCVT_NETBSD
EXTERN struct tty *pc_tty[PCVT_NSCREENS + 1];
-#elif !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
-EXTERN struct tty pccons[PCVT_NSCREENS + 1];
-#else
-EXTERN struct tty *pccons[PCVT_NSCREENS + 1];
-#endif
#endif /* PCVT_EMU_MOUSE */
@@ -890,23 +791,14 @@ struct mousestat {
#ifdef WAS_EXTERN
-#if PCVT_NETBSD > 9
-
-#if PCVT_NETBSD > 101
struct vt_softc {
struct device sc_dev;
void *sc_ih;
};
-#endif /* PCVT_NETBSD > 101 */
-#if PCVT_NETBSD > 100
int pcprobe(struct device *, void *, void *);
-#endif
-#if PCVT_NETBSD > 9
void pcattach(struct device *, struct device *, void *);
-#endif
-#if PCVT_NETBSD > 110
struct cfattach vt_ca = {
sizeof(struct vt_softc), pcprobe, pcattach
};
@@ -914,28 +806,6 @@ struct cfattach vt_ca = {
struct cfdriver vt_cd = {
NULL, "vt", DV_TTY
};
-#else /* !PCVT_NETBSD > 110 */
-#if PCVT_NETBSD > 101
-struct cfdriver vtcd = {
- NULL, "vt", pcprobe, pcattach, DV_TTY, sizeof(struct vt_softc)
-};
-#else /* !PCVT_NETBSD > 101 */
-struct cfdriver vtcd = {
- NULL, "vt", pcprobe, pcattach, DV_TTY, sizeof(struct device)
-};
-#endif /* PCVT_NETBSD > 101 */
-#endif /* PCVT_NETBSD > 110 */
-
-#else /* !PCVT_NETBSD > 9 */
-
-int pcprobe ( struct isa_device *dev );
-int pcattach ( struct isa_device *dev );
-
-struct isa_driver vtdriver = { /* driver routines */
- pcprobe, pcattach, "vt",
-};
-
-#endif /* PCVT_NETBSD > 9 */
u_char fgansitopc[] = { /* foreground ANSI color -> pc */
FG_BLACK, FG_RED, FG_GREEN, FG_BROWN, FG_BLUE,
@@ -947,21 +817,9 @@ u_char bgansitopc[] = { /* background ANSI color -> pc */
BG_MAGENTA, BG_CYAN, BG_LIGHTGREY
};
-#if !PCVT_NETBSD
-u_short *Crtat = (u_short *)MONO_BUF; /* screen start address */
-#if !(PCVT_FREEBSD > 110 && PCVT_FREEBSD < 200)
-struct tty *pcconsp = &pccons[0]; /* ptr to current device */
-#else /* PCVT_FREEBSD > 110 */
-struct tty *pcconsp;
-#endif /* !(PCVT_FREEBSD > 110) */
-#else
struct tty *pcconsp; /* ptr to current device, see pcattach() */
-#if PCVT_NETBSD > 101
u_short *Crtat; /* screen start address */
-#endif /* PCVT_NETBSD > 101 */
-
-#endif /* PCVT_NETBSD */
#if PCVT_EMU_MOUSE
struct mousestat mouse = {{0}};
@@ -1151,47 +1009,13 @@ extern u_char *saved_charsets[NVGAFONTS];
#endif /* WAS_EXTERN */
-/*
- * FreeBSD > 1.0.2 cleaned up the kernel definitions (with the aim of
- * getting ANSI-clean). Since there has been a mixed usage of types like
- * "dev_t" (actually some short) in prototyped and non-prototyped fasion,
- * each of those types is declared as "int" within function prototypes
- * (which is what the compiler would actually promote it to).
- *
- * The macros below are used to clarify which type a parameter ought to
- * be, regardless of its actual promotion to "int".
- */
-
-
-#define Dev_t int
#define U_short int
#define U_char int
-
-/*
- * In FreeBSD >= 2.0, dev_t has type `unsigned long', so promoting it
- * doesn't cause any problems in prototypes.
- */
-
-#if PCVT_FREEBSD >= 200
-#undef Dev_t
#define Dev_t dev_t
-#endif
-/* in FreeBSD > 102 arguments for timeout()/untimeout() are a special type */
-
-#if PCVT_FREEBSD > 102
-#define TIMEOUT_FUNC_T timeout_func_t
-#else
#define TIMEOUT_FUNC_T void *
-#endif
-#if !PCVT_FREEBSD || (PCVT_FREEBSD < 210)
extern void bcopyb(void *from, void *to, u_int length);
-#endif
-
-#if (PCVT_FREEBSD > 0 && PCVT_FREEBSD < 200) || (PCVT_NETBSD > 0 && PCVT_NETBSD <= 110)
-extern void fillw(U_short value, void *addr, u_int length);
-#endif
int pcopen ( Dev_t dev, int flag, int mode, struct proc *p );
int pcclose ( Dev_t dev, int flag, int mode, struct proc *p );
@@ -1199,49 +1023,19 @@ int pcread ( Dev_t dev, struct uio *uio, int flag );
int pcwrite ( Dev_t dev, struct uio *uio, int flag );
int pcioctl ( Dev_t dev, int cmd, caddr_t data, int flag, struct proc *p );
int pcmmap ( Dev_t dev, int offset, int nprot );
-#if PCVT_FREEBSD > 205
-struct tty *pcdevtotty ( Dev_t dev );
-#endif /* PCVT_FREEBSD > 205 */
-#if PCVT_NETBSD
-#if PCVT_NETBSD > 101
struct tty *
pctty ( Dev_t dev );
int pcintr ( void *arg);
void pccnprobe ( struct consdev *cp );
void pccninit ( struct consdev *cp );
void pccnputc ( Dev_t dev, U_char c );
-#else
-int pcrint ( void );
-int pccnprobe ( struct consdev *cp );
-int pccninit ( struct consdev *cp );
-int pccnputc ( Dev_t dev, U_char c );
-#endif
int pccngetc ( Dev_t dev );
-#endif /* PCVT_NETBSD */
int pcparam ( struct tty *tp, struct termios *t );
void pcstart ( struct tty *tp );
void pcstop ( struct tty *tp, int flag );
-#if PCVT_FREEBSD
-/*
- * In FreeBSD > 2.0.6, driver console functions are declared in i386/cons.h
- * and some return void, so don't declare them here.
- */
-#if PCVT_FREEBSD <= 205
-int pccnprobe ( struct consdev *cp );
-int pccninit ( struct consdev *cp );
-int pccngetc ( Dev_t dev );
-int pccncheckc ( Dev_t dev );
-int pccnputc ( Dev_t dev, U_char c );
-#endif
-
-# if PCVT_FREEBSD < 200
-void consinit ( void );
-# endif
-#endif /* PCVT_FREEBSD */
-
void switch_screen ( int n, int oldgrafx, int newgrafx );
int usl_vt_ioctl (Dev_t dev,int cmd,caddr_t data,int flag,struct proc *);
int vt_activate ( int newscreen );
@@ -1255,9 +1049,6 @@ int mouse_ioctl ( Dev_t dev, int cmd, caddr_t data );
#if PCVT_SCREENSAVER
void pcvt_scrnsv_reset ( void );
-#endif /* PCVT_SCREENSAVER */
-
-#if PCVT_SCREENSAVER
void pcvt_set_scrnsv_tmo ( int );
#endif /* PCVT_SCREENSAVER */
@@ -1412,11 +1203,7 @@ static __inline void vt_selattr(struct video_state *svsp)
/* use system supplied delay function for */
/* producing delays for accesssing the */
/* keyboard controller */
-#if PCVT_NETBSD > 9
#define PCVT_KBD_DELAY() delay(11)
-#elif PCVT_FREEBSD || (PCVT_NETBSD <= 9)
-#define PCVT_KBD_DELAY() DELAY(11)
-#endif
#endif /* PCVT_PORTIO_DELAY */
/*---------------------------------- E O F ----------------------------------*/
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
index ef5d505c0b7..ac92fecbb52 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_kbd.c,v 1.14 1998/02/22 22:06:14 niklas Exp $ */
+/* $OpenBSD: pcvt_kbd.c,v 1.15 1998/06/25 00:40:29 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -1272,11 +1272,7 @@ loop:
*/
now = time;
-#if PCVT_NETBSD > 100
timersub(&now,&mouse.lastmove,&now);
-#else
- timevalsub(&now, &mouse.lastmove);
-#endif
mouse.lastmove = time;
accel = (now.tv_sec == 0
@@ -1420,10 +1416,6 @@ regular:
cpu_reset();
#endif /* PCVT_CTRL_ALT_DEL */
-#if !(PCVT_NETBSD || PCVT_FREEBSD >= 200)
-#include "ddb.h"
-#endif /* !(PCVT_NETBSD || PCVT_FREEBSD >= 200) */
-
#if NDDB > 0 || defined(DDB) /* Check for cntl-alt-esc */
if((key == 110) && ctrl_down && (meta_down || altgr_down))
@@ -1433,13 +1425,8 @@ regular:
if(!in_Debugger)
{
in_Debugger = 1;
-#if PCVT_FREEBSD
- /* the string is actually not used... */
- Debugger("kbd");
-#else
if (db_console)
Debugger();
-#endif
in_Debugger = 0;
if(noblock)
return NULL;
diff --git a/sys/arch/i386/isa/pcvt/pcvt_out.c b/sys/arch/i386/isa/pcvt/pcvt_out.c
index ae7b462e40e..ee4ef54a576 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_out.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_out.c
@@ -982,31 +982,17 @@ vt_coldinit(void)
extern u_short csd_ascii[]; /* pcvt_tbl.h */
extern u_short csd_supplemental[];
-#if PCVT_NETBSD <= 101
- u_short volatile *cp = Crtat + (CGA_BUF-MONO_BUF)/CHR;
-#endif
-
u_short was;
int nscr, charset;
int equipment;
-
-#if PCVT_NETBSD <= 101
- u_short *SaveCrtat = Crtat;
-#endif
-
struct video_state *svsp;
do_initialization = 0; /* reset init necessary flag */
/* get the equipment byte from the RTC chip */
-#if PCVT_NETBSD > 101
equipment = mc146818_read(NULL, NVRAM_EQUIPMENT);
switch(equipment & NVRAM_EQUIPMENT_MONITOR)
-#else
- equipment = ((rtcin(RTC_EQUIPMENT)) >> 4) & 0x03;
- switch(equipment)
-#endif
{
default:
panic("vt_coldinit: impossible equipment");
@@ -1014,7 +1000,6 @@ vt_coldinit(void)
case EQ_EGAVGA:
/* set memory start to CGA == B8000 */
-#if PCVT_NETBSD > 101
Crtat = ISA_HOLE_VADDR(CGA_BUF);
/* find out, what monitor is connected */
@@ -1034,28 +1019,6 @@ vt_coldinit(void)
color = 1;
}
-#else /* ! PCVT_NETBSD > 101 */
-
- Crtat = Crtat + (CGA_BUF-MONO_BUF)/CHR;
-
- /* find out, what monitor is connected */
-
- was = *cp;
- *cp = (u_short) 0xA55A;
- if (*cp != 0xA55A)
- {
- addr_6845 = MONO_BASE;
- color = 0;
- }
- else
- {
- *cp = was;
- addr_6845 = CGA_BASE;
- color = 1;
- }
-
-#endif /* PCVT_NETBSD > 101 */
-
if(vga_test()) /* EGA or VGA ? */
{
adaptor_type = VGA_ADAPTOR;
@@ -1064,9 +1027,6 @@ vt_coldinit(void)
if(color == 0)
{
mda2egaorvga();
-#if PCVT_NETBSD <= 101
- Crtat = SaveCrtat; /* mono start */
-#endif
}
/* find out which chipset we are running on */
@@ -1080,9 +1040,6 @@ vt_coldinit(void)
if(color == 0)
{
mda2egaorvga();
-#if PCVT_NETBSD <= 101
- Crtat = SaveCrtat; /* mono start */
-#endif
}
}
@@ -1094,11 +1051,7 @@ vt_coldinit(void)
case EQ_40COLOR: /* XXX should panic in 40 col mode ! */
case EQ_80COLOR:
-#if PCVT_NETBSD > 101
Crtat = ISA_HOLE_VADDR (CGA_BUF);
-#else
- Crtat = Crtat + (CGA_BUF-MONO_BUF)/CHR;
-#endif
addr_6845 = CGA_BASE;
adaptor_type = CGA_ADAPTOR;
@@ -1108,9 +1061,7 @@ vt_coldinit(void)
case EQ_80MONO:
-#if PCVT_NETBSD > 101
Crtat = ISA_HOLE_VADDR (MONO_BUF);
-#endif
addr_6845 = MONO_BASE;
adaptor_type = MDA_ADAPTOR;
diff --git a/sys/arch/i386/isa/pcvt/pcvt_sup.c b/sys/arch/i386/isa/pcvt/pcvt_sup.c
index cf7ad8f0f24..a9c5bd570f7 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_sup.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_sup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_sup.c,v 1.5 1996/05/25 22:18:00 deraadt Exp $ */
+/* $OpenBSD: pcvt_sup.c,v 1.6 1998/06/25 00:40:31 millert Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -254,26 +254,14 @@ vgapcvtid(struct pcvtid *data)
static void
vgapcvtinfo(struct pcvtinfo *data)
{
-#if PCVT_NETBSD
data->opsys = CONF_NETBSD;
- data->opsysrel = PCVT_NETBSD;
-#elif PCVT_FREEBSD
- data->opsys = CONF_FREEBSD;
- data->opsysrel = PCVT_FREEBSD;
-#else
- data->opsys = CONF_UNKNOWNOPSYS;
- data->opsysrel = 0;
-#endif
+ data->opsysrel = OpenBSD;
data->nscreens = PCVT_NSCREENS;
data->scanset = PCVT_SCANSET;
data->sysbeepf = PCVT_SYSBEEPF;
-#if PCVT_NETBSD || PCVT_FREEBSD >= 200
data->pcburst = PCVT_PCBURST;
-#else
- data->pcburst = 1;
-#endif
#if PCVT_KBD_FIFO
data->kbd_fifo_sz = PCVT_KBD_FIFO_SZ;
@@ -1771,9 +1759,8 @@ set_2ndcharset(void)
static u_short
getrand(void)
{
-#if !PCVT_FREEBSD
extern struct timeval time; /* time-of-day register */
-#endif
+
static unsigned long seed = 1;
register u_short res = (u_short)seed;
seed = seed * 1103515245L + time.tv_sec;