Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/xen Consistently use xencons for eveything refferin...



details:   https://anonhg.NetBSD.org/src/rev/bdec70487f8f
branches:  trunk
changeset: 565967:bdec70487f8f
user:      cl <cl%NetBSD.org@localhost>
date:      Sat Apr 24 18:24:14 2004 +0000

description:
Consistently use xencons for eveything reffering to Xen's virtual console.

rename arch/xen/xen/console.c -> arch/xen/xen/xencons.c

diffstat:

 sys/arch/xen/conf/GENERIC         |    8 +-
 sys/arch/xen/conf/XEN             |    7 +-
 sys/arch/xen/conf/files.xen       |    8 +-
 sys/arch/xen/conf/majors.xen      |    4 +-
 sys/arch/xen/include/hypervisor.h |    4 +-
 sys/arch/xen/include/xen.h        |    8 +-
 sys/arch/xen/x86/consinit.c       |    8 +-
 sys/arch/xen/xen/console.c        |  345 -------------------------------------
 sys/arch/xen/xen/hypervisor.c     |   16 +-
 sys/arch/xen/xen/xencons.c        |  352 ++++++++++++++++++++++++++++++++++++++
 10 files changed, 383 insertions(+), 377 deletions(-)

diffs (truncated from 939 to 300 lines):

diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/conf/GENERIC
--- a/sys/arch/xen/conf/GENERIC Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/conf/GENERIC Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.3 2004/04/24 17:35:27 cl Exp $
+# $NetBSD: GENERIC,v 1.4 2004/04/24 18:24:14 cl Exp $
 # NetBSD: GENERIC,v 1.596 2004/04/07 13:13:59 augustss Exp 
 #
 # GENERIC machine description file
@@ -23,7 +23,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident                 "GENERIC-$Revision: 1.3 $"
+#ident                 "GENERIC-$Revision: 1.4 $"
 
 maxusers       32              # estimated number of users
 
@@ -46,7 +46,7 @@
 #options       CPURESET_DELAY=2000
 
 # force Xen console
-options                CONSDEVNAME="\"xen\""
+options                CONSDEVNAME="\"xencons\""
 
 # This option allows you to force a serial console at the specified
 # I/O address.   see console(4) for details.
@@ -202,7 +202,7 @@
 
 npx0           at hypervisor?          # x86 math coprocessor
 
-xenc*          at hypervisor?          # Xen virtual console
+xencons*       at hypervisor?          # Xen virtual console
 xennet*        at hypervisor?          # Xen virtual network interface
 
 xbd*           at hypervisor?          # Xen virtual block device
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/conf/XEN
--- a/sys/arch/xen/conf/XEN     Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/conf/XEN     Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN,v 1.3 2004/04/24 17:35:27 cl Exp $
+# $NetBSD: XEN,v 1.4 2004/04/24 18:24:14 cl Exp $
 
 include        "arch/xen/conf/std.xen"
 
@@ -22,8 +22,7 @@
 
 #options       MTRR            # memory-type range register syscall support
 
-options                CONSDEVNAME="\"xen\""
-#options       CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600
+options        CONSDEVNAME="\"xencons\""
 #options       CONS_OVERRIDE
 
 options                INSECURE        # disable kernel security levels - X needs this
@@ -120,7 +119,7 @@
 
 npx0           at hypervisor?          # x86 math coprocessor
 
-xenc*          at hypervisor?          # Xen virtual console
+xencons*       at hypervisor?          # Xen virtual console
 xennet*        at hypervisor?          # Xen virtual network interface
 
 xbd*           at hypervisor?          # Xen virtual block device
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/conf/files.xen
--- a/sys/arch/xen/conf/files.xen       Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/conf/files.xen       Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: files.xen,v 1.5 2004/04/24 17:35:27 cl Exp $
+#      $NetBSD: files.xen,v 1.6 2004/04/24 18:24:14 cl Exp $
 #      NetBSD: files.x86,v 1.10 2003/10/08 17:30:00 bouyer Exp 
 #      NetBSD: files.i386,v 1.254 2004/03/25 23:32:10 jmc Exp 
 
@@ -116,9 +116,9 @@
 file   arch/xen/i386/npx_hv.c          npx_hv
 
 # Xen console support
-device xenc: tty
-attach xenc at hypervisor
-file   arch/xen/xen/console.c          xenc needs-flag
+device xencons: tty
+attach xencons at hypervisor
+file   arch/xen/xen/xencons.c          xencons needs-flag
 
 #include       "dev/wscons/files.wscons"
 #include       "dev/wsfont/files.wsfont"
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/conf/majors.xen
--- a/sys/arch/xen/conf/majors.xen      Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/conf/majors.xen      Sat Apr 24 18:24:14 2004 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: majors.xen,v 1.2 2004/04/17 12:56:27 cl Exp $
+#      $NetBSD: majors.xen,v 1.3 2004/04/24 18:24:14 cl Exp $
 #
 # Device majors for Xen
 #
 
 device-major   xbd             char 142 block 142      xbd
-device-major   xenc            char 143                xenc
+device-major   xencons         char 143                xencons
 
 # Majors up to 143 are reserved for machine-dependant drivers.
 # New machine-independant driver majors are assigned in 
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/include/hypervisor.h
--- a/sys/arch/xen/include/hypervisor.h Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/include/hypervisor.h Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hypervisor.h,v 1.4 2004/04/24 17:35:27 cl Exp $        */
+/*     $NetBSD: hypervisor.h,v 1.5 2004/04/24 18:24:14 cl Exp $        */
 
 /*
  * 
@@ -34,7 +34,7 @@
        const char              *haa_busname;
 };
 
-struct xenc_attach_args {
+struct xencons_attach_args {
        const char              *xa_device;
 };
 
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h        Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/include/xen.h        Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen.h,v 1.2 2004/04/17 12:46:42 cl Exp $       */
+/*     $NetBSD: xen.h,v 1.3 2004/04/24 18:24:14 cl Exp $       */
 
 /*
  *
@@ -30,6 +30,8 @@
 
 #ifndef _LOCORE
 
+void   xenconscn_attach(void);
+
 typedef uint16_t u16;
 typedef uint32_t u32;
 typedef uint64_t u64;
@@ -38,8 +40,6 @@
 void printk(const char *, ...);
 #endif
 
-void xencn_attach(void);
-
 #endif
 
 #define hypervisor_asm_ack(num) \
@@ -47,7 +47,7 @@
        lock                                            ;\
        btsl    $num,EVENTS_MASK(%eax)
 
-#endif
+#endif /* _XEN_H */
 
 /******************************************************************************
  * os.h
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/x86/consinit.c
--- a/sys/arch/xen/x86/consinit.c       Sat Apr 24 17:45:38 2004 +0000
+++ b/sys/arch/xen/x86/consinit.c       Sat Apr 24 18:24:14 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.1 2004/03/11 21:44:08 cl Exp $  */
+/*     $NetBSD: consinit.c,v 1.2 2004/04/24 18:24:14 cl Exp $  */
 /*     NetBSD: consinit.c,v 1.3 2003/06/14 17:01:15 thorpej Exp        */
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.1 2004/03/11 21:44:08 cl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.2 2004/04/24 18:24:14 cl Exp $");
 
 #include "opt_kgdb.h"
 
@@ -202,8 +202,8 @@
        }
 #endif
 #if (XEN > 0)
-       if (!strcmp(consinfo->devname, "xen")) {
-               xencn_attach();
+       if (!strcmp(consinfo->devname, "xencons")) {
+               xenconscn_attach();
                printf("NetBSD Xen console attached.\n");
                return;
        }
diff -r 2319d59a2a12 -r bdec70487f8f sys/arch/xen/xen/console.c
--- a/sys/arch/xen/xen/console.c        Sat Apr 24 17:45:38 2004 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,345 +0,0 @@
-/*     $NetBSD: console.c,v 1.2 2004/04/24 17:35:28 cl Exp $   */
-
-/*
- *
- * Copyright (c) 2004 Christian Limpach.
- * All rights reserved.
- *
- * 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 Christian Limpach.
- * 4. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
- */
-
-
-#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.2 2004/04/24 17:35:28 cl Exp $");
-
-#include <sys/param.h>
-#include <sys/ioctl.h>
-#include <sys/proc.h>
-#include <sys/tty.h>
-#include <sys/systm.h>
-#include <sys/device.h>
-#include <sys/conf.h>
-
-#include <machine/stdarg.h>
-#include <machine/xen.h>
-#include <machine/hypervisor.h>
-
-#include <dev/cons.h>
-
-#include <ddb/db_output.h>     /* XXX for db_max_line */
-
-static int xenc_isconsole = 0;
-
-#define        XENC_UNIT(x)    (minor(x))
-#define XENC_BURST 128
-
-int xenc_match (struct device *, struct cfdata *, void *);
-void xenc_attach (struct device *, struct device *, void *);
-/* int xenc_intr (void *); */
-void xenc_init (void);
-
-struct xenc_softc {
-       struct  device sc_dev;
-       struct  tty *sc_tty;
-};
-
-CFATTACH_DECL(xenc, sizeof(struct xenc_softc),
-    xenc_match, xenc_attach, NULL, NULL);
-
-extern struct cfdriver xenc_cd;
-
-dev_type_open(xenc_open);
-dev_type_close(xenc_close);
-dev_type_read(xenc_read);
-dev_type_write(xenc_write);
-dev_type_ioctl(xenc_ioctl);
-dev_type_stop(xenc_stop);
-dev_type_tty(xenc_tty);
-dev_type_poll(xenc_poll);
-
-const struct cdevsw xenc_cdevsw = {
-       xenc_open, xenc_close, xenc_read, xenc_write, xenc_ioctl,
-       xenc_stop, xenc_tty, xenc_poll, NULL, ttykqfilter, D_TTY
-};
-
-
-void xencn_attach(void);
-int xencn_getc(dev_t);
-void xencn_putc(dev_t, int);
-void xencn_pollc(dev_t, int);
-
-static struct consdev xencons = {
-       NULL, NULL, xencn_getc, xencn_putc, xencn_pollc, NULL, NULL, NULL,
-       NODEV, CN_NORMAL
-};
-
-void   xenc_start (struct tty *);
-int    xenc_param (struct tty *, struct termios *);
-
-int
-xenc_match(struct device *parent, struct cfdata *match, void *aux)
-{
-       struct xenc_attach_args *xa = (struct xenc_attach_args *)aux;
-
-       if (strcmp(xa->xa_device, "xenc") == 0)
-               return 1;
-       return 0;
-}
-



Home | Main Index | Thread Index | Old Index