WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [PATCH] merge firmware and builtin command lines

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [PATCH] merge firmware and builtin command lines
From: Amos Waterland <apw@xxxxxxxxxx>
Date: Sat, 17 Jun 2006 00:06:46 -0400
Delivery-date: Fri, 16 Jun 2006 21:07:14 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Since prom_init is not executed by Linux when running as a guest in Xen,
we currently have no way to communicate the builtin command line to the
rest of the kernel.  We need to respect CONFIG_CMDLINE for many reasons,
one of which is that it is commonly used to configure a NFS root
filesystem.  This patch appends the builtin command line to the one
supplied by Xen.

Arguably the right answer is to completely ignore the command line
supplied by Xen if the programmer supplied a builtin command line, since
she is presumed to know what she is doing.  However, prom_init does not
behave this way, and Xen seems to think it is important that it
communicate a console=X value to its guest, so this patch just
implements simple merge logic.

Signed-off-by: Amos Waterland <apw@xxxxxxxxxx>

---

 setup.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

diff -r 3fa1002443e8 arch/powerpc/platforms/xen/setup.c
--- a/arch/powerpc/platforms/xen/setup.c        Fri Jun 09 09:45:30 2006 -0400
+++ b/arch/powerpc/platforms/xen/setup.c        Fri Jun 16 23:48:42 2006 -0400
@@ -123,6 +123,19 @@ static void __init xen_init_early(void)
        }
 
        DBG("Hello World I'm Maple Xen-LPAR!\n");
+
+#ifdef CONFIG_CMDLINE
+       {
+           int used, remain;
+
+           used = strlen(cmd_line);
+           remain = sizeof(cmd_line) - used - 1;
+       
+           strncat(cmd_line, CONFIG_CMDLINE, remain);
+
+           DBG("Firmware + builtin command line: %s\n", cmd_line);
+       }
+#endif
 
        /* Setup interrupt mapping options */
        ppc64_interrupt_controller = IC_OPEN_PIC;

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel