Accessing Card I/O space

  • J.Bright

    J.Bright - 2004-12-28


    I have successfully integrated my custom Socket Services layer with Card Services layer (i.e pcmcia-cs package) and utilities like cardmgr, cardctl and dum_cis are working fine. I have virtualised the concept of memory windows and things are working fine as far as Card Services access to attribute memory (to read CIS info) is concerned. I am thankful to all for their helpful suggestions.

    Now, I would appreciate to have comments on the following questions. (I am using pcmcia-cs-3.2.8 modules with 2.4 kernel)

    (1) Does Card Services access only the card attribute memory OR does it access the card common memory as well?

    (2) Does Card Services access card I/O space?

    (2) Why card I/O space does not map in the host address space? I have access to the Card I/O space with 32-bit addresses (in host address space) but Card Services uses 16-bit address. How should I do that?

    (3) How do the client drivers access card I/O space? (I am using wlan prism2 from linux-wlan-ng)
    (3-a) Direct read/write from a memory location?
    (3-b) Using Card Services calls? (I mean by using the functions in bus_ops.h.

    (4) How Card Services (or the client driver) is informed of the incoming data received on the wlan interface?

    ~ J.Bright

    • David Hinds

      David Hinds - 2004-12-29

      (1) Card Services itself may access both attribute and common memory.  The CIS information may be located in either of these memory spaces, depending on card type.  For many cards, Card Services will only ever touch attribute space.

      (2a) Not as far as I can think of

      (2b) The IO addresses that Card Services knows about are PCMCIA bus IO addresses, which are defined to be 16 bit, regardless of how those addresses are reached from the host CPU.

      (3) Client drivers use kernel IO functions like inb(), outb(), etc to access IO space.  These may translate into reading/writing an arbitrary memory location, on systems that don't actually have a native IO address space.  I created infrastructure for an indirection layer (the bus_ops stuff), but because socket drivers were never implemented to use the indirection layer, no client drivers ever got modified to use it.

      (4) Since I don't know how the wlan hardware works, I don't actually now how these cards notify the driver (not Card Services) about incoming data.  Generally, a card would trigger an interrupt when data is received.

      -- Dave

    • J.Bright

      J.Bright - 2005-01-19


      I have successfully ported the device driver part and now everything is working great. I am thankful to everyone for suggestions and special thanks to David Hinds.

      ~ J.Bright


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks