- Timestamp:
- Feb 26, 2010 1:19:14 PM (15 years ago)
- Location:
- trunk/src/VBox/Runtime
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/include/internal/memobj.h
r26433 r26847 354 354 355 355 /** 356 * Allocates contiguous page aligned physical memory without (necessarily) any kernel mapping. 356 * Allocates contiguous page aligned physical memory without (necessarily) any 357 * kernel mapping. 357 358 * 358 359 * @returns IPRT status code. … … 362 363 * NIL_RTHCPHYS if any address is acceptable. 363 364 * @param uAlignment The alignment of the reserved memory. 364 * Supported values are 0 (alias for PAGE_SIZE),PAGE_SIZE, _2M, _4M and _1G.365 * Supported values are PAGE_SIZE, _2M, _4M and _1G. 365 366 */ 366 367 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment); -
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r26430 r26847 570 570 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment) 571 571 { 572 /** @todo */ 573 if ( uAlignment != 0 574 && uAlignment != PAGE_SIZE) 572 /** @todo alignment */ 573 if (uAlignment != PAGE_SIZE) 575 574 return VERR_NOT_SUPPORTED; 576 575 -
trunk/src/VBox/Runtime/r0drv/freebsd/memobj-r0drv-freebsd.c
r26829 r26847 331 331 /** @todo check if there is a more appropriate API somewhere.. */ 332 332 333 /** @todo */ 334 if ( uAlignment != 0 335 && uAlignment != PAGE_SIZE) 333 /** @todo alignment */ 334 if (uAlignment != PAGE_SIZE) 336 335 return VERR_NOT_SUPPORTED; 337 336 -
trunk/src/VBox/Runtime/r0drv/linux/memobj-r0drv-linux.c
r26430 r26847 702 702 int rtR0MemObjNativeAllocPhys(PPRTR0MEMOBJINTERNAL ppMem, size_t cb, RTHCPHYS PhysHighest, size_t uAlignment) 703 703 { 704 /* @todo */ 705 if ( uAlignment != 0 706 && uAlignment != PAGE_SIZE) 704 /** @todo alignment */ 705 if (uAlignment != PAGE_SIZE) 707 706 return VERR_NOT_SUPPORTED; 708 707 -
trunk/src/VBox/Runtime/r0drv/memobj-r0drv.cpp
r26492 r26847 587 587 RT_EXPORT_SYMBOL(RTR0MemObjAllocPhys); 588 588 589 589 590 /** 590 591 * Allocates contiguous physical memory without (necessarily) any kernel mapping. … … 607 608 AssertReturn(cb <= cbAligned, VERR_INVALID_PARAMETER); 608 609 AssertReturn(PhysHighest >= cb, VERR_INVALID_PARAMETER); 610 if (uAlignment == 0) 611 uAlignment = PAGE_SIZE; 612 AssertReturn( uAlignment == PAGE_SIZE 613 || uAlignment == _2M 614 || uAlignment == _4M 615 || uAlignment == _1G, 616 VERR_INVALID_PARAMETER); 609 617 #if HC_ARCH_BITS == 32 610 /* Memory allocated in this way is typically mapped into kernel space as well; simply don't allow this 611 * on 32 bits hosts as the kernel space is too crowded already. 612 */ 613 if ( uAlignment != 0 614 && uAlignment != PAGE_SIZE) 618 /* Memory allocated in this way is typically mapped into kernel space as well; simply 619 don't allow this on 32 bits hosts as the kernel space is too crowded already. */ 620 if (uAlignment != PAGE_SIZE) 615 621 return VERR_NOT_SUPPORTED; 616 #else617 AssertReturn(( uAlignment == 0618 || uAlignment == PAGE_SIZE619 || uAlignment == _2M620 || uAlignment == _4M621 || uAlignment == _1G), VERR_INVALID_PARAMETER);622 622 #endif 623 623 RT_ASSERT_PREEMPTIBLE(); -
trunk/src/VBox/Runtime/r0drv/nt/memobj-r0drv-nt.cpp
r26840 r26847 401 401 * current limit is kind of random... 402 402 */ 403 if ( cb < _128K404 && (uAlignment == 0 || uAlignment == PAGE_SIZE))403 if ( cb < _128K 404 && uAlignment == PAGE_SIZE) 405 405 406 406 { -
trunk/src/VBox/Runtime/r0drv/os2/memobj-r0drv-os2.cpp
r26430 r26847 199 199 AssertMsgReturn(PhysHighest >= 16 *_1M, ("PhysHigest=%RHp\n", PhysHighest), VERR_NOT_IMPLEMENTED); 200 200 201 /** @todo */ 202 if ( uAlignment != 0 203 && uAlignment != PAGE_SIZE) 201 /** @todo alignment */ 202 if (uAlignment != PAGE_SIZE) 204 203 return VERR_NOT_SUPPORTED; 205 204 … … 228 227 { 229 228 /** @todo rtR0MemObjNativeAllocPhys / darwin. */ 230 return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest );229 return rtR0MemObjNativeAllocPhys(ppMem, cb, PhysHighest, PAGE_SIZE); 231 230 } 232 231 -
trunk/src/VBox/Runtime/r0drv/solaris/vbi/memobj-r0drv-solaris.c
r26430 r26847 196 196 AssertMsgReturn(PhysHighest >= 16 *_1M, ("PhysHigest=%RHp\n", PhysHighest), VERR_NOT_IMPLEMENTED); 197 197 198 /** @todo */ 199 if ( uAlignment != 0 200 && uAlignment != PAGE_SIZE) 198 /** @todo alignment */ 199 if (uAlignment != PAGE_SIZE) 201 200 return VERR_NOT_SUPPORTED; 202 201
Note:
See TracChangeset
for help on using the changeset viewer.