Changeset 33687 in vbox for trunk/src/VBox/Devices/Bus
- Timestamp:
- Nov 2, 2010 1:05:01 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 67311
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Bus/DevPciIch9.cpp
r33606 r33687 253 253 { 254 254 PPCIGLOBALS pThis = PDMINS_2_DATA(pDevIns, PPCIGLOBALS); 255 255 256 PCI_LOCK(pDevIns, VINF_IOM_HC_IOPORT_WRITE); 256 257 pThis->uConfigReg = u32 & ~3; /* Bits 0-1 are reserved and we silently clear them */ 257 258 PCI_UNLOCK(pDevIns); 258 259 } 260 259 261 return VINF_SUCCESS; 260 262 } … … 311 313 pBridgeDevice->Int.s.pfnBridgeConfigWrite(pBridgeDevice->pDevIns, pAddr->iBus, pAddr->iDeviceFunc, pAddr->iRegister, val, cb); 312 314 } 315 else 316 { 317 // do nothing, bridge not found 318 } 313 319 #else 314 320 rc = rcReschedule; … … 360 366 static void ich9pciNoMem(void* ptr, int cb) 361 367 { 362 memset(ptr, 0xff, cb); 368 for (int i = 0; i < cb; i++) 369 ((uint8_t*)ptr)[i] = 0xff; 363 370 } 364 371 … … 448 455 } 449 456 450 static int ich9pciDataRead(PPCIGLOBALS pGlobals, uint32_t addr, int len, uint32_t *pu32)457 static int ich9pciDataRead(PPCIGLOBALS pGlobals, uint32_t addr, int cb, uint32_t *pu32) 451 458 { 452 459 PciAddress aPciAddr; 453 460 454 LogFlow(("ich9pciDataRead: config=%x len=%d\n", pGlobals->uConfigReg, len)); 461 LogFlow(("ich9pciDataRead: config=%x cb=%d\n", pGlobals->uConfigReg, cb)); 462 463 *pu32 = 0xffffffff; 455 464 456 465 if (!(pGlobals->uConfigReg & (1 << 31))) … … 463 472 ich9pciStateToPciAddr(pGlobals, addr, &aPciAddr); 464 473 465 return ich9pciDataReadAddr(pGlobals, &aPciAddr, len, pu32, VINF_IOM_HC_IOPORT_READ);474 return ich9pciDataReadAddr(pGlobals, &aPciAddr, cb, pu32, VINF_IOM_HC_IOPORT_READ); 466 475 } 467 476 … … 1038 1047 } 1039 1048 else 1040 ich9pciNoMem(&u32Value, cb);1049 ich9pciNoMem(&u32Value, 4); 1041 1050 } 1042 1051 else … … 1050 1059 } 1051 1060 else 1052 ich9pciNoMem(&u32Value, cb);1061 ich9pciNoMem(&u32Value, 4); 1053 1062 } 1054 1063 … … 1979 1988 }, 1980 1989 /* Disable, if we may wish to have multiple AHCI controllers */ 1981 #if 11982 1990 { 1983 1991 "ahci", 31, 2 /* SATA controller */ 1984 1992 }, 1985 #endif1986 1993 { 1987 1994 "smbus", 31, 3 /* System Management Bus */ … … 2021 2028 2022 2029 int iStartPos = 0; 2023 2024 /* We add bridges starting slot 22 */2025 if (!strcmp(pszName, "ich9pcibridge"))2026 {2027 iStartPos = 22 * 8;2028 }2029 2030 2030 2031 /* Otherwise when assigning a slot, we need to make sure all its functions are available */
Note:
See TracChangeset
for help on using the changeset viewer.