Changeset 32765 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Sep 24, 2010 4:26:32 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r32715 r32765 184 184 // See 7.2.2. PCI Express Enhanced Configuration Mechanism for details of address 185 185 // mapping, we take n=8 approach 186 DECLINLINE(void) ich9pciPhysToPciAddr(RTGCPHYS GCPhysAddr, PciAddress* pPciAddr) 187 { 186 DECLINLINE(void) ich9pciPhysToPciAddr(PPCIGLOBALS pGlobals, RTGCPHYS GCPhysAddr, PciAddress* pPciAddr) 187 { 188 GCPhysAddr = GCPhysAddr - pGlobals->u64PciConfigMMioAddress; 188 189 pPciAddr->iBus = (GCPhysAddr >> 20) & ((1<<8) - 1); 189 190 pPciAddr->iDeviceFunc = (GCPhysAddr >> 15) & ((1<<(5+3)) - 1); // 5 bits - device, 3 bits - function … … 288 289 static int ich9pciDataWriteAddr(PPCIGLOBALS pGlobals, PciAddress* pAddr, uint32_t val, int len) 289 290 { 291 292 if (pAddr->iRegister > 0xff) 293 { 294 LogRel(("PCI: attempt to write extended register: %x (%d) <- val\n", pAddr->iRegister, len, val)); 295 return 0; 296 } 297 290 298 if (pAddr->iBus != 0) 291 299 { … … 367 375 static int ich9pciDataReadAddr(PPCIGLOBALS pGlobals, PciAddress* pPciAddr, int len, uint32_t *pu32) 368 376 { 377 if (pPciAddr->iRegister > 0xff) 378 { 379 LogRel(("PCI: attempt to read extended register: %x\n", pPciAddr->iRegister)); 380 *pu32 = 0; 381 return 0; 382 } 383 384 369 385 if (pPciAddr->iBus != 0) 370 386 { … … 536 552 uint32_t u32 = 0; 537 553 538 ich9pciPhysToPciAddr( GCPhysAddr, &aDest);554 ich9pciPhysToPciAddr(pGlobals, GCPhysAddr, &aDest); 539 555 540 556 PCI_LOCK(pDevIns, VINF_IOM_HC_IOPORT_WRITE); … … 556 572 int rc = ich9pciDataWriteAddr(pGlobals, &aDest, u32, cb); 557 573 PCI_UNLOCK(pDevIns); 558 Assert(false);559 574 560 575 return rc; … … 567 582 uint32_t rv = 0; 568 583 569 ich9pciPhysToPciAddr( GCPhysAddr, &aDest);584 ich9pciPhysToPciAddr(pGlobals, GCPhysAddr, &aDest); 570 585 571 586 PCI_LOCK(pDevIns, VINF_IOM_HC_IOPORT_WRITE); … … 591 606 PCI_UNLOCK(pDevIns); 592 607 593 Assert(false);594 608 return rc; 595 609 }
Note:
See TracChangeset
for help on using the changeset viewer.