Changeset 32342 in vbox
- Timestamp:
- Sep 9, 2010 12:08:48 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Builtins.cpp
r30976 r32342 60 60 if (RT_FAILURE(rc)) 61 61 return rc; 62 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9); 63 if (RT_FAILURE(rc)) 64 return rc; 62 65 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePcArch); 63 66 if (RT_FAILURE(rc)) … … 165 168 #endif 166 169 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePCIBridge); 170 if (RT_FAILURE(rc)) 171 return rc; 172 rc = pCallbacks->pfnRegister(pCallbacks, &g_DevicePciIch9Bridge); 167 173 if (RT_FAILURE(rc)) 168 174 return rc; -
trunk/src/VBox/Devices/Builtins.h
r30976 r32342 36 36 37 37 extern const PDMDEVREG g_DevicePCI; 38 extern const PDMDEVREG g_DevicePciIch9; 38 39 extern const PDMDEVREG g_DevicePcArch; 39 40 extern const PDMDEVREG g_DevicePcBios; … … 77 78 #endif 78 79 extern const PDMDEVREG g_DevicePCIBridge; 80 extern const PDMDEVREG g_DevicePciIch9Bridge; 79 81 #ifdef VBOX_WITH_LSILOGIC 80 82 extern const PDMDEVREG g_DeviceLsiLogicSCSI; -
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r32280 r32342 800 800 int rc = ich9pciDataRead(pGlobals, addr & 3, len, &u32Val); 801 801 AssertRC(rc); 802 switch (len) 803 { 804 case 1: 805 u32Val &= 0xff; 806 break; 807 case 2: 808 u32Val &= 0xffff; 809 break; 810 } 802 811 return u32Val; 803 812 } … … 912 921 { 913 922 uint32_t *paddr; 914 int i, pin, pic_irq;915 923 uint16_t uDevClass, uVendor, uDevice; 916 924 … … 923 931 return; 924 932 925 switch (uDev ice)933 switch (uDevClass) 926 934 { 927 935 case 0x0101: … … 1005 1013 u32Size = (~u32Size) + 1; 1006 1014 1007 Log(("%s: Size of region %u for device %d on bus %d is %u\n", __FUNCTION__, i , uDevFn, uBus, u32Size));1015 Log(("%s: Size of region %u for device %d on bus %d is %u\n", __FUNCTION__, iRegion, uDevFn, uBus, u32Size)); 1008 1016 1009 1017 if (u32Size) … … 1011 1019 paddr = fIsPio ? &pGlobals->uPciBiosIo : &pGlobals->uPciBiosMmio; 1012 1020 *paddr = (*paddr + u32Size - 1) & ~(u32Size - 1); 1013 Log(("%s: Start address of %s region %u is %#x\n", __FUNCTION__, (fIsPio ? "I/O" : "MMIO"), i , *paddr));1014 ich9pciSetRegionAddress(pGlobals, uBus, uDevFn, i , *paddr);1021 Log(("%s: Start address of %s region %u is %#x\n", __FUNCTION__, (fIsPio ? "I/O" : "MMIO"), iRegion, *paddr)); 1022 ich9pciSetRegionAddress(pGlobals, uBus, uDevFn, iRegion, *paddr); 1015 1023 *paddr += u32Size; 1016 1024 Log(("%s: New address is %#x\n", __FUNCTION__, *paddr)); … … 1505 1513 1506 1514 pBus->aPciDev.pDevIns = pDevIns; 1507 pBus->aPciDev.Int.s.fRequestedDevFn = true;1508 1515 /* We register Host<->PCI controller on the bus */ 1509 ich9pciRegisterInternal(pBus, 0, &pBus->aPciDev, "i82801");1510 1511 /** @todo: ther chipset devices shall be registered too */1512 /** @todo: bridges? */1516 ich9pciRegisterInternal(pBus, -1, &pBus->aPciDev, "i82801"); 1517 1518 /** @todo: other chipset devices shall be registered too */ 1519 /** @todo: what to with bridges? */ 1513 1520 1514 1521 return VINF_SUCCESS; … … 1574 1581 static DECLCALLBACK(void) ich9pcibridgeReset(PPDMDEVINS pDevIns) 1575 1582 { 1583 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 1584 1585 /* Reset config space to default values. */ 1586 pBus->aPciDev.config[VBOX_PCI_PRIMARY_BUS] = 0; 1587 pBus->aPciDev.config[VBOX_PCI_SECONDARY_BUS] = 0; 1588 pBus->aPciDev.config[VBOX_PCI_SUBORDINATE_BUS] = 0; 1576 1589 } 1577 1590 … … 1582 1595 static DECLCALLBACK(void) ich9pcibridgeRelocate(PPDMDEVINS pDevIns, RTGCINTPTR offDelta) 1583 1596 { 1597 PPCIBUS pBus = PDMINS_2_DATA(pDevIns, PPCIBUS); 1598 pBus->pDevInsRC = PDMDEVINS_2_RCPTR(pDevIns); 1599 1600 /* Relocate RC pointers for the attached pci devices. */ 1601 for (uint32_t i = 0; i < RT_ELEMENTS(pBus->apDevices); i++) 1602 { 1603 if (pBus->apDevices[i]) 1604 pBus->apDevices[i]->Int.s.pBusRC += offDelta; 1605 } 1606 1584 1607 } 1585 1608 -
trunk/src/VBox/Devices/Makefile.kmk
r32241 r32342 298 298 Input/UsbMouse.cpp \ 299 299 Bus/DevPCI.cpp \ 300 $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,)\300 Bus/DevPciIch9.cpp \ 301 301 Graphics/DevVGA.cpp \ 302 302 Storage/DevATA.cpp \ … … 551 551 VBoxDDGC_SOURCES = \ 552 552 Bus/DevPCI.cpp \ 553 $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,)\553 Bus/DevPciIch9.cpp \ 554 554 Graphics/DevVGA.cpp \ 555 555 Input/DevPS2.cpp \ … … 663 663 VBoxDDR0_SOURCES = \ 664 664 Bus/DevPCI.cpp \ 665 $(if $(VBOX_WITH_NEWPCI),Bus/DevPciIch9.cpp,)\665 Bus/DevPciIch9.cpp \ 666 666 Graphics/DevVGA.cpp \ 667 667 Input/DevPS2.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.