Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > --- /dev/null > +++ b/hw/ppc/pnv.c > @@ -0,0 +1,600 @@ <snip> > +static void *powernv_create_fdt(PnvSystem *sys, uint32_t initrd_base, > uint32_t initrd_size) > +{ <snip> > + _FDT((fdt_begin_node(fdt, "chosen"))); > + _FDT((fdt_property(fdt, "linux,initrd-start", > + &start_prop, sizeof(start_prop)))); > + _FDT((fdt_property(fdt, "linux,initrd-end", > + &end_prop, sizeof(end_prop)))); > + _FDT((fdt_end_node(fdt)));
(this time replying to list as well) This misses out kernel command line, which means -append doesn't work. This patch fixes that: diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 1787dd19c67a..82d6321228f6 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -379,7 +379,7 @@ static void powernv_create_cpu_node(void *fdt, CPUState *cs, int smt_threads) _FDT((fdt_end_node(fdt))); } -static void *powernv_create_fdt(PnvSystem *sys, uint32_t initrd_base, uint32_t initrd_size) +static void *powernv_create_fdt(PnvSystem *sys, const char *kernel_cmdline, uint32_t initrd_base, uint32_t initrd_size) { void *fdt; CPUState *cs; @@ -423,6 +423,9 @@ static void *powernv_create_fdt(PnvSystem *sys, uint32_t initrd_base, uint32_t i g_free(buf); _FDT((fdt_begin_node(fdt, "chosen"))); + if (kernel_cmdline) { + _FDT((fdt_property_string(fdt, "bootargs", kernel_cmdline))); + } _FDT((fdt_property(fdt, "linux,initrd-start", &start_prop, sizeof(start_prop)))); _FDT((fdt_property(fdt, "linux,initrd-end", @@ -781,7 +784,8 @@ static void ppc_powernv_init(MachineState *machine) initrd_base = 0; initrd_size = 0; } - fdt = powernv_create_fdt(sys, initrd_base, initrd_size); + fdt = powernv_create_fdt(sys, machine->kernel_cmdline, + initrd_base, initrd_size); cpu_physical_memory_write(FDT_ADDR, fdt, fdt_totalsize(fdt)); }