Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/arch/xen/x86 Pull up revision 1.5 (requested by bouye...



details:   https://anonhg.NetBSD.org/src/rev/bddef54b733a
branches:  netbsd-3
changeset: 576332:bddef54b733a
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 28 10:29:17 2005 +0000

description:
Pull up revision 1.5 (requested by bouyer in ticket #482):
Allow compiling a domain0 kernel with vga but without pckbc, and add
console support for USB keyboard. Problem pointed out by Karl Janmar on
port-xen.

diffstat:

 sys/arch/xen/x86/consinit.c |  22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diffs (53 lines):

diff -r b289e905ea2a -r bddef54b733a sys/arch/xen/x86/consinit.c
--- a/sys/arch/xen/x86/consinit.c       Tue Jun 28 10:27:51 2005 +0000
+++ b/sys/arch/xen/x86/consinit.c       Tue Jun 28 10:29:17 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.4 2005/03/09 22:39:21 bouyer Exp $      */
+/*     $NetBSD: consinit.c,v 1.4.2.1 2005/06/28 10:29:17 tron Exp $    */
 /*     NetBSD: consinit.c,v 1.4 2004/03/13 17:31:34 bjh21 Exp  */
 
 /*
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4 2005/03/09 22:39:21 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.4.2.1 2005/06/28 10:29:17 tron Exp $");
 
 #include "opt_kgdb.h"
 
@@ -65,6 +65,11 @@
 #endif
 #include "pckbd.h" /* for pckbc_machdep_cnattach */
 
+#include "ukbd.h"
+#if (NUKBD > 0)
+#include <dev/usb/ukbdvar.h>
+#endif
+
 #ifndef __x86_64__
 #include "pc.h"
 #endif
@@ -168,10 +173,21 @@
                if (strcmp(xcp.xcp_console, "tty0") == 0 || /* linux name */
                    strcmp(xcp.xcp_console, "pc") == 0) { /* NetBSD name */
 #endif /* CONS_OVERRIDE */
+                       int error;
                        vga_cnattach(X86_BUS_SPACE_IO, X86_BUS_SPACE_MEM,
                            -1, 1);
-                       pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP,
+                       error = ENODEV;
+#if (NPCKBC > 0)
+                       error = pckbc_cnattach(X86_BUS_SPACE_IO, IO_KBD, KBCMDP,
                            PCKBC_KBD_SLOT);
+#endif
+#if (NUKBD > 0)
+                       if (error)
+                               error = ukbd_cnattach();
+#endif
+                       if (error)
+                               printf("WARNING: no console keyboard, "
+                                   "error=%d\n", error);
                        return;
                }
        }



Home | Main Index | Thread Index | Old Index