Changeset 32776 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Sep 27, 2010 1:31:42 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices/Bus
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r32490 r32776 773 773 */ 774 774 PPCIDEVICE pBridgeTemp = pBus->papBridgesR3[iBridge]; 775 AssertMsg(pBridgeTemp && pBridgeTemp->Int.s.fPciToPciBridge,775 AssertMsg(pBridgeTemp && PCIIsPci2PciBridge(pBridgeTemp), 776 776 ("Device is not a PCI bridge but on the list of PCI bridges\n")); 777 777 … … 1721 1721 } 1722 1722 } 1723 pPciDev->Int.s.fRequestedDevFn = false;1723 PCIClearRequestedDevfunc(pPciDev); 1724 1724 } 1725 1725 else … … 1742 1742 AssertReleaseMsg(!(iDev % 8), ("PCI Configuration Conflict! iDev=%d pszName=%s clashes with %s\n", 1743 1743 iDev, pszName, pBus->devices[iDev]->name)); 1744 if ( pBus->devices[iDev]->Int.s.fRequestedDevFn1745 || (pBus->devices[iDev + 1] && pBus->devices[iDev + 1]->Int.s.fRequestedDevFn)1746 || (pBus->devices[iDev + 2] && pBus->devices[iDev + 2]->Int.s.fRequestedDevFn)1747 || (pBus->devices[iDev + 3] && pBus->devices[iDev + 3]->Int.s.fRequestedDevFn)1748 || (pBus->devices[iDev + 4] && pBus->devices[iDev + 4]->Int.s.fRequestedDevFn)1749 || (pBus->devices[iDev + 5] && pBus->devices[iDev + 5]->Int.s.fRequestedDevFn)1750 || (pBus->devices[iDev + 6] && pBus->devices[iDev + 6]->Int.s.fRequestedDevFn)1751 || (pBus->devices[iDev + 7] && pBus->devices[iDev + 7]->Int.s.fRequestedDevFn))1744 if ( PCIIsRequestedDevfunc(pBus->devices[iDev]) 1745 || (pBus->devices[iDev + 1] && PCIIsRequestedDevfunc(pBus->devices[iDev + 1])) 1746 || (pBus->devices[iDev + 2] && PCIIsRequestedDevfunc(pBus->devices[iDev + 2])) 1747 || (pBus->devices[iDev + 3] && PCIIsRequestedDevfunc(pBus->devices[iDev + 3])) 1748 || (pBus->devices[iDev + 4] && PCIIsRequestedDevfunc(pBus->devices[iDev + 4])) 1749 || (pBus->devices[iDev + 5] && PCIIsRequestedDevfunc(pBus->devices[iDev + 5])) 1750 || (pBus->devices[iDev + 6] && PCIIsRequestedDevfunc(pBus->devices[iDev + 6])) 1751 || (pBus->devices[iDev + 7] && PCIIsRequestedDevfunc(pBus->devices[iDev + 7]))) 1752 1752 { 1753 1753 AssertReleaseMsgFailed(("Configuration error:'%s' and '%s' are both configured as device %d\n", … … 1786 1786 } 1787 1787 } /* if conflict */ 1788 pPciDev->Int.s.fRequestedDevFn = true;1788 PCISetRequestedDevfunc(pPciDev); 1789 1789 } 1790 1790 … … 1798 1798 pPciDev->Int.s.pfnConfigWrite = pci_default_write_config; 1799 1799 pBus->devices[iDev] = pPciDev; 1800 if ( pPciDev->Int.s.fPciToPciBridge)1800 if (PCIIsPci2PciBridge(pPciDev)) 1801 1801 { 1802 1802 AssertMsg(pBus->cBridges < RT_ELEMENTS(pBus->devices), ("Number of bridges exceeds the number of possible devices on the bus\n")); … … 2073 2073 2074 2074 pBus->PciDev.pDevIns = pDevIns; 2075 pBus->PciDev.Int.s.fRequestedDevFn= true;2075 PCISetRequestedDevfunc(&pBus->PciDev); 2076 2076 pciRegisterInternal(pBus, 0, &pBus->PciDev, "i440FX"); 2077 2077 … … 2084 2084 2085 2085 pGlobals->PIIX3State.dev.pDevIns = pDevIns; 2086 pGlobals->PIIX3State.dev.Int.s.fRequestedDevFn= true;2086 PCISetRequestedDevfunc(&pGlobals->PIIX3State.dev); 2087 2087 pciRegisterInternal(pBus, 8, &pGlobals->PIIX3State.dev, "PIIX3"); 2088 2088 piix3_reset(&pGlobals->PIIX3State); … … 2453 2453 2454 2454 pBus->PciDev.pDevIns = pDevIns; 2455 pBus->PciDev.Int.s.fPciToPciBridge = true; 2455 2456 /* Bridge-specific data */ 2457 PCISetPci2PciBridge(&pBus->PciDev); 2456 2458 pBus->PciDev.Int.s.pfnBridgeConfigRead = pcibridgeConfigRead; 2457 2459 pBus->PciDev.Int.s.pfnBridgeConfigWrite = pcibridgeConfigWrite; -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r32765 r32776 621 621 */ 622 622 PPCIDEVICE pBridgeTemp = pBus->papBridgesR3[iBridge]; 623 AssertMsg(pBridgeTemp && pBridgeTemp->Int.s.fPciToPciBridge,623 AssertMsg(pBridgeTemp && PCIIsPci2PciBridge(pBridgeTemp), 624 624 ("Device is not a PCI bridge but on the list of PCI bridges\n")); 625 625 … … 771 771 static DECLCALLBACK(int) ich9pcibridgeRegister(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, const char *pszName, int iDev) 772 772 { 773 return 0; 773 774 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 775 776 /* 777 * Check input. 778 */ 779 if ( !pszName 780 || !pPciDev 781 || iDev >= (int)RT_ELEMENTS(pBus->apDevices)) 782 { 783 AssertMsgFailed(("Invalid argument! pszName=%s pPciDev=%p iDev=%d\n", pszName, pPciDev, iDev)); 784 return VERR_INVALID_PARAMETER; 785 } 786 787 /* 788 * Register the device. 789 */ 790 return ich9pciRegisterInternal(pBus, iDev, pPciDev, pszName); 774 791 } 775 792 … … 831 848 * @param pSSM The handle to save the state to. 832 849 */ 833 static DECLCALLBACK(int) pciGenericSaveExec(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSM)850 static DECLCALLBACK(int) ich9pciGenericSaveExec(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSM) 834 851 { 835 852 return SSMR3PutMem(pSSM, &pPciDev->config[0], sizeof(pPciDev->config)); 836 853 } 837 854 838 static int pciR3CommonSaveExec(PPCIBUS pBus, PSSMHANDLE pSSM)855 static int ich9pciR3CommonSaveExec(PPCIBUS pBus, PSSMHANDLE pSSM) 839 856 { 840 857 /* … … 860 877 } 861 878 862 static DECLCALLBACK(int) pciR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)879 static DECLCALLBACK(int) ich9pciR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 863 880 { 864 881 PPCIBUS pThis = PDMINS_2_DATA(pDevIns, PPCIBUS); 865 return pciR3CommonSaveExec(pThis, pSSM);866 } 867 868 869 static DECLCALLBACK(int) pcibridgeR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM)882 return ich9pciR3CommonSaveExec(pThis, pSSM); 883 } 884 885 886 static DECLCALLBACK(int) ich9pcibridgeR3SaveExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM) 870 887 { 871 888 PPCIBUS pThis = PDMINS_2_DATA(pDevIns, PPCIBUS); 872 return pciR3CommonSaveExec(pThis, pSSM); 889 return ich9pciR3CommonSaveExec(pThis, pSSM); 890 } 891 892 893 static void ich9pcibridgeConfigWrite(PPDMDEVINSR3 pDevIns, uint8_t iBus, uint8_t iDevice, uint32_t u32Address, uint32_t u32Value, unsigned cb) 894 { 895 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 896 897 LogFlowFunc((": pDevIns=%p iBus=%d iDevice=%d u32Address=%u u32Value=%u cb=%d\n", pDevIns, iBus, iDevice, u32Address, u32Value, cb)); 898 899 /* If the current bus is not the target bus search for the bus which contains the device. */ 900 if (iBus != PCIDevGetByte(&pBus->aPciDev, VBOX_PCI_SECONDARY_BUS)) 901 { 902 PPCIDEVICE pBridgeDevice = ich9pciFindBridge(pBus, iBus); 903 if (pBridgeDevice) 904 { 905 AssertPtr(pBridgeDevice->Int.s.pfnBridgeConfigWrite); 906 pBridgeDevice->Int.s.pfnBridgeConfigWrite(pBridgeDevice->pDevIns, iBus, iDevice, u32Address, u32Value, cb); 907 } 908 } 909 else 910 { 911 /* This is the target bus, pass the write to the device. */ 912 PPCIDEVICE pPciDev = pBus->apDevices[iDevice]; 913 if (pPciDev) 914 { 915 Log(("%s: %s: addr=%02x val=%08x len=%d\n", __FUNCTION__, pPciDev->name, u32Address, u32Value, cb)); 916 pPciDev->Int.s.pfnConfigWrite(pPciDev, u32Address, u32Value, cb); 917 } 918 } 919 } 920 921 static uint32_t ich9pcibridgeConfigRead(PPDMDEVINSR3 pDevIns, uint8_t iBus, uint8_t iDevice, uint32_t u32Address, unsigned cb) 922 { 923 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 924 uint32_t u32Value = 0xffffffff; /* Return value in case there is no device. */ 925 926 LogFlowFunc((": pDevIns=%p iBus=%d iDevice=%d u32Address=%u cb=%d\n", pDevIns, iBus, iDevice, u32Address, cb)); 927 928 /* If the current bus is not the target bus search for the bus which contains the device. */ 929 if (iBus != PCIDevGetByte(&pBus->aPciDev, VBOX_PCI_SECONDARY_BUS)) 930 { 931 PPCIDEVICE pBridgeDevice = ich9pciFindBridge(pBus, iBus); 932 if (pBridgeDevice) 933 { 934 AssertPtr( pBridgeDevice->Int.s.pfnBridgeConfigRead); 935 u32Value = pBridgeDevice->Int.s.pfnBridgeConfigRead(pBridgeDevice->pDevIns, iBus, iDevice, u32Address, cb); 936 } 937 } 938 else 939 { 940 /* This is the target bus, pass the read to the device. */ 941 PPCIDEVICE pPciDev = pBus->apDevices[iDevice]; 942 if (pPciDev) 943 { 944 u32Value = pPciDev->Int.s.pfnConfigRead(pPciDev, u32Address, cb); 945 Log(("%s: %s: u32Address=%02x u32Value=%08x cb=%d\n", __FUNCTION__, pPciDev->name, u32Address, u32Value, cb)); 946 } 947 } 948 949 return u32Value; 873 950 } 874 951 … … 1018 1095 } 1019 1096 if (off == VBOX_PCI_COMMAND) 1020 PCIDevSetCommand(pDev, 0); /* For remapping, see pciR3CommonLoadExec. */1097 PCIDevSetCommand(pDev, 0); /* For remapping, see ich9pciR3CommonLoadExec. */ 1021 1098 pDev->Int.s.pfnConfigWrite(pDev, off, u32Src, cb); 1022 1099 } … … 1040 1117 1041 1118 /** 1042 * Common worker for pciR3LoadExec andpcibridgeR3LoadExec.1119 * Common worker for ich9pciR3LoadExec and ich9pcibridgeR3LoadExec. 1043 1120 * 1044 1121 * @returns VBox status code. … … 1048 1125 * @param uPass The pass. 1049 1126 */ 1050 static DECLCALLBACK(int) pciR3CommonLoadExec(PPCIBUS pBus, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)1127 static DECLCALLBACK(int) ich9pciR3CommonLoadExec(PPCIBUS pBus, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 1051 1128 { 1052 1129 uint32_t u32; … … 1154 1231 * @param pSSM The handle to the saved state. 1155 1232 */ 1156 static DECLCALLBACK(int) pciGenericLoadExec(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSM)1233 static DECLCALLBACK(int) ich9pciGenericLoadExec(PPDMDEVINS pDevIns, PPCIDEVICE pPciDev, PSSMHANDLE pSSM) 1157 1234 { 1158 1235 return SSMR3GetMem(pSSM, &pPciDev->config[0], sizeof(pPciDev->config)); 1159 1236 } 1160 1237 1161 static DECLCALLBACK(int) pciR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)1238 static DECLCALLBACK(int) ich9pciR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 1162 1239 { 1163 1240 PPCIBUS pThis = PDMINS_2_DATA(pDevIns, PPCIBUS); 1164 1241 if (uVersion > VBOX_ICH9PCI_SAVED_STATE_VERSION) 1165 1242 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 1166 return pciR3CommonLoadExec(pThis, pSSM, uVersion, uPass);1167 } 1168 1169 static DECLCALLBACK(int) pcibridgeR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass)1243 return ich9pciR3CommonLoadExec(pThis, pSSM, uVersion, uPass); 1244 } 1245 1246 static DECLCALLBACK(int) ich9pcibridgeR3LoadExec(PPDMDEVINS pDevIns, PSSMHANDLE pSSM, uint32_t uVersion, uint32_t uPass) 1170 1247 { 1171 1248 PPCIBUS pThis = PDMINS_2_DATA(pDevIns, PPCIBUS); 1172 1249 if (uVersion > VBOX_ICH9PCI_SAVED_STATE_VERSION) 1173 1250 return VERR_SSM_UNSUPPORTED_DATA_UNIT_VERSION; 1174 return pciR3CommonLoadExec(pThis, pSSM, uVersion, uPass);1251 return ich9pciR3CommonLoadExec(pThis, pSSM, uVersion, uPass); 1175 1252 } 1176 1253 … … 1693 1770 if (!strcmp(pszName, PciSlotAssignments[i].pszName)) 1694 1771 { 1695 pPciDev->Int.s.fRequestedDevFn = true;1772 PCISetRequestedDevfunc(pPciDev); 1696 1773 return (PciSlotAssignments[i].iSlot << 3) + PciSlotAssignments[i].iFunction; 1697 1774 } … … 1709 1786 && !pBus->apDevices[iPos + 7]) 1710 1787 { 1711 pPciDev->Int.s.fRequestedDevFn = false;1788 PCIClearRequestedDevfunc(pPciDev); 1712 1789 return iPos; 1713 1790 } … … 1720 1797 PCIDevice** aSlot = &pBus->apDevices[iSlot << 3]; 1721 1798 1722 return (aSlot[0] && aSlot[0]->Int.s.fRequestedDevFn)1723 || (aSlot[1] && aSlot[1]->Int.s.fRequestedDevFn)1724 || (aSlot[2] && aSlot[2]->Int.s.fRequestedDevFn)1725 || (aSlot[3] && aSlot[3]->Int.s.fRequestedDevFn)1726 || (aSlot[4] && aSlot[4]->Int.s.fRequestedDevFn)1727 || (aSlot[5] && aSlot[5]->Int.s.fRequestedDevFn)1728 || (aSlot[6] && aSlot[6]->Int.s.fRequestedDevFn)1729 || (aSlot[7] && aSlot[7]->Int.s.fRequestedDevFn)1799 return (aSlot[0] && PCIIsRequestedDevfunc(aSlot[0])) 1800 || (aSlot[1] && PCIIsRequestedDevfunc(aSlot[1])) 1801 || (aSlot[2] && PCIIsRequestedDevfunc(aSlot[2])) 1802 || (aSlot[3] && PCIIsRequestedDevfunc(aSlot[3])) 1803 || (aSlot[4] && PCIIsRequestedDevfunc(aSlot[4])) 1804 || (aSlot[5] && PCIIsRequestedDevfunc(aSlot[5])) 1805 || (aSlot[6] && PCIIsRequestedDevfunc(aSlot[6])) 1806 || (aSlot[7] && PCIIsRequestedDevfunc(aSlot[7])) 1730 1807 ; 1731 1808 } … … 1750 1827 * its current habitant, if it wasn't hard assigned too. 1751 1828 */ 1752 if ( pPciDev->Int.s.fRequestedDevFn&&1753 pBus->apDevices[iDev] 1754 pBus->apDevices[iDev]->Int.s.fRequestedDevFn)1829 if (PCIIsRequestedDevfunc(pPciDev) && 1830 pBus->apDevices[iDev] && 1831 PCIIsRequestedDevfunc(pBus->apDevices[iDev])) 1755 1832 { 1756 1833 /* … … 1796 1873 pPciDev->Int.s.pfnConfigWrite = ich9pciConfigWrite; 1797 1874 pBus->apDevices[iDev] = pPciDev; 1798 if ( pPciDev->Int.s.fPciToPciBridge)1875 if (PCIIsPci2PciBridge(pPciDev)) 1799 1876 { 1800 1877 AssertMsg(pBus->cBridges < RT_ELEMENTS(pBus->apDevices), ("Number of bridges exceeds the number of possible devices on the bus\n")); … … 1918 1995 PciBusReg.pfnSetConfigCallbacksR3 = ich9pciSetConfigCallbacks; 1919 1996 PciBusReg.pfnSetIrqR3 = ich9pciSetIrq; 1920 PciBusReg.pfnSaveExecR3 = pciGenericSaveExec;1921 PciBusReg.pfnLoadExecR3 = pciGenericLoadExec;1997 PciBusReg.pfnSaveExecR3 = ich9pciGenericSaveExec; 1998 PciBusReg.pfnLoadExecR3 = ich9pciGenericLoadExec; 1922 1999 PciBusReg.pfnFakePCIBIOSR3 = ich9pciFakePCIBIOS; 1923 2000 PciBusReg.pszSetIrqRC = fGCEnabled ? "ich9pciSetIrq" : NULL; … … 2091 2168 N_("Configuration error: Failed to query boolean value \"R0Enabled\"")); 2092 2169 Log(("PCI: fGCEnabled=%RTbool fR0Enabled=%RTbool\n", fGCEnabled, fR0Enabled)); 2170 2171 /* 2172 * Init data and register the PCI bus. 2173 */ 2174 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 2175 pBus->pDevInsR3 = pDevIns; 2176 pBus->pDevInsR0 = PDMDEVINS_2_R0PTR(pDevIns); 2177 pBus->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 2178 pBus->papBridgesR3 = (PPCIDEVICE *)PDMDevHlpMMHeapAllocZ(pDevIns, sizeof(PPCIDEVICE) * RT_ELEMENTS(pBus->apDevices)); 2179 2180 PDMPCIBUSREG PciBusReg; 2181 PciBusReg.u32Version = PDM_PCIBUSREG_VERSION; 2182 PciBusReg.pfnRegisterR3 = ich9pcibridgeRegister; 2183 PciBusReg.pfnIORegionRegisterR3 = ich9pciIORegionRegister; 2184 PciBusReg.pfnSetConfigCallbacksR3 = ich9pciSetConfigCallbacks; 2185 PciBusReg.pfnSetIrqR3 = ich9pcibridgeSetIrq; 2186 PciBusReg.pfnSaveExecR3 = ich9pciGenericSaveExec; 2187 PciBusReg.pfnLoadExecR3 = ich9pciGenericLoadExec; 2188 PciBusReg.pfnFakePCIBIOSR3 = NULL; /* Only needed for the first bus. */ 2189 PciBusReg.pszSetIrqRC = fGCEnabled ? "ich9pcibridgeSetIrq" : NULL; 2190 PciBusReg.pszSetIrqR0 = fR0Enabled ? "ich9pcibridgeSetIrq" : NULL; 2191 rc = PDMDevHlpPCIBusRegister(pDevIns, &PciBusReg, &pBus->pPciHlpR3); 2192 if (RT_FAILURE(rc)) 2193 return PDMDEV_SET_ERROR(pDevIns, rc, 2194 N_("Failed to register ourselves as a PCI Bus")); 2195 if (pBus->pPciHlpR3->u32Version != PDM_PCIHLPR3_VERSION) 2196 return PDMDevHlpVMSetError(pDevIns, VERR_VERSION_MISMATCH, RT_SRC_POS, 2197 N_("PCI helper version mismatch; got %#x expected %#x"), 2198 pBus->pPciHlpR3->u32Version, PDM_PCIHLPR3_VERSION); 2199 2200 pBus->pPciHlpRC = pBus->pPciHlpR3->pfnGetRCHelpers(pDevIns); 2201 pBus->pPciHlpR0 = pBus->pPciHlpR3->pfnGetR0Helpers(pDevIns); 2202 2203 /* 2204 * Fill in PCI configs and add them to the bus. 2205 */ 2206 PCIDevSetVendorId( &pBus->aPciDev, 0x8086); /* Intel */ 2207 PCIDevSetDeviceId( &pBus->aPciDev, 0x2448); /* 82801 Mobile PCI bridge. */ 2208 PCIDevSetRevisionId(&pBus->aPciDev, 0xf2); 2209 PCIDevSetClassSub( &pBus->aPciDev, 0x04); /* pci2pci */ 2210 PCIDevSetClassBase( &pBus->aPciDev, 0x06); /* PCI_bridge */ 2211 PCIDevSetClassProg( &pBus->aPciDev, 0x01); /* Supports subtractive decoding. */ 2212 PCIDevSetHeaderType(&pBus->aPciDev, 0x01); /* Single function device which adheres to the PCI-to-PCI bridge spec. */ 2213 PCIDevSetCommand( &pBus->aPciDev, 0x00); 2214 PCIDevSetStatus( &pBus->aPciDev, 0x20); /* 66MHz Capable. */ 2215 PCIDevSetInterruptLine(&pBus->aPciDev, 0x00); /* This device does not assert interrupts. */ 2216 2217 /* 2218 * This device does not generate interrupts. Interrupt delivery from 2219 * devices attached to the bus is unaffected. 2220 */ 2221 PCIDevSetInterruptPin (&pBus->aPciDev, 0x00); 2222 2223 pBus->aPciDev.pDevIns = pDevIns; 2224 2225 /* Bridge-specific data */ 2226 PCISetPci2PciBridge(&pBus->aPciDev); 2227 pBus->aPciDev.Int.s.pfnBridgeConfigRead = ich9pcibridgeConfigRead; 2228 pBus->aPciDev.Int.s.pfnBridgeConfigWrite = ich9pcibridgeConfigWrite; 2229 2230 /* 2231 * Register this PCI bridge. The called function will take care on which bus we will get registered. 2232 */ 2233 rc = PDMDevHlpPCIRegister (pDevIns, &pBus->aPciDev); 2234 if (RT_FAILURE(rc)) 2235 return rc; 2236 2237 /* 2238 * The iBus property doesn't really represent the bus number 2239 * because the guest and the BIOS can choose different bus numbers 2240 * for them. 2241 * The bus number is mainly for the setIrq function to indicate 2242 * when the host bus is reached which will have iBus = 0. 2243 * Thathswhy the + 1. 2244 */ 2245 pBus->iBus = iInstance + 1; 2246 2247 /* 2248 * Register SSM handlers. We use the same saved state version as for the host bridge 2249 * to make changes easier. 2250 */ 2251 rc = PDMDevHlpSSMRegisterEx(pDevIns, VBOX_ICH9PCI_SAVED_STATE_VERSION, sizeof(*pBus) + 16*128, "pgm", 2252 NULL, NULL, NULL, 2253 NULL, ich9pcibridgeR3SaveExec, NULL, 2254 NULL, ich9pcibridgeR3LoadExec, NULL); 2255 if (RT_FAILURE(rc)) 2256 return rc; 2257 2093 2258 2094 2259 return VINF_SUCCESS; -
trunk/src/VBox/Devices/Bus/PCIInternal.h
r32216 r32776 72 72 struct PCIBus; 73 73 74 enum { 75 /** Set if the specific device fun was requested by PDM. 76 * If clear the device and it's functions can be relocated to satisfy the slot request of another device. */ 77 PCIDEV_FLAG_REQUESTED_DEVFUNC = 1<<0, 78 /** Flag whether the device is a pci-to-pci bridge. 79 * This is set prior to device registration. */ 80 PCIDEV_FLAG_PCI_TO_PCI_BRIDGE = 1<<1, 81 /** Flag whether the device is a PCI Express device. 82 * This is set prior to device registration. */ 83 PCIDEV_FLAG_PCI_EXPRESS_DEVICE = 1<<2 84 }; 85 74 86 /** 75 87 * PCI Device - Internal data. … … 94 106 R3PTRTYPE(PFNPCICONFIGWRITE) pfnConfigWrite; 95 107 96 /** Set if the specific device fun was requested by PDM. 97 * If clear the device and it's functions can be relocated to satisfy the slot request of another device. */ 98 bool fRequestedDevFn; 99 /** Flag whether the device is a pci-to-pci bridge. 100 * This is set prior to device registration. */ 101 bool fPciToPciBridge; 108 /* Flags of this PCI device, see PCIDEV_FLAG_ constants */ 109 int32_t uFlags; 102 110 /** Current state of the IRQ pin of the device. */ 103 111 int32_t uIrqPinState;
Note:
See TracChangeset
for help on using the changeset viewer.