Changeset 2270 in vbox for trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
- Timestamp:
- Apr 20, 2007 12:58:15 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IOMAll.cpp
r2230 r2270 435 435 pRange->pfnWriteCallback= pfnWriteCallback; 436 436 pRange->pfnFillCallback = pfnFillCallback; 437 437 #ifdef IN_GC 438 438 pRange->pDevIns = pDevIns; 439 439 pRange->pszDesc = MMHyperGC2HC(pVM, (void *)pszDesc); 440 440 #else 441 441 pRange->pDevIns = MMHyperHC2GC(pVM, pDevIns); 442 442 pRange->pszDesc = pszDesc; 443 443 #endif 444 444 445 445 /* … … 478 478 * @param pszDesc Pointer to description string. This must not be freed. 479 479 */ 480 IOMDECL(int) IOMIOPortRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RT HCPTR pvUser,481 HCPTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, HCPTRTYPE(PFNIOMIOPORTIN) pfnInCallback,482 HCPTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, HCPTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback,480 IOMDECL(int) IOMIOPortRegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTIOPORT PortStart, RTUINT cPorts, RTR0PTR pvUser, 481 R0PTRTYPE(PFNIOMIOPORTOUT) pfnOutCallback, R0PTRTYPE(PFNIOMIOPORTIN) pfnInCallback, 482 R0PTRTYPE(PFNIOMIOPORTOUTSTRING) pfnOutStrCallback, R0PTRTYPE(PFNIOMIOPORTINSTRING) pfnInStrCallback, 483 483 const char *pszDesc) 484 484 { … … 548 548 pRange->pfnInStrCallback = pfnInStrCallback; 549 549 #ifdef IN_GC 550 pRange->pDevIns = MMHyperGC2HC(pVM, pDevIns); 551 pRange->pszDesc = MMHyperGC2HC(pVM, (void *)pszDesc); 550 pRange->pDevIns = MMHyperGCToR0(pVM, pDevIns); 551 pRange->pszDesc = MMHyperGCToR3(pVM, (void *)pszDesc); 552 #elif defined(IN_RING3) 553 pRange->pDevIns = MMHyperR3ToR0(pVM, pDevIns); 554 pRange->pszDesc = pszDesc; 552 555 #else 553 556 pRange->pDevIns = pDevIns; 554 pRange->pszDesc = pszDesc;557 pRange->pszDesc = MMHyperR0ToR3(pVM, (RTR0PTR)pszDesc); 555 558 #endif 556 559 … … 590 593 * @param pszDesc Pointer to description string. This must not be freed. 591 594 */ 592 IOMDECL(int) IOMMMIORegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RT HCPTR pvUser,593 HCPTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, HCPTRTYPE(PFNIOMMMIOREAD) pfnReadCallback,594 HCPTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc)595 IOMDECL(int) IOMMMIORegisterR0(PVM pVM, PPDMDEVINS pDevIns, RTGCPHYS GCPhysStart, RTUINT cbRange, RTR0PTR pvUser, 596 R0PTRTYPE(PFNIOMMMIOWRITE) pfnWriteCallback, R0PTRTYPE(PFNIOMMMIOREAD) pfnReadCallback, 597 R0PTRTYPE(PFNIOMMMIOFILL) pfnFillCallback, const char *pszDesc) 595 598 { 596 599 LogFlow(("IOMMMIORegisterR0: pDevIns=%p GCPhysStart=%#x cbRange=%#x pvUser=%VHv pfnWriteCallback=%#x pfnReadCallback=%#x pfnFillCallback=%#x pszDesc=%s\n", … … 658 661 pRange->pfnFillCallback = pfnFillCallback; 659 662 #ifdef IN_GC 660 pRange->pDevIns = MMHyperGC2HC(pVM, pDevIns); 661 pRange->pszDesc = MMHyperGC2HC(pVM, (void *)pszDesc); 663 pRange->pDevIns = MMHyperGCToR0(pVM, pDevIns); 664 pRange->pszDesc = MMHyperGCToR3(pVM, (void *)pszDesc); 665 #elif defined(IN_RING3) 666 pRange->pDevIns = MMHyperR3ToR0(pVM, pDevIns); 667 pRange->pszDesc = pszDesc; 662 668 #else 663 669 pRange->pDevIns = pDevIns; 664 pRange->pszDesc = pszDesc;670 pRange->pszDesc = MMHyperR0ToR3(pVM, (RTR0PTR)pszDesc); 665 671 #endif 666 672
Note:
See TracChangeset
for help on using the changeset viewer.