mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
13bb63b754
commit
df8a4a8c5f
3 files changed
+23
No files matched your search
@@ -152,6 +152,8 @@ void __init start_xen(unsigned long boot_phys_offset,
|
||||
+ (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
|
||||
|
||||
@@ -118,6 +118,26 @@ int device_tree_for_each_node(const void *fdt,
|
||||
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)
|
||||
{
|
||||
|
||||
@@ -49,6 +49,7 @@ u32 device_tree_get_u32(const void *fdt, int node, const char *prop_name);
|
||||
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
|
||||