 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Bottom of page |
|
iohandle_to_phys(9r)
NAME
iohandle_to_phys - General: Converts an I/O handle to a valid system
physical address
SYNOPSIS
u_long iohandle_to_phys(
io_handle_t io_handle,
long flags );
ARGUMENTS
io_handle
Specifies the I/O handle that you want converted to a valid system
physical address. To convert the I/O handle to a valid system physical
address, you must pass the bitwise inclusive OR of one of the valid
conversion flag bits and one of the data type flag bits described in
the flags argument. See the bus-specific device driver book for the
type of I/O handle associated with that bus.
flags
Specifies a flag that indicates the conversion type and data size. This
flag is the bitwise inclusive OR of a valid conversion type value and a
valid data size value. To indicate the conversion type, pass one of the
following conversion type values defined in
/usr/sys/include/io/common/devdriver.h:
HANDLE_DENSE_SPACE
Converts the I/O handle to a dense space physical address.
HANDLE_SPARSE_SPACE
Converts the I/O handle to a sparse space physical address.
HANDLE_BUSPHYS_ADDR
Converts the I/O handle to a bus physical address.
DESCRIPTION
The iohandle_to_phys interface converts an I/O handle to a valid system
physical address that a device driver uses to perform I/O copy operations.
You use this physical address in the I/O copy operations associated with
calls to bcopy, copyin, copyout, or a copy interface that you supply. Do
not use the physical address returned by iohandle_to_phys in calls to
io_copyin, io_copyio, and io_copyout. These interfaces take an I/O handle
instead of a physical address and are to bus address space what bcopy is to
system memory.
NOTES
The iohandle_to_phys interface is a generic interface that maps to a bus-
and machine-specific interface that actually converts the I/O handle to a
system physical address. Using this interface to convert the I/O handle
makes the device driver more portable across different bus architectures,
different CPU architectures, and different CPU types within the same CPU
architecture.
RETURN VALUES
Upon successful completion, iohandle_to_phys returns the physical address
indicated by the conversion type value that you passed to the flags
argument. If a failure occurs, iohandle_to_phys returns the value zero (0).
A return value of zero (0) can occur as a result of the following
conditions:
· The CPU that the driver operates on does not support the physical
address space indicated by the conversion type value.
· The data type indicated by the data type value does not exist in the
physical address space on this CPU or bus.
SEE ALSO
Kernel Interfaces: io_copyin(9r), io_copyio(9r), io_copyout(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Top of page |
|