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 xen: declare 'default_consinfo' as extern i...



details:   https://anonhg.NetBSD.org/src/rev/ff76df0f944e
branches:  trunk
changeset: 378146:ff76df0f944e
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sat Jul 22 19:13:17 2023 +0000

description:
xen: declare 'default_consinfo' as extern in a header

this makes pvh_consinit.c actually compile with CONS_OVERRIDE set.
i didn't see any good header to add to (bootinfo.h and cpu.h both
seem to be poor choices but were considered), hence the new one
with just this definition.

diffstat:

 sys/arch/xen/x86/consinit.c     |   5 +++--
 sys/arch/xen/x86/pvh_consinit.c |   6 ++++--
 sys/arch/xen/x86/xen_def_cons.h |  10 ++++++++++
 3 files changed, 17 insertions(+), 4 deletions(-)

diffs (67 lines):

diff -r 35d42f21c409 -r ff76df0f944e sys/arch/xen/x86/consinit.c
--- a/sys/arch/xen/x86/consinit.c       Sat Jul 22 18:50:31 2023 +0000
+++ b/sys/arch/xen/x86/consinit.c       Sat Jul 22 19:13:17 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consinit.c,v 1.16 2012/10/13 17:58:55 jdc Exp $        */
+/*     $NetBSD: consinit.c,v 1.17 2023/07/22 19:13:17 mrg 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.16 2012/10/13 17:58:55 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.17 2023/07/22 19:13:17 mrg Exp $");
 
 #include "opt_kgdb.h"
 
@@ -75,6 +75,7 @@
 #include <xen/xen.h>
 #include <dev/pckbport/pckbportvar.h>
 #include <xen/hypervisor.h>
+#include "xen_def_cons.h"
 #endif
 
 #include "com.h"
diff -r 35d42f21c409 -r ff76df0f944e sys/arch/xen/x86/pvh_consinit.c
--- a/sys/arch/xen/x86/pvh_consinit.c   Sat Jul 22 18:50:31 2023 +0000
+++ b/sys/arch/xen/x86/pvh_consinit.c   Sat Jul 22 19:13:17 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pvh_consinit.c,v 1.3 2023/03/24 12:28:42 bouyer Exp $ */
+/* $NetBSD: pvh_consinit.c,v 1.4 2023/07/22 19:13:17 mrg Exp $ */
 
 /*
  * Copyright (c) 2020 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pvh_consinit.c,v 1.3 2023/03/24 12:28:42 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pvh_consinit.c,v 1.4 2023/07/22 19:13:17 mrg Exp $");
 
 #include "xencons.h"
 #include <sys/param.h>
@@ -41,6 +41,8 @@
 #include <xen/include/public/hvm/hvm_op.h>
 #include <xen/include/public/hvm/params.h>
 
+#include "xen_def_cons.h"
+
 static int pvh_xenconscn_getc(dev_t);
 static void pvh_xenconscn_putc(dev_t, int);
 static void pvh_xenconscn_pollc(dev_t, int);
diff -r 35d42f21c409 -r ff76df0f944e sys/arch/xen/x86/xen_def_cons.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/arch/xen/x86/xen_def_cons.h   Sat Jul 22 19:13:17 2023 +0000
@@ -0,0 +1,10 @@
+/*     $NetBSD: xen_def_cons.h,v 1.1 2023/07/22 19:13:17 mrg Exp $     */
+
+/*
+ * Written by Matthew R. Green, July 20, 2023
+ * Public domain.
+ */
+
+#include <machine/bootinfo.h>
+
+extern const struct btinfo_console default_consinfo;



Home | Main Index | Thread Index | Old Index