VirtualBox

Ignore:
Timestamp:
Feb 27, 2010 8:05:38 PM (15 years ago)
Author:
vboxsync
Message:

IPRT/FreeBSD: Fix GetPagePhysAddr for lock objects

File:
1 edited

Legend:

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

    r26847 r26886  
    731731    {
    732732        case RTR0MEMOBJTYPE_LOCK:
     733        {
    733734            if (    pMemFreeBSD->Core.u.Lock.R0Process != NIL_RTR0PROCESS
    734735                &&  pMemFreeBSD->Core.u.Lock.R0Process != (RTR0PROCESS)curproc)
     
    737738                return NIL_RTHCPHYS;
    738739            }
    739             /* fall thru*/
     740
     741            vm_offset_t pb = (vm_offset_t)pMemFreeBSD->Core.pv + (iPage << PAGE_SHIFT);
     742
     743            struct proc    *pProc     = (struct proc *)pMemFreeBSD->Core.u.Lock.R0Process;
     744            struct vm_map  *pProcMap  = &pProc->p_vmspace->vm_map;
     745            pmap_t pPhysicalMap       = pProcMap->pmap;
     746
     747            return pmap_extract(pPhysicalMap, pb);
     748        }
     749
    740750        case RTR0MEMOBJTYPE_PAGE:
    741751        {
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