|TUPLE(9S)||Data Structures for Drivers||TUPLE(9S)|
The CIS information allows PC cards to be self-identifying: the CIS provides information to the system so that it can identify the proper PC card driver for the PC card, and provides configuration information so that the driver can allocate appropriate resources to configure the PC card for proper operation in the system.
The CIS information is contained on the PC card in a linked list of tuple data structures called a CIS chain. Each tuple has a one-byte type and a one-byte link, an offset to the next tuple in the list. A PC card can have one or more CIS chains.
A multi-function PC card that complies with the PC Card 95 MultiFunction Metaformat specification will have one or more global CIS chains that collectively are referred to as the global CIS. These PC Cards will also have one or more per-function CIS chains. Each per-function collection of CIS chains is referred to as a function-specific CIS.
To examine a PC card's CIS, first a PC card driver must locate the desired tuple by calling csx_GetFirstTuple(9F). Once the first tuple is located, subsequent tuples may be located by calling csx_GetNextTuple(9F). See csx_GetFirstTuple(9F). The linked list of tuples may be inspected one by one, or the driver may narrow the search by requesting only tuples of a particular type.
Once a tuple has been located, the PC card driver may inspect the tuple data. The most convenient way to do this for standard tuples is by calling one of the number of tuple-parsing utility functions; for custom tuples, the driver may get access to the raw tuple data by calling csx_GetTupleData(9F).
illumos PC card drivers do not need to be concerned with which CIS chain a tuple appears in. On a multi-function PC card, the client will get the tuples from the global CIS followed by the tuples in the function-specific CIS. The caller will not get any tuples from a function-specific CIS that does not belong to the caller's function.
uint32_t Socket; /* socket number */ uint32_t Attributes; /* tuple attributes */ cisdata_t DesiredTuple; /* tuple to search for */ cisdata_t TupleOffset; /* tuple data offset */ cisdata_t TupleDataMax; /* max tuple data size */ cisdata_t TupleDataLen; /* actual tuple data length */ cisdata_t TupleData[CIS_MAX_TUPLE_DATA_LEN]; /* body tuple data */ cisdata_t TupleCode; /* tuple type code */ cisdata_t TupleLink; /* tuple link */
The fields are defined as follows:
PC Card 95 Standard, PCMCIA/JEIDA
|December 20, 1996||OmniOS|