VirtualBox

Changeset 2291 in vbox for trunk


Ignore:
Timestamp:
Apr 20, 2007 11:26:42 PM (18 years ago)
Author:
vboxsync
Message:

More ring-0/ring-3 type safety (callbacks and PDM symbol resolving).

Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/pdm.h

    r2286 r2291  
    34173417} PDMPCIHLPR0;
    34183418/** Pointer to PCI helpers. */
    3419 typedef HCPTRTYPE(PDMPCIHLPR0 *) PPDMPCIHLPR0;
     3419typedef R0PTRTYPE(PDMPCIHLPR0 *) PPDMPCIHLPR0;
    34203420/** Pointer to const PCI helpers. */
    3421 typedef HCPTRTYPE(const PDMPCIHLPR0 *) PCPDMPCIHLPR0;
     3421typedef R0PTRTYPE(const PDMPCIHLPR0 *) PCPDMPCIHLPR0;
    34223422
    34233423/** Current PDMPCIHLPR0 version number. */
     
    36473647
    36483648/** Pointer to PIC R0 helpers. */
    3649 typedef HCPTRTYPE(PDMPICHLPR0 *) PPDMPICHLPR0;
     3649typedef R0PTRTYPE(PDMPICHLPR0 *) PPDMPICHLPR0;
    36503650/** Pointer to const PIC R0 helpers. */
    3651 typedef HCPTRTYPE(const PDMPICHLPR0 *) PCPDMPICHLPR0;
     3651typedef R0PTRTYPE(const PDMPICHLPR0 *) PCPDMPICHLPR0;
    36523652
    36533653/** Current PDMPICHLPR0 version number. */
     
    39493949typedef GCPTRTYPE(PDMAPICHLPR0 *) PPDMAPICHLPR0;
    39503950/** Pointer to const APIC helpers. */
    3951 typedef HCPTRTYPE(const PDMAPICHLPR0 *) PCPDMAPICHLPR0;
     3951typedef R0PTRTYPE(const PDMAPICHLPR0 *) PCPDMAPICHLPR0;
    39523952
    39533953/** Current PDMAPICHLPR0 version number. */
     
    41714171} PDMIOAPICHLPR0;
    41724172/** Pointer to IOAPIC R0 helpers. */
    4173 typedef HCPTRTYPE(PDMAPICHLPGC *)PPDMIOAPICHLPR0;
     4173typedef R0PTRTYPE(PDMAPICHLPGC *) PPDMIOAPICHLPR0;
    41744174/** Pointer to const IOAPIC helpers. */
    4175 typedef HCPTRTYPE(const PDMIOAPICHLPR0 *) PCPDMIOAPICHLPR0;
     4175typedef R0PTRTYPE(const PDMIOAPICHLPR0 *) PCPDMIOAPICHLPR0;
    41764176
    41774177/** Current PDMIOAPICHLPR0 version number. */
     
    65976597 * @param   ppvValue        Where to store the symbol value.
    65986598 */
    6599 PDMR3DECL(int) PDMR3GetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue);
     6599PDMR3DECL(int) PDMR3GetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
    66006600
    66016601/**
     
    66096609 * @param   ppvValue        Where to store the symbol value.
    66106610 */
    6611 PDMR3DECL(int) PDMR3GetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue);
     6611PDMR3DECL(int) PDMR3GetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
    66126612
    66136613/**
  • trunk/include/iprt/cdefs.h

    r1451 r2291  
    471471# define DECLR3CALLBACKMEMBER(type, name, args)  type (RTCALL * name) args
    472472#else
    473 # define DECLR3CALLBACKMEMBER(type, name, args)  RTHCPTR name
     473# define DECLR3CALLBACKMEMBER(type, name, args)  RTR3PTR name
    474474#endif
    475475
     
    495495# define DECLR0CALLBACKMEMBER(type, name, args)  type (RTCALL * name) args
    496496#else
    497 # define DECLR0CALLBACKMEMBER(type, name, args)  RTHCPTR name
     497# define DECLR0CALLBACKMEMBER(type, name, args)  RTR0PTR name
    498498#endif
    499499
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r1856 r2291  
    41724172
    41734173#ifdef PCNET_NO_POLLING
    4174     rc = PDMR3GetSymbolR0Lazy(PDMDevHlpGetVM(pDevIns), NULL, "EMInterpretInstruction", (void **)&pData->pfnEMInterpretInstructionR0);
     4174    rc = PDMR3GetSymbolR0Lazy(PDMDevHlpGetVM(pDevIns), NULL, "EMInterpretInstruction", &pData->pfnEMInterpretInstructionR0);
    41754175    if (VBOX_SUCCESS(rc))
    41764176    {
  • trunk/src/VBox/VMM/PDMDevice.cpp

    r2270 r2291  
    540540
    541541    R0PTRTYPE(PCPDMDEVHLPR0) pDevHlpR0;
    542     rc = PDMR3GetSymbolR0(pVM, NULL, "g_pdmR0DevHlp", (void **)&pDevHlpR0);
     542    rc = PDMR3GetSymbolR0(pVM, NULL, "g_pdmR0DevHlp", &pDevHlpR0);
    543543    AssertReleaseRCReturn(rc, rc);
    544544
     
    12301230        if (pszIn)
    12311231        {
    1232             rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszIn, (void **)&pfnR0PtrIn);
     1232            rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszIn, &pfnR0PtrIn);
    12331233            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszIn)\n", pDevIns->pDevReg->szR0Mod, pszIn));
    12341234        }
     
    12361236        if (pszOut && VBOX_SUCCESS(rc))
    12371237        {
    1238             rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszOut, (void **)&pfnR0PtrOut);
     1238            rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszOut, &pfnR0PtrOut);
    12391239            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszOut)\n", pDevIns->pDevReg->szR0Mod, pszOut));
    12401240        }
     
    12421242        if (pszInStr && VBOX_SUCCESS(rc))
    12431243        {
    1244             rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszInStr, (void **)&pfnR0PtrInStr);
     1244            rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszInStr, &pfnR0PtrInStr);
    12451245            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszInStr)\n", pDevIns->pDevReg->szR0Mod, pszInStr));
    12461246        }
     
    12481248        if (pszOutStr && VBOX_SUCCESS(rc))
    12491249        {
    1250             rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszOutStr, (void **)&pfnR0PtrOutStr);
     1250            rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszOutStr, &pfnR0PtrOutStr);
    12511251            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszOutStr)\n", pDevIns->pDevReg->szR0Mod, pszOutStr));
    12521252        }
     
    13731373        R0PTRTYPE(PFNIOMMMIOWRITE) pfnR0PtrWrite = 0;
    13741374        if (pszWrite)
    1375             rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszWrite, (void **)&pfnR0PtrWrite);
     1375            rc = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszWrite, &pfnR0PtrWrite);
    13761376        R0PTRTYPE(PFNIOMMMIOREAD) pfnR0PtrRead = 0;
    13771377        int rc2 = VINF_SUCCESS;
    13781378        if (pszRead)
    1379             rc2 = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszRead, (void **)&pfnR0PtrRead);
     1379            rc2 = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszRead, &pfnR0PtrRead);
    13801380        R0PTRTYPE(PFNIOMMMIOFILL) pfnR0PtrFill = 0;
    13811381        int rc3 = VINF_SUCCESS;
    13821382        if (pszFill)
    1383             rc3 = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszFill, (void **)&pfnR0PtrFill);
     1383            rc3 = PDMR3GetSymbolR0Lazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szR0Mod, pszFill, &pfnR0PtrFill);
    13841384        if (VBOX_SUCCESS(rc) && VBOX_SUCCESS(rc2) && VBOX_SUCCESS(rc3))
    13851385            rc = IOMMMIORegisterR0(pDevIns->Internal.s.pVMHC, pDevIns, GCPhysStart, cbRange, pvUser, pfnR0PtrWrite, pfnR0PtrRead, pfnR0PtrFill, pszDesc);
     
    23812381        &&  pPciBusReg->pszSetIrqR0)
    23822382    {
    2383         int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPciBusReg->pszSetIrqR0, (void **)&pPciBus->pfnSetIrqR0);
     2383        int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPciBusReg->pszSetIrqR0, &pPciBus->pfnSetIrqR0);
    23842384        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pPciBusReg->pszSetIrqR0, rc));
    23852385        if (VBOX_FAILURE(rc))
     
    25182518        &&  pPicReg->pszSetIrqR0)
    25192519    {
    2520         int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPicReg->pszSetIrqR0, (void **)&pVM->pdm.s.Pic.pfnSetIrqR0);
     2520        int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPicReg->pszSetIrqR0, &pVM->pdm.s.Pic.pfnSetIrqR0);
    25212521        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pPicReg->pszSetIrqR0, rc));
    25222522        if (VBOX_SUCCESS(rc))
    25232523        {
    2524             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPicReg->pszGetInterruptR0, (void **)&pVM->pdm.s.Pic.pfnGetInterruptR0);
     2524            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pPicReg->pszGetInterruptR0, &pVM->pdm.s.Pic.pfnGetInterruptR0);
    25252525            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pPicReg->pszGetInterruptR0, rc));
    25262526        }
     
    27142714        &&  pApicReg->pszGetInterruptR0)
    27152715    {
    2716         int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetInterruptR0, (void **)&pVM->pdm.s.Apic.pfnGetInterruptR0);
     2716        int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetInterruptR0, &pVM->pdm.s.Apic.pfnGetInterruptR0);
    27172717        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszGetInterruptR0, rc));
    27182718        if (RT_SUCCESS(rc))
    27192719        {
    2720             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszSetBaseR0, (void **)&pVM->pdm.s.Apic.pfnSetBaseR0);
     2720            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszSetBaseR0, &pVM->pdm.s.Apic.pfnSetBaseR0);
    27212721            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszSetBaseR0, rc));
    27222722        }
    27232723        if (RT_SUCCESS(rc))
    27242724        {
    2725             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetBaseR0, (void **)&pVM->pdm.s.Apic.pfnGetBaseR0);
     2725            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetBaseR0, &pVM->pdm.s.Apic.pfnGetBaseR0);
    27262726            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszGetBaseR0, rc));
    27272727        }
    27282728        if (RT_SUCCESS(rc))
    27292729        {
    2730             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszSetTPRR0, (void **)&pVM->pdm.s.Apic.pfnSetTPRR0);
     2730            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszSetTPRR0, &pVM->pdm.s.Apic.pfnSetTPRR0);
    27312731            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszSetTPRR0, rc));
    27322732        }
    27332733        if (RT_SUCCESS(rc))
    27342734        {
    2735             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetTPRR0, (void **)&pVM->pdm.s.Apic.pfnGetTPRR0);
     2735            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszGetTPRR0, &pVM->pdm.s.Apic.pfnGetTPRR0);
    27362736            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszGetTPRR0, rc));
    27372737        }
    27382738        if (RT_SUCCESS(rc))
    27392739        {
    2740             rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszBusDeliverR0, (void **)&pVM->pdm.s.Apic.pfnBusDeliverR0);
     2740            rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pApicReg->pszBusDeliverR0, &pVM->pdm.s.Apic.pfnBusDeliverR0);
    27412741            AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pApicReg->pszBusDeliverR0, rc));
    27422742        }
     
    28792879        &&  pIoApicReg->pszSetIrqR0)
    28802880    {
    2881         int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pIoApicReg->pszSetIrqR0, (void **)&pVM->pdm.s.IoApic.pfnSetIrqR0);
     2881        int rc = PDMR3GetSymbolR0Lazy(pVM, pDevIns->pDevReg->szR0Mod, pIoApicReg->pszSetIrqR0, &pVM->pdm.s.IoApic.pfnSetIrqR0);
    28822882        AssertMsgRC(rc, ("%s::%s rc=%Vrc\n", pDevIns->pDevReg->szR0Mod, pIoApicReg->pszSetIrqR0, rc));
    28832883        if (VBOX_FAILURE(rc))
     
    37833783    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    37843784    PCPDMPICHLPR0 pR0Helpers = 0;
    3785     int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0PicHlp", (void **)&pR0Helpers);
     3785    int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0PicHlp", &pR0Helpers);
    37863786    AssertReleaseRC(rc);
    37873787    AssertRelease(pR0Helpers);
     
    38703870    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    38713871    PCPDMAPICHLPR0 pR0Helpers = 0;
    3872     int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0ApicHlp", (void **)&pR0Helpers);
     3872    int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0ApicHlp", &pR0Helpers);
    38733873    AssertReleaseRC(rc);
    38743874    AssertRelease(pR0Helpers);
     
    39343934    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    39353935    PCPDMIOAPICHLPR0 pR0Helpers = 0;
    3936     int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0IoApicHlp", (void **)&pR0Helpers);
     3936    int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0IoApicHlp", &pR0Helpers);
    39373937    AssertReleaseRC(rc);
    39383938    AssertRelease(pR0Helpers);
     
    40064006    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    40074007    PCPDMPCIHLPR0 pR0Helpers = 0;
    4008     int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0PciHlp", (void **)&pR0Helpers);
     4008    int rc = PDMR3GetSymbolR0(pDevIns->Internal.s.pVMHC, NULL, "g_pdmR0PciHlp", &pR0Helpers);
    40094009    AssertReleaseRC(rc);
    40104010    AssertRelease(pR0Helpers);
  • trunk/src/VBox/VMM/PDMLdr.cpp

    r1890 r2291  
    646646 * @param   ppvValue        Where to store the symbol value.
    647647 */
    648 PDMR3DECL(int) PDMR3GetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue)
     648PDMR3DECL(int) PDMR3GetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue)
    649649{
    650650#ifdef PDMLDR_FAKE_MODE
    651     *ppvValue = (void *)0xdeadbeef;
     651    *ppvValue = 0xdeadbeef;
    652652    return VINF_SUCCESS;
    653653
     
    668668            &&  !strcmp(pModule->szName, pszModule))
    669669        {
    670             int rc = SUPGetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, ppvValue);
     670            int rc = SUPGetSymbolR0((void *)(uintptr_t)pModule->ImageBase, pszSymbol, (void **)ppvValue);
    671671            if (VBOX_FAILURE(rc))
    672672            {
     
    694694 * @param   ppvValue        Where to store the symbol value.
    695695 */
    696 PDMR3DECL(int) PDMR3GetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue)
     696PDMR3DECL(int) PDMR3GetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue)
    697697{
    698698#ifdef PDMLDR_FAKE_MODE
    699     *ppvValue = (void *)0xdeadbeef;
     699    *ppvValue = 0xdeadbeef;
    700700    return VINF_SUCCESS;
    701701
  • trunk/src/VBox/VMM/PGMBth.h

    r23 r2291  
    8989
    9090        /* Ring 0 */
    91         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(Trap0eHandler),  (void **)&pModeData->pfnR0BthTrap0eHandler);
     91        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(Trap0eHandler),  &pModeData->pfnR0BthTrap0eHandler);
    9292        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(Trap0eHandler),  rc), rc);
    93         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(InvalidatePage), (void **)&pModeData->pfnR0BthInvalidatePage);
     93        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(InvalidatePage), &pModeData->pfnR0BthInvalidatePage);
    9494        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(InvalidatePage), rc), rc);
    9595        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(SyncCR3), &pModeData->pfnR0BthSyncCR3);
    9696        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(SyncCR3), rc), rc);
    97         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(SyncPage), (void **)&pModeData->pfnR0BthSyncPage);
     97        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(SyncPage), &pModeData->pfnR0BthSyncPage);
    9898        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(SyncPage), rc), rc);
    99         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(PrefetchPage), (void **)&pModeData->pfnR0BthPrefetchPage);
     99        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(PrefetchPage), &pModeData->pfnR0BthPrefetchPage);
    100100        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(PrefetchPage), rc), rc);
    101         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(VerifyAccessSyncPage), (void **)&pModeData->pfnR0BthVerifyAccessSyncPage);
     101        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(VerifyAccessSyncPage), &pModeData->pfnR0BthVerifyAccessSyncPage);
    102102        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(VerifyAccessSyncPage), rc), rc);
    103103#ifdef VBOX_STRICT
    104         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(AssertCR3), (void **)&pModeData->pfnR0BthAssertCR3);
     104        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_BTH_NAME_R0_STR(AssertCR3), &pModeData->pfnR0BthAssertCR3);
    105105        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_BTH_NAME_R0_STR(AssertCR3), rc), rc);
    106106#endif
  • trunk/src/VBox/VMM/PGMGst.h

    r23 r2291  
    165165
    166166        /* Ring-0 */
    167         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(GetPage),          (void **)&pModeData->pfnR0GstGetPage);
     167        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(GetPage),          &pModeData->pfnR0GstGetPage);
    168168        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(GetPage),  rc), rc);
    169         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(ModifyPage),       (void **)&pModeData->pfnR0GstModifyPage);
     169        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(ModifyPage),       &pModeData->pfnR0GstModifyPage);
    170170        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(ModifyPage),  rc), rc);
    171         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(GetPDE),           (void **)&pModeData->pfnR0GstGetPDE);
     171        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(GetPDE),           &pModeData->pfnR0GstGetPDE);
    172172        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(GetPDE), rc), rc);
    173         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(MonitorCR3),       (void **)&pModeData->pfnR0GstMonitorCR3);
     173        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(MonitorCR3),       &pModeData->pfnR0GstMonitorCR3);
    174174        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(MonitorCR3), rc), rc);
    175         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(UnmonitorCR3),     (void **)&pModeData->pfnR0GstUnmonitorCR3);
     175        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(UnmonitorCR3),     &pModeData->pfnR0GstUnmonitorCR3);
    176176        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(UnmonitorCR3), rc), rc);
    177         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(MapCR3),           (void **)&pModeData->pfnR0GstMapCR3);
     177        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(MapCR3),           &pModeData->pfnR0GstMapCR3);
    178178        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(MapCR3), rc), rc);
    179         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(UnmapCR3),         (void **)&pModeData->pfnR0GstUnmapCR3);
     179        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(UnmapCR3),         &pModeData->pfnR0GstUnmapCR3);
    180180        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(UnmapCR3), rc), rc);
    181181#if PGM_GST_TYPE == PGM_TYPE_32BIT || PGM_GST_TYPE == PGM_TYPE_PAE
    182182# if 0/** @todo ring-0. */
    183         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(WriteHandlerCR3),  (void **)&pModeData->pfnR0GstWriteHandlerCR3);
     183        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_GST_NAME_R0_STR(WriteHandlerCR3),  &pModeData->pfnR0GstWriteHandlerCR3);
    184184        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_GST_NAME_R0_STR(WriteHandlerCR3), rc), rc);
    185185# endif
  • trunk/src/VBox/VMM/PGMHandler.cpp

    r2270 r2291  
    114114    int rc = VINF_SUCCESS;
    115115    if (HWACCMR3IsAllowed(pVM))
    116         rc = PDMR3GetSymbolR0Lazy(pVM, pszModR0, pszHandlerR0, (void **)&pfnHandlerR0);
     116        rc = PDMR3GetSymbolR0Lazy(pVM, pszModR0, pszHandlerR0, &pfnHandlerR0);
    117117    if (VBOX_SUCCESS(rc))
    118118    {
  • trunk/src/VBox/VMM/PGMPool.cpp

    r23 r2291  
    377377    if (!pVM->pgm.s.pPoolHC->pfnAccessHandlerR0)
    378378    {
    379         rc = PDMR3GetSymbolR0(pVM, NULL, "pgmPoolAccessHandler", (void **)&pVM->pgm.s.pPoolHC->pfnAccessHandlerR0);
     379        rc = PDMR3GetSymbolR0(pVM, NULL, "pgmPoolAccessHandler", &pVM->pgm.s.pPoolHC->pfnAccessHandlerR0);
    380380        AssertReleaseRC(rc);
    381381    }
  • trunk/src/VBox/VMM/PGMShw.h

    r23 r2291  
    132132
    133133        /* Ring-0 */
    134         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(GetPage),  (void **)&pModeData->pfnR0ShwGetPage);
     134        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(GetPage),  &pModeData->pfnR0ShwGetPage);
    135135        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_R0_STR(GetPage),  rc), rc);
    136         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(ModifyPage),  (void **)&pModeData->pfnR0ShwModifyPage);
     136        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(ModifyPage),  &pModeData->pfnR0ShwModifyPage);
    137137        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_R0_STR(ModifyPage),  rc), rc);
    138         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(GetPDEByIndex),  (void **)&pModeData->pfnR0ShwGetPDEByIndex);
     138        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(GetPDEByIndex),  &pModeData->pfnR0ShwGetPDEByIndex);
    139139        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_R0_STR(GetPDEByIndex),  rc), rc);
    140         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(SetPDEByIndex),  (void **)&pModeData->pfnR0ShwSetPDEByIndex);
     140        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(SetPDEByIndex),  &pModeData->pfnR0ShwSetPDEByIndex);
    141141        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_R0_STR(SetPDEByIndex),  rc), rc);
    142         rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(ModifyPDEByIndex),  (void **)&pModeData->pfnR0ShwModifyPDEByIndex);
     142        rc = PDMR3GetSymbolR0(pVM, NULL, PGM_SHW_NAME_R0_STR(ModifyPDEByIndex),  &pModeData->pfnR0ShwModifyPDEByIndex);
    143143        AssertMsgRCReturn(rc, ("%s -> rc=%Vrc\n", PGM_SHW_NAME_R0_STR(ModifyPDEByIndex),  rc), rc);
    144144    }
  • trunk/src/VBox/VMM/VMM.cpp

    r2289 r2291  
    870870        if (!pR0Logger->fCreated)
    871871        {
    872             RTHCPTR pfnLoggerWrapper = NULL;
     872            RTR0PTR pfnLoggerWrapper = NIL_RTR0PTR;
    873873            rc = PDMR3GetSymbolR0(pVM, VMMR0_MAIN_MODULE_NAME, "vmmR0LoggerWrapper", &pfnLoggerWrapper);
    874874            AssertReleaseMsgRCReturn(rc, ("VMMLoggerWrapper not found! rc=%Vra\n", rc), rc);
    875875
    876             RTHCPTR pfnLoggerFlush = NULL;
     876            RTR0PTR pfnLoggerFlush = NIL_RTR0PTR;
    877877            rc = PDMR3GetSymbolR0(pVM, VMMR0_MAIN_MODULE_NAME, "vmmR0LoggerFlush", &pfnLoggerFlush);
    878878            AssertReleaseMsgRCReturn(rc, ("VMMLoggerFlush not found! rc=%Vra\n", rc), rc);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette