Linear Memory Card (PCMCIA) Driver Questions

All:

I have had a driver for linear flash memory cards (PCMCIA bus) for well over a year now. Essentially, the driver maps the card into a window of physical memory - nothing special. Unfortunately, I have seen some rather odd behavior on some newer systems (Win XP especially) and was hoping someone could comment.

Memory Windows below 1MB - Windows 2000 had always seemed to insist on placing the memory window under 1MB. (This has come up in this forum before.) I never had any specific problem with this. In fact, I coded the original version of my driver so it would only ask for a memory window in this range. Now on some systems, I see one of two things: a.) Windows refuses to load the driver with “Not enough resources” even though there is plenty of space available in this range (we only need 4k) or b.) Windows provides a window in use by the “PCI bus” and actually using this window opens a world of evil: bluescreens, hard locks, invalid data… etc. This is despite the fact that I use CmResourceShareDeviceExclusive.

a.) Why can’t a driver load in < 1MB if space is available? Is there some sort of granularity or minimum window size (i.e. larger than 4K) that I am missing?
b.) Why does Windows overlap the driver with existing devices; without so much as a minor warning? (That question is probably rhetorical).

Memory Windows above 0xF0000000 - To work around all of that, the driver was modified to simply ask for a 4KB memory window from 0 to 0xFFFFFFFF. In all newer systems this produces a memory window above 0xF0000000. On most systems, this seems to correct all problems. Unfortunately a few remain. The first problem with this is that if I use on an ISA based PCMCIA drive (not common, but not unheard of), I can no longer access the drive. The second problem is this seems to (in some cases ?) force the drive to access the card using 16 bit accesses. Unfortunately, there are still 8 bit cards in the world.

a.) Why is memory forced above to 0xF0000000; even for ISA based PCMCIA drives? Is any other range possible?
b.) How is 8 bit access forced? Why is the 8/16 bit access system dependant?

Thomas McCormick
Smart Modular (MA)
e-mail: xxxxx@smartm.com

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&th=745dfa68821241fd&rnum=
1


-Eliyas
This posting is provided “AS IS” with no warranties, and confers no rights.

“McCormick, Tom” wrote in message
news:xxxxx@ntdev…

All:

I have had a driver for linear flash memory cards (PCMCIA bus) for well over
a year now. Essentially, the driver maps the card into a window of physical
memory - nothing special. Unfortunately, I have seen some rather odd
behavior on some newer systems (Win XP especially) and was hoping someone
could comment.

Memory Windows below 1MB - Windows 2000 had always seemed to insist on
placing the memory window under 1MB. (This has come up in this forum
before.) I never had any specific problem with this. In fact, I coded the
original version of my driver so it would only ask for a memory window in
this range. Now on some systems, I see one of two things: a.) Windows
refuses to load the driver with “Not enough resources” even though there is
plenty of space available in this range (we only need 4k) or b.) Windows
provides a window in use by the “PCI bus” and actually using this window
opens a world of evil: bluescreens, hard locks, invalid data… etc. This is
despite the fact that I use CmResourceShareDeviceExclusive.

a.) Why can’t a driver load in < 1MB if space is available? Is there some
sort of granularity or minimum window size (i.e. larger than 4K) that I am
missing?
b.) Why does Windows overlap the driver with existing devices; without so
much as a minor warning? (That question is probably rhetorical).

Memory Windows above 0xF0000000 - To work around all of that, the driver was
modified to simply ask for a 4KB memory window from 0 to 0xFFFFFFFF. In all
newer systems this produces a memory window above 0xF0000000. On most
systems, this seems to correct all problems. Unfortunately a few remain. The
first problem with this is that if I use on an ISA based PCMCIA drive (not
common, but not unheard of), I can no longer access the drive. The second
problem is this seems to (in some cases ?) force the drive to access the
card using 16 bit accesses. Unfortunately, there are still 8 bit cards in
the world.

a.) Why is memory forced above to 0xF0000000; even for ISA based PCMCIA
drives? Is any other range possible?
b.) How is 8 bit access forced? Why is the 8/16 bit access system dependant?

Thomas McCormick
Smart Modular (MA)
e-mail: xxxxx@smartm.com