Revision 46e50e9d vl.h

b/vl.h
457 457

  
458 458
extern target_phys_addr_t pci_mem_base;
459 459

  
460
typedef struct PCIBus PCIBus;
460 461
typedef struct PCIDevice PCIDevice;
461 462

  
462 463
typedef void PCIConfigWriteFunc(PCIDevice *pci_dev, 
......
484 485
    uint8_t config[256];
485 486

  
486 487
    /* the following fields are read only */
487
    int bus_num;
488
    PCIBus *bus;
488 489
    int devfn;
489 490
    char name[64];
490 491
    PCIIORegion io_regions[PCI_NUM_REGIONS];
......
495 496
    int irq_index;
496 497
};
497 498

  
498
PCIDevice *pci_register_device(const char *name, int instance_size,
499
                               int bus_num, int devfn,
499
PCIDevice *pci_register_device(PCIBus *bus, const char *name,
500
                               int instance_size, int devfn,
500 501
                               PCIConfigReadFunc *config_read, 
501 502
                               PCIConfigWriteFunc *config_write);
502 503

  
......
513 514

  
514 515
extern struct PIIX3State *piix3_state;
515 516

  
516
void i440fx_init(void);
517
void piix3_init(void);
517
PCIBus *i440fx_init(void);
518
void piix3_init(PCIBus *bus);
518 519
void pci_bios_init(void);
519 520
void pci_info(void);
520 521

  
521 522
/* temporary: will be moved in platform specific file */
522
void pci_prep_init(void);
523
void pci_pmac_init(void);
524
void pci_ppc_bios_init(void);
523
PCIBus *pci_prep_init(void);
524
struct openpic_t;
525
void pci_pmac_set_openpic(PCIBus *bus, struct openpic_t *openpic);
526
PCIBus *pci_pmac_init(void);
525 527

  
526 528
/* openpic.c */
527 529
typedef struct openpic_t openpic_t;
528 530
void openpic_set_irq (openpic_t *opp, int n_IRQ, int level);
529
openpic_t *openpic_init (uint32_t isu_base, uint32_t idu_base, int nb_cpus);
531
openpic_t *openpic_init (PCIBus *bus,
532
                         uint32_t isu_base, uint32_t idu_base, int nb_cpus);
530 533

  
531 534
/* vga.c */
532 535

  
......
551 554
    s->dpy_resize(s, w, h);
552 555
}
553 556

  
554
int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base, 
555
                   unsigned long vga_ram_offset, int vga_ram_size, 
556
                   int is_pci);
557
int vga_initialize(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, 
558
                   unsigned long vga_ram_offset, int vga_ram_size);
557 559
void vga_update_display(void);
558 560
void vga_invalidate_display(void);
559 561
void vga_screen_dump(const char *filename);
560 562

  
561 563
/* cirrus_vga.c */
562
void pci_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base, 
564
void pci_cirrus_vga_init(PCIBus *bus, DisplayState *ds, uint8_t *vga_ram_base, 
563 565
                         unsigned long vga_ram_offset, int vga_ram_size);
564

  
565 566
void isa_cirrus_vga_init(DisplayState *ds, uint8_t *vga_ram_base, 
566 567
                         unsigned long vga_ram_offset, int vga_ram_size);
567 568

  
......
575 576

  
576 577
void isa_ide_init(int iobase, int iobase2, int irq,
577 578
                  BlockDriverState *hd0, BlockDriverState *hd1);
578
void pci_ide_init(BlockDriverState **hd_table);
579
void pci_piix3_ide_init(BlockDriverState **hd_table);
579
void pci_ide_init(PCIBus *bus, BlockDriverState **hd_table);
580
void pci_piix3_ide_init(PCIBus *bus, BlockDriverState **hd_table);
580 581
int pmac_ide_init (BlockDriverState **hd_table,
581 582
                   openpic_t *openpic, int irq);
582 583

  
......
627 628
/* ne2000.c */
628 629

  
629 630
void isa_ne2000_init(int base, int irq, NetDriverState *nd);
630
void pci_ne2000_init(NetDriverState *nd);
631
void pci_ne2000_init(PCIBus *bus, NetDriverState *nd);
631 632

  
632 633
/* pckbd.c */
633 634

  

Also available in: Unified diff