Changeset 29765 in vbox
- Timestamp:
- May 24, 2010 7:07:28 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime/r0drv/freebsd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c
r28298 r29765 77 77 do 78 78 { 79 vm_pindex_t PageIndex = OFF_TO_IDX(AddressDst); 80 vm_page_t pPage; 79 vm_page_t pPage; 81 80 82 pPage = vm_page_alloc(NULL, PageIndex,81 pPage = vm_page_alloc(NULL, 0, 83 82 VM_ALLOC_NOBUSY | VM_ALLOC_SYSTEM | 84 83 VM_ALLOC_WIRED | VM_ALLOC_NOOBJ); 85 84 if (pPage) 86 85 { 87 vm_page_lock_queues();88 vm_page_wire(pPage);89 vm_page_unlock_queues();90 86 /* Put the page into the page table now. */ 91 #if __FreeBSD_version >= 701105 92 pmap_enter(kernel_map->pmap, AddressDst, VM_PROT_NONE, pPage, 93 VM_PROT_ALL, TRUE); 94 #else 95 pmap_enter(kernel_map->pmap, AddressDst, pPage, 96 VM_PROT_ALL, TRUE); 97 #endif 87 MY_PMAP_ENTER(kernel_map->pmap, AddressDst, pPage, VM_PROT_ALL, 88 TRUE); 98 89 } 99 90 else -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r29763 r29765 44 44 #include "internal/memobj.h" 45 45 46 /**47 * Our pmap_enter version48 */49 #if __FreeBSD_version >= 70110550 # define MY_PMAP_ENTER(pPhysMap, AddrR3, pPage, fProt, fWired) \51 pmap_enter(pPhysMap, AddrR3, VM_PROT_NONE, pPage, fProt, fWired)52 #else53 # define MY_PMAP_ENTER(pPhysMap, AddrR3, pPage, fProt, fWired) \54 pmap_enter(pPhysMap, AddrR3, pPage, fProt, fWired)55 #endif56 57 /**58 * Check whether we can use kmem_alloc_attr for low allocs.59 */60 #if (__FreeBSD_version >= 900011) \61 || (__FreeBSD_version < 900000 && __FreeBSD_version >= 800505) \62 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 703101)63 # define USE_KMEM_ALLOC_ATTR64 #endif65 66 46 /******************************************************************************* 67 47 * Structures and Typedefs * -
trunk/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h
r27146 r29765 70 70 #include <machine/cpu.h> 71 71 72 /*#ifdef __cplusplus 73 # error "This header doesn't work for C++ code. Sorry, typical kernel crap." 74 #endif*/ 75 72 /** 73 * Wrappers arount the sleepq_ KPI. 74 */ 76 75 #if __FreeBSD_version >= 800026 77 76 # define SLEEPQ_TIMEDWAIT(EventInt) sleepq_timedwait(EventInt, 0) … … 86 85 #endif 87 86 87 /** 88 * Our pmap_enter version 89 */ 90 #if __FreeBSD_version >= 701105 91 # define MY_PMAP_ENTER(pPhysMap, AddrR3, pPage, fProt, fWired) \ 92 pmap_enter(pPhysMap, AddrR3, VM_PROT_NONE, pPage, fProt, fWired) 93 #else 94 # define MY_PMAP_ENTER(pPhysMap, AddrR3, pPage, fProt, fWired) \ 95 pmap_enter(pPhysMap, AddrR3, pPage, fProt, fWired) 88 96 #endif 97 98 /** 99 * Check whether we can use kmem_alloc_attr for low allocs. 100 */ 101 #if (__FreeBSD_version >= 900011) \ 102 || (__FreeBSD_version < 900000 && __FreeBSD_version >= 800505) \ 103 || (__FreeBSD_version < 800000 && __FreeBSD_version >= 703101) 104 # define USE_KMEM_ALLOC_ATTR 105 #endif 106 107 #endif
Note:
See TracChangeset
for help on using the changeset viewer.