man Pages(9F): DDI and DKI Kernel Functions
  Rechercher uniquement dans ce livre
Télécharger cet ouvrage au format PDF

NAME

csx_Parse_CISTPL_CFTABLE_ENTRY - parse 16-bit Card Configuration Table Entry tuple

SYNOPSIS

#include <sys/pccard.h>

int32_t csx_Parse_CISTPL_CFTABLE_ENTRY(client_handle_t ch, tuple_t * tu, cistpl_cftable_entry_t * cft);

INTERFACE LEVEL

Solaris DDI Specific (Solaris DDI)

ARGUMENTS

ch
Client handle returned from csx_RegisterClient(9F).
tu
Pointer to a tuple_t structure (see tuple(9S)) returned by a call to csx_GetFirstTuple(9F) or csx_GetNextTuple(9F).
cft
Pointer to a cistpl_cftable_entry_t structure which contains the parsed CISTPL_CFTABLE_ENTRY tuple information upon return from this function.

DESCRIPTION

This function parses the 16 bit Card Configuration Table Entry tuple, CISTPL_CFTABLE_ENTRY, into a form usable by PC Card drivers.
The CISTPL_CFTABLE_ENTRY tuple is used to describe each possible configuration of a PC Card and to distinguish among the permitted configurations. The CISTPL_CONFIG tuple must precede all CISTPL_CFTABLE_ENTRY tuples.

STRUCTURE MEMBERS

The structure members of cistpl_cftable_entry_t are:
uint32_t                        flags;     /* which descriptions are valid * /
uint32_t                        ifc;      /* interface description information * /
uint32_t                        pin;      /* values for PRR * /
uint32_t                        index;    /* configuration index number * /
cistpl_cftable_entry_pd_t       pd;       /* power requirements description * /
cistpl_cftable_entry_speed_t    speed;    /* device speed description * /
cistpl_cftable_entry_io_t       io;       /* device I/O map * /
cistpl_cftable_entry_irq_t      irq;      /* device IRQ utilization * /
cistpl_cftable_entry_mem_t      mem;      /* device memory space * /
cistpl_cftable_entry_misc_t     misc;     /* miscellaneous device features * /

The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_DEFAULTThis is a default configuration
CISTPL_CFTABLE_TPCE_IFIf configuration byte exists
CISTPL_CFTABLE_TPCE_FS_PWRPower information exists
CISTPL_CFTABLE_TPCE_FS_TDTiming information exists
CISTPL_CFTABLE_TPCE_FS_IOI/O information exists
CISTPL_CFTABLE_TPCE_FS_IRQIRQ information exists
CISTPL_CFTABLE_TPCE_FS_MEMMEM space information exists
CISTPL_CFTABLE_TPCE_FS_MISCMISC information exists
CISTPL_CFTABLE_TPCE_FS_STCE_EVSTCE_EV exists
CISTPL_CFTABLE_TPCE_FS_STCE_PDSTCE_PD exists
ifc
When the CISTPL_CFTABLE_TPCE_IF flag is set, this field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_IF_MEMORYMemory interface
CISTPL_CFTABLE_TPCE_IF_IO_MEMIO and memory
CISTPL_CFTABLE_TPCE_IF_CUSTOM_0Custom interface 0
CISTPL_CFTABLE_TPCE_IF_CUSTOM_1Custom interface 1
CISTPL_CFTABLE_TPCE_IF_CUSTOM_2Custom interface 2
CISTPL_CFTABLE_TPCE_IF_CUSTOM_3Custom interface 3
CISTPL_CFTABLE_TPCE_IF_MASKInterface type mask
CISTPL_CFTABLE_TPCE_IF_BVDBVD active in PRR
CISTPL_CFTABLE_TPCE_IF_WPWP active in PRR
CISTPL_CFTABLE_TPCE_IF_RDYRDY active in PRR
CISTPL_CFTABLE_TPCE_IF_MWAITWAIT - mem cycles
pin
This is a value for the Pin Replacement Register.
index
This is a configuration index number.
The structure members of cistpl_cftable_entry_pd_t are:
uint32_t                      flags;        /* which descriptions are valid * /
cistpl_cftable_entry_pwr_t    pd_vcc;      /* VCC power description * /
cistpl_cftable_entry_pwr_t    pd_vpp1;     /* Vpp1 power description * /
cistpl_cftable_entry_pwr_t    pd_vpp2;     /* Vpp2 power description * /

The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_FS_PWR_VCCVcc description valid
CISTPL_CFTABLE_TPCE_FS_PWR_VPP1Vpp1 description valid
CISTPL_CFTABLE_TPCE_FS_PWR_VPP2Vpp2 description valid
The structure members of cistpl_cftable_entry_pwr_t are:
uint32_t   nomV;             /* nominal supply voltage * /
uint32_t   nomV_flags;
uint32_t   minV;             /* minimum supply voltage * /
uint32_t   minV_flags;
uint32_t   maxV;             /* maximum supply voltage * /
uint32_t   maxV_flags;
uint32_t   staticI;          /* continuous supply current * /
uint32_t   staticI_flags;
uint32_t   avgI;             /* max current required averaged over 1 sec. * /
uint32_t   avgI_flags;
uint32_t   peakI;            /* max current required averaged over 10mS * /
uint32_t   peakI_flags;
uint32_t   pdownI;           /* power down supply current required * /
uint32_t   pdownI_flags;

The fields are defined as follows:
nomV, minV_flags, maxV_flags,
staticI_flags, avgI, peakI_flags, pdownI_flags
These fields are bit-mapped and defined as follows:
CISTPL_CFTABLE_PD_NOMVNominal supply voltage
CISTPL_CFTABLE_PD_MINVMinimum supply voltage
CISTPL_CFTABLE_PD_MAXVMaximum supply voltage
CISTPL_CFTABLE_PD_STATICIContinuous supply current
CISTPL_CFTABLE_PD_AVGIMaximum current required averaged
over 1 second
CISTPL_CFTABLE_PD_PEAKIMaximum current required averaged
over 10mS
CISTPL_CFTABLE_PD_PDOWNIPower down supply current required
nomV_flags, minV_flags, maxV_flags,
staticI_flags, avgI_flags, peakI_flags, pdownI_flags
These fields are bit-mapped and defined as follows:
CISTPL_CFTABLE_PD_EXISTSThis parameter exists
CISTPL_CFTABLE_PD_MUL10Multiply return value by 10
CISTPL_CFTABLE_PD_NC_SLEEPNo connection on sleep/power down
CISTPL_CFTABLE_PD_ZEROZero value required
CISTPL_CFTABLE_PD_NCNo connection ever
The structure members of cistpl_cftable_entry_speed_t are:
uint32_t   flags;          /* which timing information is present * /
uint32_t   wait;          /* max WAIT time in device speed format * /
uint32_t   nS_wait;       /* max WAIT time in nS * /
uint32_t   rdybsy;        /* max RDY/BSY time in device speed format * /
uint32_t   nS_rdybsy;     /* max RDY/BSY time in nS * /
uint32_t   rsvd;          /* max RSVD time in device speed format * /
uint32_t   nS_rsvd;       /* max RSVD time in nS * /

The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_FS_TD_WAITWAIT timing exists
CISTPL_CFTABLE_TPCE_FS_TD_RDYRDY/BSY timing exists
CISTPL_CFTABLE_TPCE_FS_TD_RSVDRSVD timing exists
The structure members of cistpl_cftable_entry_io_t are:
uint32_t    flags;         /* direct copy of TPCE_IO byte in tuple * /
uint32_t    addr_lines;   /* number of decoded I/O address lines * /
uint32_t    ranges;       /* number of I/O ranges * /
cistpl_cftable_entry_io_range_t
            range[CISTPL_CFTABLE_ENTRY_MAX_IO_RANGES];

The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_FS_IO_BUSBus width mask
CISTPL_CFTABLE_TPCE_FS_IO_BUS88-bit flag
CISTPL_CFTABLE_TPCE_FS_IO_BUS1616-bit flag
CISTPL_CFTABLE_TPCE_FS_IO_RANGEIO address ranges exist
The structure members of cistpl_cftable_entry_io_range_t are:
      uint32_t   addr;      /* I/O start address * /
      uint32_t   length;    /* I/O register length * /

The structure members of cistpl_cftable_entry_irq_t are:
      uint32_t   flags;    /* direct copy of TPCE_IR byte in tuple * /
      uint32_t   irqs;    /* bit mask for each allowed IRQ * /

The structure members of cistpl_cftable_entry_mem_t are:
uint32_t    flags;        /* memory descriptor type and host addr info * /
uint32_t    windows;     /* number of memory space descriptors * /
cistpl_cftable_entry_mem_window_t
            window[CISTPL_CFTABLE_ENTRY_MAX_MEM_WINDOWS];

The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_FS_MEM3Space descriptors
CISTPL_CFTABLE_TPCE_FS_MEM2host_addr=card_addr
CISTPL_CFTABLE_TPCE_FS_MEM1Card address=0 ,
any host address
CISTPL_CFTABLE_TPCE_FS_MEM_HOSTIf host address is present in MEM3
The structure members of cistpl_cftable_entry_mem_window_t are:
      uint32_t   length;       /* length of this window * /
      uint32_t   card_addr;    /* card address * /
      uint32_t   host_addr;    /* host address * /

The structure members of cistpl_cftable_entry_misc_t are:
uint32_t
flags;
/* miscellaneous features flags * /
The fields are defined as follows:
flags
This field is bit-mapped and defined as follows:
CISTPL_CFTABLE_TPCE_MI_MTC_MASKMax twin cards mask
CISTPL_CFTABLE_TPCE_MI_AUDIOAudio on BVD2
CISTPL_CFTABLE_TPCE_MI_READONLYR/O storage
CISTPL_CFTABLE_TPCE_MI_PWRDOWNPowerdown capable
CISTPL_CFTABLE_TPCE_MI_DRQ_MASKDMAREQ mask
CISTPL_CFTABLE_TPCE_MI_DRQ_SPKDMAREQ on SPKR
CISTPL_CFTABLE_TPCE_MI_DRQ_IOISDMAREQ on IOIS16
CISTPL_CFTABLE_TPCE_MI_DRQ_INPDMAREQ on INPACK
CISTPL_CFTABLE_TPCE_MI_DMA_8DMA width 8 bits
CISTPL_CFTABLE_TPCE_MI_DMA_16DMA width 16 bits

RETURN VALUES

CS_SUCCESS
Successful operation.
CS_BAD_HANDLE
Client handle is invalid.
CS_UNKNOWN_TUPLE
Parser does not know how to parse tuple.
CS_NO_CARD
No PC Card in socket.
CS_NO_CIS
No Card Information Structure (CIS) on PC Card.
CS_UNSUPPORTED_FUNCTION
No PCMCIA hardware installed.

CONTEXT

This function may be called from user or kernel context.

SEE ALSO

csx_GetFirstTuple(9F), csx_GetTupleData(9F), csx_Parse_CISTPL_CONFIG(9F), csx_RegisterClient(9F), csx_ValidateCIS(9F), tuple(9S)
PC Card 95 Standard, PCMCIA/JEIDA