On 2/17/20 9:34 AM, Igor Mammedov wrote: > If user provided non-sense RAM size, board will complain and > continue running with max RAM size supported. > 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. > > Signed-off-by: Igor Mammedov <imamm...@redhat.com> > Reviewed-by: Alistair Francis <alistair.fran...@wdc.com> > ---
Reviewed-by: Richard Henderson <richard.hender...@linaro.org> > + /* max 2GB ram */ > + if (machine->ram_size > 0x80000000) { > + error_report("RAM size more than %d is not supported", 0x80000000); > + exit(EXIT_FAILURE); > + } If you have occasion to re-spin, I think that a common function like void machine_memory_check_max_size(MachineState *machine, ram_addr_t max); akin to the machine_memory_check_fixed_size I proposed earlier, would help keep the language consistent across the boards. r~