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 SubtypesNetwork 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.
| Request | W | The class to be enumerated, as defined in <eros/Device.h> |
| Reply | W | The number of controllers in the specified class |
| Result | RC_OK | Success. |
- Create Instance Key (OC = 2)
Creates a device key for the specified controller instance.
| Request | W | The index of the desired instance. |
| Reply | RK0 | A key to the requested controller instance, or a void key if the instance does not exist. |
| Result | RC_OK | Instance key created. |
| 1 | No instance corresponding to the specified index exists. |
- Check Alleged Key Type (OC = KT)
Returns the alleged type of the key.
| Reply | R1 | 0x10000004: Key is a logappend key. |