Module Name: src
Committed By: martin
Date: Sat Oct 13 17:16:12 UTC 2018
Modified Files:
src/sys/arch/xen/include [netbsd-8]: xen.h
src/sys/arch/xen/x86 [netbsd-8]: autoconf.c
Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1057):
sys/arch/xen/x86/autoconf.c: revision 1.20
sys/arch/xen/include/xen.h: revision 1.40
Support bootspec.
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.10.1 src/sys/arch/xen/include/xen.h
cvs rdiff -u -r1.18 -r1.18.2.1 src/sys/arch/xen/x86/autoconf.c
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/include/xen.h
diff -u src/sys/arch/xen/include/xen.h:1.37 src/sys/arch/xen/include/xen.h:1.37.10.1
--- src/sys/arch/xen/include/xen.h:1.37 Thu Jul 7 06:55:40 2016
+++ src/sys/arch/xen/include/xen.h Sat Oct 13 17:16:12 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: xen.h,v 1.37 2016/07/07 06:55:40 msaitoh Exp $ */
+/* $NetBSD: xen.h,v 1.37.10.1 2018/10/13 17:16:12 martin Exp $ */
/*
*
@@ -44,7 +44,7 @@ struct xen_netinfo {
};
union xen_cmdline_parseinfo {
- char xcp_bootdev[16]; /* sizeof(dv_xname) */
+ char xcp_bootdev[144];
struct xen_netinfo xcp_netinfo;
char xcp_console[16];
char xcp_pcidevs[64];
Index: src/sys/arch/xen/x86/autoconf.c
diff -u src/sys/arch/xen/x86/autoconf.c:1.18 src/sys/arch/xen/x86/autoconf.c:1.18.2.1
--- src/sys/arch/xen/x86/autoconf.c:1.18 Tue May 23 08:48:35 2017
+++ src/sys/arch/xen/x86/autoconf.c Sat Oct 13 17:16:12 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.18 2017/05/23 08:48:35 nonaka Exp $ */
+/* $NetBSD: autoconf.c,v 1.18.2.1 2018/10/13 17:16:12 martin Exp $ */
/* NetBSD: autoconf.c,v 1.75 2003/12/30 12:33:22 pk Exp */
/*-
@@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18 2017/05/23 08:48:35 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.18.2.1 2018/10/13 17:16:12 martin Exp $");
#include "opt_xen.h"
#include "opt_compat_oldboot.h"
@@ -154,7 +154,8 @@ cpu_rootconf(void)
cpu_bootconf();
printf("boot device: %s\n",
- booted_device ? device_xname(booted_device) : "<unknown>");
+ booted_device ? device_xname(booted_device) :
+ bootspec ? bootspec : "<unknown>");
rootconf();
}
@@ -168,6 +169,7 @@ cpu_bootconf(void)
device_t dv;
deviter_t di;
union xen_cmdline_parseinfo xcp;
+ static char bootspecbuf[sizeof(xcp.xcp_bootdev)];
if (booted_device)
return;
@@ -204,6 +206,18 @@ cpu_bootconf(void)
break;
}
deviter_release(&di);
+
+ if (booted_device)
+ return;
+
+ /*
+ * not a boot device name, pass through to MI code
+ */
+ if (xcp.xcp_bootdev[0] != '\0') {
+ strlcpy(bootspecbuf, xcp.xcp_bootdev, sizeof(bootspecbuf));
+ bootspec = bootspecbuf;
+ return;
+ }
}
#include "pci.h"