VirtualBox

Ignore:
Timestamp:
Aug 14, 2007 1:59:36 AM (17 years ago)
Author:
vboxsync
Message:

Added RTR0MemObjAllocPhysNC. Changed the two APIs taking ring-3 addresses to use RTR3PTR.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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:
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