VirtualBox

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c

    r77131 r78120  
    651651    if (uAlignment > PAGE_SIZE)
    652652        return VERR_NOT_SUPPORTED;
     653    Assert(!offSub || cbSub);
    653654
    654655    int                rc;
     
    711712
    712713DECLHIDDEN(int) rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment,
    713                                         unsigned fProt, RTR0PROCESS R0Process)
     714                                        unsigned fProt, RTR0PROCESS R0Process, size_t offSub, size_t cbSub)
    714715{
    715716    /*
     
    719720    if (uAlignment > PAGE_SIZE)
    720721        return VERR_NOT_SUPPORTED;
     722    Assert(!offSub || cbSub);
    721723
    722724    int                rc;
     
    748750        AddrR3 = (vm_offset_t)R3PtrFixed;
    749751
     752    if (cbSub == 0)
     753        cbSub = pMemToMap->cb - offSub;
     754
    750755    /* Insert the pObject in the map. */
    751756    vm_object_reference(pMemToMapFreeBSD->pObject);
    752757    rc = vm_map_find(pProcMap,              /* Map to insert the object in */
    753758                     pMemToMapFreeBSD->pObject, /* Object to map */
    754                      0,                     /* Start offset in the object */
     759                     offSub,                /* Start offset in the object */
    755760                     &AddrR3,               /* Start address IN/OUT */
    756                      pMemToMap->cb,         /* Size of the mapping */
     761                     cbSub,                 /* Size of the mapping */
    757762#if __FreeBSD_version >= 1000055
    758763                     0,                     /* Upper bound of the mapping */
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