All:
I was hoping someone can answer a few questions about creating a PCMCIA
driver for memory cards (linear) running under Windows 2000.
1.) Windows 2000 DDK mentions a PCMCIA_STANDARD_INTERFACE that seems to
provide much of the functionality required but my attempts to obtain
such an interface fail. Anyone run into this?
2.) IoGetDeviceInterfaces returns an empty string for the PCMCIA driver
(\Device\Pcmcia0) <\Device\Pcmcia0)> (This agrees with the results
from 1, but is baffling considering Pcmcia.sys is Microsoft’s own
(V5.XX). Shouldn’t the interface be returned?
3.) Is PCMCIA_STANDARD_INTERFACE the service I’m looking for or is there
another way (short of accessing the controller directly)?
Thanks in advance for any help that you are able to provide.
Thomas McCormick
Centennial Technologies
e-mail: xxxxx@cent-tech.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>I was hoping someone can answer a few questions about creating a PCMCIA
driver for memory cards (linear) running under Windows 2000.
1.) Windows 2000 DDK mentions a PCMCIA_STANDARD_INTERFACE that seems to
provide much of the functionality required but my attempts to obtain
such an interface fail. Anyone run into this?
2.) IoGetDeviceInterfaces returns an empty string for the PCMCIA driver
(\Device\Pcmcia0) <\Device\Pcmcia0)> (This agrees with the results
from 1, but is baffling considering Pcmcia.sys is Microsoft’s own
(V5.XX). Shouldn’t the interface be returned?
3.) Is PCMCIA_STANDARD_INTERFACE the service I’m looking for or is there
another way (short of accessing the controller directly)?
A couple of things come to mind.
-
You ARE handling the PNP events, notifying you of a new physical device
and creating a new logical device? I believe these devices are NOT named
\Device\Pcmcia0, which actually is a logical device off the controller,
not a PDO representing the slot). As I remember, PCMCIA_STANDARD_INTERFACE
is for a PDO.
-
You can do read/write by passing IRP’S down the stack to the bus driver.
There is an IRP called IRP_MJ_PNP/IRP_MN_READ_CONFIG. By setting data in
the IRP you can control attribute/common memory, and offset. The PCMCIA
driver I did used these and worked great, and didn’t have to fool with it’s
own mapping and tiling of memory. In theory, if someone made a PCMCIA
adapter connected via a different bus type (like usb/scsi/1394) and
correctly implemented the bus driver, your function driver would just
automatically work (this is also a hint hint to those of you writing bus
drivers for your USB to PCMCIA slot hardware). A little glitch though, I
didn’t have lot’s of success getting the INF to declare the device needing
no memory window, or ports, expecting the bus driver to do whatever it
needed to make IRP_MN_READ_CONFIG happen.
A little bug in the Microsoft PCMCIA driver seems to be it will not cross a
4K boundry on the IRP_MN_READ_CONFIG IRP, so you have to chop up your
request into chunks that fit this. Nowhere did I find anything that said
IRP_MN_READ_CONFIG might have alignment requirements.
Another little PCMCIA driver glitch was the reporting of slot number on PCI
bus slot adapters seemed bogus. A PCI based slot controller seems to
actually create two controller devices, and it’s owning slot is always
zero. This makes it impossible to tell which slot a card actually was
inserted into.
I also noticed that even PCI slot adapters try to map your 16-bit PCMCIA
card to addresses below 1 MB. I had received some email from someone who
said if you add a “32-bit addressing” flag to the INF file for your device
it will map to more sensible places.
Hope this helps.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com