Commit 5768f5aca6ebe81b203b580c7ab812dd0c2bcfa7
1 parent
1078f663
PCI interrupt support
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@825 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
12 additions
and
2 deletions
vl.h
| @@ -382,7 +382,7 @@ typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num, | @@ -382,7 +382,7 @@ typedef void PCIMapIORegionFunc(PCIDevice *pci_dev, int region_num, | ||
| 382 | #define PCI_ADDRESS_SPACE_MEM_PREFETCH 0x08 | 382 | #define PCI_ADDRESS_SPACE_MEM_PREFETCH 0x08 |
| 383 | 383 | ||
| 384 | typedef struct PCIIORegion { | 384 | typedef struct PCIIORegion { |
| 385 | - uint32_t addr; | 385 | + uint32_t addr; /* current PCI mapping address. -1 means not mapped */ |
| 386 | uint32_t size; | 386 | uint32_t size; |
| 387 | uint8_t type; | 387 | uint8_t type; |
| 388 | PCIMapIORegionFunc *map_func; | 388 | PCIMapIORegionFunc *map_func; |
| @@ -401,6 +401,7 @@ struct PCIDevice { | @@ -401,6 +401,7 @@ struct PCIDevice { | ||
| 401 | /* do not access the following fields */ | 401 | /* do not access the following fields */ |
| 402 | PCIConfigReadFunc *config_read; | 402 | PCIConfigReadFunc *config_read; |
| 403 | PCIConfigWriteFunc *config_write; | 403 | PCIConfigWriteFunc *config_write; |
| 404 | + int irq_index; | ||
| 404 | }; | 405 | }; |
| 405 | 406 | ||
| 406 | PCIDevice *pci_register_device(const char *name, int instance_size, | 407 | PCIDevice *pci_register_device(const char *name, int instance_size, |
| @@ -412,9 +413,17 @@ void pci_register_io_region(PCIDevice *pci_dev, int region_num, | @@ -412,9 +413,17 @@ void pci_register_io_region(PCIDevice *pci_dev, int region_num, | ||
| 412 | uint32_t size, int type, | 413 | uint32_t size, int type, |
| 413 | PCIMapIORegionFunc *map_func); | 414 | PCIMapIORegionFunc *map_func); |
| 414 | 415 | ||
| 416 | +void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level); | ||
| 417 | + | ||
| 418 | +uint32_t pci_default_read_config(PCIDevice *d, | ||
| 419 | + uint32_t address, int len); | ||
| 420 | +void pci_default_write_config(PCIDevice *d, | ||
| 421 | + uint32_t address, uint32_t val, int len); | ||
| 422 | + | ||
| 415 | void i440fx_init(void); | 423 | void i440fx_init(void); |
| 416 | void piix3_init(void); | 424 | void piix3_init(void); |
| 417 | void pci_bios_init(void); | 425 | void pci_bios_init(void); |
| 426 | +void pci_info(void); | ||
| 418 | 427 | ||
| 419 | /* vga.c */ | 428 | /* vga.c */ |
| 420 | 429 | ||
| @@ -440,7 +449,8 @@ static inline void dpy_resize(DisplayState *s, int w, int h) | @@ -440,7 +449,8 @@ static inline void dpy_resize(DisplayState *s, int w, int h) | ||
| 440 | } | 449 | } |
| 441 | 450 | ||
| 442 | int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base, | 451 | int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base, |
| 443 | - unsigned long vga_ram_offset, int vga_ram_size); | 452 | + unsigned long vga_ram_offset, int vga_ram_size, |
| 453 | + int is_pci); | ||
| 444 | void vga_update_display(void); | 454 | void vga_update_display(void); |
| 445 | void vga_screen_dump(const char *filename); | 455 | void vga_screen_dump(const char *filename); |
| 446 | 456 |