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

cm_read_devconfig(D3)


cm_read_devconfig -- read a board's NVRAM extension information

Synopsis

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

int cm_read_devconfig(rm_key_t key, size_t offset, void *buf, size_t nbyte);

Description

cm_read_devconfig( ) is used to read the NVRAM extension information associated with a selected board instance. The extension information is specific to the bus type of the board and exactly what information is read is determined by the bus driver. For information about the configuration space for different bus types, see:


EISA
eisa(D5)

MCA
mca(D5)

PCI
pci(D5)

Use the GetFirstTuple(D3pccard) function to access PC Card configuration information rather than calling cm_read_devconfig( ).

Do not use this routine to directly read the standard board parameters that are documented on the cm_params(D5) manual apge. Instead, use the cm_getval(D3) function to access that information. cm_read_devconfig( ) is used to access non-standard (usually vendor-specific) information.

Arguments


key
Resource manager key selecting a particular board instance.

offset
Offset from the beginning of the board's device configuration space to start the read.

buf
Buffer to hold data to be read.

nbyte
Number of bytes of data to be read.

Return values

cm_read_devconfig( ) returns the number of bytes read. It will return -1 if an error occurs.

Usage

The caller must not have a resource manager transaction pending (see cm_begin_trans(D3)) when this function is called.

Context and synchronization

All contexts.

Hardware applicability

All

Version applicability

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

Differences between versions

In DDI versions before version 8 that support this function, the offset argument is cast as size_t rather than an off_t. When porting drivers from earlier DDI versions, it is not necessary to modify the type of the offset argument.

References

cm_devconfig_size(D3), cm_getbrdkey(D3), cm_getval(D3), cm_read_devconfig8(D3), cm_read_devconfig16(D3), cm_read_devconfig32(D3), cm_write_devconfig(D3), cm_write_devconfig8(D3), cm_write_devconfig16(D3), cm_write_devconfig32(D3), eisa_parse_devconfig(D3), eisa(D4), eisa(D5), mca(D5), pci(D5)

``Autoconfiguration'' 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