Revision f3e3aa8c

b/hw/r2d.c
215 215
    }
216 216

  
217 217
    /* Allocate memory space */
218
    qemu_ram_alloc(SDRAM_BASE); /* to adjust the offset */
219 218
    sdram_addr = qemu_ram_alloc(SDRAM_SIZE);
220 219
    cpu_register_physical_memory(SDRAM_BASE, SDRAM_SIZE, sdram_addr);
221 220
    /* Register peripherals */
......
250 249
          env->pc = (SDRAM_BASE + LINUX_LOAD_OFFSET) | 0xa0000000;
251 250
          pstrcpy_targphys(SDRAM_BASE + 0x10100, 256, kernel_cmdline);
252 251
      } else {
253
          kernel_size = load_image(kernel_filename, SDRAM_BASE);
252
          kernel_size = load_image_targphys(kernel_filename, SDRAM_BASE, SDRAM_SIZE);
254 253
          env->pc = SDRAM_BASE | 0xa0000000; /* Start from P2 area */
255 254
      }
256 255

  
......
265 264
    .name = "r2d",
266 265
    .desc = "r2d-plus board",
267 266
    .init = r2d_init,
268
    .ram_require = (SDRAM_BASE + SDRAM_SIZE + SM501_VRAM_SIZE) | RAMSIZE_FIXED,
267
    .ram_require = (SDRAM_SIZE + SM501_VRAM_SIZE) | RAMSIZE_FIXED,
269 268
};

Also available in: Unified diff