diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2020-10-28 06:25:06 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-12-10 12:15:09 -0500 |
commit | 541693a4195508a077fc10e5803d0a5b4f76838a (patch) | |
tree | 25d1d30708c38ee40bfd19393d256bd54621ebe4 /hw/nios2 | |
parent | eb09df927274c7a873557588a1a23398af47fbb6 (diff) |
nios2: do not use ram_size global
Use the equivalent argument to the function instead.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/nios2')
-rw-r--r-- | hw/nios2/boot.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/nios2/boot.c b/hw/nios2/boot.c index 1df3b66c29..3cb864914b 100644 --- a/hw/nios2/boot.c +++ b/hw/nios2/boot.c @@ -181,7 +181,7 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, /* Not an ELF image nor an u-boot image, try a RAW image. */ if (kernel_size < 0) { kernel_size = load_image_targphys(kernel_filename, ddr_base, - ram_size); + ramsize); boot_info.bootstrap_pc = ddr_base; high = ddr_base + kernel_size; } @@ -198,11 +198,11 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, initrd_size = load_ramdisk(initrd_filename, boot_info.initrd_start, - ram_size - initrd_offset); + ramsize - initrd_offset); if (initrd_size < 0) { initrd_size = load_image_targphys(initrd_filename, boot_info.initrd_start, - ram_size - initrd_offset); + ramsize - initrd_offset); } if (initrd_size < 0) { error_report("could not load initrd '%s'", @@ -216,7 +216,7 @@ void nios2_load_kernel(Nios2CPU *cpu, hwaddr ddr_base, /* Device tree must be placed right after initrd (if available) */ boot_info.fdt = high; - fdt_size = nios2_load_dtb(boot_info, ram_size, kernel_cmdline, + fdt_size = nios2_load_dtb(boot_info, ramsize, kernel_cmdline, /* Preference a -dtb argument */ dtb_arg ? dtb_arg : filename); high += fdt_size; |