VirtualBox

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


Ignore:
Timestamp:
Nov 30, 2008 7:52:59 AM (16 years ago)
Author:
vboxsync
Message:

IPRT: RTR0MemObjMapKernelEx for mapping a portion of a memory object into ring-0. Only implemented on darwin (where I had to switch back to use I/O kit to wire memory instead of vm_map_wire).

File:
1 edited

Legend:

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

    r8245 r14824  
    188188 *          physical memory on this platform. The caller should expect
    189189 *          this error and have a fallback strategy for it.
     190 *
    190191 * @param   pMemObj         Where to store the ring-0 memory object handle.
    191192 * @param   cb              Number of bytes to allocate. This is rounded up to nearest page.
     
    240241 * Maps a memory object into kernel virtual address space.
    241242 *
     243 * This is the same as calling RTR0MemObjMapKernelEx with cbSub and offSub set
     244 * to zero.
     245 *
    242246 * @returns IPRT status code.
    243247 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
     
    251255
    252256/**
     257 * Maps a memory object into kernel virtual address space.
     258 *
     259 * The ability to map subsections of the object into kernel space is currently
     260 * not implemented on all platforms. All/Most of platforms supports mapping the
     261 * whole object into  kernel space.
     262 *
     263 * @returns IPRT status code.
     264 * @retval  VERR_NOT_SUPPORTED if it's not possible to map a subsection of a
     265 *          memory object on this platform. When you hit this, try implement it.
     266 *
     267 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
     268 * @param   MemObjToMap     The object to be map.
     269 * @param   pvFixed         Requested address. (void *)-1 means any address. This must match the alignment.
     270 * @param   uAlignment      The alignment of the reserved memory.
     271 *                          Supported values are 0 (alias for PAGE_SIZE), PAGE_SIZE, _2M and _4M.
     272 * @param   fProt           Combination of RTMEM_PROT_* flags (except RTMEM_PROT_NONE).
     273 * @param   offSub          Where in the object to start mapping. If non-zero
     274 *                          the value must be page aligned and cbSub must be
     275 *                          non-zero as well.
     276 * @param   cbSub           The size of the part of the object to be mapped. If
     277 *                          zero the entire object is mapped. The value must be
     278 *                          page aligned.
     279 */
     280RTR0DECL(int) RTR0MemObjMapKernelEx(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, void *pvFixed, size_t uAlignment,
     281                                    unsigned fProt, size_t offSub, size_t cbSub);
     282
     283/**
    253284 * Maps a memory object into user virtual address space in the current process.
    254285 *
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