提交 5768f5ac 编写于 作者: B bellard

PCI interrupt support


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@825 c046a42c-6fe2-441c-8c8c-71466251a162
上级 1078f663
...@@ -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,
#define PCI_ADDRESS_SPACE_MEM_PREFETCH 0x08 #define PCI_ADDRESS_SPACE_MEM_PREFETCH 0x08
typedef struct PCIIORegion { typedef struct PCIIORegion {
uint32_t addr; uint32_t addr; /* current PCI mapping address. -1 means not mapped */
uint32_t size; uint32_t size;
uint8_t type; uint8_t type;
PCIMapIORegionFunc *map_func; PCIMapIORegionFunc *map_func;
...@@ -401,6 +401,7 @@ struct PCIDevice { ...@@ -401,6 +401,7 @@ struct PCIDevice {
/* do not access the following fields */ /* do not access the following fields */
PCIConfigReadFunc *config_read; PCIConfigReadFunc *config_read;
PCIConfigWriteFunc *config_write; PCIConfigWriteFunc *config_write;
int irq_index;
}; };
PCIDevice *pci_register_device(const char *name, int instance_size, 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,
uint32_t size, int type, uint32_t size, int type,
PCIMapIORegionFunc *map_func); PCIMapIORegionFunc *map_func);
void pci_set_irq(PCIDevice *pci_dev, int irq_num, int level);
uint32_t pci_default_read_config(PCIDevice *d,
uint32_t address, int len);
void pci_default_write_config(PCIDevice *d,
uint32_t address, uint32_t val, int len);
void i440fx_init(void); void i440fx_init(void);
void piix3_init(void); void piix3_init(void);
void pci_bios_init(void); void pci_bios_init(void);
void pci_info(void);
/* vga.c */ /* vga.c */
...@@ -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)
} }
int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base, int vga_initialize(DisplayState *ds, uint8_t *vga_ram_base,
unsigned long vga_ram_offset, int vga_ram_size); unsigned long vga_ram_offset, int vga_ram_size,
int is_pci);
void vga_update_display(void); void vga_update_display(void);
void vga_screen_dump(const char *filename); void vga_screen_dump(const char *filename);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册