devfn number for the PIIX3 southbridge
PATCH 1/1 devfn number for the PIIX3 southbridge
This patch adds a way to specify a devfn number for the PIIX3 southbridge, as the Malta platform rely on this number to setup the IRQ. Passing the value -1 makes the devfn automatically assigned as previously.
hw/pc.c +1 -1
@@ -582,7 +582,7 @@if (pci_enabled) { pci_bus =i440fx_init (&i440fx_state); - piix3_devfn =piix3_init (pci_bus); + piix3_devfn =piix3_init (pci_bus,-1 ); }else { pci_bus =NULL ; }
hw/piix_pci.c +3 -3
@@ -196,7 +196,7 @@/* PIIX3 PCI to ISA bridge */ -static PCIDevice *piix3_dev; +PCIDevice *piix3_dev;/* just used for simpler irq handling. */ #define PCI_IRQ_WORDS ((PCI_DEVICES_MAX + 31) / 32)
@@ -273,13 +273,13 @@return pci_device_load (d, f); } -int piix3_init (PCIBus *bus) +int piix3_init (PCIBus *bus,int devfn) {PCIDevice *d;uint8_t *pci_conf; d =pci_register_device (bus,"PIIX3" ,sizeof (PCIDevice), --1 ,NULL ,NULL ); + devfn,NULL ,NULL );register_savevm ("PIIX3" ,0 ,2 , piix_save, piix_load, d); piix3_dev = d;
vl.h +1 -1
@@ -790,7 +790,7 @@/* piix_pci.c */ PCIBus *i440fx_init (PCIDevice **pi440fx_state);void i440fx_set_smm (PCIDevice *d,int val); -int piix3_init (PCIBus *bus); +int piix3_init (PCIBus *bus,int devfn);void i440fx_init_memory_mappings (PCIDevice *d);/* openpic.c */
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net