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

[Xen-changelog] [xen-unstable] arm: use bootargs for the command line



# HG changeset patch
# User David Vrabel <david.vrabel@xxxxxxxxxx>
# Date 1333381842 -3600
# Node ID ed36e57043941bdeb733559fec9b0d630beb6557
# Parent  ce659898b2dfc04dc7f54b52d1c5582fa45ea520
arm: use bootargs for the command line

Use the /chosen node's bootargs parameter for the Xen command line.
Parse it early on before the serial console is setup.

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---


diff -r ce659898b2df -r ed36e5704394 xen/arch/arm/setup.c
--- a/xen/arch/arm/setup.c      Mon Apr 02 16:50:42 2012 +0100
+++ b/xen/arch/arm/setup.c      Mon Apr 02 16:50:42 2012 +0100
@@ -152,6 +152,8 @@ void __init start_xen(unsigned long boot
         + (atag_paddr & ((1 << SECOND_SHIFT) - 1));
     fdt_size = device_tree_early_init(fdt);
 
+    cmdline_parse(device_tree_bootargs(fdt));
+
     setup_pagetables(boot_phys_offset);
 
 #ifdef EARLY_UART_ADDRESS
diff -r ce659898b2df -r ed36e5704394 xen/common/device_tree.c
--- a/xen/common/device_tree.c  Mon Apr 02 16:50:42 2012 +0100
+++ b/xen/common/device_tree.c  Mon Apr 02 16:50:42 2012 +0100
@@ -118,6 +118,26 @@ int device_tree_for_each_node(const void
     return 0;
 }
 
+/**
+ * device_tree_bootargs - return the bootargs (the Xen command line)
+ * @fdt flat device tree.
+ */
+const char *device_tree_bootargs(const void *fdt)
+{
+    int node; 
+    const struct fdt_property *prop;
+
+    node = fdt_path_offset(fdt, "/chosen");
+    if ( node < 0 )
+        return NULL;
+
+    prop = fdt_get_property(fdt, node, "bootargs", NULL);
+    if ( prop == NULL )
+        return NULL;
+
+    return prop->data;
+}
+
 static int dump_node(const void *fdt, int node, const char *name, int depth,
                      u32 address_cells, u32 size_cells, void *data)
 {
diff -r ce659898b2df -r ed36e5704394 xen/include/xen/device_tree.h
--- a/xen/include/xen/device_tree.h     Mon Apr 02 16:50:42 2012 +0100
+++ b/xen/include/xen/device_tree.h     Mon Apr 02 16:50:42 2012 +0100
@@ -49,6 +49,7 @@ u32 device_tree_get_u32(const void *fdt,
 bool_t device_tree_node_matches(const void *fdt, int node, const char *match);
 int device_tree_for_each_node(const void *fdt,
                               device_tree_node_func func, void *data);
+const char *device_tree_bootargs(const void *fdt);
 void device_tree_dump(const void *fdt);
 
 #endif

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.