hw/arm/nseries: Fix loading kernel image on n8x0 machines
commitb3267ff675dd410b4c2a569e209cb7d468cf1873
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>
Mon, 19 Oct 2020 09:51:48 +0000 (19 11:51 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 20 Oct 2020 15:12:01 +0000 (20 16:12 +0100)
tree3ca3bdcfcaa95660e6540545958aba3f2db6e72e
parent3cd27b58dd2045580689bdece677fa14e12c324d
hw/arm/nseries: Fix loading kernel image on n8x0 machines

Commit 7998beb9c2e removed the ram_size initialization in the
arm_boot_info structure, however it is used by arm_load_kernel().

Initialize the field to fix:

  $ qemu-system-arm -M n800 -append 'console=ttyS1' \
    -kernel meego-arm-n8x0-1.0.80.20100712.1431-vmlinuz-2.6.35~rc4-129.1-n8x0
  qemu-system-arm: kernel 'meego-arm-n8x0-1.0.80.20100712.1431-vmlinuz-2.6.35~rc4-129.1-n8x0' is too large to fit in RAM (kernel size 1964608, RAM size 0)

Noticed while running the test introduced in commit 050a82f0c5b
("tests/acceptance: Add a test for the N800 and N810 arm machines").

Fixes: 7998beb9c2e ("arm/nseries: use memdev for RAM")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Thomas Huth <thuth@redhat.com>
Message-id: 20201019095148.1602119-1-f4bug@amsat.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/nseries.c