From b326b6ea7998912d0bb0565ffef34efdfe9016dc Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 28 Oct 2020 06:24:22 -0400 Subject: make ram_size local to vl.c Use the machine properties for the leftovers too. Signed-off-by: Paolo Bonzini --- hw/core/generic-loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hw/core/generic-loader.c') diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c index a242c076f6..2b2a7b5e9a 100644 --- a/hw/core/generic-loader.c +++ b/hw/core/generic-loader.c @@ -35,6 +35,7 @@ #include "hw/sysbus.h" #include "sysemu/dma.h" #include "sysemu/reset.h" +#include "hw/boards.h" #include "hw/loader.h" #include "hw/qdev-properties.h" #include "qapi/error.h" @@ -154,7 +155,7 @@ static void generic_loader_realize(DeviceState *dev, Error **errp) if (size < 0 || s->force_raw) { /* Default to the maximum size being the machine's ram size */ - size = load_image_targphys_as(s->file, s->addr, ram_size, as); + size = load_image_targphys_as(s->file, s->addr, current_machine->ram_size, as); } else { s->addr = entry; } -- cgit v1.2.3-55-g7522