VirtualBox

Changeset 44351 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jan 24, 2013 12:04:39 PM (12 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
83312
Message:

PDM,++: Change APIs used by Main from PVM to PUVM.

Location:
trunk/include/VBox/vmm
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmapi.h

    r43657 r44351  
    88
    99/*
    10  * Copyright (C) 2006-2010 Oracle Corporation
     10 * Copyright (C) 2006-2013 Oracle Corporation
    1111 *
    1212 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4141 */
    4242
    43 VMMDECL(int)        PDMGetInterrupt(PVMCPU pVCpu, uint8_t *pu8Interrupt);
    44 VMMDECL(int)        PDMIsaSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);
    45 VMM_INT_DECL(int)   PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);
    46 VMM_INT_DECL(int)   PDMIoApicSendMsi(PVM pVM, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc);
    47 VMMDECL(bool)       PDMHasIoApic(PVM pVM);
    48 VMMDECL(int)        PDMApicHasPendingIrq(PVM pVM, bool *pfPending);
    49 VMMDECL(int)        PDMApicSetBase(PVMCPU pVCpu, uint64_t u64Base);
    50 VMMDECL(int)        PDMApicGetBase(PVMCPU pVCpu, uint64_t *pu64Base);
    51 VMMDECL(int)        PDMApicGetBaseFromApic(PVMCPU pVCpu, uint64_t *pu64Base);
    52 VMMDECL(int)        PDMApicSetTPR(PVMCPU pVCpu, uint8_t u8TPR);
    53 VMMDECL(int)        PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending);
    54 VMMDECL(int)        PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
    55 VMMDECL(int)        PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
    56 VMMDECL(int)        PDMVMMDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys);
    57 VMMDECL(bool)       PDMVMMDevHeapIsEnabled(PVM pVM);
     43VMMDECL(int)            PDMGetInterrupt(PVMCPU pVCpu, uint8_t *pu8Interrupt);
     44VMMDECL(int)            PDMIsaSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);
     45VMM_INT_DECL(int)       PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level, uint32_t uTagSrc);
     46VMM_INT_DECL(int)       PDMIoApicSendMsi(PVM pVM, RTGCPHYS GCAddr, uint32_t uValue, uint32_t uTagSrc);
     47VMM_INT_DECL(bool)      PDMHasIoApic(PVM pVM);
     48VMM_INT_DECL(int)       PDMApicHasPendingIrq(PVM pVM, bool *pfPending);
     49VMMDECL(int)            PDMApicSetBase(PVMCPU pVCpu, uint64_t u64Base);
     50VMMDECL(int)            PDMApicGetBase(PVMCPU pVCpu, uint64_t *pu64Base);
     51VMMDECL(int)            PDMApicSetTPR(PVMCPU pVCpu, uint8_t u8TPR);
     52VMMDECL(int)            PDMApicGetTPR(PVMCPU pVCpu, uint8_t *pu8TPR, bool *pfPending);
     53VMM_INT_DECL(int)       PDMApicWriteMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t u64Value);
     54VMM_INT_DECL(int)       PDMApicReadMSR(PVM pVM, VMCPUID iCpu, uint32_t u32Reg, uint64_t *pu64Value);
     55VMM_INT_DECL(int)       PDMVmmDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys);
     56VMM_INT_DECL(bool)      PDMVmmDevHeapIsEnabled(PVM pVM);
    5857
    5958
     
    6362 */
    6463
    65 VMMR3DECL(int)  PDMR3InitUVM(PUVM pUVM);
    66 VMMR3DECL(int)  PDMR3LdrLoadVMMR0U(PUVM pUVM);
    67 VMMR3DECL(int)  PDMR3Init(PVM pVM);
    68 VMMR3DECL(void) PDMR3PowerOn(PVM pVM);
    69 VMMR3DECL(void) PDMR3ResetCpu(PVMCPU pVCpu);
    70 VMMR3DECL(void) PDMR3Reset(PVM pVM);
    71 VMMR3DECL(void) PDMR3Suspend(PVM pVM);
    72 VMMR3DECL(void) PDMR3Resume(PVM pVM);
    73 VMMR3DECL(void) PDMR3PowerOff(PVM pVM);
    74 VMMR3DECL(void) PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
    75 VMMR3DECL(int)  PDMR3Term(PVM pVM);
    76 VMMR3DECL(void) PDMR3TermUVM(PUVM pUVM);
     64VMMR3_INT_DECL(int)     PDMR3InitUVM(PUVM pUVM);
     65VMMR3_INT_DECL(int)     PDMR3LdrLoadVMMR0U(PUVM pUVM);
     66VMMR3_INT_DECL(int)     PDMR3Init(PVM pVM);
     67VMMR3DECL(void)         PDMR3PowerOn(PVM pVM);
     68VMMR3_INT_DECL(void)    PDMR3ResetCpu(PVMCPU pVCpu);
     69VMMR3_INT_DECL(void)    PDMR3Reset(PVM pVM);
     70VMMR3_INT_DECL(void)    PDMR3Suspend(PVM pVM);
     71VMMR3_INT_DECL(void)    PDMR3Resume(PVM pVM);
     72VMMR3DECL(void)         PDMR3PowerOff(PVM pVM);
     73VMMR3_INT_DECL(void)    PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
     74VMMR3_INT_DECL(int)     PDMR3Term(PVM pVM);
     75VMMR3_INT_DECL(void)    PDMR3TermUVM(PUVM pUVM);
    7776
    7877/**
     
    9493/** Pointer to a FNPDMR3ENUM() function. */
    9594typedef FNPDMR3ENUM *PFNPDMR3ENUM;
    96 VMMR3DECL(int)  PDMR3LdrEnumModules(PVM pVM, PFNPDMR3ENUM pfnCallback, void *pvArg);
    97 VMMR3DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta);
    98 VMMR3DECL(int)  PDMR3LdrGetSymbolR3(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue);
    99 VMMR3DECL(int)  PDMR3LdrGetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
    100 VMMR3DECL(int)  PDMR3LdrGetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSearchPath, const char *pszSymbol, PRTR0PTR ppvValue);
    101 VMMR3DECL(int)  PDMR3LdrLoadRC(PVM pVM, const char *pszFilename, const char *pszName);
    102 VMMR3DECL(int)  PDMR3LdrGetSymbolRC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTRCPTR pRCPtrValue);
    103 VMMR3DECL(int)  PDMR3LdrGetSymbolRCLazy(PVM pVM, const char *pszModule, const char *pszSearchPath, const char *pszSymbol, PRTRCPTR pRCPtrValue);
    104 VMMR3DECL(int)  PDMR3LdrQueryRCModFromPC(PVM pVM, RTRCPTR uPC,
    105                                          char *pszModName,  size_t cchModName,  PRTRCPTR pMod,
    106                                          char *pszNearSym1, size_t cchNearSym1, PRTRCPTR pNearSym1,
    107                                          char *pszNearSym2, size_t cchNearSym2, PRTRCPTR pNearSym2);
    108 VMMR3DECL(int)  PDMR3LdrQueryR0ModFromPC(PVM pVM, RTR0PTR uPC,
    109                                          char *pszModName,  size_t cchModName,  PRTR0PTR pMod,
    110                                          char *pszNearSym1, size_t cchNearSym1, PRTR0PTR pNearSym1,
    111                                          char *pszNearSym2, size_t cchNearSym2, PRTR0PTR pNearSym2);
    112 VMMR3DECL(int)  PDMR3LdrGetInterfaceSymbols(PVM pVM,
    113                                             void *pvInterface, size_t cbInterface,
    114                                             const char *pszModule, const char *pszSearchPath,
    115                                             const char *pszSymPrefix, const char *pszSymList,
    116                                             bool fRing0OrRC);
    117 
    118 VMMR3DECL(int)  PDMR3QueryDevice(PVM pVM, const char *pszDevice, unsigned iInstance, PPPDMIBASE ppBase);
    119 VMMR3DECL(int)  PDMR3QueryDeviceLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
    120 VMMR3DECL(int)  PDMR3QueryLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
    121 VMMR3DECL(int)  PDMR3QueryDriverOnLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, const char *pszDriver,
    122                                       PPPDMIBASE ppBase);
    123 VMMR3DECL(int)  PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags, PPDMIBASE *ppBase);
    124 VMMR3DECL(int)  PDMR3DeviceDetach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags);
     95VMMR3DECL(int)          PDMR3LdrEnumModules(PVM pVM, PFNPDMR3ENUM pfnCallback, void *pvArg);
     96VMMR3_INT_DECL(void)    PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta);
     97VMMR3_INT_DECL(int)     PDMR3LdrGetSymbolR3(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue);
     98VMMR3DECL(int)          PDMR3LdrGetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
     99VMMR3DECL(int)          PDMR3LdrGetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSearchPath, const char *pszSymbol, PRTR0PTR ppvValue);
     100VMMR3DECL(int)          PDMR3LdrLoadRC(PVM pVM, const char *pszFilename, const char *pszName);
     101VMMR3DECL(int)          PDMR3LdrGetSymbolRC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTRCPTR pRCPtrValue);
     102VMMR3DECL(int)          PDMR3LdrGetSymbolRCLazy(PVM pVM, const char *pszModule, const char *pszSearchPath, const char *pszSymbol,
     103                                                PRTRCPTR pRCPtrValue);
     104VMMR3_INT_DECL(int)     PDMR3LdrQueryRCModFromPC(PVM pVM, RTRCPTR uPC,
     105                                                 char *pszModName,  size_t cchModName,  PRTRCPTR pMod,
     106                                                 char *pszNearSym1, size_t cchNearSym1, PRTRCPTR pNearSym1,
     107                                                 char *pszNearSym2, size_t cchNearSym2, PRTRCPTR pNearSym2);
     108VMMR3_INT_DECL(int)     PDMR3LdrQueryR0ModFromPC(PVM pVM, RTR0PTR uPC,
     109                                                 char *pszModName,  size_t cchModName,  PRTR0PTR pMod,
     110                                                 char *pszNearSym1, size_t cchNearSym1, PRTR0PTR pNearSym1,
     111                                                 char *pszNearSym2, size_t cchNearSym2, PRTR0PTR pNearSym2);
     112VMMR3_INT_DECL(int)     PDMR3LdrGetInterfaceSymbols(PVM pVM, void *pvInterface, size_t cbInterface,
     113                                                    const char *pszModule, const char *pszSearchPath,
     114                                                    const char *pszSymPrefix, const char *pszSymList,
     115                                                    bool fRing0OrRC);
     116
     117VMMR3DECL(int)          PDMR3QueryDevice(PUVM pUVM, const char *pszDevice, unsigned iInstance, PPPDMIBASE ppBase);
     118VMMR3DECL(int)          PDMR3QueryDeviceLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
     119VMMR3DECL(int)          PDMR3QueryLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
     120VMMR3DECL(int)          PDMR3QueryDriverOnLun(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun,
     121                                              const char *pszDriver, PPPDMIBASE ppBase);
     122VMMR3DECL(int)          PDMR3DeviceAttach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags,
     123                                          PPDMIBASE *ppBase);
     124VMMR3DECL(int)          PDMR3DeviceDetach(PUVM pUVM, const char *pszDevice, unsigned iInstance, unsigned iLun, uint32_t fFlags);
    125125VMMR3_INT_DECL(PPDMCRITSECT) PDMR3DevGetCritSect(PVM pVM, PPDMDEVINS pDevIns);
    126 VMMR3DECL(int)  PDMR3DriverAttach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, uint32_t fFlags, PPPDMIBASE ppBase);
    127 VMMR3DECL(int)  PDMR3DriverDetach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,
    128                                   const char *pszDriver, unsigned iOccurance, uint32_t fFlags);
    129 VMMR3DECL(int)  PDMR3DriverReattach(PVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,
    130                                     const char *pszDriver, unsigned iOccurance, uint32_t fFlags, PCFGMNODE pCfg, PPPDMIBASE ppBase);
    131 VMMR3DECL(void) PDMR3DmaRun(PVM pVM);
    132 VMMR3DECL(int)  PDMR3LockCall(PVM pVM);
    133 VMMR3DECL(int)  PDMR3RegisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
    134 VMMR3DECL(int)  PDMR3VMMDevHeapAlloc(PVM pVM, unsigned cbSize, RTR3PTR *ppv);
    135 VMMR3DECL(int)  PDMR3VMMDevHeapFree(PVM pVM, RTR3PTR pv);
    136 VMMR3DECL(int)  PDMR3UnregisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys);
     126VMMR3DECL(int)          PDMR3DriverAttach(PUVM pUVM, const char *pszDevice, unsigned iDevIns, unsigned iLun, uint32_t fFlags,
     127                                          PPPDMIBASE ppBase);
     128VMMR3DECL(int)          PDMR3DriverDetach(PUVM pUVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,
     129                                          const char *pszDriver, unsigned iOccurance, uint32_t fFlags);
     130VMMR3DECL(int)          PDMR3DriverReattach(PUVM pVM, const char *pszDevice, unsigned iDevIns, unsigned iLun,
     131                                            const char *pszDriver, unsigned iOccurance, uint32_t fFlags, PCFGMNODE pCfg,
     132                                            PPPDMIBASE ppBase);
     133VMMR3DECL(void)         PDMR3DmaRun(PVM pVM);
     134VMMR3_INT_DECL(int)     PDMR3LockCall(PVM pVM);
     135VMMR3_INT_DECL(int)     PDMR3VmmDevHeapRegister(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
     136VMMR3_INT_DECL(int)     PDMR3VmmDevHeapUnregister(PVM pVM, RTGCPHYS GCPhys);
     137VMMR3_INT_DECL(int)     PDMR3VmmDevHeapAlloc(PVM pVM, size_t cbSize, RTR3PTR *ppv);
     138VMMR3_INT_DECL(int)     PDMR3VmmDevHeapFree(PVM pVM, RTR3PTR pv);
    137139VMMR3_INT_DECL(int)     PDMR3TracingConfig(PVM pVM, const char *pszName, size_t cchName, bool fEnable, bool fApply);
    138140VMMR3_INT_DECL(bool)    PDMR3TracingAreAll(PVM pVM, bool fEnabled);
  • trunk/include/VBox/vmm/pdmdev.h

    r43657 r44351  
    33883388    DECLR3CALLBACKMEMBER(void, pfnReserved8,(void));
    33893389    DECLR3CALLBACKMEMBER(void, pfnReserved9,(void));
    3390     DECLR3CALLBACKMEMBER(void, pfnReserved10,(void));
     3390    /*DECLR3CALLBACKMEMBER(void, pfnReserved10,(void));*/
    33913391    /** @} */
    33923392
     
    33993399     * @{
    34003400     */
    3401     /**
    3402      * Gets the VM handle. Restricted API.
     3401
     3402    /**
     3403     * Gets the user mode VM handle. Restricted API.
     3404     *
     3405     * @returns User mode VM Handle.
     3406     * @param   pDevIns             The device instance.
     3407     */
     3408    DECLR3CALLBACKMEMBER(PUVM, pfnGetUVM,(PPDMDEVINS pDevIns));
     3409
     3410    /**
     3411     * Gets the global VM handle. Restricted API.
    34033412     *
    34043413     * @returns VM Handle.
     
    50045013}
    50055014
     5015/**
     5016 * @copydoc PDMDEVHLPR3::pfnGetUVM
     5017 */
     5018DECLINLINE(PUVM) PDMDevHlpGetUVM(PPDMDEVINS pDevIns)
     5019{
     5020    return pDevIns->CTX_SUFF(pHlp)->pfnGetUVM(pDevIns);
     5021}
     5022
    50065023#endif /* IN_RING3 */
    50075024
  • trunk/include/VBox/vmm/pdmusb.h

    r43814 r44351  
    10001000typedef DECLCALLBACK(int) FNPDMVBOXUSBREGISTER(PCPDMUSBREGCB pCallbacks, uint32_t u32Version);
    10011001
    1002 VMMR3DECL(int)  PDMR3USBCreateProxyDevice(PVM pVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend,
     1002VMMR3DECL(int)  PDMR3UsbCreateProxyDevice(PUVM pUVM, PCRTUUID pUuid, bool fRemote, const char *pszAddress, void *pvBackend,
    10031003                                          uint32_t iUsbVersion, uint32_t fMaskedIfs);
    1004 VMMR3DECL(int)  PDMR3USBDetachDevice(PVM pVM, PCRTUUID pUuid);
    1005 VMMR3DECL(bool) PDMR3USBHasHub(PVM pVM);
     1004VMMR3DECL(int)  PDMR3UsbDetachDevice(PUVM pUVM, PCRTUUID pUuid);
     1005VMMR3DECL(bool) PDMR3UsbHasHub(PUVM pUVM);
    10061006
    10071007
Note: See TracChangeset for help on using the changeset viewer.

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