Enable keyboard and vga display as console when running as domain-0.
This commit is contained in:
parent
5c7586f0e5
commit
f53151522e
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: GENERIC,v 1.7 2004/04/24 21:33:32 cl Exp $
|
||||
# $NetBSD: GENERIC,v 1.8 2004/04/24 21:45:58 cl Exp $
|
||||
# NetBSD: GENERIC,v 1.596 2004/04/07 13:13:59 augustss Exp
|
||||
#
|
||||
# GENERIC machine description file
|
||||
|
@ -23,7 +23,7 @@ include "arch/xen/conf/std.xen"
|
|||
|
||||
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
|
||||
|
||||
#ident "GENERIC-$Revision: 1.7 $"
|
||||
#ident "GENERIC-$Revision: 1.8 $"
|
||||
|
||||
maxusers 32 # estimated number of users
|
||||
|
||||
|
@ -45,15 +45,9 @@ options I686_CPU
|
|||
# delay between "rebooting ..." message and hardware reset, in milliseconds
|
||||
#options CPURESET_DELAY=2000
|
||||
|
||||
# force Xen console
|
||||
options CONSDEVNAME="\"xencons\""
|
||||
|
||||
# This option allows you to force a serial console at the specified
|
||||
# I/O address. see console(4) for details.
|
||||
#options CONSDEVNAME="\"com\"",CONADDR=0x2f8,CONSPEED=57600
|
||||
# you don't want the option below ON iff you are using the
|
||||
# serial console option of the new boot strap code.
|
||||
#options CONS_OVERRIDE # Always use above! independent of boot info
|
||||
# This option allows you to force the Xen virtual console
|
||||
#options CONSDEVNAME="\"xencons\""
|
||||
#options CONS_OVERRIDE # Always use above! independent of commandline
|
||||
|
||||
# Standard system options
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: XEN,v 1.7 2004/04/24 21:33:32 cl Exp $
|
||||
# $NetBSD: XEN,v 1.8 2004/04/24 21:45:58 cl Exp $
|
||||
|
||||
include "arch/xen/conf/std.xen"
|
||||
|
||||
|
@ -22,7 +22,7 @@ options I686_CPU
|
|||
|
||||
#options MTRR # memory-type range register syscall support
|
||||
|
||||
options CONSDEVNAME="\"xencons\""
|
||||
#options CONSDEVNAME="\"xencons\""
|
||||
#options CONS_OVERRIDE
|
||||
|
||||
options INSECURE # disable kernel security levels - X needs this
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/* $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 */
|
||||
/* $NetBSD: consinit.c,v 1.3 2004/04/24 21:45:58 cl Exp $ */
|
||||
/* NetBSD: consinit.c,v 1.4 2004/03/13 17:31:34 bjh21 Exp */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.2 2004/04/24 18:24:14 cl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.3 2004/04/24 21:45:58 cl Exp $");
|
||||
|
||||
#include "opt_kgdb.h"
|
||||
|
||||
|
@ -73,7 +73,13 @@ __KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.2 2004/04/24 18:24:14 cl Exp $");
|
|||
|
||||
#include "opt_xen.h"
|
||||
#if (XEN > 0)
|
||||
#include "vga_xen.h"
|
||||
#include "xenkbc.h"
|
||||
#include <machine/xen.h>
|
||||
#include <dev/pckbport/pckbportvar.h>
|
||||
#include <machine/xenkbcvar.h>
|
||||
#include <machine/vga_xenvar.h>
|
||||
#include <machine/hypervisor.h>
|
||||
#endif
|
||||
|
||||
#include "com.h"
|
||||
|
@ -154,6 +160,33 @@ consinit()
|
|||
return;
|
||||
initted = 1;
|
||||
|
||||
#if (XEN > 0)
|
||||
#if (NVGA_XEN > 0) && (NXENKBC > 0)
|
||||
#ifndef CONS_OVERRIDE
|
||||
if (xen_start_info.flags & SIF_CONSOLE) {
|
||||
union xen_cmdline_parseinfo xcp;
|
||||
|
||||
xen_parse_cmdline(XEN_PARSE_CONSOLE, &xcp);
|
||||
if (strcmp(xcp.xcp_console, "xencons") == 0) {
|
||||
xenconscn_attach();
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if ((xen_start_info.flags & SIF_CONSOLE) &&
|
||||
strcmp(default_consinfo.devname, "xencons") != 0) {
|
||||
if ((xen_start_info.flags & SIF_PRIVILEGED) == 0)
|
||||
panic("Console access without privileged status");
|
||||
|
||||
vga_xen_cnattach(X86_BUS_SPACE_IO, X86_BUS_SPACE_MEM);
|
||||
xenkbc_cnattach(PCKBPORT_KBD_SLOT);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
xenconscn_attach();
|
||||
return;
|
||||
#endif
|
||||
|
||||
#ifndef CONS_OVERRIDE
|
||||
consinfo = lookup_bootinfo(BTINFO_CONSOLE);
|
||||
if (!consinfo)
|
||||
|
@ -200,13 +233,6 @@ dokbd:
|
|||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#if (XEN > 0)
|
||||
if (!strcmp(consinfo->devname, "xencons")) {
|
||||
xenconscn_attach();
|
||||
printf("NetBSD Xen console attached.\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
panic("invalid console device %s", consinfo->devname);
|
||||
}
|
||||
|
@ -217,9 +243,9 @@ dokbd:
|
|||
* mi keyboard controller driver
|
||||
*/
|
||||
int
|
||||
pckbc_machdep_cnattach(kbctag, kbcslot)
|
||||
pckbc_tag_t kbctag;
|
||||
pckbc_slot_t kbcslot;
|
||||
pckbport_machdep_cnattach(kbctag, kbcslot)
|
||||
pckbport_tag_t kbctag;
|
||||
pckbport_slot_t kbcslot;
|
||||
{
|
||||
#if (NPC > 0) && (NPCCONSKBD > 0)
|
||||
return (pcconskbd_cnattach(kbctag, kbcslot));
|
||||
|
|
Loading…
Reference in New Issue