cris: do not use ram_size global
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 Oct 2020 10:19:42 +0000 (06:19 -0400)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 10 Dec 2020 17:15:07 +0000 (12:15 -0500)
Use the machine properties instead.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/cris/axis_dev88.c
hw/cris/boot.c
hw/cris/boot.h

index dab7423c7378525c3fcf3977e12c84425f795a3f..b0cb6d84afb270d0d82f24189d8c3a15c19e68f1 100644 (file)
@@ -333,6 +333,7 @@ void axisdev88_init(MachineState *machine)
     if (kernel_filename) {
         li.image_filename = kernel_filename;
         li.cmdline = kernel_cmdline;
+        li.ram_size = machine->ram_size;
         cris_load_image(cpu, &li);
     } else if (!qtest_enabled()) {
         fprintf(stderr, "Kernel image must be specified\n");
index aa8d2756d6cebad30d3d1865579916e33526a115..9fa09cfd83cd5cd45337dcfaec065ea4f57be6bd 100644 (file)
@@ -81,7 +81,7 @@ void cris_load_image(CRISCPU *cpu, struct cris_load_info *li)
     if (image_size < 0) {
         /* Takes a kimage from the axis devboard SDK.  */
         image_size = load_image_targphys(li->image_filename, 0x40004000,
-                                         ram_size);
+                                         li->ram_size);
         li->entry = 0x40004000;
     }
 
index 218854e5d12c576b0d9ad58284a5b4284a7db3bf..9f1e0e340c99112f76c04b0744cb64ebe08f4679 100644 (file)
@@ -6,6 +6,7 @@ struct cris_load_info
     const char *image_filename;
     const char *cmdline;
     int image_size;
+    ram_addr_t ram_size;
 
     hwaddr entry;
 };