From: Rick on 8 Feb 2010 13:48 Hello, I designed a PCI based data acquisition system few years ago. I wrote a simple WDM driver that mapped memory directly to a user mode and our application just read and wrote data as needed. This system has worked quite well so far. Now, I have a potential customer who is interested in sourcing my design to be used in their turnkey systems provided I redesign the board to use a free IDE connector in the system. We don't have spare PCI slots and newer bus protocols like USB are also out of question due to other reasons. I figured out the hardware part, but software part looks bit tricky. Questions to the experts are 1 - Can I map memory to IDE address space just like I was able to do it with PCI? From the first looks it doesn't look possible. 2 - If I cant do the above what kind of driver should I be writing. Almost all the samples I have seen so far targets PCI or other buses and I am not even sure if this is feasible from software point of view. All my searches so far have pointed to PCI-IDE and the storage stack, but nothing about using IDE for "non-storage" applications. Any inputs or guidance will help me immensely. Thanks a bunch,
From: Maxim S. Shatskih on 8 Feb 2010 15:01 > 1 - Can I map memory to IDE address space just like I was able to do > it with PCI? From the first looks it doesn't look possible. There is no such things as "IDE address space", there are IDE commands instead. The IDE commands can be a) old-style hard disk IDE commands b) packet-based ATAPI commands. a) mode is not for non-disk peripherals, since IOCTL_IDE_PASS_THROUGH is barely working and not supported (properly) in old Windows versions, so, let's forget the custom IDE commands in the a) mode. In the b) mode, there is no such things as "IDE commands" actually. There are SCSI CDBs which are sent over the IDE wires, and thus do not require any translation (from modern good SCSI command set to brain-damaged primitive command set of 30-years-old IBM PC/AT). In this mode, the command is delivered from the class driver (or even user-mode app) down to your device's firmware unchanged. Yes, no drivers can be inlvolved in the command translation and interpreting, from the user mode app/DLL down to the device firmware. This is how Nero and Vista+ IMAPI work to burn discs on IDE CD/DVD drives. So, design the hardware as packet-based (ATAPI), and, in user mode, use IOCTL_SCSI_PASS_THROUGH_DIRECT to send the commands to the hardware. No driver is required. Anyway IDE is a strange choice. Parallel ATA is dying out - will you move to SATA then? -- Maxim S. Shatskih Windows DDK MVP maxim(a)storagecraft.com http://www.storagecraft.com
From: Rick on 8 Feb 2010 15:50 Thanks a lot Maxim. That clarifies few things. Let me explore SATA angle and explore those IOCTL's. IDE is a strange choice indeed. Unfortunately we are constrained on what is available at the moment and I am a very small fish in the bigger picture. :) Thanks again for your help. On Feb 8, 12:01 pm, "Maxim S. Shatskih" <ma...(a)storagecraft.com.no.spam> wrote: > > 1 - Can I map memory to IDE address space just like I was able to do > > it with PCI? From the first looks it doesn't look possible. > > There is no such things as "IDE address space", there are IDE commands instead. > > The IDE commands can be a) old-style hard disk IDE commands b) packet-based ATAPI commands. > > a) mode is not for non-disk peripherals, since IOCTL_IDE_PASS_THROUGH is barely working and not supported (properly) in old Windows versions, so, let's forget the custom IDE commands in the a) mode. > > In the b) mode, there is no such things as "IDE commands" actually. There are SCSI CDBs which are sent over the IDE wires, and thus do not require any translation (from modern good SCSI command set to brain-damaged primitive command set of 30-years-old IBM PC/AT). In this mode, the command is delivered from the class driver (or even user-mode app) down to your device's firmware unchanged. > > Yes, no drivers can be inlvolved in the command translation and interpreting, from the user mode app/DLL down to the device firmware. This is how Nero and Vista+ IMAPI work to burn discs on IDE CD/DVD drives. > > So, design the hardware as packet-based (ATAPI), and, in user mode, use IOCTL_SCSI_PASS_THROUGH_DIRECT to send the commands to the hardware. No driver is required. > > Anyway IDE is a strange choice. Parallel ATA is dying out - will you move to SATA then? > > -- > Maxim S. Shatskih > Windows DDK MVP > ma...(a)storagecraft.comhttp://www.storagecraft.com
|
Pages: 1 Prev: Getting started with a wlan driver Next: filter driver for an USB modem |