Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/x86 Hanble dom0 console. This one doesn't need ...



details:   https://anonhg.NetBSD.org/src/rev/6de532b6200b
branches:  trunk
changeset: 932265:6de532b6200b
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sun May 03 17:23:14 2020 +0000

description:
Hanble dom0 console. This one doesn't need a ring to be mapped, and
can be used earlier.

diffstat:

 sys/arch/xen/x86/pvh_consinit.c |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r e71d76816c27 -r 6de532b6200b sys/arch/xen/x86/pvh_consinit.c
--- a/sys/arch/xen/x86/pvh_consinit.c   Sun May 03 17:22:03 2020 +0000
+++ b/sys/arch/xen/x86/pvh_consinit.c   Sun May 03 17:23:14 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pvh_consinit.c,v 1.1 2020/05/02 16:44:36 bouyer Exp $ */
+/* $NetBSD: pvh_consinit.c,v 1.2 2020/05/03 17:23:14 bouyer Exp $ */
 
 /*
  * Copyright (c) 2020 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pvh_consinit.c,v 1.1 2020/05/02 16:44:36 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pvh_consinit.c,v 1.2 2020/05/03 17:23:14 bouyer Exp $");
 
 #include "xencons.h"
 #include <sys/param.h>
@@ -59,7 +59,7 @@
         * boot stage.
         */
        static int initted = 0;
-       if (initted == 0) {
+       if (initted == 0 && !xendomain_is_dom0()) {
                /* pmap not up yet, fall back to printk() */
                cn_tab = &pvh_xencons;
                initted++;
@@ -68,6 +68,12 @@
                return;
        }
        initted++;
+       if (xendomain_is_dom0()) {
+               xenconscn_attach(); /* no ring in this case */
+               initted++; /* don't init console twice */
+               return;
+       }
+               
 #if NXENCONS > 0
        /* we can now map the xencons rings. */
        struct xen_hvm_param xen_hvm_param;



Home | Main Index | Thread Index | Old Index