Author: laurent Date: 2009-11-07 21:53:45 +0000 (Sat, 07 Nov 2009) New Revision: 599
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c Log: ppc/qemu: correctly manage property "available" of package "/memory"
Instead of hardcoding values during init, call ofmem_register() with "/memory" phandle.
Signed-off-by: Laurent Vivier Laurent@vivier.eu
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c =================================================================== --- trunk/openbios-devel/arch/ppc/qemu/init.c 2009-11-06 21:59:24 UTC (rev 598) +++ trunk/openbios-devel/arch/ppc/qemu/init.c 2009-11-07 21:53:45 UTC (rev 599) @@ -613,28 +613,12 @@ push_str("reg"); fword("property");
- /* available memory */ - - PUSH(0); - fword("encode-int"); - PUSH((unsigned long)get_ram_bottom()); - fword("encode-int"); - fword("encode+"); - PUSH((unsigned long)get_ram_top()); - fword("encode-int"); - fword("encode+"); - PUSH(ram_size); - fword("encode-int"); - fword("encode+"); - push_str("available"); - fword("property"); - cpu = id_cpu(); cpu->initfn(cpu); printk("CPU type %s\n", cpu->name);
snprintf(buf, sizeof(buf), "/cpus/%s", cpu->name); - ofmem_register(0, find_dev(buf)); + ofmem_register(find_dev("/memory"), find_dev(buf)); node_methods_init(buf);
#ifdef USE_RTAS