aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/sam460ex.c
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2019-01-03 17:27:24 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-04 18:44:17 +1100
commit6a9938a3797a6008ee54bf4ec9b41973c1efc3b9 (patch)
tree2a1752cd2d9a782bbad047f8e98334ef13d68f44 /hw/ppc/sam460ex.c
parent70812bf70973f02366421c1549fab4036853aea3 (diff)
sam460ex: Fix support for memory larger than 1GB
Fix the encoding of larger memory modules in the SoC registers which allows specifying more than 1GB memory for sam460ex. Well, only 2GB due to SoC and firmware restrictions which was the only missing value compared to what the real hardware supports. The SoC should support up to 4GB but when setting that the firmware hangs during memory test. This may be an overflow bug in the firmware which I did not try to debug but this may affect real hardware as well. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc/sam460ex.c')
-rw-r--r--hw/ppc/sam460ex.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
index 7a8c745021..202ed14bcf 100644
--- a/hw/ppc/sam460ex.c
+++ b/hw/ppc/sam460ex.c
@@ -76,9 +76,11 @@
#define UART_FREQ 11059200
#define SDRAM_NR_BANKS 4
-/* FIXME: See u-boot.git 8ac41e, also fix in ppc440_uc.c */
+/* The SoC could also handle 4 GiB but firmware does not work with that. */
+/* Maybe it overflows a signed 32 bit number somewhere? */
static const ram_addr_t ppc460ex_sdram_bank_sizes[] = {
- 1 * GiB, 512 * MiB, 256 * MiB, 128 * MiB, 64 * MiB, 32 * MiB, 0
+ 2 * GiB, 1 * GiB, 512 * MiB, 256 * MiB, 128 * MiB, 64 * MiB,
+ 32 * MiB, 0
};
struct boot_info {