Specifications

Operating System Routines
IOC$MOVTOUSER, IOC$MOVTOUSER2
IOC$MOVTOUSER, IOC$MOVTOUSER2
Move data from a device to a user buffer.
Module
BUFFERCTL
Input
Location Contents
R0 User buffer address to which to move the byte
(IOC$MOVTOUSER2 only)
R1 Address of driver’s buffer
R2 Number of bytes to move
R5 Address of UCB
DPT$B_FLAGS Bit DPT$V_SVP set (causing a system page-table
entry (SPTE) to be allocated to the driver)
UCB$L_SVAPTE System virtual address of PTE that maps the first
page of the buffer
UCB$L_SVPN System virtual page number of SPTE allocated to
driver
UCB$W_BOFF Byte offset to start of transfer in page
Output
Location Contents
R0 Next starting address of users buffer
Synchronization
The caller of IOC$MOVTOUSER or IOC$MOVTOUSER2 may be executing at
fork IPL or above and must hold the corresponding fork lock in a multiprocessing
environment. Either routine returns control to its caller at the callers IPL. The
caller retains any spinlocks it held at the time of the call.
Description
A driver calls IOC$MOVTOUSER and IOC$MOVTOUSER2 to move data from
a device to a user buffer when the device itself (for instance, a non-DMA device)
cannot map the user buffer to system virtual addresses.
In order to accomplish the move, IOC$MOVTOUSER and IOC$MOVTOUSER2
first map the user buffer using the system page-table entry (SPTE) the driver
allocated in a DPTAB macro invocation. If an SPTE has not been allocated to
the driver, these routines cause an access violation when they attempt to refer
to the location addressed by the contents of the field UCB$L_SVAPTE. (See the
description of the DPTAB macro in Chapter 2 for information on how to allocate
this SPTE.)
3–110