Next: , Previous: Processors and Processor Sets, Up: Top

10 Device Interface

The GNU Mach microkernel provides a simple device interface that allows the user space programs to access the underlying hardware devices. Each device has a unique name, which is a string up to 127 characters long. To open a device, the device master port has to be supplied. The device master port is only available through the bootstrap port. Anyone who has control over the device master port can use all hardware devices.

— Data type: device_t

This is a mach_port_t and used to hold the port name of a device port that represents the device. Operations on the device are implemented as remote procedure calls to the device port. Each device provides a sequence of records. The length of a record is specific to the device. Data can be transferred “out-of-line” or “in-line” (see Memory).

All constants and functions in this chapter are defined in device/device.h.