aboutsummaryrefslogtreecommitdiff
path: root/hw/mips/fuloong2e.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2020-10-28 06:20:52 -0400
committerPaolo Bonzini <pbonzini@redhat.com>2020-12-10 12:15:08 -0500
commit74d6bf85257ee0344696e35de54fa24757a50b0f (patch)
tree26cb8013d643a6e1ae1a5cdfc004689b09ac32d4 /hw/mips/fuloong2e.c
parent89ee4a098c130cea0aca50090388cdca41f89dd9 (diff)
mips: do not use ram_size global
Use the machine properties or loader parameters instead. Cc: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/mips/fuloong2e.c')
-rw-r--r--hw/mips/fuloong2e.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c
index 25b679011f..84a2132f85 100644
--- a/hw/mips/fuloong2e.c
+++ b/hw/mips/fuloong2e.c
@@ -134,14 +134,14 @@ static int64_t load_kernel(CPUMIPSState *env)
initrd_size = get_image_size(loaderparams.initrd_filename);
if (initrd_size > 0) {
initrd_offset = ROUND_UP(kernel_high, INITRD_PAGE_SIZE);
- if (initrd_offset + initrd_size > ram_size) {
+ if (initrd_offset + initrd_size > loaderparams.ram_size) {
error_report("memory too small for initial ram disk '%s'",
loaderparams.initrd_filename);
exit(1);
}
initrd_size = load_image_targphys(loaderparams.initrd_filename,
initrd_offset,
- ram_size - initrd_offset);
+ loaderparams.ram_size - initrd_offset);
}
if (initrd_size == (target_ulong) -1) {
error_report("could not load initial ram disk '%s'",