diff options
author | Igor Mammedov | 2020-02-19 17:09:39 +0100 |
---|---|---|
committer | Patchew Importer | 2020-02-19 17:50:00 +0100 |
commit | a0258e4afa10a8e9dba4901b7a8202dac24c72e2 (patch) | |
tree | a46aa725643ed83e639f148a0e3fc3eeaa22029c /hw/ppc/sam460ex.c | |
parent | ppc/ppc405_boards: use memdev for RAM (diff) | |
download | qemu-a0258e4afa10a8e9dba4901b7a8202dac24c72e2.tar.gz qemu-a0258e4afa10a8e9dba4901b7a8202dac24c72e2.tar.xz qemu-a0258e4afa10a8e9dba4901b7a8202dac24c72e2.zip |
ppc/{ppc440_bamboo, sam460ex}: drop RAM size fixup
If user provided non-sense RAM size, board will complain and
continue running with max RAM size supported or sometimes
crash like this:
%QEMU -M bamboo -m 1
exec.c:1926: find_ram_offset: Assertion `size != 0' failed.
Aborted (core dumped)
Also RAM is going to be allocated by generic code, so it won't be
possible for board to fix things up for user.
Make it error message and exit to force user fix CLI,
instead of accepting non-sense CLI values.
That also fixes crash issue, since wrongly calculated size
isn't used to allocate RAM
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: BALATON Zoltan <balaton@eik.bme.hu>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20200219160953.13771-66-imammedo@redhat.com>
Diffstat (limited to 'hw/ppc/sam460ex.c')
-rw-r--r-- | hw/ppc/sam460ex.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c index 89bc70eb94..17d40bd672 100644 --- a/hw/ppc/sam460ex.c +++ b/hw/ppc/sam460ex.c @@ -324,9 +324,8 @@ static void sam460ex_init(MachineState *machine) /* SDRAM controller */ /* put all RAM on first bank because board has one slot * and firmware only checks that */ - machine->ram_size = ppc4xx_sdram_adjust(machine->ram_size, 1, - ram_memories, ram_bases, ram_sizes, - ppc460ex_sdram_bank_sizes); + ppc4xx_sdram_banks(machine->ram_size, 1, ram_memories, ram_bases, ram_sizes, + ppc460ex_sdram_bank_sizes); /* FIXME: does 460EX have ECC interrupts? */ ppc440_sdram_init(env, SDRAM_NR_BANKS, ram_memories, |