Revision 3b46e624 hw/ppc_chrp.c

b/hw/ppc_chrp.c
173 173
    d->config[0x0e] = 0x00; // header_type
174 174

  
175 175
    d->config[0x3d] = 0x01; // interrupt on pin 1
176
   
176

  
177 177
    dbdma_mem_index = cpu_register_io_memory(0, dbdma_read, dbdma_write, NULL);
178 178

  
179 179
    pci_register_io_region(d, 0, 0x80000,
......
208 208
{
209 209
    static int vga_vbl_enabled;
210 210
    int linesize;
211
   
211

  
212 212
    //    printf("osi_call R5=%d\n", env->gpr[5]);
213 213

  
214 214
    /* same handler as PearPC, coming from the original MOL video
......
280 280
void pmac_format_nvram_partition(uint8_t *buf, int len)
281 281
{
282 282
    char partition_name[12] = "wwwwwwwwwwww";
283
   
283

  
284 284
    buf[0] = 0x7f; /* free partition magic */
285 285
    buf[1] = 0; /* checksum */
286 286
    buf[2] = len >> 8;
287 287
    buf[3] = len;
288 288
    memcpy(buf + 4, partition_name, 12);
289 289
    buf[1] = nvram_chksum(buf, 16);
290
}   
290
}
291 291

  
292 292
/* PowerPC CHRP hardware initialisation */
293 293
static void ppc_chrp_init (int ram_size, int vga_ram_size, int boot_device,
......
355 355
    bios_size = (bios_size + 0xfff) & ~0xfff;
356 356
    cpu_register_physical_memory((uint32_t)(-bios_size),
357 357
                                 bios_size, bios_offset | IO_MEM_ROM);
358
   
358

  
359 359
    /* allocate and load VGA BIOS */
360 360
    vga_bios_offset = bios_offset + bios_size;
361 361
    snprintf(buf, sizeof(buf), "%s/%s", bios_dir, VGABIOS_FILENAME);
......
376 376
        vga_bios_size += 8;
377 377
    }
378 378
    vga_bios_size = (vga_bios_size + 0xfff) & ~0xfff;
379
   
379

  
380 380
    if (linux_boot) {
381 381
        kernel_base = KERNEL_LOAD_ADDR;
382 382
        /* now we can load the kernel */
......
427 427

  
428 428
        /* XXX: suppress that */
429 429
        dummy_irq = i8259_init(NULL);
430
       
430

  
431 431
        /* XXX: use Mac Serial port */
432 432
        serial_init(0x3f8, dummy_irq[4], serial_hds[0]);
433
       
433

  
434 434
        for(i = 0; i < nb_nics; i++) {
435 435
            if (!nd_table[i].model)
436 436
                nd_table[i].model = "ne2k_pci";
437 437
            pci_nic_init(pci_bus, &nd_table[i], -1);
438 438
        }
439
       
439

  
440 440
        pci_cmd646_ide_init(pci_bus, &bs_table[0], 0);
441 441

  
442 442
        /* cuda also initialize ADB */
443 443
        cuda_mem_index = cuda_init(pic[0x12]);
444
       
444

  
445 445
        adb_kbd_init(&adb_bus);
446 446
        adb_mouse_init(&adb_bus);
447
       
447

  
448 448
        {
449 449
            MacIONVRAMState *nvr;
450 450
            nvr = macio_nvram_init();
......
534 534
#endif
535 535
        /* cuda also initialize ADB */
536 536
        cuda_mem_index = cuda_init(pic[0x19]);
537
       
537

  
538 538
        adb_kbd_init(&adb_bus);
539 539
        adb_mouse_init(&adb_bus);
540
       
540

  
541 541
        macio_init(pci_bus, 0x0022);
542
       
542

  
543 543
        nvram = m48t59_init(dummy_irq[8], 0xFFF04000, 0x0074, NVRAM_SIZE, 59);
544
       
544

  
545 545
        arch_name = "MAC99";
546 546
    }
547 547

  
......
578 578
                  kernel_filename, kernel_cmdline,
579 579
                  initrd_filename, cpu_model, 0);
580 580
}
581
   
581

  
582 582
static void ppc_heathrow_init (int ram_size, int vga_ram_size, int boot_device,
583 583
                               DisplayState *ds, const char **fd_filename,
584 584
                               int snapshot,

Also available in: Unified diff