Minor fixes and workarounds to make the Xen Dom0 console work. --- sys/dev/xen/console/xencons_ring.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/sys/dev/xen/console/xencons_ring.c b/sys/dev/xen/console/xencons_ring.c index d826363..ea97f7b 100644 --- a/sys/dev/xen/console/xencons_ring.c +++ b/sys/dev/xen/console/xencons_ring.c _at__at_ -48,6 +48,9 _at__at_ xencons_has_input(void) { struct xencons_interface *intf; + if (xen_initial_domain()) + return 1; + intf = xencons_interface(); return (intf->in_cons != intf->in_prod); _at__at_ -97,6 +100,19 _at__at_ xencons_handle_input(void *unused) XENCONS_RING_IDX cons, prod; CN_LOCK(cn_mtx); + + if (xen_initial_domain()) { + /* XXX: read from console */ + static char rbuf[16]; + int l; + + while ((l = HYPERVISOR_console_io(CONSOLEIO_read, 16, rbuf)) > 0) + xencons_rx(rbuf, l); + + CN_UNLOCK(cn_mtx); + return; + } + intf = xencons_interface(); cons = intf->in_cons; -- 1.7.7.5 (Apple Git-26)Received on Tue Dec 24 2013 - 10:22:41 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:45 UTC