Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/xen Pull up following revision(s) (requested by ...



details:   https://anonhg.NetBSD.org/src/rev/1fcbf6bd6dbc
branches:  netbsd-8
changeset: 435306:1fcbf6bd6dbc
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 13 17:16:12 2018 +0000

description:
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.

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 c249223e4962 -r 1fcbf6bd6dbc sys/arch/xen/include/xen.h
--- a/sys/arch/xen/include/xen.h        Sat Oct 13 17:14:13 2018 +0000
+++ b/sys/arch/xen/include/xen.h        Sat Oct 13 17:16:12 2018 +0000
@@ -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 @@
 };
 
 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 c249223e4962 -r 1fcbf6bd6dbc sys/arch/xen/x86/autoconf.c
--- a/sys/arch/xen/x86/autoconf.c       Sat Oct 13 17:14:13 2018 +0000
+++ b/sys/arch/xen/x86/autoconf.c       Sat Oct 13 17:16:12 2018 +0000
@@ -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_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 @@
        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 @@
                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