diff options
author | Andreas Färber <andreas.faerber@web.de> | 2010-11-07 16:51:47 +0000 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2010-11-07 16:51:47 +0000 |
commit | 652ebc448fa7bad10ee0153a6c48bfdfda7001f4 (patch) | |
tree | 2d2b8a3e470f0ae83a1a7d386c459320c3c2be85 | |
parent | 21e461a4e783bf2cf38f534dbe26286feea36500 (diff) | |
download | openbios-652ebc448fa7bad10ee0153a6c48bfdfda7001f4.zip openbios-652ebc448fa7bad10ee0153a6c48bfdfda7001f4.tar.gz openbios-652ebc448fa7bad10ee0153a6c48bfdfda7001f4.tar.bz2 |
ppc: Fix /memory reg property
Physical address and size were both using two cells instead of one,
and their order was wrong. This would happen to work for RAM < 4 GB,
since the clear high address bits would happen to match the zero-based
memory location. It would indicate a second bank of size zero though.
Switch the value order and use encode-phys in preparation for ppc64.
This tidies the output of the Haiku boot loader.
v2:
* Document TODOs for ppc64, requested by Alex.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@947 f158a5a8-5612-0410-a976-696ce0be7e32
-rw-r--r-- | arch/ppc/qemu/init.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c index bfd147a..ba215bc 100644 --- a/arch/ppc/qemu/init.c +++ b/arch/ppc/qemu/init.c @@ -730,15 +730,12 @@ arch_of_init( void ) /* all memory */ - PUSH(ram_size >> 32); - fword("encode-int"); - PUSH(ram_size & 0xffffffff); - fword("encode-int"); - fword("encode+"); - PUSH(0); - fword("encode-int"); - fword("encode+"); + /* TODO Adjust this when #address-cells gets increased for ppc64. */ PUSH(0); + fword("encode-phys"); + /* This needs adjusting if #size-cells gets increased. + Alternatively use multiple (address, size) tuples. */ + PUSH(ram_size & 0xffffffff); fword("encode-int"); fword("encode+"); push_str("reg"); |