Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/xen Support bootspec.
details: https://anonhg.NetBSD.org/src/rev/23f6bc58b740
branches: trunk
changeset: 993892:23f6bc58b740
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sun Oct 07 11:25:55 2018 +0000
description:
Support bootspec.
diffstat:
sys/arch/xen/include/xen.h | 4 ++--
sys/arch/xen/x86/autoconf.c | 20 +++++++++++++++++---
2 files changed, 19 insertions(+), 5 deletions(-)
diffs (73 lines):
diff -r 771f48d1f258 -r 23f6bc58b740 sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h Sun Oct 07 11:24:16 2018 +0000
+++ b/sys/arch/xen/include/xen.h Sun Oct 07 11:25:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: xen.h,v 1.39 2018/07/26 15:38:26 maxv Exp $ */
+/* $NetBSD: xen.h,v 1.40 2018/10/07 11:25:55 mlelstv Exp $ */
/*
*
@@ -44,7 +44,7 @@
};
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];
diff -r 771f48d1f258 -r 23f6bc58b740 sys/arch/xen/x86/autoconf.c
--- a/sys/arch/xen/x86/autoconf.c Sun Oct 07 11:24:16 2018 +0000
+++ b/sys/arch/xen/x86/autoconf.c Sun Oct 07 11:25:55 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.19 2017/07/29 06:29:32 maxv Exp $ */
+/* $NetBSD: autoconf.c,v 1.20 2018/10/07 11:25:55 mlelstv 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.19 2017/07/29 06:29:32 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.20 2018/10/07 11:25:55 mlelstv Exp $");
#include "opt_xen.h"
#include "opt_multiprocessor.h"
@@ -150,7 +150,8 @@
cpu_bootconf();
printf("boot device: %s\n",
- booted_device ? device_xname(booted_device) : "<unknown>");
+ booted_device ? device_xname(booted_device) :
+ bootspec ? bootspec : "<unknown>");
rootconf();
}
@@ -164,6 +165,7 @@
device_t dv;
deviter_t di;
union xen_cmdline_parseinfo xcp;
+ static char bootspecbuf[sizeof(xcp.xcp_bootdev)];
if (booted_device)
return;
@@ -200,6 +202,18 @@
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"
Home |
Main Index |
Thread Index |
Old Index