Lines Matching refs:bmd

167 	IOBufferMemoryDescriptor * bmd;  in IODMACommandForceDoubleBufferTest()  local
186 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(kernel_task, in IODMACommandForceDoubleBufferTest()
188 assert(bmd); in IODMACommandForceDoubleBufferTest()
191 dmaLen = bmd->getDMAMapLength(&dmaOffset); in IODMACommandForceDoubleBufferTest()
196 ((uint32_t*) bmd->getBytesNoCopy())[0] = 0x53535300 | dir; in IODMACommandForceDoubleBufferTest()
198 ret = bmd->prepare((IODirection) dir); in IODMACommandForceDoubleBufferTest()
205 ret = dma->setMemoryDescriptor(bmd, true); in IODMACommandForceDoubleBufferTest()
218 data = ((uint32_t*) bmd->getBytesNoCopy())[0]; in IODMACommandForceDoubleBufferTest()
229 bmd->complete((IODirection) dir); in IODMACommandForceDoubleBufferTest()
232 data = ((uint32_t*) bmd->getBytesNoCopy())[0]; in IODMACommandForceDoubleBufferTest()
236 bmd->release(); in IODMACommandForceDoubleBufferTest()
415 IOBufferMemoryDescriptor * bmd; in IOMemoryPrefaultTest() local
425 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(current_task(), in IOMemoryPrefaultTest()
427 assert(bmd); in IOMemoryPrefaultTest()
428 kr = bmd->prepare(); in IOMemoryPrefaultTest()
431 map = bmd->map(kIOMapPrefault); in IOMemoryPrefaultTest()
442 bmd->release(); in IOMemoryPrefaultTest()
451 IOBufferMemoryDescriptor * bmd; in IOBMDOverflowTest() local
453bmd = IOBufferMemoryDescriptor::inTaskWithPhysicalMask(kernel_task, kIOMemoryPageable | kIODirecti… in IOBMDOverflowTest()
455 assert(NULL == bmd); in IOBMDOverflowTest()
463 IOBufferMemoryDescriptor * bmd; in IOBMDSetLengthMapTest() local
466 bmd = IOBufferMemoryDescriptor::inTaskWithOptions( in IOBMDSetLengthMapTest()
468 assert(bmd); in IOBMDSetLengthMapTest()
470 bmd->setLength(0x100); in IOBMDSetLengthMapTest()
471 map = bmd->createMappingInTask(current_task(), 0, kIOMapAnywhere, 0, 0); in IOBMDSetLengthMapTest()
475 bmd->setLength(0x200); in IOBMDSetLengthMapTest()
476 map = bmd->createMappingInTask(current_task(), 0, kIOMapAnywhere, 0, 0); in IOBMDSetLengthMapTest()
480 bmd->release(); in IOBMDSetLengthMapTest()
504 IOBufferMemoryDescriptor * bmd; in BadFixedAllocTest() local
507 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(NULL, in BadFixedAllocTest()
509 assert(bmd); in BadFixedAllocTest()
510 map = bmd->createMappingInTask(kernel_task, 0x2000, 0); in BadFixedAllocTest()
513 bmd->release(); in BadFixedAllocTest()
521 IOBufferMemoryDescriptor * bmd; in IODirectionPrepareNoZeroFillTest() local
523 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(NULL, in IODirectionPrepareNoZeroFillTest()
525 assert(bmd); in IODirectionPrepareNoZeroFillTest()
526 bmd->prepare((IODirection)(kIODirectionIn | kIODirectionPrepareNoZeroFill)); in IODirectionPrepareNoZeroFillTest()
527 bmd->prepare(kIODirectionIn); in IODirectionPrepareNoZeroFillTest()
528 bmd->complete((IODirection)(kIODirectionIn | kIODirectionCompleteWithDataValid)); in IODirectionPrepareNoZeroFillTest()
529 bmd->complete(kIODirectionIn); in IODirectionPrepareNoZeroFillTest()
530 bmd->release(); in IODirectionPrepareNoZeroFillTest()
538 IOBufferMemoryDescriptor * bmd; in IOMemoryMapTest() local
547 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(current_task(), in IOMemoryMapTest()
549 assert(bmd); in IOMemoryMapTest()
550 p = (typeof(p))bmd->getBytesNoCopy(); in IOMemoryMapTest()
600 bmd->release(); in IOMemoryMapTest()
616 IOMemoryDescriptor * bmd; in AllocationNameTest() local
624 bmd = IOBufferMemoryDescriptor::inTaskWithOptions(TASK_NULL, in AllocationNameTest()
627 assert(bmd); in AllocationNameTest()
628 bmd->prepare(); in AllocationNameTest()
634 bmd->release(); in AllocationNameTest()
748 IOBufferMemoryDescriptor * bmd = IOBufferMemoryDescriptor::inTaskWithOptions(TASK_NULL, in IOMDContextTest() local
756 assert(bmd->copyContext() == NULL); in IOMDContextTest()
758 bmd->setContext(NULL); in IOMDContextTest()
759 assert(bmd->copyContext() == NULL); in IOMDContextTest()
761 bmd->setContext(firstString); in IOMDContextTest()
762 current = bmd->copyContext(); in IOMDContextTest()
766 bmd->setContext(NULL); in IOMDContextTest()
767 assert(bmd->copyContext() == NULL); in IOMDContextTest()
769 bmd->setContext(secondString); in IOMDContextTest()
770 current = bmd->copyContext(); in IOMDContextTest()
774 bmd->release(); in IOMDContextTest()