[OpenBIOS] [PATCH] ppc: Fix /memory reg property
Andreas Färber
andreas.faerber at web.de
Sat Nov 6 02:46:08 CET 2010
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.
Cc: Alexander Graf <agraf at suse.de>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
arch/ppc/qemu/init.c | 10 ++--------
1 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/arch/ppc/qemu/init.c b/arch/ppc/qemu/init.c
index bfd147a..c5da992 100644
--- a/arch/ppc/qemu/init.c
+++ b/arch/ppc/qemu/init.c
@@ -730,15 +730,9 @@ 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+");
PUSH(0);
+ fword("encode-phys");
+ PUSH(ram_size & 0xffffffff);
fword("encode-int");
fword("encode+");
push_str("reg");
--
1.7.3
More information about the OpenBIOS
mailing list