Kernel Functions for Drivers csxDupHandle(9F)
NAME
csxDupHandle - duplicate access handle
SYNOPSIS
#include
int32t csxDupHandle(acchandlet handle1, acchandlet *handle2,
uint32t flags);
INTERFACE LEVEL
Solaris DI Specific (Solaris DI)
PARAMETERS
handle1 The access handle returned from
csxRequestIO(9F) or csxRequestWindow(9F) that
is to be duplicated.
handle2 A pointer to the newly-created duplicated data
access handle.
flags The access attributes that will be applied to
the new handle.
DESCRIPTION
This function duplicates the handle, handle1, into a new
handle, handle2, that has the access attributes specified in
the flags argument. Both the original handle and the new
handle are active and can be used with the common access
functions.
Both handles must be explicitly freed when they are no
longer necessary.
The flags argument is bit-mapped. The following bits are
defined:
WINACNEVERSWAP Host endian byte ordering
WINACBIGENDIAN Big endian byte ordering
WINACLITLENDIAN Little endian byte ordering
WINACSTRICTORDER Program ordering references
WINACUNORDEREDOK May re-order references
WINACMERGINGOK Merge stores to consecutive locations
WINACLOADCACHINGOK May cache load operations
WINACSTORECACHINGOK May cache store operations
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csxDupHandle(9F)
WINACBIGENDIAN and WINACLITLENDIAN describe the
endian characteristics of the device as big endian or little
endian, respectively. Even though most of the devices will
have the same endian characteristics as their busses, there
are examples of devices with an I/O processor that has oppo-
site endian characteristics of the busses. When
WINACBIGENDIAN or WINACLITLENDIAN is set, byte
swapping will automatically be performed by the system if
the host machine and the device data formats have opposite
endian characteristics. The implementation may take advan-
tage of hardware platform byte swapping capabilities. When
WINACNEVERSWAP is specified, byte swapping will not be
invoked in the data access functions. The ability to specify
the order in which the CPU will reference data is provided
by the following flags bits. Only one of the following bits
may be specified:
WINACSTRICTORDER The data references must be
issued by a CPU in program
order. Strict ordering is the
default behavior.
WINACUNORDEREDOK The CPU may re-order the data
references. This includes all
kinds of re-ordering (that is, a
load followed by a store may be
replaced by a store followed by
a load).
WINACMERGINGOK The CPU may merge individual
stores to consecutive locations.
For example, the CPU may turn
two consecutive byte stores into
one halfword store. It may also
batch individual loads. For
example, the CPU may turn two
consecutive byte loads into one
halfword load. Setting this bit
also implies re-ordering.
WINACLOADCACHINGOK The CPU may cache the data it
fetches and reuse it until
another store occurs. The
default behavior is to fetch new
data on every load. Setting this
bit also implies merging and
re-ordering.
SunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csxDupHandle(9F)
WINACSTORECACHINGOK The CPU may keep the data in the
cache and push it to the device
(perhaps with other data) at a
later time. The default
behavior is to push the data
right away. Setting this bit
also implies load caching, merg-
ing, and re-ordering.
These values are advisory, not mandatory. For example, data
can be ordered without being merged or cached, even though a
driver requests unordered, merged and cached together.
RETURN VALUES
CSUCES Successful operation.
CSFAILURE Error in flags argument or han-
dle could not be duplicated for
some reason.
CSUNSUPORTEDFUNCTION No PCMCIA hardware installed.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO
csxGet8(9F), csxGetMappedAddr(9F), csxPut8(9F),
csxRepGet8(9F), csxRepPut8(9F), csxRequestIO(9F),
csxRequestWindow(9F)
PC Card 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 3
|