summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini2020-10-28 11:16:22 +0100
committerPaolo Bonzini2020-12-10 18:15:09 +0100
commit82e69054656f86d00b263437ad04395a5f834248 (patch)
tree47ba7db0542014014718a3cddb4a4420b1888156 /hw
parentppc: do not use ram_size global (diff)
downloadqemu-82e69054656f86d00b263437ad04395a5f834248.tar.gz
qemu-82e69054656f86d00b263437ad04395a5f834248.tar.xz
qemu-82e69054656f86d00b263437ad04395a5f834248.zip
riscv: do not use ram_size global
Use the machine properties instead. Cc: Alistair Francis <Alistair.Francis@wdc.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/riscv/boot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/riscv/boot.c b/hw/riscv/boot.c
index 9b3fe3fb1e..70a9bf8f5d 100644
--- a/hw/riscv/boot.c
+++ b/hw/riscv/boot.c
@@ -120,7 +120,8 @@ target_ulong riscv_load_firmware(const char *firmware_filename,
}
firmware_size = load_image_targphys_as(firmware_filename,
- firmware_load_addr, ram_size, NULL);
+ firmware_load_addr,
+ current_machine->ram_size, NULL);
if (firmware_size > 0) {
return firmware_load_addr + firmware_size;
@@ -148,7 +149,7 @@ target_ulong riscv_load_kernel(const char *kernel_filename,
}
if (load_image_targphys_as(kernel_filename, kernel_start_addr,
- ram_size, NULL) > 0) {
+ current_machine->ram_size, NULL) > 0) {
return kernel_start_addr;
}