Changeset 80945 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Sep 23, 2019 10:54:25 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 133526
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r80943 r80945 362 362 LogFlowFunc(("Port=%#x u32=%#x cb=%d (config=%#10x)\n", uPort, u32, cb, pThis->uConfigReg)); 363 363 NOREF(pvUser); 364 int rc= VINF_SUCCESS;364 VBOXSTRICTRC rcStrict = VINF_SUCCESS; 365 365 if (!(uPort % cb)) 366 366 { 367 367 PCI_LOCK(pDevIns, VINF_IOM_R3_IOPORT_WRITE); 368 368 369 do 369 do /* do-brain-dead-while-false-utter-stupidity-loop */ 370 370 { 371 371 /* Configuration space mapping enabled? */ … … 378 378 379 379 /* Perform configuration space write */ 380 rc = ich9pciConfigWrite(pDevIns, pThis, &aPciAddr, u32, cb, VINF_IOM_R3_IOPORT_WRITE);380 rcStrict = ich9pciConfigWrite(pDevIns, pThis, &aPciAddr, u32, cb, VINF_IOM_R3_IOPORT_WRITE); 381 381 } while (0); 382 382 … … 385 385 else 386 386 AssertMsgFailed(("Unaligned write to port %#x u32=%#x cb=%d\n", uPort, u32, cb)); 387 return rc;387 return VBOXSTRICTRC_TODO(rcStrict); 388 388 } 389 389 … … 473 473 474 474 /* Configuration space mapping enabled? */ 475 int rc;475 VBOXSTRICTRC rcStrict; 476 476 if (!(pThis->uConfigReg & (1 << 31))) 477 rc = VINF_SUCCESS;477 rcStrict = VINF_SUCCESS; 478 478 else 479 479 { … … 483 483 484 484 /* Perform configuration space read */ 485 rc = ich9pciConfigRead(pThis, &aPciAddr, cb, pu32, VINF_IOM_R3_IOPORT_READ);485 rcStrict = ich9pciConfigRead(pThis, &aPciAddr, cb, pu32, VINF_IOM_R3_IOPORT_READ); 486 486 } 487 487 488 488 PCI_UNLOCK(pDevIns); 489 489 490 LogFlowFunc(("Port=%#x cb=%#x (config=%#10x) -> %#x (%Rrc)\n", uPort, cb, *pu32, pThis->uConfigReg, rc));491 return rc ;490 LogFlowFunc(("Port=%#x cb=%#x (config=%#10x) -> %#x (%Rrc)\n", uPort, cb, *pu32, pThis->uConfigReg, VBOXSTRICTRC_VAL(rcStrict))); 491 return rcStrict; 492 492 } 493 493 AssertMsgFailed(("Unaligned read from port %#x cb=%d\n", uPort, cb)); … … 672 672 673 673 /* Perform configuration space write */ 674 int rc= ich9pciConfigWrite(pDevIns, pPciRoot, &aDest, u32, cb, VINF_IOM_R3_MMIO_WRITE);674 VBOXSTRICTRC rcStrict = ich9pciConfigWrite(pDevIns, pPciRoot, &aDest, u32, cb, VINF_IOM_R3_MMIO_WRITE); 675 675 PCI_UNLOCK(pDevIns); 676 676 677 return rc;677 return VBOXSTRICTRC_TODO(rcStrict); 678 678 } 679 679 … … 696 696 { 697 697 PDEVPCIROOT pPciRoot = PDMINS_2_DATA(pDevIns, PDEVPCIROOT); 698 uint32_t rv;699 698 NOREF(pvUser); 700 699 … … 708 707 709 708 /* Perform configuration space read */ 710 int rc = ich9pciConfigRead(pPciRoot, &aDest, cb, &rv, VINF_IOM_R3_MMIO_READ);711 712 if (RT_SUCCESS(rc ))709 uint32_t u32Value; 710 VBOXSTRICTRC rcStrict = ich9pciConfigRead(pPciRoot, &aDest, cb, &u32Value, VINF_IOM_R3_MMIO_READ); 711 if (RT_SUCCESS(rcStrict)) /** @todo this is wrong, though it probably works fine due to double buffering... */ 713 712 { 714 713 switch (cb) 715 714 { 716 715 case 1: 717 *(uint8_t *)pv = (uint8_t)rv;716 *(uint8_t *)pv = (uint8_t)u32Value; 718 717 break; 719 718 case 2: 720 *(uint16_t *)pv = (uint16_t)rv;719 *(uint16_t *)pv = (uint16_t)u32Value; 721 720 break; 722 721 case 4: 723 *(uint32_t *)pv = (uint32_t)rv;722 *(uint32_t *)pv = u32Value; 724 723 break; 725 724 default: 726 Assert (false);725 AssertFailed(); 727 726 break; 728 727 } 729 728 } 729 730 730 PCI_UNLOCK(pDevIns); 731 732 return rc; 731 return rcStrict; 733 732 } 734 733
Note:
See TracChangeset
for help on using the changeset viewer.