DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
HDK Technical Reference

Data, copying

DDI and ODDI support various facilities for copying data between different locations. These are summarized in the following table:

Action DDI ODDI
Copy between kernel addresses bcopy(D3) bcopy(D3oddi)
Copy from user space to kernel space copyin(D3) copyin(D3oddi)
Copy from kernel space to user space copyout(D3) copyout(D3oddi)
Copy between any two addresses -- copyio(D3oddi)
Copy between any two addresses and update uio structure uiomove(D3) --
Copy between any two addresses and update user area -- iomove(D3oddi)
Copy byte from user space to kernel space -- fubyte(D3oddi)
cpass(D3oddi)
Copy 32-bit word from user space to kernel space -- fuword(D3oddi)
Copy byte from kernel space to user space -- subyte(D3oddi)
passc(D3oddi)
Copy 32-bit word from kernel space to user space -- suword(D3oddi)

Accessing memory about the 4GB boundary (DDI 8)

DDI 8 and later drivers can access memory above the 4GB boundary. Drivers written for SCO OpenServer 5 and earlier DDI versions cannot access large memory.

The two uses of large memory are:


Command blocks
Allocate the memory with the kmem_alloc_phys(D3) function. The resulting kernel virtual address can be used by the bcopy(D3), copyin(D3), and copyout(D3) functions. The physical address can be passed to the device.

STREAMS message blocks
Handle with the msgphysreq(D3str) function, to guarantee that the message block itself conforms to the addressibility, continguity, alignment, and other requirements of the device. Use the msgscgth(D3str) function to obtain the physical address to pass to the hardware. Data blocks, like all STREAMS messages, always have a kernel virtual address that bcopy(D3) can use; it is not necessary to have the physical address.

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