aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlin Tomescu <tomescu.alin@gmail.com>2013-02-20 21:36:09 -0500
committerStefan Hajnoczi <stefanha@redhat.com>2013-02-21 10:34:19 +0100
commit11e5d738a4c68cd20e90477fa8b7ee873bf3e2c0 (patch)
treece0ed4aadfec2a58d9099ff5074af2eebcd6e88c
parent499a6165bef56ce3f5297fa7b1abaab32858a34f (diff)
downloadqemu-arm-11e5d738a4c68cd20e90477fa8b7ee873bf3e2c0.tar.gz
ppc: fix bamboo >256MB RAM initialization in hw/ppc4xx_devs.c
I was trying to launch a PowerPC "bamboo" machine with more than 256MB of RAM with qemu-system-ppc -M bamboo -kernel $kernel -initrd $ramdisk -m 512, but QEMU would just hang. However, when I used -m 256, the machine would boot. I looked through the code in hw/ and it seems there is an error when the RAM memory is setup (if my understanding is correct). After patching it, the machine launched and booted successfully with 512MB of RAM. Signed-off-by: Alin Tomescu <tomescu.alin@gmail.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
-rw-r--r--hw/ppc4xx_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc4xx_devs.c b/hw/ppc4xx_devs.c
index 5e491bc0b4..b6bb0e166a 100644
--- a/hw/ppc4xx_devs.c
+++ b/hw/ppc4xx_devs.c
@@ -700,7 +700,7 @@ ram_addr_t ppc4xx_sdram_adjust(ram_addr_t ram_size, int nr_banks,
vmstate_register_ram_global(&ram_memories[i]);
ram_bases[i] = base;
ram_sizes[i] = bank_size;
- base += ram_size;
+ base += bank_size;
size_left -= bank_size;
break;
}