Changeset 21497 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Jul 10, 2009 8:24:18 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 49946
- Location:
- trunk/src/VBox/Runtime/r0drv
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r20525 r21497 756 756 757 757 /* 758 * Check that the specified alignment is supported. 759 */ 760 if (uAlignment > PAGE_SIZE) 761 return VERR_NOT_SUPPORTED; 762 763 /* 758 764 * Must have a memory descriptor that we can map. 759 765 */ … … 851 857 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process) 852 858 { 859 /* 860 * Check for unsupported things. 861 */ 853 862 AssertReturn(R3PtrFixed == (RTR3PTR)-1, VERR_NOT_SUPPORTED); 863 if (uAlignment > PAGE_SIZE) 864 return VERR_NOT_SUPPORTED; 854 865 855 866 /* -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r20525 r21497 442 442 443 443 /* 444 * Check that the specified alignment is supported. 445 */ 446 if (uAlignment > PAGE_SIZE) 447 return VERR_NOT_SUPPORTED; 448 449 /* 444 450 * Create the object. 445 451 */ … … 515 521 AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); 516 522 523 /* 524 * Check that the specified alignment is supported. 525 */ 526 if (uAlignment > PAGE_SIZE) 527 return VERR_NOT_SUPPORTED; 528 529 530 517 531 /* Phys: see pmap_mapdev in i386/i386/pmap.c (http://fxr.watson.org/fxr/source/i386/i386/pmap.c?v=RELENG62#L2860) */ 518 532 … … 588 602 int rtR0MemObjNativeMapUser(PPRTR0MEMOBJINTERNAL ppMem, RTR0MEMOBJ pMemToMap, RTR3PTR R3PtrFixed, size_t uAlignment, unsigned fProt, RTR0PROCESS R0Process) 589 603 { 604 /* 605 * Check for unsupported stuff. 606 */ 590 607 AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED); 591 608 AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED); 609 if (uAlignment > PAGE_SIZE) 610 return VERR_NOT_SUPPORTED; 592 611 593 612 int rc; -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r21314 r21497 904 904 /* check for unsupported stuff. */ 905 905 AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); 906 AssertMsgReturn(uAlignment <= PAGE_SIZE, ("%#x\n", uAlignment), VERR_NOT_SUPPORTED); 906 if (uAlignment > PAGE_SIZE) 907 return VERR_NOT_SUPPORTED; 907 908 908 909 /* … … 1018 1019 1019 1020 /* 1021 * Check that the specified alignment is supported. 1022 */ 1023 if (uAlignment > PAGE_SIZE) 1024 return VERR_NOT_SUPPORTED; 1025 1026 /* 1020 1027 * Let rtR0MemObjLinuxDoMmap do the difficult bits. 1021 1028 */ … … 1051 1058 AssertMsgReturn(!offSub && !cbSub, ("%#x %#x\n", offSub, cbSub), VERR_NOT_SUPPORTED); 1052 1059 AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); 1053 AssertMsgReturn(uAlignment <= PAGE_SIZE, ("%#x\n", uAlignment), VERR_NOT_SUPPORTED); 1060 if (uAlignment > PAGE_SIZE) 1061 return VERR_NOT_SUPPORTED; 1054 1062 1055 1063 /* … … 1135 1143 */ 1136 1144 if (!pTask) 1145 return VERR_NOT_SUPPORTED; 1146 if (uAlignment > PAGE_SIZE) 1137 1147 return VERR_NOT_SUPPORTED; 1138 1148 -
trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
r20525 r21497 654 654 655 655 /* 656 * Check that the specified alignment is supported. 657 */ 658 if (uAlignment > PAGE_SIZE) 659 return VERR_NOT_SUPPORTED; 660 661 /* 656 662 * There are two basic cases here, either we've got an MDL and can 657 663 * map it using MmMapLockedPages, or we've got a contiguous physical -
trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
r20525 r21497 310 310 AssertMsgReturn(pvFixed == (void *)-1, ("%p\n", pvFixed), VERR_NOT_SUPPORTED); 311 311 312 /* 313 * Check that the specified alignment is supported. 314 */ 315 if (uAlignment > PAGE_SIZE) 316 return VERR_NOT_SUPPORTED; 317 318 312 319 /** @todo finish the implementation. */ 313 320 … … 331 338 { 332 339 /* no ring-0 mapping, so allocate a mapping in the process. */ 333 AssertMsgReturn(uAlignment == PAGE_SIZE, ("%#zx\n", uAlignment), VERR_NOT_SUPPORTED);334 340 AssertMsgReturn(fProt & RTMEM_PROT_WRITE, ("%#x\n", fProt), VERR_NOT_SUPPORTED); 335 341 Assert(!pMemToMapOs2->Core.u.Phys.fAllocated); … … 383 389 AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED); 384 390 AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED); 391 if (uAlignment > PAGE_SIZE) 392 return VERR_NOT_SUPPORTED; 385 393 386 394 int rc; … … 405 413 { 406 414 /* no ring-0 mapping, so allocate a mapping in the process. */ 407 AssertMsgReturn(uAlignment == PAGE_SIZE, ("%#zx\n", uAlignment), VERR_NOT_SUPPORTED);408 415 AssertMsgReturn(fProt & RTMEM_PROT_WRITE, ("%#x\n", fProt), VERR_NOT_SUPPORTED); 409 416 Assert(!pMemToMapOs2->Core.u.Phys.fAllocated); -
trunk/src/VBox/Runtime/r0drv/solaris/memobj-r0drv-solaris.c
r20525 r21497 322 322 unsigned fProt, size_t offSub, size_t cbSub) 323 323 { 324 /* @todo rtR0MemObjNativeMapKernel / Solaris - Should be fairly simple alloc kernel memory and memload it. */324 /** @todo rtR0MemObjNativeMapKernel / Solaris - Should be fairly simple alloc kernel memory and memload it. */ 325 325 return VERR_NOT_IMPLEMENTED; 326 326 } … … 357 357 as_rangeunlock(useras); 358 358 cmn_err(CE_NOTE, "rtR0MemObjNativeMapUser: map_addr alignment(%ld) failed.\n", uAlignment); 359 if (uAlignment > PAGE_SIZE) 360 return VERR_NOT_SUPPORTED; 359 361 return VERR_MAP_FAILED; 360 362 } -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/memobj-r0drv-solaris.c
r20526 r21497 265 265 unsigned fProt, size_t offSub, size_t cbSub) 266 266 { 267 /* @todo rtR0MemObjNativeMapKernel / Solaris - Should be fairly simple alloc kernel memory and memload it. */267 /** @todo rtR0MemObjNativeMapKernel / Solaris - Should be fairly simple alloc kernel memory and memload it. */ 268 268 return VERR_NOT_IMPLEMENTED; 269 269 } … … 273 273 AssertMsgReturn(R3PtrFixed == (RTR3PTR)-1, ("%p\n", R3PtrFixed), VERR_NOT_SUPPORTED); 274 274 AssertMsgReturn(R0Process == RTR0ProcHandleSelf(), ("%p != %p\n", R0Process, RTR0ProcHandleSelf()), VERR_NOT_SUPPORTED); 275 AssertMsgReturn(uAlignment == 0 || uAlignment == PAGE_SIZE, ("%d\n", uAlignment), VERR_NOT_SUPPORTED); 275 if (uAlignment > PAGE_SIZE) 276 return VERR_NOT_SUPPORTED; 276 277 277 278 PRTR0MEMOBJSOLARIS pMemToMapSolaris = (PRTR0MEMOBJSOLARIS)pMemToMap;
Note:
See TracChangeset
for help on using the changeset viewer.