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

Programmed I/O (PIO)

Intel IA32 systems offer a 64KB (16-bit) I/O address space. Programmed I/O devices provide access to their internal registers through this I/O address space. This scheme is sometimes also called I/O-mapped I/O.

From the driver's point of view, accessing device registers involves reading to and writing from locations (ports) in the I/O space. The operating system provides special functions such as inb( ) and outb( ) to transfer data to and from device registers. Low-end floppy disk and tape drivers use this method to move data and control information to and from the device.

Both DDI and ODDI define functions to implement PIO:

DDI ODDI Description
inb(D3) inb(D3oddi) Read a byte from an 8-bit I/O port
inl(D3) ind(D3oddi) Read a 32-bit word from a 32-bit I/O port
inw(D3) inw(D3oddi) Read a 16-bit short word from a 16-bit I/O port
outb(D3) outb(D3oddi) Write a byte to an 8-bit I/O port
outl(D3) outd(D3oddi) Write a 32-bit word to a 32-bit I/O port
outw(D3) outw(D3oddi) Write a 16-bit short word to a 16-bit I/O port
repinsb(D3) repinsb(D3oddi) Read bytes from an 8-bit I/O port to a buffer
repinsd(D3) repinsd(D3oddi) Read 32-bit words from a 32-bit I/O port to a buffer
repinsw(D3) repinsw(D3oddi) Read 16-bit short words from a 16-bit I/O port to a buffer
repoutsb(D3) repoutsb(D3oddi) Write bytes to an 8-bit I/O port from a buffer
repoutsd(D3) repoutsd(D3oddi) Write 32-bit words to a 32-bit I/O port from a buffer
repoutsw(D3) repoutsw(D3oddi) Write 16-bit short words to a 16-bit I/O port from a buffer


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