 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Bottom of page |
|
io_zero(9r)
NAME
io_zero - General: Zeros a block of memory in bus address space
SYNOPSIS
int io_zero(
io_handle_t destaddr,
u_long byte_count );
ARGUMENTS
destaddr
Specifies an I/O handle that you can use to reference a device register
or memory located in bus address space (either I/O space or memory
space). For io_zero, this I/O handle identifies the location in bus
address space where the zero operation occurs. You can perform standard
C mathematical operations (addition and subtraction only) on the I/O
handle. For example, you can add an offset to or subtract an offset
from the I/O handle.
byte_count
Specifies the number of bytes in the data block to be zeroed. The
interface assumes that the buffer associated with the data block is
physically contiguous.
DESCRIPTION
The io_zero interface zeros byte_count bytes of memory beginning at the bus
address specified by destaddr. The I/O handle you pass to destaddr
identifies where the zero operation occurs in bus address space. The
interface optimizes the copy operation for 32-bit transfers.
NOTES
The io_zero interface is a generic interface that maps to a machine-
specific interface that actually writes zeros to some location in bus
address space. Using io_zero to perform the zero operation makes the device
driver more portable across different CPU architectures and different CPU
types within the same architecture.
CAUTIONS
The I/O handle that you pass to the destaddr argument of the io_zero
interface must be an I/O handle that references addresses residing in
sparse space. All Alpha CPUs support sparse space. As a result, all bus
configuration code should supply an I/O handle that references bus address
space.
If you pass an I/O handle to the destaddr argument that references
addresses residing in some other space (for example, dense space) the
results of the copy operation are unpredictable.
Tru64 UNIX provides the following interfaces that allow device drivers to
perform copy operations and zero blocks of memory on addresses that reside
in dense space:
· bcopy
Copies a series of bytes with a specified limit
· blkclr and bzero
Zeros a block of memory
· copyin
Copies data from a user address space to a kernel address space
· copyinstr
Copies a null-terminated string from a user address space to a kernel
address space
· copyout
Copies data from a kernel address space to a user address space
· copyoutstr
Copies a null-terminated string from a kernel address space to a user
address space
RETURN VALUES
Upon successful completion, io_zero returns IOA_OKAY. It returns the value
-1 on failure.
SEE ALSO
Kernel Interfaces: io_copyin(9r), io_copyio(9r), io_copyout(9r)
 |
Index for Section 9 |
|
 |
Alphabetical listing for I |
|
 |
Top of page |
|