VirtualBox

Changeset 4136 in vbox for trunk/include/iprt/memobj.h


Ignore:
Timestamp:
Aug 14, 2007 1:59:36 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
23615
Message:

Added RTR0MemObjAllocPhysNC. Changed the two APIs taking ring-3 addresses to use RTR3PTR.

File:
1 edited

Legend:

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

    r4135 r4136  
    140140
    141141/**
    142  * Allocates page aligned physical memory without (necessarily) any kernel mapping.
     142 * Allocates contiguous page aligned physical memory without (necessarily) any kernel mapping.
    143143 *
    144144 * @returns IPRT status code.
     
    149149 */
    150150RTR0DECL(int) RTR0MemObjAllocPhys(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest);
     151
     152/**
     153 * Allocates non-contiguous page aligned physical memory without (necessarily) any kernel mapping.
     154 *
     155 * @returns IPRT status code.
     156 * @param   pMemObj         Where to store the ring-0 memory object handle.
     157 * @param   cb              Number of bytes to allocate. This is rounded up to nearest page.
     158 * @param   PhysHighest     The highest permittable address (inclusive).
     159 *                          Pass NIL_RTHCPHYS if any address is acceptable.
     160 */
     161RTR0DECL(int) RTR0MemObjAllocPhysNC(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest);
    151162
    152163/**
     
    180191 * @returns IPRT status code.
    181192 * @param   pMemObj         Where to store the ring-0 memory object handle.
    182  * @param   pvFixed         Requested address. (void *)-1 means any address. This must match the alignment.
     193 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
    183194 * @param   cb              The number of bytes to reserve. This is rounded up to nearest PAGE_SIZE.
    184195 * @param   uAlignment      The alignment of the reserved memory.
     
    186197 * @param   R0Process       The process to reserve the memory in. NIL_R0PROCESS is an alias for the current one.
    187198 */
    188 RTR0DECL(int) RTR0MemObjReserveUser(PRTR0MEMOBJ pMemObj, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
     199RTR0DECL(int) RTR0MemObjReserveUser(PRTR0MEMOBJ pMemObj, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
    189200
    190201/**
     
    207218 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
    208219 * @param   MemObjToMap     The object to be map.
    209  * @param   pvFixed         Requested address. (void *)-1 means any address. This must match the alignment.
     220 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
    210221 * @param   uAlignment      The alignment of the reserved memory.
    211222 *                          Supported values are 0 (alias for PAGE_SIZE), PAGE_SIZE, _2M and _4M.
     
    213224 * @param   R0Process       The process to map the memory into. NIL_R0PROCESS is an alias for the current one.
    214225 */
    215 RTR0DECL(int) RTR0MemObjMapUser(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
     226RTR0DECL(int) RTR0MemObjMapUser(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
    216227
    217228#endif /* IN_RING0 */
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