A central facility is available to allocate device keys for those facilities that require them. This arrangement concentrates knowledge of the configuration of the system into one place. A subsystem (terminals or tapes) that requires device keys must provide a factory and a receptionist to the Device Allocator. Whenever a device is initialized by calling the DEVALOC key (p2,devalloc)) the Device Allocator calls the Device factory as follows:
The Device driver might call the receptionist key with SIK SOK CCK (for instance) or the receptionist might be another allocator mechanism as in the tape system (p2,drive-allocate).
DEVDVR remains busy while the device is being used.
String is returned when the device driver recognizes an unrecoverable error. The string is used to log the event.
Return codes
1,2 - Factory return codes
3 - Unrecoverable Outboard error, the string is defined as follows. The current DEVDVR is called with kt+4 to destroy it and a new one is obtained from the DEVDVRF for this device. After 32 successive calls with return code greater than 2, the device is marked as disabled and will not be reinitialized until the Device Allocator is called to do so.
VOLID 6 bytes
CCW 8 bytes the failing ccw
CSW 8 bytes the failing csw
SENSE the remaining bytes in the string represent the device sense data
>4 catastrophic error, do not retry.
The device driver requires a pair of Device Keys and wants to obtain the Device Key for the Device with the next sequential address from the Device Key on the DEVDVR invocation. The companion key is only returned if it is not assigned to some other device driver (not in the Devalloc database). If it is not available DEVALOC will return rc=1 else it will return with rc=0. The availability of a compainion device is part of the policy of the Device Allocator (DEVALOC) as determined by the ordercode on the assignment
Slot 1 Prompt spacebank key (used on factory requestor call)
Slot 2 the meter used on the factory requestor call
SLot 3 The second spacebank used on the factory requestor call
Slot 7 The DEVDVRF key
Slot 8 the RECEP key used on the DEVDVR key
SLot 9 a Start key to the device allocator
Slot 12 Datakey with the Device key bits (7 bytes)
Slot 13 Datakey with the device type
Slot 14 Datakey with the device address
Slot 15 Format key
In all calls described below the "devad" is a two byte device address and "device-type" is the string returned from "sense ID" I/O order code {see POP} without the initial X'FF', such as x'32741Bxxxxxx'.
DEVALOCF(0;SB,METER,DEVAL ==> 0;DEVALOC)
Return Codes are the standard factory requestor return codes
NODE is optional and contains the resource keys for use in calling the DEVDVRF keys. If it is not specified then the resources of the device allocator will be used. Node is described as follows:
Slot 1 a meter
Slot 2 a spacebank
2 device type string greater than 7 bytes
6 database full
Return codes
2 input string longer than 9 bytes
3 device with address specified is of the wrong type (if prevously known)
4 cannot get a device key for this device (such as in use by kernel or not configured to the kernel)
5 DEVDVRF does not behave correctly
6 database full
Return codes
3 device unknown
The device block is returned and the devices node as described above is returned. The DEVDVR key can be fetched from this node for debugging purposes. THe device block is described as follows.
Devicetype xl8 return from sense deviceid without the FF
devicekeybits xl8 the bits used in the DEVAL call
Deviceflags flags
x'40' device failed (unrecoverable error)
x'20' cannot build driver
3 device not located
Return codes
Return codes
2 string to long (greater than 2 bytes)
Return codes
2 string to long (greater than 9 bytes)
7 device not active