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>
This commit is contained in:
parent
ead2b283ad
commit
82e6905465
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user