Changeset 15835 in vbox for trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
- Timestamp:
- Jan 7, 2009 3:18:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r0drv/darwin/memobj-r0drv-darwin.cpp
r14836 r15835 405 405 { 406 406 /* 407 * Validate the address range and create a descriptor for it. 407 * Create a descriptor for it (the validation is always true on intel macs, but 408 * as it doesn't harm us keep it in). 408 409 */ 409 410 int rc = VERR_ADDRESS_TOO_BIG; 410 IOPhysicalAddress PhysAddr = Phys; 411 if (PhysAddr == Phys) 412 { 413 IOMemoryDescriptor *pMemDesc = IOMemoryDescriptor::withPhysicalAddress(PhysAddr, cb, kIODirectionInOut); 411 IOAddressRange aRanges[1] = { Phys, cb }; 412 if ( aRanges[0].address == Phys 413 && aRanges[0].length == cb) 414 { 415 IOMemoryDescriptor *pMemDesc = IOMemoryDescriptor::withAddressRanges(&aRanges[0], RT_ELEMENTS(aRanges), 416 kIODirectionInOut, NULL /*task*/); 414 417 if (pMemDesc) 415 418 { 416 Assert(Phys Addr== pMemDesc->getPhysicalAddress());419 Assert(Phys == pMemDesc->getPhysicalAddress()); 417 420 418 421 /* … … 422 425 if (pMemDarwin) 423 426 { 424 pMemDarwin->Core.u.Phys.PhysBase = Phys Addr;427 pMemDarwin->Core.u.Phys.PhysBase = Phys; 425 428 pMemDarwin->Core.u.Phys.fAllocated = false; 426 429 pMemDarwin->pMemDesc = pMemDesc; … … 432 435 pMemDesc->release(); 433 436 } 437 else 438 rc = VERR_MEMOBJ_INIT_FAILED; 434 439 } 435 440 else 436 AssertMsgFailed(("%#llx \n", (unsigned long long)Phys));441 AssertMsgFailed(("%#llx %llx\n", (unsigned long long)Phys, (unsigned long long)cb)); 437 442 return rc; 438 443 }
Note:
See TracChangeset
for help on using the changeset viewer.