Module Name:    src
Committed By:   mrg
Date:           Sat Jul 22 19:13:17 UTC 2023

Modified Files:
        src/sys/arch/xen/x86: consinit.c pvh_consinit.c
Added Files:
        src/sys/arch/xen/x86: xen_def_cons.h

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/x86/consinit.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/xen/x86/pvh_consinit.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/xen/x86/xen_def_cons.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/xen/x86/consinit.c
diff -u src/sys/arch/xen/x86/consinit.c:1.16 src/sys/arch/xen/x86/consinit.c:1.17
--- src/sys/arch/xen/x86/consinit.c:1.16	Sat Oct 13 17:58:55 2012
+++ src/sys/arch/xen/x86/consinit.c	Sat Jul 22 19:13:17 2023
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: consinit.c,v
 #include <xen/xen.h>
 #include <dev/pckbport/pckbportvar.h>
 #include <xen/hypervisor.h>
+#include "xen_def_cons.h"
 #endif
 
 #include "com.h"

Index: src/sys/arch/xen/x86/pvh_consinit.c
diff -u src/sys/arch/xen/x86/pvh_consinit.c:1.3 src/sys/arch/xen/x86/pvh_consinit.c:1.4
--- src/sys/arch/xen/x86/pvh_consinit.c:1.3	Fri Mar 24 12:28:42 2023
+++ src/sys/arch/xen/x86/pvh_consinit.c	Sat Jul 22 19:13:17 2023
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: pvh_consinit
 #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);

Added files:

Index: src/sys/arch/xen/x86/xen_def_cons.h
diff -u /dev/null src/sys/arch/xen/x86/xen_def_cons.h:1.1
--- /dev/null	Sat Jul 22 19:13:17 2023
+++ src/sys/arch/xen/x86/xen_def_cons.h	Sat Jul 22 19:13:17 2023
@@ -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;

Reply via email to