- Timestamp:
- Nov 18, 2016 10:11:14 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r64702 r64707 83 83 #ifdef IN_RING3 84 84 static void ich9pcibridgeReset(PPDMDEVINS pDevIns); 85 DECLINLINE(PPDMPCIDEV) ich9pciFindBridge(PDEVPCIBUS pBus, uint8_t iBus);85 DECLINLINE(PPDMPCIDEV) ich9pciFindBridge(PDEVPCIBUS pBus, uint8_t uBus); 86 86 static void ich9pciBiosInitDevice(PDEVPCIROOT pPciRoot, uint8_t uBus, uint8_t uDevFn); 87 87 #endif … … 687 687 688 688 689 DECLINLINE(PPDMPCIDEV) ich9pciFindBridge(PDEVPCIBUS pBus, uint8_t iBus)689 DECLINLINE(PPDMPCIDEV) ich9pciFindBridge(PDEVPCIBUS pBus, uint8_t uBus) 690 690 { 691 691 /* Search for a fitting bridge. */ … … 701 701 uint32_t uSecondary = PDMPciDevGetByte(pBridge, VBOX_PCI_SECONDARY_BUS); 702 702 uint32_t uSubordinate = PDMPciDevGetByte(pBridge, VBOX_PCI_SUBORDINATE_BUS); 703 Log3(("ich9pciFindBridge on bus %p, bridge %d: %d in %d..%d\n", pBus, iBridge, iBus, uSecondary, uSubordinate));704 if ( iBus >= uSecondary && iBus <= uSubordinate)703 Log3(("ich9pciFindBridge on bus %p, bridge %d: %d in %d..%d\n", pBus, iBridge, uBus, uSecondary, uSubordinate)); 704 if (uBus >= uSecondary && uBus <= uSubordinate) 705 705 return pBridge; 706 706 } … … 922 922 923 923 924 static DECLCALLBACK(void) ich9pcibridgeConfigWrite(PPDMDEVINSR3 pDevIns, uint8_t iBus, uint8_t iDevice, uint32_t u32Address, uint32_t u32Value, unsigned cb)924 static DECLCALLBACK(void) ich9pcibridgeConfigWrite(PPDMDEVINSR3 pDevIns, uint8_t uBus, uint8_t uDevice, uint32_t u32Address, uint32_t u32Value, unsigned cb) 925 925 { 926 926 PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS); 927 927 928 LogFlowFunc((": pDevIns=%p iBus=%d iDevice=%d u32Address=%u u32Value=%u cb=%d\n", pDevIns, iBus, iDevice, u32Address, u32Value, cb));928 LogFlowFunc((": pDevIns=%p uBus=%d uDevice=%d u32Address=%u u32Value=%u cb=%d\n", pDevIns, uBus, uDevice, u32Address, u32Value, cb)); 929 929 930 930 /* If the current bus is not the target bus search for the bus which contains the device. */ 931 if ( iBus != PDMPciDevGetByte(&pBus->PciDev, VBOX_PCI_SECONDARY_BUS))932 { 933 PPDMPCIDEV pBridgeDevice = ich9pciFindBridge(pBus, iBus);931 if (uBus != PDMPciDevGetByte(&pBus->PciDev, VBOX_PCI_SECONDARY_BUS)) 932 { 933 PPDMPCIDEV pBridgeDevice = ich9pciFindBridge(pBus, uBus); 934 934 if (pBridgeDevice) 935 935 { 936 936 AssertPtr(pBridgeDevice->Int.s.pfnBridgeConfigWrite); 937 pBridgeDevice->Int.s.pfnBridgeConfigWrite(pBridgeDevice->Int.s.CTX_SUFF(pDevIns), iBus, iDevice,937 pBridgeDevice->Int.s.pfnBridgeConfigWrite(pBridgeDevice->Int.s.CTX_SUFF(pDevIns), uBus, uDevice, 938 938 u32Address, u32Value, cb); 939 939 } … … 942 942 { 943 943 /* This is the target bus, pass the write to the device. */ 944 PPDMPCIDEV pPciDev = pBus->apDevices[ iDevice];944 PPDMPCIDEV pPciDev = pBus->apDevices[uDevice]; 945 945 if (pPciDev) 946 946 { … … 951 951 } 952 952 953 static DECLCALLBACK(uint32_t) ich9pcibridgeConfigRead(PPDMDEVINSR3 pDevIns, uint8_t iBus, uint8_t iDevice, uint32_t u32Address, unsigned cb)953 static DECLCALLBACK(uint32_t) ich9pcibridgeConfigRead(PPDMDEVINSR3 pDevIns, uint8_t uBus, uint8_t uDevice, uint32_t u32Address, unsigned cb) 954 954 { 955 955 PDEVPCIBUS pBus = PDMINS_2_DATA(pDevIns, PDEVPCIBUS); 956 956 uint32_t u32Value; 957 957 958 LogFlowFunc((": pDevIns=%p iBus=%d iDevice=%d u32Address=%u cb=%d\n", pDevIns, iBus, iDevice, u32Address, cb));958 LogFlowFunc((": pDevIns=%p uBus=%d uDevice=%d u32Address=%u cb=%d\n", pDevIns, uBus, uDevice, u32Address, cb)); 959 959 960 960 /* If the current bus is not the target bus search for the bus which contains the device. */ 961 if ( iBus != PDMPciDevGetByte(&pBus->PciDev, VBOX_PCI_SECONDARY_BUS))962 { 963 PPDMPCIDEV pBridgeDevice = ich9pciFindBridge(pBus, iBus);961 if (uBus != PDMPciDevGetByte(&pBus->PciDev, VBOX_PCI_SECONDARY_BUS)) 962 { 963 PPDMPCIDEV pBridgeDevice = ich9pciFindBridge(pBus, uBus); 964 964 if (pBridgeDevice) 965 965 { 966 966 AssertPtr( pBridgeDevice->Int.s.pfnBridgeConfigRead); 967 u32Value = pBridgeDevice->Int.s.pfnBridgeConfigRead(pBridgeDevice->Int.s.CTX_SUFF(pDevIns), iBus, iDevice,967 u32Value = pBridgeDevice->Int.s.pfnBridgeConfigRead(pBridgeDevice->Int.s.CTX_SUFF(pDevIns), uBus, uDevice, 968 968 u32Address, cb); 969 969 } … … 974 974 { 975 975 /* This is the target bus, pass the read to the device. */ 976 PPDMPCIDEV pPciDev = pBus->apDevices[ iDevice];976 PPDMPCIDEV pPciDev = pBus->apDevices[uDevice]; 977 977 if (pPciDev) 978 978 { … … 1701 1701 * @param uBusPrimary The primary bus number the bus is connected to. 1702 1702 */ 1703 static uint8_t ich9pciBiosInitBridgeTopology(PDEVPCIROOT pPciRoot, PDEVPCIBUS pBus, uint32_t *pbmUsed, u nsigneduBusPrimary)1703 static uint8_t ich9pciBiosInitBridgeTopology(PDEVPCIROOT pPciRoot, PDEVPCIBUS pBus, uint32_t *pbmUsed, uint8_t uBusPrimary) 1704 1704 { 1705 1705 PPDMPCIDEV pBridgeDev = &pBus->PciDev; … … 2357 2357 { 2358 2358 PDEVPCIBUS pBusSub = PDMINS_2_DATA(pBus->papBridgesR3[iBridge]->Int.s.CTX_SUFF(pDevIns), PDEVPCIBUS); 2359 devpciR3InfoIndent(pHlp, iIndentLvl); 2360 pHlp->pfnPrintf(pHlp, "bridge topology: primary=%d secondary=%d subordinate=%d\n", 2361 PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_PRIMARY_BUS), 2362 PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SECONDARY_BUS), 2363 PDMPciDevGetByte(&pBusSub->PciDev, VBOX_PCI_SUBORDINATE_BUS)); 2359 2364 devpciR3InfoPciBus(pBusSub, pHlp, iIndentLvl + 1, fRegisters); 2360 2365 }
Note:
See TracChangeset
for help on using the changeset viewer.