DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5

cm_params(D5)


cm_params -- configuration manager parameters

Synopsis

   #include <sys/confmgr.h>
   #include <sys/cm_i386at.h>
   #include <sys/ddi.h>

Description

The configuration manager includes a set of routines for accessing the resource manager database. The resource manager is a repository for <key, param, value> tuples. A parameter is an arbitrary character string uninterpreted by the resource manager. This manual page describes the pre-defined parameters provided by the configuration manager that drivers and modules can use to access their configuration information.

The configuration manager parameters use the following defined types:


cm_num_t
This type is used for scalar numeric quantities. Integer arithmetic operations apply to this type.

cm_range_t
This type is used for address ranges. It is a structure with two members: startaddr and endaddr. These are the starting and ending addresses, inclusive.

string
This type, not explicitly defined, is used for text strings. It is just an array of characters terminated by a null byte ('\0').

The following pre-defined parameters correspond to the configuration information in a driver's System file:


CM_MODNAME
The external name of the module. This corresponds to pfx_MODNAME as generated for Space.c(DSP/4dsp). CM_MODNAME is a read-only parameter of type string.

CM_UNIT
Parameter used to store arbitrary driver-specific data. CM_UNIT is of type cm_num_t.

CM_IPL
Interrupt priority level. CM_IPL is of type cm_num_t and may have multiple values for devices (functions) that have multiple interrupt lines. For example, an ISA audio card that ping-pongs ISA DMA channels with separate completion IRQs for each of he two channels will need multiple values. Note that multiple CM_IPL values are not supported for PCI devices.

CM_ITYPE
Interrupt type. CM_ITYPE is of type cm_num_t and may have multiple values. If drivers set this parameter, it should be set to CM_ITYPE_EDGE for edge-triggered interrupts or CM_ITYPE_LEVEL for level-sensitive interrupts.

CM_IRQ
Interrupt vector number. CM_IRQ is of type cm_num_t and may have multiple values.

CM_IOADDR
I/O address range, includes start and end addresses. CM_IOADDR is of type cm_range_t and may have multiple values.

CM_MEMADDR
Memory address range, includes start and end addresses. CM_MEMADDR is of type cm_range_t and may have multiple values. This parameter can be used only in 32-bit environments and if the device's memory is below the 4GB boundary. Non-ISA DDI 8 drivers do not usually need to access this parameter, but most ISA drivers do need to access it from the CFG_VERIFY subroutine of the config(D2) entry point routine or, for pre-DDI 8 drivers, the _verify(D2) entry point routine.

CM_DMAC
DMA channel. If this parameter is not present, the device does not use DMA channels. CM_DMAC is of type cm_num_t and may have multiple values.

The following pre-defined parameters are also available to drivers:


CM_BRDBUSTYPE
Board bus type. This parameter represents the type of board and is a read-only parameter of type cm_num_t. If set, it will be one of the following values:

CM_BUS_UNK
CM_BUS_I2O
CM_BUS_ISA
CM_BUS_EISA
CM_BUS_PCI
CM_BUS_PCCARD
CM_BUS_PNPISA
CM_BUS_MCA
CM_BUS_SYS


CM_CLAIM
Bitmap of parameters owned by the driver. CM_CLAIM is of type cm_num_t. A driver can set this parameter to prevent the configuration manager from updating the resource manager with information from NVRAM. CM_CLAIM may be set explicitly by cm_AT_putconf(D3). The following values can be OR'ed together to form the bitmask:

CM_SET_IRQ
CM_SET_ITYPE
CM_SET_IOADDR
CM_SET_MEMADDR
CM_SET_DMAC


CM_SLOT
Bus slot number. CM_SLOT is a read-only parameter of type cm_num_t. This parameter is provided only on buses on which slot numbers can be determined, such as EISA, MCA, and PCI 2.1.

CM_BRDID
Board ID. If provided, specifies the bus specific board identifier. This parameter is only provided for EISA, MCA, PCI, and PC Card devices and is read-only of type string.

EISA board IDs are in uncompressed form as defined in the EISA spec.

MCA board IDs are in the form:

0xDDDD

where each D is a hex digit, 0 - 9 or A - F. MCA board IDs must be four digits; when necessary leading zeroes must be used. For example:

0xABC is not correct.
0x0ABC is correct.

PCI board IDs are in the form:

0xVVVVDDDD

where V and D are hex digits, 0 - 9 or A - F, VVVV is the vendor ID and DDDD is the device ID. PCI board IDs must be eight digits; when necessary leading zeroes must be used.

PCCARD board IDs are specified as:

0xVVVVIIII

where V and I are hex digits, 0 - 9 or A - F. VVVV is the PC Card manufacturer code (TPLMID_MANF) and IIII is the manufacturer information (TPLMID_CARD) from the Manufacturer Identification Tuple (CISTPL_MANFID). If a CISTPL_MANFID tuple is is not found, a board ID will be created by making a checksum out of the bytes comprising the Level 1 Version/Product Information Tuple (CISTPL_VERS_1).


CM_SBRDID
Subsystem board ID. This parameter is only provided for PCI devices and is read-only of type string. It is in the same form as a PCI CM_BRDID except VVVV is the subsystem vendor ID and DDDD is the subsystem device ID.

CM_SCLASSID
Class/subclass ID. This is valid only for PCI devices and returns a number in the format 0xSSBB, where SS is the subclass code of the PCI class code and BB is the base class code of the same register.

CM_BUSNUM
Board bus number. If provided, this is the number of the PCI bus on which the particular board is located, as returned by the system BIOS. This parameter is only provided for PCI devices and is read-only of type cm_num_t.

CM_DEVNUM
Board device number. If provided, this is the device number of the PCI device that the particular board has been assigned by the system BIOS. This parameter is only provided for PCI devices and is read-only of type cm_num_t.

CM_FUNCNUM
Board function number. If provided, this is the function number for the particular EISA or PCI device that has been detected by the system BIOS. This parameter is only provided for EISA and PCI devices and is read-only of type cm_num_t.

Hardware applicability

x86/Pentium compatible architectures

Applicable versions


CM_BUSNUM, CM_DEVNUM, CM_FUNCNUM, and CM_SBRDID:
ddi: 7.1, 7.1mp, 8, 8mp

CM_BUS_PCCARD
pccard: 2, 3

For all others:

ddi: 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp

Differences between versions

Earlier versions of the DDI documentation documented the CM_BUSTYPES parameter. This parameter was never functional; use CM_BRDBUSTYPES instead.

CM_PCMCIA is an alias for CM_BUS_PCCARD and has the same effect, although CM_BUS_PCCARD should always be used for drivers developed to the pccard interface. On some earlier systems, the CM_BUS_PCCARD symbol is not available at compile time and CM_PCMCIA must be used instead.

References

cm_addval(D3), cm_AT_putconf(D3), cm_delval(D3), cm_getval(D3)

``Bus'' in HDK Technical Reference
``Configuration manager'' in HDK Technical Reference
``PCI'' in HDK Technical Reference


19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005