summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-08-09 10:35:05 +0000
committerphk <phk@FreeBSD.org>1999-08-09 10:35:05 +0000
commitee871b6440719fbe58a0cb8e994ad543265f4e1a (patch)
tree5e644fe7bdaf6b601abb674aac52092ad3fd8b45 /sys/i386
parentf0f8bd1b55697613d6f80eb5c65838ecc4b246e6 (diff)
downloadFreeBSD-src-ee871b6440719fbe58a0cb8e994ad543265f4e1a.zip
FreeBSD-src-ee871b6440719fbe58a0cb8e994ad543265f4e1a.tar.gz
Merge the cons.c and cons.h to the best of my ability. alpha may or
may not compile, I can't test it.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/conf/files.i3863
-rw-r--r--sys/i386/i386/autoconf.c4
-rw-r--r--sys/i386/i386/cons.c457
-rw-r--r--sys/i386/i386/cons.h96
-rw-r--r--sys/i386/i386/db_interface.c4
-rw-r--r--sys/i386/i386/i386-gdbstub.c3
-rw-r--r--sys/i386/i386/machdep.c4
-rw-r--r--sys/i386/i386/mp_machdep.c5
-rw-r--r--sys/i386/i386/mptable.c5
-rw-r--r--sys/i386/i386/tsc.c4
-rw-r--r--sys/i386/i386/userconfig.c6
-rw-r--r--sys/i386/include/cons.h8
-rw-r--r--sys/i386/include/mptable.h5
-rw-r--r--sys/i386/isa/bs/bshw.c2
-rw-r--r--sys/i386/isa/clock.c4
-rw-r--r--sys/i386/isa/pcvt/pcvt_hdr.h2
-rw-r--r--sys/i386/isa/wd.c4
17 files changed, 25 insertions, 591 deletions
diff --git a/sys/i386/conf/files.i386 b/sys/i386/conf/files.i386
index b79f016..cf586fc 100644
--- a/sys/i386/conf/files.i386
+++ b/sys/i386/conf/files.i386
@@ -1,7 +1,7 @@
# This file tells config what files go into building a kernel,
# files marked standard are always included.
#
-# $Id: files.i386,v 1.256 1999/08/06 14:01:55 hm Exp $
+# $Id: files.i386,v 1.257 1999/08/07 12:19:41 peter Exp $
#
# The long compile-with and dependency lines are required because of
# limitations in config: backslash-newline doesn't work in strings, and
@@ -121,7 +121,6 @@ i386/i386/autoconf.c standard
i386/i386/bios.c standard
i386/i386/bioscall.s standard
i386/i386/busdma_machdep.c standard
-i386/i386/cons.c standard
i386/i386/db_disasm.c optional ddb
i386/i386/db_interface.c optional ddb
i386/i386/db_trace.c optional ddb
diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c
index 6e2b68a..ea12b1a 100644
--- a/sys/i386/i386/autoconf.c
+++ b/sys/i386/i386/autoconf.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91
- * $Id: autoconf.c,v 1.129 1999/07/17 20:47:49 phk Exp $
+ * $Id: autoconf.c,v 1.130 1999/08/06 20:29:46 phk Exp $
*/
/*
@@ -63,9 +63,9 @@
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/sysctl.h>
+#include <sys/cons.h>
#include <machine/bootinfo.h>
-#include <machine/cons.h>
#include <machine/ipl.h>
#include <machine/md_var.h>
#ifdef APIC_IO
diff --git a/sys/i386/i386/cons.c b/sys/i386/i386/cons.c
deleted file mode 100644
index 92544f8..0000000
--- a/sys/i386/i386/cons.c
+++ /dev/null
@@ -1,457 +0,0 @@
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)cons.c 7.2 (Berkeley) 5/9/91
- * $Id: cons.c,v 1.69 1999/06/26 12:19:03 peter Exp $
- */
-
-#include "opt_devfs.h"
-
-#include <sys/param.h>
-#ifdef DEVFS
-#include <sys/devfsext.h>
-#endif /*DEVFS*/
-#include <sys/systm.h>
-#include <sys/conf.h>
-#include <sys/kernel.h>
-#include <sys/reboot.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/tty.h>
-#include <sys/uio.h>
-
-#include <machine/cpu.h>
-#include <machine/cons.h>
-
-static d_open_t cnopen;
-static d_close_t cnclose;
-static d_read_t cnread;
-static d_write_t cnwrite;
-static d_ioctl_t cnioctl;
-static d_poll_t cnpoll;
-
-#define CDEV_MAJOR 0
-static struct cdevsw cn_cdevsw = {
- /* open */ cnopen,
- /* close */ cnclose,
- /* read */ cnread,
- /* write */ cnwrite,
- /* ioctl */ cnioctl,
- /* stop */ nostop,
- /* reset */ noreset,
- /* devtotty */ nodevtotty,
- /* poll */ cnpoll,
- /* mmap */ nommap,
- /* strategy */ nostrategy,
- /* name */ "console",
- /* parms */ noparms,
- /* maj */ CDEV_MAJOR,
- /* dump */ nodump,
- /* psize */ nopsize,
- /* flags */ D_TTY,
- /* maxio */ 0,
- /* bmaj */ -1
-};
-
-static dev_t cn_dev_t; /* seems to be never really used */
-static udev_t cn_udev_t;
-SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLFLAG_RD,
- &cn_udev_t, sizeof cn_udev_t, "T,dev_t", "");
-
-static int cn_mute;
-
-int cons_unavail = 0; /* XXX:
- * physical console not available for
- * input (i.e., it is in graphics mode)
- */
-
-static u_char cn_is_open; /* nonzero if logical console is open */
-static int openmode, openflag; /* how /dev/console was openned */
-static u_char cn_phys_is_open; /* nonzero if physical device is open */
-static d_close_t *cn_phys_close; /* physical device close function */
-static d_open_t *cn_phys_open; /* physical device open function */
-static struct consdev *cn_tab; /* physical console device info */
-static struct tty *cn_tp; /* physical console tty struct */
-#ifdef DEVFS
-static void *cn_devfs_token; /* represents the devfs entry */
-#endif /* DEVFS */
-
-CONS_DRIVER(cons, NULL, NULL, NULL, NULL, NULL, NULL);
-
-void
-cninit()
-{
- struct consdev **list, *best_cp, *cp;
-
- /*
- * Find the first console with the highest priority.
- */
- best_cp = NULL;
- list = (struct consdev **)cons_set.ls_items;
- while ((cp = *list++) != NULL) {
- if (cp->cn_probe == NULL)
- continue;
- (*cp->cn_probe)(cp);
- if (cp->cn_pri > CN_DEAD &&
- (best_cp == NULL || cp->cn_pri > best_cp->cn_pri))
- best_cp = cp;
- }
-
- /*
- * Check if we should mute the console (for security reasons perhaps)
- * It can be changes dynamically using sysctl kern.consmute
- * once we are up and going.
- *
- */
- cn_mute = ((boothowto & (RB_MUTE
- |RB_SINGLE
- |RB_VERBOSE
- |RB_ASKNAME
- |RB_CONFIG)) == RB_MUTE);
-
- /*
- * If no console, give up.
- */
- if (best_cp == NULL) {
- if (cn_tab != NULL && cn_tab->cn_term != NULL)
- (*cn_tab->cn_term)(cn_tab);
- cn_tab = best_cp;
- return;
- }
-
- /*
- * Initialize console, then attach to it. This ordering allows
- * debugging using the previous console, if any.
- */
- (*best_cp->cn_init)(best_cp);
- if (cn_tab != NULL && cn_tab != best_cp) {
- /* Turn off the previous console. */
- if (cn_tab->cn_term != NULL)
- (*cn_tab->cn_term)(cn_tab);
- }
- cn_tab = best_cp;
-}
-
-void
-cninit_finish()
-{
- struct cdevsw *cdp;
-
- if ((cn_tab == NULL) || cn_mute)
- return;
-
- /*
- * Hook the open and close functions.
- */
- cdp = devsw(cn_tab->cn_dev);
- cn_phys_close = cdp->d_close;
- cdp->d_close = cnclose;
- cn_phys_open = cdp->d_open;
- cdp->d_open = cnopen;
- cn_tp = (*cdp->d_devtotty)(cn_tab->cn_dev);
- cn_dev_t = cn_tab->cn_dev;
- cn_udev_t = dev2udev(cn_dev_t);
-}
-
-static void
-cnuninit(void)
-{
- struct cdevsw *cdp;
-
- if (cn_tab == NULL)
- return;
-
- /*
- * Unhook the open and close functions.
- */
- cdp = devsw(cn_tab->cn_dev);
- cdp->d_close = cn_phys_close;
- cn_phys_close = NULL;
- cdp->d_open = cn_phys_open;
- cn_phys_open = NULL;
- cn_tp = NULL;
- cn_dev_t = NODEV;
- cn_udev_t = NOUDEV;
-}
-
-/*
- * User has changed the state of the console muting.
- * This may require us to open or close the device in question.
- */
-static int
-sysctl_kern_consmute SYSCTL_HANDLER_ARGS
-{
- int error;
- int ocn_mute;
-
- ocn_mute = cn_mute;
- error = sysctl_handle_int(oidp, &cn_mute, 0, req);
- if((error == 0) && (cn_tab != NULL) && (req->newptr != NULL)) {
- if(ocn_mute && !cn_mute) {
- /*
- * going from muted to unmuted.. open the physical dev
- * if the console has been openned
- */
- cninit_finish();
- if(cn_is_open)
- /* XXX curproc is not what we want really */
- error = cnopen(cn_dev_t, openflag,
- openmode, curproc);
- /* if it failed, back it out */
- if ( error != 0) cnuninit();
- } else if (!ocn_mute && cn_mute) {
- /*
- * going from unmuted to muted.. close the physical dev
- * if it's only open via /dev/console
- */
- if(cn_is_open)
- error = cnclose(cn_dev_t, openflag,
- openmode, curproc);
- if ( error == 0) cnuninit();
- }
- if (error != 0) {
- /*
- * back out the change if there was an error
- */
- cn_mute = ocn_mute;
- }
- }
- return (error);
-}
-
-SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW,
- 0, sizeof cn_mute, sysctl_kern_consmute, "I", "");
-
-static int
-cnopen(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
- dev_t cndev, physdev;
- int retval = 0;
-
- if (cn_tab == NULL)
- return (0);
- cndev = cn_tab->cn_dev;
- physdev = (major(dev) == major(cndev) ? dev : cndev);
- /*
- * If mute is active, then non console opens don't get here
- * so we don't need to check for that. They
- * bypass this and go straight to the device.
- */
- if(!cn_mute)
- retval = (*cn_phys_open)(physdev, flag, mode, p);
- if (retval == 0) {
- /*
- * check if we openned it via /dev/console or
- * via the physical entry (e.g. /dev/sio0).
- */
- if (dev == cndev)
- cn_phys_is_open = 1;
- else if (physdev == cndev) {
- openmode = mode;
- openflag = flag;
- cn_is_open = 1;
- }
- }
- return (retval);
-}
-
-static int
-cnclose(dev, flag, mode, p)
- dev_t dev;
- int flag, mode;
- struct proc *p;
-{
- dev_t cndev;
-
- if (cn_tab == NULL)
- return (0);
- cndev = cn_tab->cn_dev;
- /*
- * act appropriatly depending on whether it's /dev/console
- * or the pysical device (e.g. /dev/sio) that's being closed.
- * in either case, don't actually close the device unless
- * both are closed.
- */
- if (dev == cndev) {
- /* the physical device is about to be closed */
- cn_phys_is_open = 0;
- if (cn_is_open) {
- if (cn_tp) {
- /* perform a ttyhalfclose() */
- /* reset session and proc group */
- cn_tp->t_pgrp = NULL;
- cn_tp->t_session = NULL;
- }
- return (0);
- }
- } else if (major(dev) != major(cndev)) {
- /* the logical console is about to be closed */
- cn_is_open = 0;
- if (cn_phys_is_open)
- return (0);
- dev = cndev;
- }
- if(cn_phys_close)
- return ((*cn_phys_close)(dev, flag, mode, p));
- return (0);
-}
-
-static int
-cnread(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
-{
- if ((cn_tab == NULL) || cn_mute)
- return (0);
- dev = cn_tab->cn_dev;
- return ((*devsw(dev)->d_read)(dev, uio, flag));
-}
-
-static int
-cnwrite(dev, uio, flag)
- dev_t dev;
- struct uio *uio;
- int flag;
-{
- if ((cn_tab == NULL) || cn_mute) {
- uio->uio_resid = 0; /* dump the data */
- return (0);
- }
- if (constty)
- dev = constty->t_dev;
- else
- dev = cn_tab->cn_dev;
- return ((*devsw(dev)->d_write)(dev, uio, flag));
-}
-
-static int
-cnioctl(dev, cmd, data, flag, p)
- dev_t dev;
- u_long cmd;
- caddr_t data;
- int flag;
- struct proc *p;
-{
- int error;
-
- if ((cn_tab == NULL) || cn_mute)
- return (0);
- /*
- * Superuser can always use this to wrest control of console
- * output from the "virtual" console.
- */
- if (cmd == TIOCCONS && constty) {
- error = suser(p);
- if (error)
- return (error);
- constty = NULL;
- return (0);
- }
- dev = cn_tab->cn_dev;
- return ((*devsw(dev)->d_ioctl)(dev, cmd, data, flag, p));
-}
-
-static int
-cnpoll(dev, events, p)
- dev_t dev;
- int events;
- struct proc *p;
-{
- if ((cn_tab == NULL) || cn_mute)
- return (1);
-
- dev = cn_tab->cn_dev;
-
- return ((*devsw(dev)->d_poll)(dev, events, p));
-}
-
-int
-cngetc()
-{
- int c;
- if ((cn_tab == NULL) || cn_mute)
- return (-1);
- c = (*cn_tab->cn_getc)(cn_tab->cn_dev);
- if (c == '\r') c = '\n'; /* console input is always ICRNL */
- return (c);
-}
-
-int
-cncheckc()
-{
- if ((cn_tab == NULL) || cn_mute)
- return (-1);
- return ((*cn_tab->cn_checkc)(cn_tab->cn_dev));
-}
-
-void
-cnputc(c)
- register int c;
-{
- if ((cn_tab == NULL) || cn_mute)
- return;
- if (c) {
- if (c == '\n')
- (*cn_tab->cn_putc)(cn_tab->cn_dev, '\r');
- (*cn_tab->cn_putc)(cn_tab->cn_dev, c);
- }
-}
-
-static int cn_devsw_installed;
-
-static void
-cn_drvinit(void *unused)
-{
-
- if( ! cn_devsw_installed ) {
- cdevsw_add(&cn_cdevsw);
- cn_devsw_installed = 1;
-#ifdef DEVFS
- cn_devfs_token = devfs_add_devswf(&cn_cdevsw, 0, DV_CHR,
- UID_ROOT, GID_WHEEL, 0600,
- "console");
-#endif
- }
-}
-
-SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL)
-
-
diff --git a/sys/i386/i386/cons.h b/sys/i386/i386/cons.h
deleted file mode 100644
index ea84d7e..0000000
--- a/sys/i386/i386/cons.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 1988 University of Utah.
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * the Systems Programming Group of the University of Utah Computer
- * Science Department.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- * must display the following acknowledgement:
- * This product includes software developed by the University of
- * California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)cons.h 7.2 (Berkeley) 5/9/91
- * $Id: cons.h,v 1.19 1999/01/09 14:07:37 bde Exp $
- */
-
-#ifndef _MACHINE_CONS_H_
-#define _MACHINE_CONS_H_
-
-struct consdev;
-typedef void cn_probe_t __P((struct consdev *));
-typedef void cn_init_t __P((struct consdev *));
-typedef void cn_term_t __P((struct consdev *));
-typedef int cn_getc_t __P((dev_t));
-typedef int cn_checkc_t __P((dev_t));
-typedef void cn_putc_t __P((dev_t, int));
-
-struct consdev {
- cn_probe_t *cn_probe;
- /* probe hardware and fill in consdev info */
- cn_init_t *cn_init;
- /* turn on as console */
- cn_term_t *cn_term;
- /* turn off as console */
- cn_getc_t *cn_getc;
- /* kernel getchar interface */
- cn_checkc_t *cn_checkc;
- /* kernel "return char if available" interface */
- cn_putc_t *cn_putc;
- /* kernel putchar interface */
- struct tty *cn_tp; /* tty structure for console device */
- dev_t cn_dev; /* major/minor of device */
- short cn_pri; /* pecking order; the higher the better */
-};
-
-/* values for cn_pri - reflect our policy for console selection */
-#define CN_DEAD 0 /* device doesn't exist */
-#define CN_NORMAL 1 /* device exists but is nothing special */
-#define CN_INTERNAL 2 /* "internal" bit-mapped display */
-#define CN_REMOTE 3 /* serial interface with remote bit set */
-
-#ifdef KERNEL
-extern struct linker_set cons_set;
-extern int cons_unavail;
-
-#define CONS_DRIVER(name, probe, init, term, getc, checkc, putc) \
- static struct consdev name##_consdev = { \
- probe, init, term, getc, checkc, putc \
- }; \
- DATA_SET(cons_set, name##_consdev)
-
-/* Other kernel entry points. */
-int cncheckc __P((void));
-int cngetc __P((void));
-void cninit __P((void));
-void cninit_finish __P((void));
-void cnputc __P((int));
-
-#endif /* KERNEL */
-
-#endif /* !_MACHINE_CONS_H_ */
diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c
index 2998597..0ad6dfb 100644
--- a/sys/i386/i386/db_interface.c
+++ b/sys/i386/i386/db_interface.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_interface.c,v 1.43 1998/12/28 23:02:56 msmith Exp $
+ * $Id: db_interface.c,v 1.44 1999/04/28 01:03:17 luoqi Exp $
*/
/*
@@ -32,8 +32,8 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/reboot.h>
+#include <sys/cons.h>
-#include <machine/cons.h>
#include <machine/cpu.h>
#ifdef SMP
#include <machine/smp.h>
diff --git a/sys/i386/i386/i386-gdbstub.c b/sys/i386/i386/i386-gdbstub.c
index 40530bf..a2323ce 100644
--- a/sys/i386/i386/i386-gdbstub.c
+++ b/sys/i386/i386/i386-gdbstub.c
@@ -95,8 +95,7 @@
#include <sys/param.h>
#include <sys/reboot.h>
#include <sys/systm.h>
-
-#include <machine/cons.h>
+#include <sys/cons.h>
#include <ddb/ddb.h>
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index c0dc2eb..a74c108 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
- * $Id: machdep.c,v 1.356 1999/07/19 23:36:30 peter Exp $
+ * $Id: machdep.c,v 1.357 1999/07/29 01:49:18 msmith Exp $
*/
#include "apm.h"
@@ -97,6 +97,7 @@
#include <sys/user.h>
#include <sys/exec.h>
+#include <sys/cons.h>
#include <ddb/ddb.h>
@@ -106,7 +107,6 @@
#include <machine/reg.h>
#include <machine/clock.h>
#include <machine/specialreg.h>
-#include <machine/cons.h>
#include <machine/bootinfo.h>
#include <machine/ipl.h>
#include <machine/md_var.h>
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index e81efef..969cd08 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.105 1999/06/23 23:02:38 msmith Exp $
+ * $Id: mp_machdep.c,v 1.106 1999/07/20 06:52:26 msmith Exp $
*/
#include "opt_smp.h"
@@ -45,6 +45,7 @@
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
+#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -73,8 +74,6 @@
#include <machine/cputypes.h>
#include <machine/globaldata.h>
-#include <i386/i386/cons.h> /* cngetc() */
-
#if defined(APIC_IO)
#include <machine/md_var.h> /* setidt() */
#include <i386/isa/icu.h> /* IPIs */
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index e81efef..969cd08 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.105 1999/06/23 23:02:38 msmith Exp $
+ * $Id: mp_machdep.c,v 1.106 1999/07/20 06:52:26 msmith Exp $
*/
#include "opt_smp.h"
@@ -45,6 +45,7 @@
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
+#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -73,8 +74,6 @@
#include <machine/cputypes.h>
#include <machine/globaldata.h>
-#include <i386/i386/cons.h> /* cngetc() */
-
#if defined(APIC_IO)
#include <machine/md_var.h> /* setidt() */
#include <i386/isa/icu.h> /* IPIs */
diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c
index 1c8d8f6..188e20b 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.141 1999/07/28 20:22:30 msmith Exp $
+ * $Id: clock.c,v 1.142 1999/07/29 01:20:47 green Exp $
*/
/*
@@ -59,10 +59,10 @@
#include <sys/lock.h>
#endif
#include <sys/sysctl.h>
+#include <sys/cons.h>
#include <machine/clock.h>
#ifdef CLK_CALIBRATION_LOOP
-#include <machine/cons.h>
#endif
#include <machine/cputypes.h>
#include <machine/frame.h>
diff --git a/sys/i386/i386/userconfig.c b/sys/i386/i386/userconfig.c
index 85360f0..ed08d90 100644
--- a/sys/i386/i386/userconfig.c
+++ b/sys/i386/i386/userconfig.c
@@ -46,7 +46,7 @@
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
** THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**
- ** $Id: userconfig.c,v 1.149 1999/07/25 04:32:46 wpaul Exp $
+ ** $Id: userconfig.c,v 1.150 1999/07/25 13:16:06 cracauer Exp $
**/
/**
@@ -116,8 +116,8 @@
#include <sys/linker.h>
#include <sys/sysctl.h>
#include <sys/bus.h>
+#include <sys/cons.h>
-#include <machine/cons.h>
#include <machine/md_var.h>
#include <machine/limits.h>
@@ -2544,7 +2544,7 @@ visuserconfig(void)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: userconfig.c,v 1.149 1999/07/25 04:32:46 wpaul Exp $
+ * $Id: userconfig.c,v 1.150 1999/07/25 13:16:06 cracauer Exp $
*/
#include "scbus.h"
diff --git a/sys/i386/include/cons.h b/sys/i386/include/cons.h
deleted file mode 100644
index faa17d1..0000000
--- a/sys/i386/include/cons.h
+++ /dev/null
@@ -1,8 +0,0 @@
-/*
- * Console support headers should be in <machine/cons.h> since MI software
- * needs to access these functions. In the mean time, just include the
- * header where it sits.
- *
- * $Id$
- */
-#include <i386/i386/cons.h>
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index e81efef..969cd08 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -22,7 +22,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: mp_machdep.c,v 1.105 1999/06/23 23:02:38 msmith Exp $
+ * $Id: mp_machdep.c,v 1.106 1999/07/20 06:52:26 msmith Exp $
*/
#include "opt_smp.h"
@@ -45,6 +45,7 @@
#ifdef BETTER_CLOCK
#include <sys/dkstat.h>
#endif
+#include <sys/cons.h> /* cngetc() */
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -73,8 +74,6 @@
#include <machine/cputypes.h>
#include <machine/globaldata.h>
-#include <i386/i386/cons.h> /* cngetc() */
-
#if defined(APIC_IO)
#include <machine/md_var.h> /* setidt() */
#include <i386/isa/icu.h> /* IPIs */
diff --git a/sys/i386/isa/bs/bshw.c b/sys/i386/isa/bs/bshw.c
index 2cfe064..7c97b32 100644
--- a/sys/i386/isa/bs/bshw.c
+++ b/sys/i386/isa/bs/bshw.c
@@ -43,7 +43,7 @@
#include <i386/isa/bs/bsif.h>
#include <i386/isa/bs/bshw.lst>
#include <machine/clock.h>
-#include <i386/i386/cons.h>
+#include <sys/cons.h>
#endif
static struct bs_softc *gbsc;
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 1c8d8f6..188e20b 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.141 1999/07/28 20:22:30 msmith Exp $
+ * $Id: clock.c,v 1.142 1999/07/29 01:20:47 green Exp $
*/
/*
@@ -59,10 +59,10 @@
#include <sys/lock.h>
#endif
#include <sys/sysctl.h>
+#include <sys/cons.h>
#include <machine/clock.h>
#ifdef CLK_CALIBRATION_LOOP
-#include <machine/cons.h>
#endif
#include <machine/cputypes.h>
#include <machine/frame.h>
diff --git a/sys/i386/isa/pcvt/pcvt_hdr.h b/sys/i386/isa/pcvt/pcvt_hdr.h
index 8603f37..07851aa 100644
--- a/sys/i386/isa/pcvt/pcvt_hdr.h
+++ b/sys/i386/isa/pcvt/pcvt_hdr.h
@@ -141,7 +141,7 @@
#if PCVT_NETBSD > 9
#include "dev/cons.h"
#elif PCVT_FREEBSD >= 200
-#include <machine/cons.h>
+#include <sys/cons.h>
#else
#include "i386/i386/cons.h"
#endif
diff --git a/sys/i386/isa/wd.c b/sys/i386/isa/wd.c
index 6a5100a..07ffd23 100644
--- a/sys/i386/isa/wd.c
+++ b/sys/i386/isa/wd.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)wd.c 7.2 (Berkeley) 5/9/91
- * $Id: wd.c,v 1.198 1999/05/30 16:52:29 phk Exp $
+ * $Id: wd.c,v 1.199 1999/05/31 11:26:36 phk Exp $
*/
/* TODO:
@@ -79,12 +79,12 @@
#include <sys/buf.h>
#include <sys/devicestat.h>
#include <sys/malloc.h>
+#include <sys/cons.h>
#ifdef DEVFS
#include <sys/devfsext.h>
#endif /*DEVFS*/
#include <machine/bootinfo.h>
#include <machine/clock.h>
-#include <machine/cons.h>
#include <machine/md_var.h>
#include <i386/isa/isa.h>
#include <i386/isa/isa_device.h>
OpenPOWER on IntegriCloud