VirtualBox

Changeset 78120 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Apr 12, 2019 1:20:50 PM (6 years ago)
Author:
vboxsync
Message:

IPRT: Started adding a RTR0MemObjMapUserEx function that takes offSub and cbSub. bugref:9217

Location:
trunk/include/iprt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/mangling.h

    r78098 r78120  
    17391739# define RTR0MemObjMapKernelTag                         RT_MANGLER(RTR0MemObjMapKernelTag)     /* r0drv */
    17401740# define RTR0MemObjMapUserTag                           RT_MANGLER(RTR0MemObjMapUserTag)       /* r0drv */
     1741# define RTR0MemObjMapUserExTag                         RT_MANGLER(RTR0MemObjMapUserExTag)     /* r0drv */
    17411742# define RTR0MemObjProtect                              RT_MANGLER(RTR0MemObjProtect)          /* r0drv */
    17421743# define RTR0MemObjReserveKernelTag                     RT_MANGLER(RTR0MemObjReserveKernelTag) /* r0drv */
  • trunk/include/iprt/memobj.h

    r76585 r78120  
    607607
    608608/**
     609 * Maps a memory object into user virtual address space in the current process
     610 * (default tag).
     611 *
     612 * @returns IPRT status code.
     613 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
     614 * @param   MemObjToMap     The object to be map.
     615 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
     616 * @param   uAlignment      The alignment of the reserved memory.
     617 *                          Supported values are 0 (alias for PAGE_SIZE), PAGE_SIZE, _2M and _4M.
     618 * @param   fProt           Combination of RTMEM_PROT_* flags (except RTMEM_PROT_NONE).
     619 * @param   R0Process       The process to map the memory into. NIL_R0PROCESS is an alias for the current one.
     620 * @param   offSub          Where in the object to start mapping. If non-zero
     621 *                          the value must be page aligned and cbSub must be
     622 *                          non-zero as well.
     623 * @param   cbSub           The size of the part of the object to be mapped. If
     624 *                          zero the entire object is mapped. The value must be
     625 *                          page aligned.
     626 */
     627#define RTR0MemObjMapUserEx(pMemObj, MemObjToMap, R3PtrFixed, uAlignment, fProt, R0Process, offSub, cbSub) \
     628    RTR0MemObjMapUserExTag((pMemObj), (MemObjToMap), (R3PtrFixed), (uAlignment), (fProt), (R0Process), \
     629                           (offSub), (cbSub), RTMEM_TAG)
     630
     631/**
     632 * Maps a memory object into user virtual address space in the current process
     633 * (custom tag).
     634 *
     635 * @returns IPRT status code.
     636 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
     637 * @param   MemObjToMap     The object to be map.
     638 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
     639 * @param   uAlignment      The alignment of the reserved memory.
     640 *                          Supported values are 0 (alias for PAGE_SIZE), PAGE_SIZE, _2M and _4M.
     641 * @param   fProt           Combination of RTMEM_PROT_* flags (except RTMEM_PROT_NONE).
     642 * @param   R0Process       The process to map the memory into. NIL_R0PROCESS is an alias for the current one.
     643 * @param   offSub          Where in the object to start mapping. If non-zero
     644 *                          the value must be page aligned and cbSub must be
     645 *                          non-zero as well.
     646 * @param   cbSub           The size of the part of the object to be mapped. If
     647 *                          zero the entire object is mapped. The value must be
     648 *                          page aligned.
     649 * @param   pszTag          Allocation tag used for statistics and such.
     650 */
     651RTR0DECL(int) RTR0MemObjMapUserExTag(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, RTR3PTR R3PtrFixed, size_t uAlignment,
     652                                     unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub, const char *pszTag);
     653
     654/**
    609655 * Change the page level protection of one or more pages in a memory object.
    610656 *
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