阅读:1623回复:2
又来送分喽!还是有关stream minidriver.
在srb中CommandData.DataBufferArray和ScatterGatherBuffer好像都是描述的数据缓冲区,它们之间有什么关系亚,ddk中testcap里好像只用了前者,而后者的NumberOfPhysicalPages为0,但我的驱动是对应硬件的,而且支持ScatterGather功能,怎么通知上面的class driver呢,我应该把什么地址作为dma地址传送给我的卡呢?
拜托拜托! |
|
沙发#
发布于:2002-02-02 02:12
fields in DataBufferArray specify virtual address which is not usable for DMA...
you should call StreamClassGetPhysicalAddress to convert this address into DMA-able physical address. Note here it\'s possible although the virtual address here is continious, but the physical address is not, so you should check the length returned by StreamClassGetPhysicalAddress and call it looply until you get all translated physical addresses. Sorry, I made a mistake in my last answer to your question. the PhysicalDeviceObject and ClassDeviceObject are visible to streaming miniport drivers via SRB_INITIALIZE_DEVICE. |
|
|
板凳#
发布于:2002-02-02 10:10
那么,pSrb->ScatterGatherBuffer怎么用呀,由于我的硬件支持ScatterGather,是不是将DataBufferArray转化成物理地址,自己创建内存映射页,他既然提供了ScatterGatherBuffer域总是会方便一点拉
|
|