Changeset 49718 in vbox
- Timestamp:
- Nov 29, 2013 10:51:54 AM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/freebsd/SUPDrv-freebsd.c
r49634 r49718 292 292 * Close the session. 293 293 */ 294 supdrvSessionRelease( &g_VBoxDrvFreeBSDDevExt,pSession);294 supdrvSessionRelease(pSession); 295 295 ASMAtomicDecU32(&g_cUsers); 296 296 } -
trunk/src/VBox/Main/src-server/HostDnsService.cpp
r49409 r49718 136 136 # elif defined(RT_OS_SOLARIS) 137 137 g_monitor = new HostDnsServiceSolaris(); 138 # elif defined(RT_OS_FREEBSD) 139 g_monitor = new HostDnsServiceFreebsd(); 138 140 # elif defined(RT_OS_OS2) 139 141 g_monitor = new HostDnsServiceOs2(); -
trunk/src/VBox/Main/src-server/HostDnsService.h
r49409 r49718 143 143 }; 144 144 # endif 145 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) || defined(RT_OS_OS2) 145 # if defined(RT_OS_SOLARIS) || defined(RT_OS_LINUX) || defined(RT_OS_OS2) || defined(RT_OS_FREEBSD) 146 146 class HostDnsServiceResolvConf: public HostDnsMonitor 147 147 { … … 183 183 }; 184 184 185 # elif defined(RT_OS_FREEBSD) 186 class HostDnsServiceFreebsd: public HostDnsServiceResolvConf 187 { 188 public: 189 HostDnsServiceFreebsd(){} 190 ~HostDnsServiceFreebsd(){} 191 HRESULT init(){ return HostDnsServiceResolvConf::init("/etc/resolv.conf");} 192 }; 193 185 194 # elif defined(RT_OS_OS2) 186 195 class HostDnsServiceOs2 : public HostDnsServiceResolvConf -
trunk/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
r48016 r49718 44 44 #include <netinet/in.h> 45 45 46 #include <stdlib.h> 46 47 #include <stdio.h> 47 48 #include <unistd.h> … … 389 390 390 391 struct ifreq IfReq; 391 RTS TrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), pInfo->szShortName);392 RTStrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), pInfo->szShortName); 392 393 if (ioctl(sock, SIOCGIFFLAGS, &IfReq) < 0) 393 394 { -
trunk/src/VBox/Main/src-server/freebsd/PerformanceFreeBSD.cpp
r48010 r49718 110 110 } 111 111 112 int getDiskListByFs(const char *name, DiskList& list) 113 { 114 return VERR_NOT_IMPLEMENTED; 115 } 116 112 117 } /* namespace pm */ 113 118 -
trunk/src/VBox/Runtime/r0drv/freebsd/alloc-r0drv-freebsd.c
r36555 r49718 80 80 81 81 /* Addr contains a start address vm_map_find will start searching for suitable space at. */ 82 #if __FreeBSD_version >= 1000055 83 int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, 84 cbAllocated, 0, VMFS_ANY_SPACE, VM_PROT_ALL, VM_PROT_ALL, 0); 85 #else 82 86 int rc = vm_map_find(kernel_map, pVmObject, 0, &Addr, 83 87 cbAllocated, TRUE, VM_PROT_ALL, VM_PROT_ALL, 0); 88 #endif 84 89 if (rc == KERN_SUCCESS) 85 90 { -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r42597 r49718 163 163 case RTR0MEMOBJTYPE_PHYS_NC: 164 164 { 165 #if __FreeBSD_version >= 1000030 166 VM_OBJECT_WLOCK(pMemFreeBSD->pObject); 167 #else 165 168 VM_OBJECT_LOCK(pMemFreeBSD->pObject); 169 #endif 166 170 vm_page_t pPage = vm_page_find_least(pMemFreeBSD->pObject, 0); 167 171 vm_page_lock_queues(); … … 173 177 } 174 178 vm_page_unlock_queues(); 179 #if __FreeBSD_version >= 1000030 180 VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); 181 #else 175 182 VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); 183 #endif 176 184 vm_object_deallocate(pMemFreeBSD->pObject); 177 185 break; … … 201 209 while (cTries <= 1) 202 210 { 211 #if __FreeBSD_version >= 1000030 212 VM_OBJECT_WLOCK(pObject); 213 #else 203 214 VM_OBJECT_LOCK(pObject); 215 #endif 204 216 pPages = vm_page_alloc_contig(pObject, iPIndex, fFlags, cPages, 0, 205 217 VmPhysAddrHigh, uAlignment, 0, VM_MEMATTR_DEFAULT); 218 #if __FreeBSD_version >= 1000030 219 VM_OBJECT_WUNLOCK(pObject); 220 #else 206 221 VM_OBJECT_UNLOCK(pObject); 222 #endif 207 223 if (pPages) 208 224 break; … … 224 240 if (!pPages) 225 241 return pPages; 242 #if __FreeBSD_version >= 1000030 243 VM_OBJECT_WLOCK(pObject); 244 #else 226 245 VM_OBJECT_LOCK(pObject); 246 #endif 227 247 for (vm_pindex_t iPage = 0; iPage < cPages; iPage++) 228 248 { … … 236 256 } 237 257 } 258 #if __FreeBSD_version >= 1000030 259 VM_OBJECT_WUNLOCK(pObject); 260 #else 238 261 VM_OBJECT_UNLOCK(pObject); 262 #endif 239 263 return pPages; 240 264 #endif … … 260 284 { 261 285 /* Free all allocated pages */ 286 #if __FreeBSD_version >= 1000030 287 VM_OBJECT_WLOCK(pObject); 288 #else 262 289 VM_OBJECT_LOCK(pObject); 290 #endif 263 291 while (iPage-- > 0) 264 292 { … … 270 298 vm_page_unlock_queues(); 271 299 } 300 #if __FreeBSD_version >= 1000030 301 VM_OBJECT_WUNLOCK(pObject); 302 #else 272 303 VM_OBJECT_UNLOCK(pObject); 304 #endif 273 305 return rcNoMem; 274 306 } … … 287 319 288 320 /* No additional object reference for auto-deallocation upon unmapping. */ 321 #if __FreeBSD_version >= 1000055 322 rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, 323 &MapAddress, pMemFreeBSD->Core.cb, 0, VMFS_ANY_SPACE, 324 fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); 325 #else 289 326 rc = vm_map_find(kernel_map, pMemFreeBSD->pObject, 0, 290 327 &MapAddress, pMemFreeBSD->Core.cb, VMFS_ANY_SPACE, 291 328 fExecutable ? VM_PROT_ALL : VM_PROT_RW, VM_PROT_ALL, 0); 329 #endif 292 330 293 331 if (rc == KERN_SUCCESS) … … 403 441 { 404 442 Assert(enmType == RTR0MEMOBJTYPE_PHYS); 443 #if __FreeBSD_version >= 1000030 444 VM_OBJECT_WLOCK(pMemFreeBSD->pObject); 445 #else 405 446 VM_OBJECT_LOCK(pMemFreeBSD->pObject); 447 #endif 406 448 pMemFreeBSD->Core.u.Phys.PhysBase = VM_PAGE_TO_PHYS(vm_page_find_least(pMemFreeBSD->pObject, 0)); 449 #if __FreeBSD_version >= 1000030 450 VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); 451 #else 407 452 VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); 453 #endif 408 454 pMemFreeBSD->Core.u.Phys.fAllocated = true; 409 455 } … … 552 598 &MapAddress, /* addr (IN/OUT) */ 553 599 cb, /* length */ 600 #if __FreeBSD_version >= 1000055 601 0, /* max addr */ 602 #endif 554 603 pvFixed == (void *)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, 555 604 /* find_space */ … … 629 678 &Addr, /* Start address IN/OUT */ 630 679 cbSub, /* Size of the mapping */ 680 #if __FreeBSD_version >= 1000055 681 0, /* Upper bound of mapping */ 682 #endif 631 683 VMFS_ANY_SPACE, /* Whether a suitable address should be searched for first */ 632 684 ProtectionFlags, /* protection flags */ … … 705 757 &AddrR3, /* Start address IN/OUT */ 706 758 pMemToMap->cb, /* Size of the mapping */ 759 #if __FreeBSD_version >= 1000055 760 0, /* Upper bound of the mapping */ 761 #endif 707 762 R3PtrFixed == (RTR3PTR)-1 ? VMFS_ANY_SPACE : VMFS_NO_SPACE, 708 763 /* Whether a suitable address should be searched for first */ … … 815 870 { 816 871 RTHCPHYS addr; 872 #if __FreeBSD_version >= 1000030 873 VM_OBJECT_WLOCK(pMemFreeBSD->pObject); 874 #else 817 875 VM_OBJECT_LOCK(pMemFreeBSD->pObject); 876 #endif 818 877 addr = VM_PAGE_TO_PHYS(vm_page_lookup(pMemFreeBSD->pObject, iPage)); 878 #if __FreeBSD_version >= 1000030 879 VM_OBJECT_WUNLOCK(pMemFreeBSD->pObject); 880 #else 819 881 VM_OBJECT_UNLOCK(pMemFreeBSD->pObject); 882 #endif 820 883 return addr; 821 884 } -
trunk/src/VBox/Runtime/r0drv/freebsd/mp-r0drv-freebsd.c
r44529 r49718 88 88 } 89 89 90 91 RTDECL(RTCPUID) RTMpGetCoreCount(void) 92 { 93 return mp_maxid + 1; 94 } 90 95 91 96 RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu) -
trunk/src/VBox/Runtime/r0drv/freebsd/the-freebsd-kernel.h
r44238 r49718 51 51 #include <sys/kthread.h> 52 52 #include <sys/lock.h> 53 #if __FreeBSD_version >= 1000030 54 #include <sys/rwlock.h> 55 #endif 53 56 #include <sys/mutex.h> 54 57 #include <sys/sched.h>
Note:
See TracChangeset
for help on using the changeset viewer.