Revision 77f193da hw/sun4m.c

b/hw/sun4m.c
41 41
 * Sun4m architecture was used in the following machines:
42 42
 *
43 43
 * SPARCserver 6xxMP/xx
44
 * SPARCclassic (SPARCclassic Server)(SPARCstation LC) (4/15), SPARCclassic X (4/10)
44
 * SPARCclassic (SPARCclassic Server)(SPARCstation LC) (4/15),
45
 * SPARCclassic X (4/10)
45 46
 * SPARCstation LX/ZX (4/30)
46 47
 * SPARCstation Voyager
47 48
 * SPARCstation 10/xx, SPARCserver 10/xx
......
327 328
        kernel_size = load_elf(kernel_filename, -0xf0000000ULL, NULL, NULL,
328 329
                               NULL);
329 330
        if (kernel_size < 0)
330
            kernel_size = load_aout(kernel_filename, phys_ram_base + KERNEL_LOAD_ADDR);
331
            kernel_size = load_aout(kernel_filename,
332
                                    phys_ram_base + KERNEL_LOAD_ADDR);
331 333
        if (kernel_size < 0)
332
            kernel_size = load_image(kernel_filename, phys_ram_base + KERNEL_LOAD_ADDR);
334
            kernel_size = load_image(kernel_filename,
335
                                     phys_ram_base + KERNEL_LOAD_ADDR);
333 336
        if (kernel_size < 0) {
334 337
            fprintf(stderr, "qemu: could not load kernel '%s'\n",
335 338
                    kernel_filename);
......
339 342
        /* load initrd */
340 343
        initrd_size = 0;
341 344
        if (initrd_filename) {
342
            initrd_size = load_image(initrd_filename, phys_ram_base + INITRD_LOAD_ADDR);
345
            initrd_size = load_image(initrd_filename,
346
                                     phys_ram_base + INITRD_LOAD_ADDR);
343 347
            if (initrd_size < 0) {
344 348
                fprintf(stderr, "qemu: could not load initial ram disk '%s'\n",
345 349
                        initrd_filename);
......
350 354
            for (i = 0; i < 64 * TARGET_PAGE_SIZE; i += TARGET_PAGE_SIZE) {
351 355
                if (ldl_raw(phys_ram_base + KERNEL_LOAD_ADDR + i)
352 356
                    == 0x48647253) { // HdrS
353
                    stl_raw(phys_ram_base + KERNEL_LOAD_ADDR + i + 16, INITRD_LOAD_ADDR);
354
                    stl_raw(phys_ram_base + KERNEL_LOAD_ADDR + i + 20, initrd_size);
357
                    stl_raw(phys_ram_base + KERNEL_LOAD_ADDR + i + 16,
358
                            INITRD_LOAD_ADDR);
359
                    stl_raw(phys_ram_base + KERNEL_LOAD_ADDR + i + 20,
360
                            initrd_size);
355 361
                    break;
356 362
                }
357 363
            }
......
409 415

  
410 416
    /* allocate RAM */
411 417
    if ((uint64_t)RAM_size > hwdef->max_mem) {
412
        fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum %d\n",
418
        fprintf(stderr,
419
                "qemu: Too much memory for this machine: %d, maximum %d\n",
413 420
                (unsigned int)(RAM_size / (1024 * 1024)),
414 421
                (unsigned int)(hwdef->max_mem / (1024 * 1024)));
415 422
        exit(1);
......
575 582

  
576 583
    /* allocate RAM */
577 584
    if ((uint64_t)RAM_size > hwdef->max_mem) {
578
        fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum %d\n",
585
        fprintf(stderr,
586
                "qemu: Too much memory for this machine: %d, maximum %d\n",
579 587
                (unsigned int)(RAM_size / (1024 * 1024)),
580 588
                (unsigned int)(hwdef->max_mem / (1024 * 1024)));
581 589
        exit(1);
......
1127 1135
/* SPARCserver 600MP hardware initialisation */
1128 1136
static void ss600mp_init(ram_addr_t RAM_size, int vga_ram_size,
1129 1137
                         const char *boot_device, DisplayState *ds,
1130
                         const char *kernel_filename, const char *kernel_cmdline,
1138
                         const char *kernel_filename,
1139
                         const char *kernel_cmdline,
1131 1140
                         const char *initrd_filename, const char *cpu_model)
1132 1141
{
1133 1142
    sun4m_hw_init(&hwdefs[2], RAM_size, boot_device, ds, kernel_filename,
......
1388 1397

  
1389 1398
    /* allocate RAM */
1390 1399
    if ((uint64_t)RAM_size > hwdef->max_mem) {
1391
        fprintf(stderr, "qemu: Too much memory for this machine: %d, maximum %d\n",
1400
        fprintf(stderr,
1401
                "qemu: Too much memory for this machine: %d, maximum %d\n",
1392 1402
                (unsigned int)(RAM_size / (1024 * 1024)),
1393 1403
                (unsigned int)(hwdef->max_mem / (1024 * 1024)));
1394 1404
        exit(1);

Also available in: Unified diff