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

cm_write_devconfig8(D3)


cm_write_devconfig8 -- write byte to board's NVRAM extension information

Synopsis

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

int cm_write_devconfig8(rm_key_t key, size_t offset, const uchar_t *buf)

Description

cm_write_devconfig8( ) is used to write a single byte to 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 written is determined by the bus driver (for example, the MCA bus driver).

Drivers should not use this routine to write standard board parameters directly. Rather, such parameters should be stored via cm_addval(D3) requests.

cm_write_devconfig8 can be used by MCA drivers to directly write the POS registers.

Arguments


key
Resource manager key selecting a particular board instance.

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

buf
Buffer containing data to be written.

Return values

cm_write_devconfig8 returns 0 for success. The following errnos are returned for failure:

EINVAL
if rm_key is invalid, buf is NULL or the write fails.

ENOENT
if the board is installed on an ISA bus or the bus does not provide the specified level of granularity.

Usage

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

Although the cm_write_devconfig(D3) function supports all levels of granularity, this interface is limited to those "inherent" on the system (that is, there are bios calls to support them directly).

Context and synchronization

All contexts.

Hardware applicability

All

Version applicability

ddi: 7.1, 7.1mp, 8, 8mp

Differences between versions

In DDI versions 7.1 and 7.1mp, 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_addval(D3), cm_devconfig_size(D3), cm_getbrdkey(D3), cm_read_devconfig(D3), cm_read_devconfig8(D3), cm_read_devconfig16(D3), cm_read_devconfig32(D3), cm_write_devconfig(D3), cm_write_devconfig16(D3), cm_write_devconfig32(D3), eisa(D4), eisa(D5), mca(D5), pci(D5)

``Autoconfiguration'' in HDK Technical Reference


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