I have a 64-bit PCI device whose driver I am porting from 32 to 64-bit windows. It performs scatter/gather bus-master DMA using a common buffer to store the chaining descriptors. The device supports 64-bit addressing (PLX 9656) however, the physical address of the descriptor blocks for the transfer must be below the 4GB boundary.
Will AllocateCommonBuffer return a logical address within this boundary in 64-bit windows?
If it does, how does it know to do so?
If not, is there any way to get DMA 64-bit addressing to work on the device?
thanks,
Dan
> Will AllocateCommonBuffer return a logical address within this boundary in
64-
bit windows?
Yes, if you will properly fill the device description in IoGetDmaAdapter of
being uncapable for 64bit DMA.
Use this adapter object for common buffer only. For main work, use the second
adapter object with no limitation.
–
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com
This problem was discussed last year over on the Microsoft newsgroup.
http://groups.google.com/group/microsoft.public.development.device.drivers/browse_frm/thread/98832fe7377fb35c/b3c8d3344891cfc6?lnk=st&q=AllocateCommonBuffer+64bit&rnum=1&hl=en#b3c8d3344891cfc6
The best solution we could come up with is to allocate two adapter objects, one for the common buffer that claims 32bit support only, the other for ‘normal dma’ that claims 64bit support. You allocate the common buffer from the 32bit adapter and perform your SG dma using the 64bit adapter. Hacky? Well yes it is, but this particular hardware design from PLX is a tad STUPID so it deserves what it gets.
=====================
Mark Roddy DDK MVP
Windows Vista/W2K3/XP Consulting
Broken Driver Code? Call us.
Hollis Technology Solutions 603-321-1032
www.hollistech.com
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-284655-
xxxxx@lists.osr.com] On Behalf Of xxxxx@mda.ca
Sent: Wednesday, April 25, 2007 9:46 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] logicalAddress returned by AllocateCommonBuffer within
4GB boundary?
I have a 64-bit PCI device whose driver I am porting from 32 to 64-bit
windows. It performs scatter/gather bus-master DMA using a common
buffer to store the chaining descriptors. The device supports 64-bit
addressing (PLX 9656) however, the physical address of the descriptor
blocks for the transfer must be below the 4GB boundary.
Will AllocateCommonBuffer return a logical address within this boundary
in 64-bit windows?
If it does, how does it know to do so?
If not, is there any way to get DMA 64-bit addressing to work on the
device?
thanks,
Dan
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer