[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Kernel and Subsystems Technical Reference, Volume 2

Customized Devices (CuDv) Object Class

Description

The Customized Devices (CuDv) object class contains entries for all device instances defined in the system. As the name implies, a defined device object is an object that a Define method has created in the CuDv object class. A defined device instance may or may not have a corresponding actual device attached to the system.

A CuDv object contains attributes and connections specific to the device instance. Each device instance, distinguished by a unique logical name, is represented by an object in the CuDv object class. The Customized database is updated twice, during system boot and at run time, to define new devices, remove undefined devices, or update the information for a device whose attributes have been changed.

Descriptors

The Customized Devices object class contains the following descriptors:

ODM Type Descriptor Name Description Descriptor Status
ODM_CHAR name[NAMESIZE] Device Name Required
ODM_SHORT status Device Status Flag Required
ODM_SHORT chgstatus Change Status Flag Required
ODM_CHAR ddins[TYPESIZE] Device Driver Instance Optional
ODM_CHAR location[LOCSIZE] Location Code Optional
ODM_CHAR parent[NAMESIZE] Parent Device Logical Name Optional
ODM_CHAR connwhere[LOCSIZE] Location Where Device Is Connected Optional
ODM_LINK PdDvLn Link to Predefined Devices Object Class Required

These descriptors are described as follows:

Device Name A Customized Device object for a device instance is assigned a unique logical name to distinguish the instance from other device instances. The device logical name of a device instance is derived during Define method processing. The rules for deriving a device logical name are:
  • The name should start with a prefix name pre-assigned to the device instance's associated device type. The prefix name can be retrieved from the Prefix Name descriptor in the Predefined Device object associated with the device type.
  • To complete the logical device name, a sequence number is usually appended to the prefix name. This sequence number is unique among all defined device instances using the same prefix name. Use the following subrules when generating sequence numbers:
    • A sequence number is a non-negative integer represented in character format. Therefore, the smallest available sequence number is 0. 
    • The next available sequence number relative to a given prefix name should be allocated when deriving a device instance logical name.
    • The next available sequence number relative to a given prefix name is defined to be the smallest sequence number not yet allocated to defined device instances using the same prefix name.

      For example, if tty0 , tty1 , tty3 , tty5 , and tty6 are currently assigned to defined device instances, then the next available sequence number for a device instance with the tty prefix name is 2 . This results in a logical device name of tty2 .

    The genseq subroutine can be used by a Define method to obtain the next available sequence number.
Device Status Flag Identifies the current status of the device instance. The device methods are responsible for setting Device Status flags for device instances. When the Define method defines a device instance, the device's status is set to defined . When the Configure method configures a device instance, the device's status is typically set to available . The Configure method takes a device to the Stopped state only if the device supports the Stopped state.

When the Start method starts a device instance, its device status is changed from the Stopped state to the Available state. Applying a Stop method on a started device instance changes the device status from the Available state to the Stopped state. Applying an Unconfigure method on a configured device instance changes the device status from the Available state to the Defined state. If the device supports the Stopped state, the Unconfigure method takes the device from the Stopped state to the Defined state.

"Understanding Device States" in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts provides more information about the Available, Defined, and Stopped states.

The possible status values are:

DEFINED Identifies a device instance in the Defined state.
AVAILABLE Identifies a device instance in the Available state.
STOPPED Identifies a device instance in the Stopped state.
Change Status Flag This flag tells whether the device instance has been altered since the last system boot. The diagnostics facility uses this flag to validate system configuration. The flag can take these values:
NEW Specifies whether the device instance is new to the current system boot.
DONT_CARE Identifies the device as one whose presence or uniqueness cannot be determined. For these devices, the new, same, and missing states have no meaning.
SAME Specifies whether the device instance was known to the system prior to the current system boot.
MISSING Specifies whether the device instance is missing. This is true if the device is in the CuDv object class, but is not physically present.
Device Driver Instance This descriptor typically contains the same value as the Device Driver Name descriptor in the Predefined Devices (PdDv) object class if the device driver supports only one major number. For a driver that uses multiple major numbers (for example, the logical volume device driver), unique instance names must be generated for each major number. Since the logical volume uses a different major number for each volume group, the volume group logical names would serve this purpose. This field is filled in with a null string if the device instance does not have a corresponding device driver.
Location Code Identifies the location code of the device. This field provides a means of identifying physical devices. The location code format is defined as AB-CD-EF-GH, where:
AB Identifies the CPU and Async drawers with a drawer ID.
CD Identifies the location of an adapter, memory card, or Serial Link Adapter (SLA) with a slot ID.
EF Identifies the adapter connector that something is attached to with a connector ID.
GH Identifies a port, device, or field replaceable unit (FRU), with a port or device or FRU ID, respectively.

For more information on the location code format, see "Location Codes" and "Devices Overview for System Management" in AIX Version 4.3 System Management Guide: Operating System and Devices.

Parent Device Logical Name Identifies the logical name of the parent device instance. In the case of a real device, this indicates the logical name of the parent device to which this device is connected. More generally, the specified parent device is the device whose Configure method is responsible for returning the logical name of this device to the Configuration Manager for configuring this device. This field is filled in with a null string for a node device.
Location Where Device Is Connected Identifies the specific location on the parent device instance where this device is connected. The term location is used in a generic sense. For some device instances such as the operating system bus, location indicates a slot on the bus. For device instances such as the SCSI adapter, the term indicates a logical port (that is, a SCSI ID and Logical Unit Number combination).

For example, for a bus device the location can refer to a specific slot on the bus, with values 1, 2, 3 ... . For a multiport serial adapter device, the location can refer to a specific port on the adapter, with values 0, 1, ... .

Link to Predefined Devices Object Class Provides a link to the device instance's predefined information through the Unique Type descriptor in the PdDv object class.

Related Information

ODM Device Configuration Object Classes.

Predefined Devices (PdDv) object class.

The genseq subroutine.

Writing a Define Method, Writing a Configure Method, Writing a Change Method, Writing an Undefine Method, Writing an Unconfigure Method, Writing Optional Start and Stop Methods.

The SCSI Adapter Device Driver in AIX Version 4.3 Technical Reference: Kernel and Subsystems Volume 1.

Understanding Physical Volumes and the Logical Volume Device Driver in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

Understanding Device States, Device Configuration Manager Overview in AIX Version 4.3 Kernel Extensions and Device Support Programming Concepts.

Location Codes, Devices Overview for System Management in AIX Version 4.3 System Management Guide: Operating System and Devices.


[ Previous | Next | Contents | Home | Search ]