mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@599 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -613,28 +613,12 @@ arch_of_init( void )
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user