VirtualBox

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/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r13839 r14824  
    4444#include "internal/memobj.h"
    4545
    46 #define USE_VM_MAP_WIRE
     46/*#define USE_VM_MAP_WIRE - may re-enable later when non-mapped allocations are added. */
    4747
    4848
     
    542542
    543543
    544 int rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt)
     544int rtR0MemObjNativeMapKernel(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment,
     545                              unsigned fProt, size_t offSub, size_t cbSub)
    545546{
    546547    /*
     
    549550    int rc = VERR_INVALID_PARAMETER;
    550551    PRTR0MEMOBJDARWIN pMemToMapDarwin = (PRTR0MEMOBJDARWIN)pMemToMap;
     552printf("rtR0MemObjNativeMapKernel: pMemDesc=%p\n", pMemToMapDarwin->pMemDesc);
    551553    if (pMemToMapDarwin->pMemDesc)
    552554    {
    553555        IOMemoryMap *pMemMap = pMemToMapDarwin->pMemDesc->map(kernel_task, kIOMapAnywhere,
    554                                                               kIOMapAnywhere | kIOMapDefaultCache);
     556                                                              kIOMapAnywhere | kIOMapDefaultCache,
     557                                                              offSub, cbSub);
    555558        if (pMemMap)
    556559        {
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