diff options
author | Igor Mammedov <imammedo@redhat.com> | 2020-02-19 11:08:52 -0500 |
---|---|---|
committer | Patchew Importer <importer@patchew.org> | 2020-02-19 16:49:55 +0000 |
commit | 462f1f4bde2a2d5a238a3d39788ccdb2c56490ba (patch) | |
tree | a3085dd47370296649bea720d83d0d52f7723b62 /hw/arm | |
parent | 3f25b3f4e88f5df1b0eb5e9cb59567aa4ffc80fe (diff) | |
download | qemu-462f1f4bde2a2d5a238a3d39788ccdb2c56490ba.zip qemu-462f1f4bde2a2d5a238a3d39788ccdb2c56490ba.tar.gz qemu-462f1f4bde2a2d5a238a3d39788ccdb2c56490ba.tar.bz2 |
arm/kzm: drop RAM size fixup
If the user provided too large a RAM size, the code used to
complain and trim it to the max size. Now that RAM is allocated by
generic code, that's no longer possible, so generate an error and
exit instead.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Peter Chubb <peter.chubb@data61.csiro.au>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20200219160953.13771-19-imammedo@redhat.com>
Diffstat (limited to 'hw/arm')
-rw-r--r-- | hw/arm/kzm.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/arm/kzm.c b/hw/arm/kzm.c index 1d5ef28..94cbac1 100644 --- a/hw/arm/kzm.c +++ b/hw/arm/kzm.c @@ -25,6 +25,7 @@ #include "hw/char/serial.h" #include "sysemu/qtest.h" #include "sysemu/sysemu.h" +#include "qemu/cutils.h" /* Memory map for Kzm Emulation Baseboard: * 0x00000000-0x7fffffff See i.MX31 SOC for support @@ -78,10 +79,10 @@ static void kzm_init(MachineState *machine) /* Check the amount of memory is compatible with the SOC */ if (machine->ram_size > (FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE)) { - warn_report("RAM size " RAM_ADDR_FMT " above max supported, " - "reduced to %x", machine->ram_size, - FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE); - machine->ram_size = FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE; + char *sz = size_to_str(FSL_IMX31_SDRAM0_SIZE + FSL_IMX31_SDRAM1_SIZE); + error_report("RAM size more than %s is not supported", sz); + g_free(sz); + exit(EXIT_FAILURE); } memory_region_allocate_system_memory(&s->ram, NULL, "kzm.ram", |