Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bus(4) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hft

bus

Purpose

     Supports the hardware bus interface.

Synopsis

     #include <sys/hwdbus.h>
     #include <fcntl.h>

Description

     The  bus file  consists of  a  pseudo driver  in the  AIX
     kernel which allows a user program to enable the hardware
     I/O  bus such  that the  address space  can be  addressed
     directly  by  the  program  rather  than  performing  I/O
     through the AIX system calls.

     The user program first opens  the special file name asso-
     ciated with the device  driver.  Only O_RDONLY, O_WRONLY,
     and  O_RDWR are  valid values  to be  used with  the open
     system  call.  Before  the  open, any  addressing of  I/O
     space generates a SIGSEGV signal.

     Once the device  driver is open, the  user program should
     issue an ioctl  system call to obtain  the base addresses
     of  the  bus  I/O  and bus  memory  spaces.   These  base
     addresses are added to the appropriate address offsets to
     obtain an absolute I/O address.

     ioctl Operations

     The ioctl system call is invoked as follows:

           ioctl (fildes, command, ptr)  /* get addresses */
           int fildes;                   /* file descriptor */
           int command;                  /* valid value is HWDBASE */
           struct hwdbase                /* contains base addresses */
           {
              char   *hwdio;
              char   *hwdmem;
           } *ptr

     The hwdio field is the address of the start of I/O memory
     allocated to the  I/O port address.  The  hwdmem field is
     the address of the start of I/O memory allocated to dedi-
     cated memory, such as display refresh memory.

File

     /dev/bus

Related Information

     In this book:  "hft."

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