Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/arch/xen/i386 Pull up revision 1.10 (requested by bou...



details:   https://anonhg.NetBSD.org/src/rev/286663abb198
branches:  netbsd-3
changeset: 576329:286663abb198
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 28 10:27:39 2005 +0000

description:
Pull up revision 1.10 (requested by bouyer in ticket #481):
Add support for x86 boot flags:
-s boot single user
-a ask root device
XXX -d is ifdef'd out for now, it cause early panic (no console message).

diffstat:

 sys/arch/xen/i386/xen_machdep.c |  27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)

diffs (61 lines):

diff -r b60ab64f5b37 -r 286663abb198 sys/arch/xen/i386/xen_machdep.c
--- a/sys/arch/xen/i386/xen_machdep.c   Tue Jun 28 10:25:25 2005 +0000
+++ b/sys/arch/xen/i386/xen_machdep.c   Tue Jun 28 10:27:39 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xen_machdep.c,v 1.6.2.3 2005/06/18 10:47:44 tron Exp $ */
+/*     $NetBSD: xen_machdep.c,v 1.6.2.4 2005/06/28 10:27:39 tron Exp $ */
 
 /*
  *
@@ -33,13 +33,14 @@
 
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.6.2.3 2005/06/18 10:47:44 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xen_machdep.c,v 1.6.2.4 2005/06/28 10:27:39 tron Exp $");
 
 #include "opt_xen.h"
 
 #include <sys/param.h>
 #include <sys/systm.h>
 #include <sys/mount.h>
+#include <sys/reboot.h>
 
 #include <uvm/uvm.h>
 
@@ -126,7 +127,6 @@
        int b, i, ipidx = 0;
        uint32_t xi_ip[5];
 
-
        cmd_line = strncpy(_cmd_line, xen_start_info.cmd_line, 128);
        cmd_line[127] = '\0';
 
@@ -216,6 +216,27 @@
                                    sizeof(xcp->xcp_console));
                        break;
 
+               case XEN_PARSE_BOOTFLAGS:
+                       if (*opt == '-') {
+                               opt++;
+                               while(*opt != '\0') {
+                                       switch(*opt) {
+                                       case 'a':
+                                               boothowto |= RB_ASKNAME;
+                                               break;
+#ifdef notyet /* XXX cause early panic, before console is setup */
+                                       case 'd':
+                                               boothowto |= RB_KDB;
+                                               break;
+#endif
+                                       case 's':
+                                               boothowto |= RB_SINGLE;
+                                               break;
+                                       }
+                                       opt++;
+                               }
+                       }
+                       break;
                }
 
                if (cmd_line)



Home | Main Index | Thread Index | Old Index