j: Next unread message
k: Previous unread message
j a: Jump to all threads
j l: Jump to MailingList overview
Author: afaerber Date: Sun Nov 7 17:51:47 2010 New Revision: 947 URL: http://tracker.coreboot.org/trac/openbios/changeset/947
Log: 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.
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/init.c Sat Nov 6 02:17:02 2010 (r946) +++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun Nov 7 17:51:47 2010 (r947) @@ -730,15 +730,12 @@
/* 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");