Changeset 63682 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Sep 2, 2016 9:22:00 AM (8 years ago)
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/IOM.cpp
r62643 r63682 1360 1360 */ 1361 1361 VMMR3_INT_DECL(int) 1362 IOMR3MmioRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTHCPTR pvUser,1362 IOMR3MmioRegisterR3(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser, 1363 1363 R3PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, R3PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 1364 1364 R3PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, uint32_t fFlags, const char *pszDesc) 1365 1365 { 1366 LogFlow(("IOMR3MmioRegisterR3: pDevIns=%p GCPhysStart=%RGp cbRange=% #xpvUser=%RHv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x fFlags=%#x pszDesc=%s\n",1366 LogFlow(("IOMR3MmioRegisterR3: pDevIns=%p GCPhysStart=%RGp cbRange=%RGp pvUser=%RHv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x fFlags=%#x pszDesc=%s\n", 1367 1367 pDevIns, GCPhysStart, cbRange, pvUser, pfnWriteCallback, pfnReadCallback, pfnFillCallback, fFlags, pszDesc)); 1368 1368 int rc; … … 1371 1371 * Validate input. 1372 1372 */ 1373 AssertMsgReturn(GCPhysStart + (cbRange - 1) >= GCPhysStart,("Wrapped! %RGp %#x bytes\n", GCPhysStart, cbRange),1373 AssertMsgReturn(GCPhysStart + (cbRange - 1) >= GCPhysStart,("Wrapped! %RGp LB %RGp\n", GCPhysStart, cbRange), 1374 1374 VERR_IOM_INVALID_MMIO_RANGE); 1375 1375 AssertMsgReturn( !(fFlags & ~IOMMMIO_FLAGS_VALID_MASK) … … 1463 1463 */ 1464 1464 VMMR3_INT_DECL(int) 1465 IOMR3MmioRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTGCPTR pvUser,1465 IOMR3MmioRegisterRC(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTGCPTR pvUser, 1466 1466 RCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, RCPTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 1467 1467 RCPTRTYPE(PFNIOMMMIOFILL) pfnFillCallback) 1468 1468 { 1469 LogFlow(("IOMR3MmioRegisterRC: pDevIns=%p GCPhysStart=%RGp cbRange=% #xpvUser=%RGv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x\n",1469 LogFlow(("IOMR3MmioRegisterRC: pDevIns=%p GCPhysStart=%RGp cbRange=%RGp pvUser=%RGv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x\n", 1470 1470 pDevIns, GCPhysStart, cbRange, pvUser, pfnWriteCallback, pfnReadCallback, pfnFillCallback)); 1471 1471 AssertReturn(!HMIsEnabled(pVM), VERR_IOM_HM_IPE); … … 1476 1476 if (!pfnWriteCallback && !pfnReadCallback) 1477 1477 { 1478 AssertMsgFailed(("No callbacks! %RGp LB %#x\n", GCPhysStart, cbRange));1478 AssertMsgFailed(("No callbacks! %RGp LB %RGp\n", GCPhysStart, cbRange)); 1479 1479 return VERR_INVALID_PARAMETER; 1480 1480 } … … 1522 1522 */ 1523 1523 VMMR3_INT_DECL(int) 1524 IOMR3MmioRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTR0PTR pvUser,1524 IOMR3MmioRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser, 1525 1525 R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, 1526 1526 R0PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 1527 1527 R0PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback) 1528 1528 { 1529 LogFlow(("IOMR3MmioRegisterR0: pDevIns=%p GCPhysStart=%RGp cbRange=% #xpvUser=%RHv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x\n",1529 LogFlow(("IOMR3MmioRegisterR0: pDevIns=%p GCPhysStart=%RGp cbRange=%RGp pvUser=%RHv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x\n", 1530 1530 pDevIns, GCPhysStart, cbRange, pvUser, pfnWriteCallback, pfnReadCallback, pfnFillCallback)); 1531 1531 … … 1535 1535 if (!pfnWriteCallback && !pfnReadCallback) 1536 1536 { 1537 AssertMsgFailed(("No callbacks! %RGp LB %#x\n", GCPhysStart, cbRange));1537 AssertMsgFailed(("No callbacks! %RGp LB %RGp\n", GCPhysStart, cbRange)); 1538 1538 return VERR_INVALID_PARAMETER; 1539 1539 } … … 1576 1576 * all the checks you might expect it to do. 1577 1577 */ 1578 VMMR3_INT_DECL(int) IOMR3MmioDeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange)1579 { 1580 LogFlow(("IOMR3MmioDeregister: pDevIns=%p GCPhysStart=%RGp cbRange=% #x\n", pDevIns, GCPhysStart, cbRange));1578 VMMR3_INT_DECL(int) IOMR3MmioDeregister(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange) 1579 { 1580 LogFlow(("IOMR3MmioDeregister: pDevIns=%p GCPhysStart=%RGp cbRange=%RGp\n", pDevIns, GCPhysStart, cbRange)); 1581 1581 1582 1582 /* … … 1586 1586 if (GCPhysLast < GCPhysStart) 1587 1587 { 1588 AssertMsgFailed(("Wrapped! %#x LB %#x\n", GCPhysStart, cbRange));1588 AssertMsgFailed(("Wrapped! %#x LB %RGp\n", GCPhysStart, cbRange)); 1589 1589 return VERR_IOM_INVALID_MMIO_RANGE; 1590 1590 } … … 1606 1606 } 1607 1607 AssertMsgReturnStmt(pRange->pDevInsR3 == pDevIns, 1608 ("Not owner! GCPhys=%RGp %RGp LB %#x%s\n", GCPhys, GCPhysStart, cbRange, pRange->pszDesc),1608 ("Not owner! GCPhys=%RGp %RGp LB %RGp %s\n", GCPhys, GCPhysStart, cbRange, pRange->pszDesc), 1609 1609 IOM_UNLOCK_EXCL(pVM), 1610 1610 VERR_IOM_NOT_MMIO_RANGE_OWNER); 1611 1611 AssertMsgReturnStmt(pRange->Core.KeyLast <= GCPhysLast, 1612 ("Incomplete R3 range! GCPhys=%RGp %RGp LB %#x%s\n", GCPhys, GCPhysStart, cbRange, pRange->pszDesc),1612 ("Incomplete R3 range! GCPhys=%RGp %RGp LB %RGp %s\n", GCPhys, GCPhysStart, cbRange, pRange->pszDesc), 1613 1613 IOM_UNLOCK_EXCL(pVM), 1614 1614 VERR_IOM_INCOMPLETE_MMIO_RANGE); -
trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
r62643 r63682 274 274 275 275 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegister} */ 276 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTHCPTR pvUser,276 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTHCPTR pvUser, 277 277 PFNIOMMMIOWRITE pfnWrite, PFNIOMMMIOREAD pfnRead, PFNIOMMMIOFILL pfnFill, 278 278 uint32_t fFlags, const char *pszDesc) … … 281 281 PVM pVM = pDevIns->Internal.s.pVMR3; 282 282 VM_ASSERT_EMT(pVM); 283 LogFlow(("pdmR3DevHlp_MMIORegister: caller='%s'/%d: GCPhysStart=%RGp cbRange=% #xpvUser=%p pfnWrite=%p pfnRead=%p pfnFill=%p fFlags=%#x pszDesc=%p:{%s}\n",283 LogFlow(("pdmR3DevHlp_MMIORegister: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pfnWrite=%p pfnRead=%p pfnFill=%p fFlags=%#x pszDesc=%p:{%s}\n", 284 284 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pfnWrite, pfnRead, pfnFill, pszDesc, fFlags, pszDesc)); 285 285 … … 300 300 301 301 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegisterRC} */ 302 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterRC(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTRCPTR pvUser,302 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterRC(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTRCPTR pvUser, 303 303 const char *pszWrite, const char *pszRead, const char *pszFill) 304 304 { … … 306 306 PVM pVM = pDevIns->Internal.s.pVMR3; 307 307 VM_ASSERT_EMT(pVM); 308 LogFlow(("pdmR3DevHlp_MMIORegisterRC: caller='%s'/%d: GCPhysStart=%RGp cbRange=% #xpvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n",308 LogFlow(("pdmR3DevHlp_MMIORegisterRC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 309 309 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 310 310 … … 357 357 358 358 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIORegisterR0} */ 359 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterR0(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange, RTR0PTR pvUser,359 static DECLCALLBACK(int) pdmR3DevHlp_MMIORegisterR0(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange, RTR0PTR pvUser, 360 360 const char *pszWrite, const char *pszRead, const char *pszFill) 361 361 { 362 362 PDMDEV_ASSERT_DEVINS(pDevIns); 363 363 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 364 LogFlow(("pdmR3DevHlp_MMIORegisterHC: caller='%s'/%d: GCPhysStart=%RGp cbRange=% #xpvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n",364 LogFlow(("pdmR3DevHlp_MMIORegisterHC: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp pvUser=%p pszWrite=%p:{%s} pszRead=%p:{%s} pszFill=%p:{%s}\n", 365 365 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange, pvUser, pszWrite, pszWrite, pszRead, pszRead, pszFill, pszFill)); 366 366 … … 385 385 rc3 = pdmR3DevGetSymbolR0Lazy(pDevIns, pszFill, &pfnR0PtrFill); 386 386 if (RT_SUCCESS(rc) && RT_SUCCESS(rc2) && RT_SUCCESS(rc3)) 387 rc = IOMR3MmioRegisterR0(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvUser, pfnR0PtrWrite, pfnR0PtrRead, pfnR0PtrFill); 387 rc = IOMR3MmioRegisterR0(pDevIns->Internal.s.pVMR3, pDevIns, GCPhysStart, cbRange, pvUser, 388 pfnR0PtrWrite, pfnR0PtrRead, pfnR0PtrFill); 388 389 else 389 390 { … … 409 410 410 411 /** @interface_method_impl{PDMDEVHLPR3,pfnMMIODeregister} */ 411 static DECLCALLBACK(int) pdmR3DevHlp_MMIODeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, uint32_tcbRange)412 static DECLCALLBACK(int) pdmR3DevHlp_MMIODeregister(PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTGCPHYS cbRange) 412 413 { 413 414 PDMDEV_ASSERT_DEVINS(pDevIns); 414 415 VM_ASSERT_EMT(pDevIns->Internal.s.pVMR3); 415 LogFlow(("pdmR3DevHlp_MMIODeregister: caller='%s'/%d: GCPhysStart=%RGp cbRange=% #x\n",416 LogFlow(("pdmR3DevHlp_MMIODeregister: caller='%s'/%d: GCPhysStart=%RGp cbRange=%RGp\n", 416 417 pDevIns->pReg->szName, pDevIns->iInstance, GCPhysStart, cbRange)); 417 418
Note:
See TracChangeset
for help on using the changeset viewer.