Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ uiophysio(D3DK) — Motorola System V 88k Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

uiophysio(D3DK)  —  MISC. REFERENCE MANUAL PAGES

.IX \f4uiophysio\fP(D3DK)

NAME

uiophysio − validate and issue raw I/O request

SYNOPSIS

#include<sys/types.h>
#include <sys/buf.h>
#include <sys/errno.h>
#include <sys/uio.h>
#include <sys/cred.h>
int uiophysio(int (∗strategy)(), struct buf ∗buf, dev_t
dev, int rwflag, uio_t ∗uio_p);

ARGUMENTS

strategyAddress of the driver strategy routine. 

bufPointer to the buf structure describing the I/O request.  If buf is NULL, uiophysio will take care of allocating and de-allocating a struct buf.  If buf is not NULL, uiophysio will use the struct buf specified.  However, it will modify the b_flags, b_wanted, b_oerror, b_error, b_proc, b_dev, b_edev, and b_blkno fields of the struct buf, so do not depend on any information being able to be passed through those fields. 

devDevice number. 

rwflagFlag indicating whether the access is a read (B_READ) or a write (B_WRITE).  Note that B_WRITE cannot be directly tested as it is 0. 

uio_pPointer to the uio structure that defines the user space of the I/O request. 

DESCRIPTION

uiophysio is called directly by some drivers, or indirectly via physiock(D3DK). 

uiophysio performs the following functions:

faults pages in and locks the pages impacted by the I/O transfer so they can not be swapped out

calls the driver strategy(D2DK) routine passed to it

sleeps until the transfer is complete and is awakened by the biodone(D3DK) function in the driver’s interrupt routine

performs the necessary cleanup and updates, then returns to the driver routine

A transfer using uiophysio is considered valid if the user has specified a storage area that exists in user memory space. 

RETURN VALUES

uiophysio returns 0 if the result is successful, the appropriate error number upon failure.  EFAULT is returned if user memory is not available.  EAGAIN is returned if uiophysio could not lock pages for DMA. 

LEVEL

Base only  (Do not call from an interrupt routine.) 

SEE ALSO

dma_pageio(D3DK), physiock(D3DK), strategy(D2DK)

  —  DDI

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026