VirtualBox

Changeset 20864 in vbox for trunk/include


Ignore:
Timestamp:
Jun 23, 2009 7:19:42 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
49009
Message:

SUP,*: API cleanup.

Location:
trunk/include/VBox
Files:
2 edited

Legend:

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

    r20706 r20864  
    621621
    622622    /**
    623      * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
     623     * Calls the HC R0 VMM entry point, in a safer but slower manner than
     624     * SUPR3CallVMMR0.
    624625     *
    625626     * When entering using this call the R0 components can call into the host kernel
  • trunk/include/VBox/sup.h

    r20862 r20864  
    6868{
    6969    /** The usual invalid entry.
    70      * This is returned by SUPGetPagingMode()  */
     70     * This is returned by SUPR3GetPagingMode()  */
    7171    SUPPAGINGMODE_INVALID = 0,
    7272    /** Normal 32-bit paging, no global pages */
     
    453453 * @returns VBox status code.
    454454 */
    455 SUPR3DECL(int) SUPInstall(void);
     455SUPR3DECL(int) SUPR3Install(void);
    456456
    457457/**
     
    460460 * @returns VBox status code.
    461461 */
    462 SUPR3DECL(int) SUPUninstall(void);
     462SUPR3DECL(int) SUPR3Uninstall(void);
    463463
    464464/**
     
    543543 * Initializes the support library.
    544544 * Each succesful call to SUPR3Init() must be countered by a
    545  * call to SUPTerm(false).
     545 * call to SUPR3Term(false).
    546546 *
    547547 * @returns VBox status code.
     
    558558 */
    559559#ifdef __cplusplus
    560 SUPR3DECL(int) SUPTerm(bool fForced = false);
     560SUPR3DECL(int) SUPR3Term(bool fForced = false);
    561561#else
    562 SUPR3DECL(int) SUPTerm(int fForced);
     562SUPR3DECL(int) SUPR3Term(int fForced);
    563563#endif
    564564
     
    571571 *                      VM is about to be destroyed.
    572572 */
    573 SUPR3DECL(int) SUPSetVMForFastIOCtl(PVMR0 pVMR0);
     573SUPR3DECL(int) SUPR3SetVMForFastIOCtl(PVMR0 pVMR0);
    574574
    575575/**
     
    583583 * @param   pvArg       Argument.
    584584 */
    585 SUPR3DECL(int) SUPCallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg);
    586 
    587 /**
    588  * Variant of SUPCallVMMR0, except that this takes the fast ioclt path
     585SUPR3DECL(int) SUPR3CallVMMR0(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, void *pvArg);
     586
     587/**
     588 * Variant of SUPR3CallVMMR0, except that this takes the fast ioclt path
    589589 * regardsless of compile-time defaults.
    590590 *
     
    594594 * @param   idCpu       The virtual CPU ID.
    595595 */
    596 SUPR3DECL(int) SUPCallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu);
    597 
    598 /**
    599  * Calls the HC R0 VMM entry point, in a safer but slower manner than SUPCallVMMR0.
    600  * When entering using this call the R0 components can call into the host kernel
    601  * (i.e. use the SUPR0 and RT APIs).
     596SUPR3DECL(int) SUPR3CallVMMR0Fast(PVMR0 pVMR0, unsigned uOperation, VMCPUID idCpu);
     597
     598/**
     599 * Calls the HC R0 VMM entry point, in a safer but slower manner than
     600 * SUPR3CallVMMR0. When entering using this call the R0 components can call
     601 * into the host kernel (i.e. use the SUPR0 and RT APIs).
    602602 *
    603603 * See VMMR0Entry() for more details.
     
    612612 *                      limit on this, just below 4KB.
    613613 */
    614 SUPR3DECL(int) SUPCallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
     614SUPR3DECL(int) SUPR3CallVMMR0Ex(PVMR0 pVMR0, VMCPUID idCpu, unsigned uOperation, uint64_t u64Arg, PSUPVMMR0REQHDR pReqHdr);
    615615
    616616/**
     
    672672 * @returns The paging mode.
    673673 */
    674 SUPR3DECL(SUPPAGINGMODE) SUPGetPagingMode(void);
     674SUPR3DECL(SUPPAGINGMODE) SUPR3GetPagingMode(void);
    675675
    676676/**
    677677 * Allocate zero-filled pages.
    678678 *
    679  * Use this to allocate a number of pages rather than using RTMem*() and mess with
    680  * alignment. The returned address is of course page aligned. Call SUPPageFree()
    681  * to free the pages once done with them.
     679 * Use this to allocate a number of pages suitable for seeding / locking.
     680 * Call SUPR3PageFree() to free the pages once done with them.
    682681 *
    683682 * @returns VBox status.
     
    685684 * @param   ppvPages        Where to store the base pointer to the allocated pages.
    686685 */
    687 SUPR3DECL(int) SUPPageAlloc(size_t cPages, void **ppvPages);
    688 
    689 /**
    690  * Frees pages allocated with SUPPageAlloc().
     686SUPR3DECL(int) SUPR3PageAlloc(size_t cPages, void **ppvPages);
     687
     688/**
     689 * Frees pages allocated with SUPR3PageAlloc().
    691690 *
    692691 * @returns VBox status.
    693  * @param   pvPages         Pointer returned by SUPPageAlloc().
     692 * @param   pvPages         Pointer returned by SUPR3PageAlloc().
    694693 * @param   cPages          Number of pages that was allocated.
    695694 */
    696 SUPR3DECL(int) SUPPageFree(void *pvPages, size_t cPages);
     695SUPR3DECL(int) SUPR3PageFree(void *pvPages, size_t cPages);
    697696
    698697/**
     
    702701 * Use SUPR3PageFreeEx() to free memory allocated with this function.
    703702 *
    704  * This SUPR3PageAllocEx and SUPR3PageFreeEx replaces SUPPageAllocLocked,
    705  * SUPPageAllocLockedEx, SUPPageFreeLocked, SUPPageAlloc, SUPPageLock,
    706  * SUPPageUnlock and SUPPageFree.
     703 * This SUPR3PageAllocEx and SUPR3PageFreeEx replaces SUPR3PageAllocLockedEx,
     704 * SUPR3PageFreeLocked, SUPR3PageAlloc, and SUPR3PageFree.
    707705 *
    708706 * @returns VBox status code.
     
    765763 * Allocate non-zeroed locked pages.
    766764 *
    767  * Use this to allocate a number of pages rather than using RTMem*() and mess with
    768  * alignment. The returned address is of course page aligned. Call SUPPageFreeLocked()
    769  * to free the pages once done with them.
    770  *
    771765 * @returns VBox status code.
    772766 * @param   cPages          Number of pages to allocate.
     
    775769 *                          On entry this will point to an array of with cbMemory >> PAGE_SHIFT entries.
    776770 *                          NULL is allowed.
    777  */
    778 SUPR3DECL(int) SUPPageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages);
    779 
    780 /**
    781  * Frees locked pages allocated with SUPPageAllocLocked().
     771 * @todo remove this.
     772 */
     773SUPR3DECL(int) SUPR3PageAllocLockedEx(size_t cPages, void **ppvPages, PSUPPAGE paPages);
     774
     775/**
     776 * Frees locked pages allocated with SUPPageAllocLockedEx().
    782777 *
    783778 * @returns VBox status.
    784  * @param   pvPages         Pointer returned by SUPPageAlloc().
     779 * @param   pvPages         Pointer returned by SUPR3PageAllocLockedEx().
    785780 * @param   cPages          Number of pages that was allocated.
    786  */
    787 SUPR3DECL(int) SUPPageFreeLocked(void *pvPages, size_t cPages);
    788 
    789 /**
    790  * Allocated memory with page aligned memory with a contiguous and locked physical
    791  * memory backing below 4GB.
    792  *
    793  * @returns Pointer to the allocated memory (virtual address).
    794  *          *pHCPhys is set to the physical address of the memory.
    795  *          The returned memory must be freed using SUPContFree().
    796  * @returns NULL on failure.
    797  * @param   cPages      Number of pages to allocate.
    798  * @param   pHCPhys     Where to store the physical address of the memory block.
    799  */
    800 SUPR3DECL(void *) SUPContAlloc(size_t cPages, PRTHCPHYS pHCPhys);
     781 * @todo remove this.
     782 */
     783SUPR3DECL(int) SUPR3PageFreeLocked(void *pvPages, size_t cPages);
    801784
    802785/**
     
    807790 *          *pHCPhys is set to the physical address of the memory.
    808791 *          If ppvR0 isn't NULL, *ppvR0 is set to the ring-0 mapping.
    809  *          The returned memory must be freed using SUPContFree().
     792 *          The returned memory must be freed using SUPR3ContFree().
    810793 * @returns NULL on failure.
    811794 * @param   cPages      Number of pages to allocate.
     
    817800 *          the world switchers.
    818801 */
    819 SUPR3DECL(void *) SUPContAlloc2(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
    820 
    821 /**
    822  * Frees memory allocated with SUPContAlloc().
     802SUPR3DECL(void *) SUPR3ContAlloc(size_t cPages, PRTR0PTR pR0Ptr, PRTHCPHYS pHCPhys);
     803
     804/**
     805 * Frees memory allocated with SUPR3ContAlloc().
    823806 *
    824807 * @returns VBox status code.
     
    826809 * @param   cPages      Number of pages to be freed.
    827810 */
    828 SUPR3DECL(int) SUPContFree(void *pv, size_t cPages);
     811SUPR3DECL(int) SUPR3ContFree(void *pv, size_t cPages);
    829812
    830813/**
     
    837820 * @param   cPages      Number of pages to allocate.
    838821 * @param   ppvPages    Where to store the pointer to the allocated memory.
    839  *                      The pointer stored here on success must be passed to SUPLowFree when
    840  *                      the memory should be released.
     822 *                      The pointer stored here on success must be passed to
     823 *                      SUPR3LowFree when the memory should be released.
    841824 * @param   ppvPagesR0  Where to store the ring-0 pointer to the allocated memory. optional.
    842825 * @param   paPages     Where to store the physical addresses of the individual pages.
    843826 */
    844 SUPR3DECL(int) SUPLowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
    845 
    846 /**
    847  * Frees memory allocated with SUPLowAlloc().
     827SUPR3DECL(int) SUPR3LowAlloc(size_t cPages, void **ppvPages, PRTR0PTR ppvPagesR0, PSUPPAGE paPages);
     828
     829/**
     830 * Frees memory allocated with SUPR3LowAlloc().
    848831 *
    849832 * @returns VBox status code.
     
    851834 * @param   cPages      Number of pages that was allocated.
    852835 */
    853 SUPR3DECL(int) SUPLowFree(void *pv, size_t cPages);
     836SUPR3DECL(int) SUPR3LowFree(void *pv, size_t cPages);
    854837
    855838/**
     
    864847 * @param   ppvImageBase        Where to store the image address.
    865848 */
    866 SUPR3DECL(int) SUPLoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
     849SUPR3DECL(int) SUPR3LoadModule(const char *pszFilename, const char *pszModule, void **ppvImageBase);
    867850
    868851/**
     
    889872 * @remark  This will not actually 'free' the module, there are of course usage counting.
    890873 */
    891 SUPR3DECL(int) SUPFreeModule(void *pvImageBase);
     874SUPR3DECL(int) SUPR3FreeModule(void *pvImageBase);
    892875
    893876/**
     
    900883 * @param   ppvValue        Where to store the symbol value.
    901884 */
    902 SUPR3DECL(int) SUPGetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
     885SUPR3DECL(int) SUPR3GetSymbolR0(void *pvImageBase, const char *pszSymbol, void **ppvValue);
    903886
    904887/**
     
    906889 *
    907890 * @returns VBox status code.
    908  * @deprecated  Use SUPLoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
    909  */
    910 SUPR3DECL(int) SUPLoadVMM(const char *pszFilename);
     891 * @deprecated  Use SUPR3LoadModule(pszFilename, "VMMR0.r0", &pvImageBase)
     892 */
     893SUPR3DECL(int) SUPR3LoadVMM(const char *pszFilename);
    911894
    912895/**
     
    914897 *
    915898 * @returns VBox status code.
    916  * @deprecated  Use SUPFreeModule().
    917  */
    918 SUPR3DECL(int) SUPUnloadVMM(void);
     899 * @deprecated  Use SUPR3FreeModule().
     900 */
     901SUPR3DECL(int) SUPR3UnloadVMM(void);
    919902
    920903/**
     
    924907 * @param   pHCPhys     Where to store the physical address of the GIP.
    925908 */
    926 SUPR3DECL(int) SUPGipGetPhys(PRTHCPHYS pHCPhys);
     909SUPR3DECL(int) SUPR3GipGetPhys(PRTHCPHYS pHCPhys);
    927910
    928911/**
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