[Return to Top] [Kernel Objects]

EROS Object Reference

Kernel Objects

DeviceCreator

D R A F T

Description

The DeviceCreator key conveys the authority to fabricate device keys. Device keys convey total authority on the corresponding device.

EROS devices are divided into several classes:

  • Block devices, including disks, tape drives, CD-ROMS, and the like,
  • Network devices, including ATM, FDDI, Ethernet, and other network host adaptors, and
Other device classes will be introduced in the near future, following the general framework described in the PCI standard.

Each class has an associated device creator key. The holder of the device creator key is a trusted program that carries the authority to create devices of that type.

Most classes are further subdivided into different subtypes. The currently supported subtypes are as follows:

    Block Device Subtypes
    • SCSI
    • IDE
    • Floppy
    • IPI
    • RAID
    Network Device Subtypes
    • Ethernet
    • Token Ring
    • FDDI
    • ATM

Each device class and subclass has a designated constant, which is enumerate in <eros/Device.h>.

All device keys answer to a common protocol, which is described below. The operations on unit keys are a function of the device class and unit, and are (or will be) documented in appropriate device-specific pages.


Operations

Get Class Instance Count (OC = 1)

Returns the number of controllers of the specified class present on the system, regardless of subtype. Note that the kernel is free to unregister devices, so it is possible for a device to become unavailable between the time this call is made and the time further queries are performed.

RequestWThe class to be enumerated, as defined in <eros/Device.h>
ReplyWThe number of controllers in the specified class
ResultRC_OKSuccess.

Create Instance Key (OC = 2)

Creates a device key for the specified controller instance.

RequestWThe index of the desired instance.
ReplyRK0A key to the requested controller instance, or a void key if the instance does not exist.
ResultRC_OKInstance key created.
1No instance corresponding to the specified index exists.

Check Alleged Key Type (OC = KT)

Returns the alleged type of the key.
ReplyR10x10000004: Key is a logappend key.


Copyright 1998, 2001 by Jonathan Shapiro. All rights reserved. For terms of redistribution, see the GNU General Public License