- Timestamp:
- Jan 25, 2007 8:49:05 PM (18 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdm.h
r255 r332 5689 5689 5690 5690 /** 5691 * @copydoc PDMDEVHLP::pfnGetVM 5692 */ 5693 DECLINLINE(PVM) PDMDevHlpGetVM(PPDMDEVINS pDevIns) 5694 { 5695 return pDevIns->pDevHlp->pfnGetVM(pDevIns); 5696 } 5697 5698 /** 5691 5699 * @copydoc PDMDEVHLP::pfnPhysReadGCVirt 5692 5700 */ -
trunk/src/VBox/Devices/Audio/DevIchAc97.cpp
r317 r332 40 40 41 41 #undef LOG_VOICES 42 //#define USE_MIXER 42 43 43 44 #define AC97_SSM_VERSION 1 … … 580 581 #ifdef USE_MIXER 581 582 record_select (s, 0); 582 set_volume (s, AC97_Master_Volume_Mute, AUD_MIXER_VOLUME ,0x8000);583 set_volume (s, AC97_PCM_Out_Volume_Mute, AUD_MIXER_PCM ,0x8808);583 set_volume (s, AC97_Master_Volume_Mute, AUD_MIXER_VOLUME, 0x8000); 584 set_volume (s, AC97_PCM_Out_Volume_Mute, AUD_MIXER_PCM, 0x8808); 584 585 set_volume (s, AC97_Line_In_Volume_Mute, AUD_MIXER_LINE_IN, 0x8808); 585 586 #else … … 1473 1474 record_select (s, mixer_load (s, AC97_Record_Select)); 1474 1475 #define V_(a, b) set_volume (s, a, b, mixer_load (s, a)) 1475 V_ (AC97_Master_Volume_Mute, AUD_MIXER_VOLUME);1476 V_ (AC97_Master_Volume_Mute, AUD_MIXER_VOLUME); 1476 1477 V_ (AC97_PCM_Out_Volume_Mute, AUD_MIXER_PCM); 1477 1478 V_ (AC97_Line_In_Volume_Mute, AUD_MIXER_LINE_IN); … … 1667 1668 /** @todo r=bird: add a devhlp for this of course! */ 1668 1669 if (!pData->ac97.voice_pi || !pData->ac97.voice_po || !pData->ac97.voice_mc) 1669 VMSetRuntimeError( pDevIns->pDevHlp->pfnGetVM(pDevIns), false,1670 VMSetRuntimeError(PDMDevHlpGetVM(pDevIns), false, 1670 1671 N_("Some audio devices could not be opened. Guest applications " 1671 1672 "generating audio output or depending on audio input may hang. " -
trunk/src/VBox/Devices/Bus/DevPCI.cpp
r1 r332 1312 1312 PPCIGLOBALS pGlobals = DEVINS2PCIGLOBALS(pDevIns); 1313 1313 PPCIBUS pBus = PDMINS2DATA(pDevIns, PPCIBUS); 1314 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);1314 PVM pVM = PDMDevHlpGetVM(pDevIns); 1315 1315 Assert(pVM); 1316 1316 -
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r1 r332 3634 3634 { 3635 3635 PPDMDEVINS pDevIns = pData->pDevInsHC; 3636 PGMHandlerPhysicalReset( pDevIns->pDevHlp->pfnGetVM(pDevIns), pData->GCPhysVRAM);3636 PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pData->GCPhysVRAM); 3637 3637 pData->fHaveDirtyBits = false; 3638 3638 } … … 4038 4038 Assert(pDevIns); 4039 4039 4040 pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);4040 pVM = PDMDevHlpGetVM(pDevIns); 4041 4041 Assert(pVM); 4042 4042 … … 4134 4134 * already registered before trying to do that all over again. 4135 4135 */ 4136 PVM pVM = pPciDev->pDevIns->pDevHlp->pfnGetVM(pPciDev->pDevIns);4136 PVM pVM = PDMDevHlpGetVM(pPciDev->pDevIns); 4137 4137 if (pData->GCPhysVRAM) 4138 4138 { … … 4353 4353 && pData->GCPhysVRAM) 4354 4354 { 4355 int rc = PGMHandlerPhysicalReset( pDevIns->pDevHlp->pfnGetVM(pDevIns), pData->GCPhysVRAM);4355 int rc = PGMHandlerPhysicalReset(PDMDevHlpGetVM(pDevIns), pData->GCPhysVRAM); 4356 4356 AssertRC(rc); 4357 4357 } … … 4504 4504 unsigned i; 4505 4505 PVGASTATE pData = PDMINS2DATA(pDevIns, PVGASTATE); 4506 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);4506 PVM pVM = PDMDevHlpGetVM(pDevIns); 4507 4507 #ifdef VBE_NEW_DYN_LIST 4508 4508 uint32_t cCustomModes; -
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r306 r332 1200 1200 #if 0 1201 1201 if (pData->RDRAPhysOld != 0 && pData->GCRDRA != pData->RDRAPhysOld) 1202 PGMHandlerPhysicalDeregister( pDevIns->pDevHlp->pfnGetVM(pDevIns),1202 PGMHandlerPhysicalDeregister(PDMDevHlpGetVM(pDevIns), 1203 1203 pData->RDRAPhysOld & ~PAGE_OFFSET_MASK); 1204 1204 if ( pData->TRDAPhysOld != 0 && pData->GCTDRA != pData->TRDAPhysOld … … 1209 1209 { 1210 1210 int rc; 1211 rc = PGMR3HandlerPhysicalRegister( pDevIns->pDevHlp->pfnGetVM(pDevIns),1211 rc = PGMR3HandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns), 1212 1212 PGMPHYSHANDLERTYPE_PHYSICAL_WRITE, 1213 1213 pData->GCRDRA & ~PAGE_OFFSET_MASK, … … 1228 1228 { 1229 1229 if (pData->TRDAPhysOld != 0) 1230 PGMHandlerPhysicalDeregister( pDevIns->pDevHlp->pfnGetVM(pDevIns),1230 PGMHandlerPhysicalDeregister(PDMDevHlpVM(pDevIns), 1231 1231 pData->TRDAPhysOld & ~PAGE_OFFSET_MASK); 1232 1232 1233 1233 int rc; 1234 1234 1235 rc = PGMR3HandlerPhysicalRegister( pDevIns->pDevHlp->pfnGetVM(pDevIns),1235 rc = PGMR3HandlerPhysicalRegister(PDMDevHlpGetVM(pDevIns), 1236 1236 PGMPHYSHANDLERTYPE_PHYSICAL_WRITE, 1237 1237 pData->GCTDRA & ~PAGE_OFFSET_MASK, … … 3942 3942 3943 3943 #ifdef PCNET_NO_POLLING 3944 rc = PDMR3GetSymbolR0Lazy( pDevIns->pDevHlp->pfnGetVM(pDevIns), NULL, "EMInterpretInstruction", (void **)&pData->pfnEMInterpretInstructionR0);3944 rc = PDMR3GetSymbolR0Lazy(PDMDevHlpGetVM(pDevIns), NULL, "EMInterpretInstruction", (void **)&pData->pfnEMInterpretInstructionR0); 3945 3945 if (VBOX_SUCCESS(rc)) 3946 3946 { … … 3949 3949 */ 3950 3950 RTGCPTR pfnHandlerGC; 3951 rc = PDMR3GetSymbolGCLazy( pDevIns->pDevHlp->pfnGetVM(pDevIns), NULL, "EMInterpretInstruction", (RTGCPTR *)&pData->pfnEMInterpretInstructionGC);3951 rc = PDMR3GetSymbolGCLazy(PDMDevHlpGetVM(pDevIns), NULL, "EMInterpretInstruction", (RTGCPTR *)&pData->pfnEMInterpretInstructionGC); 3952 3952 } 3953 3953 if (VBOX_FAILURE(rc)) -
trunk/src/VBox/Devices/PC/DevPcBios.cpp
r155 r332 195 195 AssertRC(rc); 196 196 #else 197 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);197 PVM pVM = PDMDevHlpGetVM(pDevIns); 198 198 IOMIOPortWrite(pVM, 0x70, off, 1); 199 199 IOMIOPortWrite(pVM, 0x71, u32Val, 1); … … 276 276 uint32_t u32; 277 277 unsigned i; 278 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);278 PVM pVM = PDMDevHlpGetVM(pDevIns); 279 279 PPDMIBLOCKBIOS apHDs[4] = {0}; 280 280 PPDMIBLOCKBIOS apFDs[2] = {0}; … … 533 533 { 534 534 #if 0 535 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);535 PVM pVM = PDMDevHlpGetVM(pDevIns); 536 536 AssertRelease(pVM); 537 537 VM_FF_SET(pVM, VM_FF_TERMINATE); … … 659 659 * Paranoia: Check that the BIOS ROM hasn't changed. 660 660 */ 661 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);661 PVM pVM = PDMDevHlpGetVM(pDevIns); 662 662 /* the low ROM mapping. */ 663 663 unsigned cb = RT_MIN(g_cbPcBiosBinary, 128 * _1K); -
trunk/src/VBox/Devices/Storage/DevATA.cpp
r307 r332 2391 2391 PPDMDEVINS pDevIns = ATADEVSTATE_2_DEVINS(s); 2392 2392 PVMREQ pReq; 2393 rc = VMR3ReqCall( pDevIns->pDevHlp->pfnGetVM(pDevIns), &pReq, RT_INDEFINITE_WAIT,2393 rc = VMR3ReqCall(PDMDevHlpGetVM(pDevIns), &pReq, RT_INDEFINITE_WAIT, 2394 2394 (PFNRT)s->pDrvMount->pfnUnmount, 1, s->pDrvMount); 2395 2395 AssertReleaseRC(rc); … … 4580 4580 MMGCRamWriteNoTrapHandler((char *)GCDst + i, s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart + i, cb); 4581 4581 #else /* !IN_GC */ 4582 rc = PGMPhysWriteGCPtrDirty( pDevIns->pDevHlp->pfnGetVM(pDevIns), GCDst, s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart, cbTransfer);4582 rc = PGMPhysWriteGCPtrDirty(PDMDevHlpGetVM(pDevIns), GCDst, s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart, cbTransfer); 4583 4583 Assert(rc == VINF_SUCCESS); 4584 4584 #endif /* IN_GC */ … … 4637 4637 MMGCRamReadNoTrapHandler(s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart + i, (char *)GCSrc + i, cb); 4638 4638 #else /* !IN_GC */ 4639 rc = PGMPhysReadGCPtr( pDevIns->pDevHlp->pfnGetVM(pDevIns), s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart, GCSrc, cbTransfer);4639 rc = PGMPhysReadGCPtr(PDMDevHlpGetVM(pDevIns), s->CTXSUFF(pbIOBuffer) + s->iIOBufferPIODataStart, GCSrc, cbTransfer); 4640 4640 Assert(rc == VINF_SUCCESS); 4641 4641 #endif /* IN_GC */ … … 4728 4728 * can be either from ataPowerOff or ataSuspend), there is no other 4729 4729 * reasonable solution. */ 4730 fVMLocked = VMMR3LockIsOwner( pDevIns->pDevHlp->pfnGetVM(pDevIns));4730 fVMLocked = VMMR3LockIsOwner(PDMDevHlpGetVM(pDevIns)); 4731 4731 4732 4732 if (fVMLocked) … … 4764 4764 { 4765 4765 if (s->pbIOBufferHC) 4766 s->pbIOBufferGC = MMHyperHC2GC( pDevIns->pDevHlp->pfnGetVM(pDevIns), s->pbIOBufferHC);4766 s->pbIOBufferGC = MMHyperHC2GC(PDMDevHlpGetVM(pDevIns), s->pbIOBufferHC); 4767 4767 } 4768 4768 … … 4943 4943 * Allocate I/O buffer. 4944 4944 */ 4945 PVM pVM = PDMDevHlpGetVM(pDevIns); 4945 4946 if (pIf->cbIOBuffer) 4946 4947 { … … 4952 4953 AssertRelease(pIf->cbIOBuffer == ATA_MAX_MULT_SECTORS * 512); 4953 4954 Assert(pIf->pbIOBufferHC); 4954 Assert(pIf->pbIOBufferGC == MMHyperHC2GC(p DevIns->pDevHlp->pfnGetVM(pDevIns), pIf->pbIOBufferHC));4955 Assert(pIf->pbIOBufferGC == MMHyperHC2GC(pVM, pIf->pbIOBufferHC)); 4955 4956 } 4956 4957 else … … 4961 4962 pIf->cbIOBuffer = ATA_MAX_MULT_SECTORS * 512; 4962 4963 Assert(!pIf->pbIOBufferHC); 4963 rc = MMHyperAlloc(p DevIns->pDevHlp->pfnGetVM(pDevIns), pIf->cbIOBuffer, 1, MM_TAG_PDM_DEVICE_USER, (void **)&pIf->pbIOBufferHC);4964 rc = MMHyperAlloc(pVM, pIf->cbIOBuffer, 1, MM_TAG_PDM_DEVICE_USER, (void **)&pIf->pbIOBufferHC); 4964 4965 if (VBOX_FAILURE(rc)) 4965 4966 return VERR_NO_MEMORY; 4966 pIf->pbIOBufferGC = MMHyperHC2GC(p DevIns->pDevHlp->pfnGetVM(pDevIns), pIf->pbIOBufferHC);4967 pIf->pbIOBufferGC = MMHyperHC2GC(pVM, pIf->pbIOBufferHC); 4967 4968 } 4968 4969 … … 5404 5405 pData->aCts[i].aIfs[j].pDevInsGC = PDMDEVINS_2_GCPTR(pDevIns); 5405 5406 pData->aCts[i].aIfs[j].pControllerHC = &pData->aCts[i]; 5406 pData->aCts[i].aIfs[j].pControllerGC = MMHyperHC2GC( pDevIns->pDevHlp->pfnGetVM(pDevIns), &pData->aCts[i]);5407 pData->aCts[i].aIfs[j].pControllerGC = MMHyperHC2GC(PDMDevHlpGetVM(pDevIns), &pData->aCts[i]); 5407 5408 pData->aCts[i].aIfs[j].IBase.pfnQueryInterface = ataQueryInterface; 5408 5409 pData->aCts[i].aIfs[j].IMountNotify.pfnMountNotify = ataMountNotify; -
trunk/src/VBox/Devices/VMMDev/VBoxDev.cpp
r211 r332 236 236 { 237 237 PPDMDEVINS pDevIns = VMMDEVSTATE_2_DEVINS(pVMMDevState); 238 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);238 PVM pVM = PDMDevHlpGetVM(pDevIns); 239 239 int rc; 240 240 PVMREQ pReq; … … 645 645 { 646 646 VMMDevReqHypervisorInfo *hypervisorInfo = (VMMDevReqHypervisorInfo*)requestHeader; 647 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);647 PVM pVM = PDMDevHlpGetVM(pDevIns); 648 648 size_t hypervisorSize = 0; 649 649 requestHeader->rc = PGMR3MappingsSize(pVM, &hypervisorSize); … … 667 667 { 668 668 VMMDevReqHypervisorInfo *hypervisorInfo = (VMMDevReqHypervisorInfo*)requestHeader; 669 PVM pVM = pDevIns->pDevHlp->pfnGetVM(pDevIns);669 PVM pVM = PDMDevHlpGetVM(pDevIns); 670 670 if (hypervisorInfo->hypervisorStart == 0) 671 671 { … … 1184 1184 * already registered before trying to do that all over again. 1185 1185 */ 1186 PVM pVM = pPciDev->pDevIns->pDevHlp->pfnGetVM(pPciDev->pDevIns);1186 PVM pVM = PDMDevHlpGetVM(pPciDev->pDevIns); 1187 1187 1188 1188 if (pData->GCPhysVMMDevRAM)
Note:
See TracChangeset
for help on using the changeset viewer.