return fdt_totalsize(fdt);
}
+const char *boot_fdt_cmdline(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, "xen,xen-bootargs", NULL);
+ if ( prop == NULL )
+ {
+ struct bootmodule *dom0_mod = NULL;
+
+ if ( bootinfo.modules.nr_mods >= MOD_KERNEL )
+ dom0_mod = &bootinfo.modules.module[MOD_KERNEL];
+
+ if (fdt_get_property(fdt, node, "xen,dom0-bootargs", NULL) ||
+ ( dom0_mod && dom0_mod->cmdline[0] ) )
+ prop = fdt_get_property(fdt, node, "bootargs", NULL);
+ }
+ if ( prop == NULL )
+ return NULL;
+
+ return prop->data;
+}
+
/*
* Local variables:
* mode: C
+ (fdt_paddr & ((1 << SECOND_SHIFT) - 1));
fdt_size = boot_fdt_info(device_tree_flattened, fdt_paddr);
- cmdline = device_tree_bootargs(device_tree_flattened);
+ cmdline = boot_fdt_cmdline(device_tree_flattened);
printk("Command line: %s\n", cmdline);
cmdline_parse(cmdline);
dt_set_cell(cellp, dt_n_size_cells(np), size);
}
-/**
- * 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, "xen,xen-bootargs", NULL);
- if ( prop == NULL )
- {
- struct bootmodule *dom0_mod = NULL;
-
- if ( bootinfo.modules.nr_mods >= MOD_KERNEL )
- dom0_mod = &bootinfo.modules.module[MOD_KERNEL];
-
- if (fdt_get_property(fdt, node, "xen,dom0-bootargs", NULL) ||
- ( dom0_mod && dom0_mod->cmdline[0] ) )
- prop = fdt_get_property(fdt, node, "bootargs", NULL);
- }
- if ( prop == NULL )
- return NULL;
-
- return prop->data;
-}
-
static void __init *unflatten_dt_alloc(unsigned long *mem, unsigned long size,
unsigned long align)
{
void discard_initial_modules(void);
size_t __init boot_fdt_info(const void *fdt, paddr_t paddr);
+const char __init *boot_fdt_cmdline(const void *fdt);
#endif
/*
extern const void *device_tree_flattened;
-const char __init *device_tree_bootargs(const void *fdt);
-
/**
* dt_unflatten_host_device_tree - Unflatten the host device tree
*