Changeset 39154 in vbox for trunk/src/VBox
- Timestamp:
- Oct 31, 2011 3:36:29 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r39151 r39154 351 351 /** A flag indicating that the bulk list may have in-flight URBs. */ 352 352 bool fBulkNeedsCleaning; 353 354 /** Whether RC/R0 is enabled. */ 355 bool fRZEnabled; 353 356 354 357 uint32_t Alignment3; /**< Align size on a 8 byte boundary. */ … … 4790 4793 * @param cb The size of the read. 4791 4794 */ 4792 PDMBOTHCBDECL(int) ohci Read(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb)4795 PDMBOTHCBDECL(int) ohciMmioRead(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void *pv, unsigned cb) 4793 4796 { 4794 4797 POHCI pOhci = PDMINS_2_DATA(pDevIns, POHCI); … … 4829 4832 * @param cb The size of the data being written. 4830 4833 */ 4831 PDMBOTHCBDECL(int) ohci Write(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb)4834 PDMBOTHCBDECL(int) ohciMmioWrite(PPDMDEVINS pDevIns, void *pvUser, RTGCPHYS GCPhysAddr, void const *pv, unsigned cb) 4832 4835 { 4833 4836 POHCI pOhci = PDMINS_2_DATA(pDevIns, POHCI); … … 4838 4841 if (cb != sizeof(uint32_t)) 4839 4842 { 4840 Log2(("ohci Write: Bad write size!!! GCPhysAddr=%RGp cb=%d\n", GCPhysAddr, cb));4843 Log2(("ohciMmioWrite: Bad write size!!! GCPhysAddr=%RGp cb=%d\n", GCPhysAddr, cb)); 4841 4844 return VINF_SUCCESS; 4842 4845 } 4843 4846 if (GCPhysAddr & 0x3) 4844 4847 { 4845 Log2(("ohci Write: Unaligned write!!! GCPhysAddr=%RGp cb=%d\n", GCPhysAddr, cb));4848 Log2(("ohciMmioWrite: Unaligned write!!! GCPhysAddr=%RGp cb=%d\n", GCPhysAddr, cb)); 4846 4849 return VINF_SUCCESS; 4847 4850 } … … 4874 4877 POHCI pOhci = (POHCI)pPciDev; 4875 4878 int rc = PDMDevHlpMMIORegister(pOhci->CTX_SUFF(pDevIns), GCPhysAddress, cb, NULL /*pvUser*/, 4876 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_PASSTHRU, 4877 ohciWrite, ohciRead, "USB OHCI"); 4879 IOMMMIO_FLAGS_READ_DWORD | IOMMMIO_FLAGS_WRITE_DWORD_ZEROED 4880 | IOMMMIO_FLAGS_DBGSTOP_ON_COMPLICATED_WRITE, 4881 ohciMmioWrite, ohciMmioRead, "USB OHCI"); 4878 4882 if (RT_FAILURE(rc)) 4879 4883 return rc; 4880 4884 4881 # if 1 /* this enabled / disabled GC/R0 stuff */ 4882 rc = PDMDevHlpMMIORegisterRC(pOhci->CTX_SUFF(pDevIns), GCPhysAddress, cb, NIL_RTRCPTR /*pvUser*/, "ohciWrite", "ohciRead"); 4883 if (RT_FAILURE(rc)) 4884 return rc; 4885 4886 rc = PDMDevHlpMMIORegisterR0(pOhci->CTX_SUFF(pDevIns), GCPhysAddress, cb, NIL_RTR0PTR /*pvUser*/, "ohciWrite", "ohciRead"); 4887 if (RT_FAILURE(rc)) 4888 return rc; 4889 # endif 4885 if (pOhci->fRZEnabled) 4886 { 4887 rc = PDMDevHlpMMIORegisterRC(pOhci->CTX_SUFF(pDevIns), GCPhysAddress, cb, 4888 NIL_RTRCPTR /*pvUser*/, "ohciMmioWrite", "ohciMmioRead"); 4889 if (RT_FAILURE(rc)) 4890 return rc; 4891 4892 rc = PDMDevHlpMMIORegisterR0(pOhci->CTX_SUFF(pDevIns), GCPhysAddress, cb, 4893 NIL_RTR0PTR /*pvUser*/, "ohciMmioWrite", "ohciMmioRead"); 4894 if (RT_FAILURE(rc)) 4895 return rc; 4896 } 4890 4897 4891 4898 pOhci->MMIOBase = GCPhysAddress; … … 5366 5373 static DECLCALLBACK(int) ohciR3Construct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 5367 5374 { 5368 POHCI pOhci = PDMINS_2_DATA(pDevIns, POHCI); 5369 int rc; 5375 POHCI pOhci = PDMINS_2_DATA(pDevIns, POHCI); 5370 5376 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 5371 5372 /*5373 * Read configuration. No configuration keys are currently supported.5374 */5375 if (!CFGMR3AreValuesValid(pCfg, "\0"))5376 return PDMDEV_SET_ERROR(pDevIns, VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES,5377 N_("Configuration error: Unknown config key"));5378 5377 5379 5378 /* … … 5409 5408 pOhci->RootHub.ILeds.pfnQueryStatusLed = ohciRhQueryStatusLed; 5410 5409 5410 5411 /* 5412 * Read configuration. No configuration keys are currently supported. 5413 */ 5414 PDMDEV_VALIDATE_CONFIG_RETURN(pDevIns, "RZEnabled", ""); 5415 int rc = CFGMR3QueryBoolDef(pCfg, "RZEnabled", &pOhci->fRZEnabled, true); 5416 AssertLogRelRCReturn(rc, rc); 5417 5418 5411 5419 /* 5412 5420 * Register PCI device and I/O region. … … 5423 5431 aMsiReg.iMsiNextOffset = 0x0; 5424 5432 rc = PDMDevHlpPCIRegisterMsi(pDevIns, &aMsiReg); 5425 if (RT_FAILURE 5433 if (RT_FAILURE(rc)) 5426 5434 { 5427 5435 PCIDevSetCapabilityList(&pOhci->PciDev, 0x0); -
trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp
r39112 r39154 85 85 * VINF_IOM_HC_MMIO_READ may be returned. 86 86 * 87 * @param pVM The VM handle. 87 88 * @param pRange The range to write to. 88 89 * @param GCPhys The physical address to start writing. … … 90 91 * @param cbValue The size of the value to write. 91 92 */ 92 static VBOXSTRICTRC iomMMIODoComplicatedWrite(P IOMMMIORANGE pRange, RTGCPHYS GCPhys, void const *pvValue, unsigned cbValue)93 static VBOXSTRICTRC iomMMIODoComplicatedWrite(PVM pVM, PIOMMMIORANGE pRange, RTGCPHYS GCPhys, void const *pvValue, unsigned cbValue) 93 94 { 94 95 AssertReturn( (pRange->fFlags & IOMMMIO_FLAGS_WRITE_MODE) != IOMMMIO_FLAGS_WRITE_PASSTHRU … … 100 101 101 102 /* 103 * Do debug stop if requested. 104 */ 105 int rc = VINF_SUCCESS; NOREF(pVM); 106 #ifdef VBOX_STRICT 107 if (pRange->fFlags & IOMMMIO_FLAGS_DBGSTOP_ON_COMPLICATED_WRITE) 108 # ifdef IN_RING3 109 rc = DBGFR3EventSrc(pVM, DBGFEVENT_DEV_STOP, RT_SRC_POS, 110 "Complicated write %#x byte at %RGp to %s\n", cbValue, GCPhys, R3STRING(pRange->pszDesc)); 111 # else 112 return VINF_IOM_HC_MMIO_WRITE; 113 # endif 114 #endif 115 116 117 /* 102 118 * Split and conquer. 103 119 */ 104 int rc = VINF_SUCCESS;105 120 for (;;) 106 121 { … … 251 266 GCPhysFault, (void *)pvData, cb); /** @todo fix const!! */ 252 267 else 253 rc = iomMMIODoComplicatedWrite(p Range, GCPhysFault, pvData, cb);268 rc = iomMMIODoComplicatedWrite(pVM, pRange, GCPhysFault, pvData, cb); 254 269 } 255 270 else … … 271 286 * VINF_IOM_HC_MMIO_WRITE may be returned. 272 287 * 288 * @param pVM The VM handle. 273 289 * @param pRange The range to read from. 274 290 * @param GCPhys The physical address to start reading. … … 276 292 * @param cbValue The size of the value to read. 277 293 */ 278 static VBOXSTRICTRC iomMMIODoComplicatedRead(P IOMMMIORANGE pRange, RTGCPHYS GCPhys, void *pvValue, unsigned cbValue)294 static VBOXSTRICTRC iomMMIODoComplicatedRead(PVM pVM, PIOMMMIORANGE pRange, RTGCPHYS GCPhys, void *pvValue, unsigned cbValue) 279 295 { 280 296 AssertReturn( (pRange->fFlags & IOMMMIO_FLAGS_READ_MODE) == IOMMMIO_FLAGS_READ_DWORD … … 285 301 286 302 /* 303 * Do debug stop if requested. 304 */ 305 int rc = VINF_SUCCESS; NOREF(pVM); 306 #ifdef VBOX_STRICT 307 if (pRange->fFlags & IOMMMIO_FLAGS_DBGSTOP_ON_COMPLICATED_WRITE) 308 # ifdef IN_RING3 309 rc = DBGFR3EventSrc(pVM, DBGFEVENT_DEV_STOP, RT_SRC_POS, 310 "Complicated read %#x byte at %RGp to %s\n", cbValue, GCPhys, R3STRING(pRange->pszDesc)); 311 # else 312 return VINF_IOM_HC_MMIO_READ; 313 # endif 314 #endif 315 316 /* 287 317 * Split and conquer. 288 318 */ 289 int rc = VINF_SUCCESS;290 319 for (;;) 291 320 { … … 439 468 rc = pRange->CTX_SUFF(pfnReadCallback)(pRange->CTX_SUFF(pDevIns), pRange->CTX_SUFF(pvUser), GCPhys, pvValue, cbValue); 440 469 else 441 rc = iomMMIODoComplicatedRead(p Range, GCPhys, pvValue, cbValue);470 rc = iomMMIODoComplicatedRead(pVM, pRange, GCPhys, pvValue, cbValue); 442 471 } 443 472 else … … 1804 1833 pu32Value, (unsigned)cbValue); 1805 1834 else 1806 rc = iomMMIODoComplicatedRead(p Range, GCPhys, pu32Value, (unsigned)cbValue);1835 rc = iomMMIODoComplicatedRead(pVM, pRange, GCPhys, pu32Value, (unsigned)cbValue); 1807 1836 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfRead), a); 1808 1837 switch (VBOXSTRICTRC_VAL(rc)) … … 1933 1962 GCPhys, &u32Value, (unsigned)cbValue); 1934 1963 else 1935 rc = iomMMIODoComplicatedWrite(p Range, GCPhys, &u32Value, (unsigned)cbValue);1964 rc = iomMMIODoComplicatedWrite(pVM, pRange, GCPhys, &u32Value, (unsigned)cbValue); 1936 1965 STAM_PROFILE_STOP(&pStats->CTX_SUFF_Z(ProfWrite), a); 1937 1966 #ifndef IN_RING3 -
trunk/src/VBox/VMM/include/DBGFInternal.h
r37410 r39154 104 104 typedef struct DBGFINFO *PDBGFINFO; 105 105 106 #ifdef IN_RING3 106 107 /** 107 108 * Info structure. … … 160 161 char szName[1]; 161 162 } DBGFINFO; 163 #endif /* IN_RING3 */ 162 164 163 165 -
trunk/src/VBox/VMM/include/PGMInternal.h
r39078 r39154 3991 3991 int pgmGstLazyMapPml4(PVMCPU pVCpu, PX86PML4 *ppPml4); 3992 3992 3993 # if defined(VBOX_STRICT) && HC_ARCH_BITS == 64 3993 # if defined(VBOX_STRICT) && HC_ARCH_BITS == 64 && defined(IN_RING3) 3994 3994 DECLCALLBACK(int) pgmR3CmdCheckDuplicatePages(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs); 3995 3995 DECLCALLBACK(int) pgmR3CmdShowSharedModules(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PVM pVM, PCDBGCVAR paArgs, unsigned cArgs);
Note:
See TracChangeset
for help on using the changeset viewer.