VirtualBox

Changeset 4136 in vbox


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.

Location:
trunk
Files:
7 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 */
  • trunk/src/VBox/Runtime/include/internal/memobj.h

    r4135 r4136  
    5454    RTR0MEMOBJTYPE_LOCK,
    5555    /** RTR0MemObjAllocPhys, RTR0MemObjEnterPhys.
     56     * This memory is physical memory, page aligned, contiguous and doesn't need to have a mapping. */
     57    RTR0MEMOBJTYPE_PHYS,
     58    /** RTR0MemObjAllocPhysNC.
    5659     * This memory is physical memory, page aligned and doesn't need to have a mapping. */
    57     RTR0MEMOBJTYPE_PHYS,
     60    RTR0MEMOBJTYPE_PHYS_NC,
    5861    /** RTR0MemObjReserveKernel, RTR0MemObjReserveUser.
    5962     * This memory is page aligned and has no backing. */
     
    161164        struct
    162165        {
    163             /** The base address of the physical memory that's being mapped. */
     166            /** The base address of the physical memory. */
    164167            RTHCPHYS    PhysBase;
    165             /** If set this object was created by RTR0MemPhysAlloc, otherwise by RTR0MemPhysEnter. */
     168            /** If set this object was created by RTR0MemPhysAlloc, otherwise it was
     169             * created by RTR0MemPhysEnter. */
    166170            bool        fAllocated;
    167171        } Phys;
     172
     173        /** RTR0MEMTYPE_PHYS_NC. */
     174        struct
     175        {
     176            unsigned iDummy;
     177        } PhysNC;
    168178
    169179        /** RTR0MEMOBJTYPE_RES_VIRT */
     
    274284
    275285/**
    276  * Allocates page aligned physical memory without (necessarily) any kernel mapping.
     286 * Allocates contiguous page aligned physical memory without (necessarily) any kernel mapping.
    277287 *
    278288 * @returns IPRT status code.
     
    283293 */
    284294int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest);
     295
     296/**
     297 * Allocates non-contiguous page aligned physical memory without (necessarily) any kernel mapping.
     298 *
     299 * @returns IPRT status code.
     300 * @param   ppMem           Where to store the ring-0 memory object handle.
     301 * @param   cb              Number of bytes to allocate, page aligned.
     302 * @param   PhysHighest     The highest permittable address (inclusive).
     303 *                          NIL_RTHCPHYS if any address is acceptable.
     304 */
     305int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest);
    285306
    286307/**
     
    310331 * @returns IPRT status code.
    311332 * @param   ppMem           Where to store the ring-0 memory object handle.
    312  * @param   pvFixed         Requested address. (void *)-1 means any address. This matches uAlignment if specified.
     333 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This matches uAlignment if specified.
    313334 * @param   cb              The number of bytes to reserve, page aligned.
    314335 * @param   uAlignment      The alignment of the reserved memory; PAGE_SIZE, _2M or _4M.
    315336 * @param   R0Process       The process to reserve the memory in.
    316337 */
    317 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
     338int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process);
    318339
    319340/**
     
    335356 * @param   ppMem           Where to store the ring-0 memory object handle of the mapping object.
    336357 * @param   pMemToMap       The object to be map.
    337  * @param   pvFixed         Requested address. (void *)-1 means any address. This matches uAlignment if specified.
     358 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This matches uAlignment if specified.
    338359 * @param   uAlignment      The alignment of the reserved memory; PAGE_SIZE, _2M or _4M.
    339360 * @param   fProt           Combination of RTMEM_PROT_* flags (except RTMEM_PROT_NONE).
    340361 * @param   R0Process       The process to map the memory into.
    341362 */
    342 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
     363int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, PRTR0MEMOBJINTERNAL pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process);
    343364
    344365/**
  • trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp

    r4135 r4136  
    105105                IOFreePhysical(pMemDarwin->Core.u.Phys.PhysBase, pMemDarwin->Core.cb);*/
    106106            Assert(!pMemDarwin->Core.u.Phys.fAllocated);
     107            break;
     108
     109        case RTR0MEMOBJTYPE_PHYS_NC:
     110            AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
     111            return VERR_INTERNAL_ERROR;
    107112            break;
    108113
     
    356361
    357362
     363int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
     364{
     365    /** @todo rtR0MemObjNativeAllocPhys / darwin. */
     366    return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest);
     367}
     368
     369
    358370int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb)
    359371{
     
    490502
    491503
    492 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
     504int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
    493505{
    494506    return VERR_NOT_IMPLEMENTED;
     
    539551
    540552
    541 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
     553int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    542554{
    543555    /*
  • trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c

    r4135 r4136  
    143143        case RTR0MEMOBJTYPE_LOW:
    144144        case RTR0MEMOBJTYPE_PHYS:
     145        case RTR0MEMOBJTYPE_PHYS_NC:
    145146        default:
    146147            AssertMsgFailed(("enmType=%d\n", pMemFreeBSD->Core.enmType));
     
    307308
    308309
     310int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
     311{
     312    /** @todo rtR0MemObjNativeAllocPhys / freebsd */
     313    return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest);
     314}
     315
     316
    309317int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb)
    310318{
     
    453461
    454462
    455 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
    456 {
    457     return rtR0MemObjNativeReserveInMap(ppMem, pvFixed, cb, uAlignment, R0Process,
     463int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
     464{
     465    return rtR0MemObjNativeReserveInMap(ppMem, (void *)R3PtrFixed, cb, uAlignment, R0Process,
    458466                                        &((struct proc *)R0Process)->p_vmspace->vm_map);
    459467}
     
    483491            break;
    484492
     493        case RTR0MEMOBJTYPE_PHYS_NC:
    485494        case RTR0MEMOBJTYPE_PHYS:
    486495            pvR0 = pMemToMapOs2->Core.pv;
     
    533542
    534543
    535 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
     544int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    536545{
    537546    AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED);
    538     AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED);
     547    AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED);
    539548
    540549#if 0
     
    578587            break;
    579588
     589        case RTR0MEMOBJTYPE_PHYS_NC:
    580590        case RTR0MEMOBJTYPE_RES_VIRT:
    581591        case RTR0MEMOBJTYPE_MAPPING:
     
    647657            return pMemFreeBSD->Core.u.Phys.PhysBase + (iPage << PAGE_SHIFT);
    648658
     659        case RTR0MEMOBJTYPE_PHYS_NC:
    649660        case RTR0MEMOBJTYPE_RES_VIRT:
    650661        case RTR0MEMOBJTYPE_MAPPING:
  • trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp

    r4135 r4136  
    487487
    488488/**
    489  * Allocates page aligned physical memory without (necessarily) any kernel mapping.
     489 * Allocates contiguous page aligned physical memory without (necessarily) any kernel mapping.
    490490 *
    491491 * @returns IPRT status code.
     
    507507    /* do the allocation. */
    508508    return rtR0MemObjNativeAllocPhys(pMemObj, cbAligned, PhysHighest);
     509}
     510
     511
     512/**
     513 * Allocates non-contiguous page aligned physical memory without (necessarily) any kernel mapping.
     514 *
     515 * @returns IPRT status code.
     516 * @param   pMemObj         Where to store the ring-0 memory object handle.
     517 * @param   cb              Number of bytes to allocate. This is rounded up to nearest page.
     518 * @param   PhysHighest     The highest permittable address (inclusive).
     519 *                          Pass NIL_RTHCPHYS if any address is acceptable.
     520 */
     521RTR0DECL(int) RTR0MemObjAllocPhysNC(PRTR0MEMOBJ pMemObj, size_t cb, RTHCPHYS PhysHighest)
     522{
     523    /* sanity checks. */
     524    AssertPtrReturn(pMemObj, VERR_INVALID_POINTER);
     525    *pMemObj = NIL_RTR0MEMOBJ;
     526    AssertReturn(cb > 0, VERR_INVALID_PARAMETER);
     527    const size_t cbAligned = RT_ALIGN_Z(cb, PAGE_SIZE);
     528    AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
     529    AssertReturn(PhysHighest >= cb, VERR_INVALID_PARAMETER);
     530
     531    /* do the allocation. */
     532    return rtR0MemObjNativeAllocPhysNC(pMemObj, cbAligned, PhysHighest);
    509533}
    510534
     
    571595 * @returns IPRT status code.
    572596 * @param   pMemObj         Where to store the ring-0 memory object handle.
    573  * @param   pvFixed         Requested address. (void *)-1 means any address. This must match the alignment.
     597 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
    574598 * @param   cb              The number of bytes to reserve. This is rounded up to nearest PAGE_SIZE.
    575599 * @param   uAlignment      The alignment of the reserved memory.
     
    577601 * @param   R0Process       The process to reserve the memory in. NIL_R0PROCESS is an alias for the current one.
    578602 */
    579 RTR0DECL(int) RTR0MemObjReserveUser(PRTR0MEMOBJ pMemObj, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
     603RTR0DECL(int) RTR0MemObjReserveUser(PRTR0MEMOBJ pMemObj, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
    580604{
    581605    /* sanity checks. */
     
    588612    const size_t cbAligned = RT_ALIGN_Z(cb, PAGE_SIZE);
    589613    AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER);
    590     if (pvFixed != (void *)-1)
    591         AssertReturn(!((uintptr_t)pvFixed & (uAlignment - 1)), VERR_INVALID_PARAMETER);
     614    if (R3PtrFixed != (RTR3PTR)-1)
     615        AssertReturn(!(R3PtrFixed & (uAlignment - 1)), VERR_INVALID_PARAMETER);
    592616    if (R0Process == NIL_RTR0PROCESS)
    593617        R0Process = RTR0ProcHandleSelf();
    594618
    595619    /* do the reservation. */
    596     return rtR0MemObjNativeReserveUser(pMemObj, pvFixed, cbAligned, uAlignment, R0Process);
     620    return rtR0MemObjNativeReserveUser(pMemObj, R3PtrFixed, cbAligned, uAlignment, R0Process);
    597621}
    598622
     
    659683 * @param   pMemObj         Where to store the ring-0 memory object handle of the mapping object.
    660684 * @param   MemObjToMap     The object to be map.
    661  * @param   pvFixed         Requested address. (void *)-1 means any address. This must match the alignment.
     685 * @param   R3PtrFixed      Requested address. (RTR3PTR)-1 means any address. This must match the alignment.
    662686 * @param   uAlignment      The alignment of the reserved memory.
    663687 *                          Supported values are 0 (alias for PAGE_SIZE), PAGE_SIZE, _2M and _4M.
     
    665689 * @param   R0Process       The process to map the memory into. NIL_R0PROCESS is an alias for the current one.
    666690 */
    667 RTR0DECL(int) RTR0MemObjMapUser(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
     691RTR0DECL(int) RTR0MemObjMapUser(PRTR0MEMOBJ pMemObj, RTR0MEMOBJ MemObjToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    668692{
    669693    /* sanity checks. */
     
    679703        uAlignment = PAGE_SIZE;
    680704    AssertReturn(uAlignment == PAGE_SIZE || uAlignment == _2M || uAlignment == _4M, VERR_INVALID_PARAMETER);
    681     if (pvFixed != (void *)-1)
    682         AssertReturn(!((uintptr_t)pvFixed & (uAlignment - 1)), VERR_INVALID_PARAMETER);
     705    if (R3PtrFixed != (RTR3PTR)-1)
     706        AssertReturn(!(R3PtrFixed & (uAlignment - 1)), VERR_INVALID_PARAMETER);
    683707    AssertReturn(fProt != RTMEM_PROT_NONE, VERR_INVALID_PARAMETER);
    684708    AssertReturn(!(fProt & ~(RTMEM_PROT_READ | RTMEM_PROT_WRITE | RTMEM_PROT_EXEC)), VERR_INVALID_PARAMETER);
     
    688712    /* do the mapping. */
    689713    PRTR0MEMOBJINTERNAL pNew;
    690     int rc = rtR0MemObjNativeMapUser(&pNew, pMemToMap, pvFixed, uAlignment, fProt, R0Process);
     714    int rc = rtR0MemObjNativeMapUser(&pNew, pMemToMap, R3PtrFixed, uAlignment, fProt, R0Process);
    691715    if (RT_SUCCESS(rc))
    692716    {
  • trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp

    r4135 r4136  
    346346
    347347
     348int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
     349{
     350    /** @todo rtR0MemObjNativeAllocPhys / darwin. */
     351    return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest);
     352}
     353
     354
    348355int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb)
    349356{
     
    480487
    481488
    482 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
     489int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
    483490{
    484491    return VERR_NOT_IMPLEMENTED;
     
    529536
    530537
    531 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
     538int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    532539{
    533540    /*
  • trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp

    r4135 r4136  
    7777    switch (pMemOs2->Core.enmType)
    7878    {
     79        case RTR0MEMOBJTYPE_PHYS_NC:
     80            AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
     81            return VERR_INTERNAL_ERROR;
     82            break;
     83
    7984        case RTR0MEMOBJTYPE_PHYS:
    8085            if (!pMemOs2->Core.pv)
     
    215220
    216221
     222int rtR0MemObjNativeAllocPhysNC(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest)
     223{
     224    /** @todo rtR0MemObjNativeAllocPhys / darwin. */
     225    return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest);
     226}
     227
     228
    217229int rtR0MemObjNativeEnterPhys(PPRTR0MEMOBJINTERNAL ppMem, RTHCPHYS Phys, size_t cb)
    218230{
     
    286298
    287299
    288 int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, void *pvFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
     300int rtR0MemObjNativeReserveUser(PPRTR0MEMOBJINTERNAL ppMem, RTR3PTR R3PtrFixed, size_t cb, size_t uAlignment, RTR0PROCESS R0Process)
    289301{
    290302    return VERR_NOT_IMPLEMENTED;
     
    328340            break;
    329341
     342        case RTR0MEMOBJTYPE_PHYS_NC:
     343            AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
     344            return VERR_NOT_IMPLEMENTED;
     345            break;
     346
    330347        case RTR0MEMOBJTYPE_LOCK:
    331348            if (pMemToMapOs2->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
     
    360377
    361378
    362 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, void *pvFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
     379int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process)
    363380{
    364381    AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED);
    365     AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED);
     382    AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED);
    366383
    367384    int rc;
     
    398415            return VERR_NOT_SUPPORTED;
    399416
     417        case RTR0MEMOBJTYPE_PHYS_NC:
     418            AssertMsgFailed(("RTR0MEMOBJTYPE_PHYS_NC\n"));
     419            return VERR_NOT_IMPLEMENTED;
     420            break;
     421
    400422        case RTR0MEMOBJTYPE_LOCK:
    401423            if (pMemToMapOs2->Core.u.Lock.R0Process != NIL_RTR0PROCESS)
     
    453475        case RTR0MEMOBJTYPE_LOW:
    454476        case RTR0MEMOBJTYPE_LOCK:
     477        case RTR0MEMOBJTYPE_PHYS_NC:
    455478            return pMemOs2->aPages[iPage].Addr;
    456479
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