Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversddi_mapdev_set_device_acc_attr(9F)


NAME

 ddi_mapdev_set_device_acc_attr - set the device attributes for the mapping

SYNOPSIS

 
#include <sys/ddi.h> 
#include <sys/sunddi.h>
int ddi_mapdev_set_device_acc_attr(ddi_mapdev_handle_t mapping_handle, off_t offset, off_t len, ddi_device_acc_attr_t *accattrp, uint_t rnumber);

INTERFACE LEVEL

 

Solaris DDI specific (Solaris DDI).

PARAMETERS

 
mapping_handle
A pointer to a device mapping handle.
offset
The offset within device memory to which the device access attributes structure applies.
len
Length (in bytes) of the memory to which the device access attributes structure applies.
*accattrp
Pointer to a ddi_device_acc_attr(9S) structure. Contains the device access attributes to be applied to this range of memory.
rnumber
Index number to the register address space set.

DESCRIPTION

 

Future releases of Solaris will provide this function for binary and source compatibility. However, for increased functionality, use devmap(9E) instead. See devmap(9E) for details.

The ddi_mapdev_set_device_acc_attr() function assigns device access attributes to a range of device memory in the register set given by rnumber.

*accattrp defines the device access attributes. See ddi_device_acc_attr(9S) for more details.

mapping_handle is a mapping handle returned from a call to ddi_mapdev(9F).

The range to be affected is defined by the offset and len arguments. Requests affect the entire page containing the offset and all pages up to and including the page containing the last byte as indicated by offset+len. Supplying a value of 0 for the len argument affects all addresses from the offset to the end of the mapping. Supplying a value of 0 for the offset argument and a value of 0 for the len argument affect all addresses in the mapping.

RETURN VALUES

 

The ddi_mapdev_set_device_acc_attr() function returns the following values:

DDI_SUCCESS
The attributes were successfully set.
DDI_FAILURE
It is not possible to set these attributes for this mapping handle.

CONTEXT

 

This routine can be called from user or kernel context only.

SEE ALSO

 

segmap(9E), ddi_mapdev(9F), ddi_segmap_setup(9F), ddi_device_acc_attr(9S)

Writing Device Drivers


SunOS 5.9Go To TopLast Changed 13 Jan 1997

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.