devb-eide

Driver for ATA/IDE disk interface and ATAPI CD-ROM interface (QNX Neutrino)

Note: You must be root or have the right abilities to start this driver.

Syntax:

devb-eide [blk option[,option]...]
          [cam option[,option]...]
          [cdrom option[,option]...]
          [disk option[,option]...]
          [eide option[,option]...] &

Runs on:

QNX Neutrino

Options:

Note: Use commas (,) to separate the options. You can put the blk, cam, cdrom, disk, and eide groups of options in any order.
blk options
The blk options control io-blk.so. If specified, they must follow the blk keyword.
cam options
The cam options control libcam.so. If specified, they must follow the cam keyword.
cdrom options
The cdrom options control the driver's interface to cam-cdrom.so. If specified, they must follow the cdrom keyword.
disk options
The disk options control the driver's interface to cam-disk.so. If specified, they must follow the disk keyword.
eide options
The eide options control the driver's interface to the EIDE controller. If you've installed multiple controllers, you can repeat these options for each controller. Remember, however, to specify the eide keyword before each controller's set of options.
  • Interface-specific options:
    altstatus
    Use alternate status register for polling. Off by default.
    bs=board_specific
    Board-specific options.
    chnl=chnl
    The channel number of the controller (0 or 1).
    decode=xor
    Set the layout between I/O registers. The default is 0.
    did=did
    The device ID of the controller.
    enable
    Enable the chipset interface.
    ioport=pri[:sec]
    The I/O port of the interface. By default, it's detected automatically. Use the vaddr option if this is a virtual address.
    irq=req
    The interrupt used by the controller.
    iwaitnbsy=ms
    The amount of time, in milliseconds, to wait for a not-BSY status after interrupt. The default is 20 ms.
    master=device
    Specify master device options. For device-specific options, see below.
    nobios
    Don't use BIOS transfer mode settings. The default is to use them.
    nobmstr
    Don't use busmastering. Specify this option if you want to disable DMA.
    nodefect
    Don't match the device defect list.
    nolegacy
    Don't scan legacy addresses (0x1f0, 0x170).
    nomaster
    Don't scan for master devices.
    noreset
    Don't reset devices at initialization.
    noslave
    Don't scan for slave devices.
    pci=index
    The PCI index of the controller in the machine, where index is a value between 0 and the number of adapters.
    priority=prio
    Set the priority of the processing thread. The default is 21.
    resets=num
    The number of times to retry initialization resets. The default is 1.
    slave=device.
    Specify slave device options. For device-specific options, see below.
    stride=space
    Set the spacing offset between I/O ports (IDE command registers). For example, if the ports are located on 4-byte boundaries, set space to 4. The default is 1.
    timeout=timeout
    Set the I/O request timeout in seconds. The default is 10.
    tmem=name
    Set the shared memory region. The default is 0.
    vaddr
    The port specified by the ioport is a virtual address. By default, it's a physical address.
    verbose=level
    Set the EIDE verbosity level.
    vid=vid
    The vendor ID of the controller.
  • Device-specific options:
    apm_level=level
    Set the APM level (0x7f0xfe). The default is the maximum (0xfe).
    ata
    Set the device type to ATA.
    atapi
    Set the device type to ATAPI.
    chs
    Use Cylinder-Head-Sector mode instead of Logical Block Addressing. LBA is used by default.
    drdy=mode
    Set the read/write Device Ready (DRDY) mode (drdy=off to disable it, or drdy=on to enable).
    geometry=heads:cyl:sect
    Specify the drive geometry.
    mdma=mode
    Set multi-word DMA mode. Values for mode can be 0-2 (or off to disable).
    multiblk=blks
    Set the number of blocks per interrupt for multiblk mode.
    nobmstr
    Don't use busmastering.
    nonremovable
    Report the device as nonremovable.
    pio=mode
    Set PIO mode. Values for mode can be 0-4 (or off to disable PIO).
    rahead=state
    Enable or disable the device read cache (state is on or off).
    smart
    Enable SMART monitoring. If there are problems with the drive, the driver puts a message in the system log (see slog2info and slogger2).
    Note: The message is logged only at startup.

    There currently isn't a mechanism to retrieve SMART data.

    spinup=time
    The length of time, in seconds, to wait for the device to become ready.
    Note: You must also specify the device type (e.g., master=ata).
    udma=mode
    Set ultra DMA mode. Values for mode can be 0-6 (or off to disable).
    verbose=level
    Set the device verbosity level.
    wcache=on | off
    Enable or disable the device write cache.
    xfer=width
    Set the I/O access width (8, 16, or 32 bits).

Description:

The devb-eide driver is for the IDE (Integrated Drive Electronics), EIDE (Enhanced IDE), and ATA (AT Attachment) hard disk interfaces, as well as the ATAPI (ATA Packet Interface) CD-ROM interface. This driver autodetects all interfaces.

Note: If you're installing multiple operating systems on the drive, make sure they all use a compatible mode. For example, if your drive is ≥ 528 MB and DOS will also be installed on the drive, the driver should be configured to use LBA.

The devb-eide driver's order of preference for the connection modes is as follows:

  1. UDMA (Ultra Direct Memory Access)
  2. MDMA
  3. SDMA
  4. PIO (Programmed Input/Output)

If the underlying hardware supports a mode, it's automatically enabled, and the driver selects the best available mode. If you want the driver to use a lower mode, you need to explicitly disable the higher, better modes. For example, if you want the driver to use PIO, and the hardware also supports UDMA and MDMA, you need to explicitly disable UDMA and MDMA.

The devb-eide driver uses DMA by default. If you want to disable DMA, specify the nobmstr command-line option.

By default, the driver uses LBA (Logical Block Addressing) modes if the drive supports them. If you want the device programmed to CHS (Cylinder-Head-Sector) mode, specify the chs option.

The devb-eide driver closes its standard input, standard output, and standard error immediately after completing its initializations. Any error messages produced during the initialization phase are written to standard error.

When the driver starts, it detects all EIDE devices attached to the chain. For each device, the driver creates an entry in the /dev directory (e.g., a hard drive appears as hdx, where x is the number of the drive, starting from 0). For example, suppose a system has two hard drives installed. The driver creates the following entries in the /dev directory:

/dev/hd0
Usually the primary master.
/dev/hd1
Usually the primary slave, or the next drive on the system (the secondary master).

If the system has one hard drive and a CD-ROM, the entries are:

/dev/hd0
The primary master.
/dev/cd0
The CD-ROM drive.
Note: A slave drive must have a master drive.

When the driver starts, it displays on the console the type of detected hardware, along with other debugging information that gets sent to the system logger, slogger2. To view the system log, run slog2info.

Note: When you view the output from slog2info, there will likely be a number of ASC_MEDIA_NOT_PRESENT entries. The driver logs these messages if there isn't a CD in the CD-ROM drive. You can generally ignore them.

Troubleshooting for devb-eide

If the driver doesn't detect the interface or drives attached to it:

Here are some other problems that you might encounter and what you should try:

If the drives are detected, but they're running slowly:

Examples:

Detect all IDE controllers, and list all connected devices:

devb-eide &

Detect an IDE controller at a specific I/O port address and IRQ number, and list all connected devices:

devb-eide eide ioport=0x1f0,irq=14

Detect a PCMCIA disk that is configured in contiguous I/O mapped addressing at a specific I/O port address and IRQ number:

devb-eide eide ioport=0x320:0x32c,irq=7,noslave
Note: For PCMCIA devices configured in contiguous I/O mapped addressing, you should always specify the control block address of the interface by adding an offset (usually 12) to the base address of the port. This isn't required for legacy addressing (0x1f0 or 0x170), where the driver adds the standard control block offset (0x200) automatically.

Detect an IDE controller with specific vendor and device identifiers, and list all connected devices:

devb-eide eide vid=0x8086,did=0x2411,pci=0,chnl=0

Detect an IDE controller with a specific vendor ID, device ID, and channel number, and disable ultra DMA on the master:

devb-eide eide vid=0x8086,did=0x2411,pci=0,chnl=1,master=udma=off

Pass cache and delwri options to io-blk.so, uid and gid options to fs-udf.so, and vollabel option to fs-dos.so:

devb-eide blk cache=2m,delwri=2s cd uid=234,gid=120 dos \
vollabel=ignore &

The cd and dos options apply to any filesystems of those types that are mounted (either by the automatic mounter or a later explicit mount).

You can also pass generic mount options (as described in io-blk.so) as follows:

devb-eide blk noatime dos hidden=show,noexec qnx6 ro &

This sets the ST_NOATIME mount bit for all filesystems, and the ST_NOEXEC bit for any DOS filesystem. The mount message also has these bits, which apply only to that mountpoint.

Files:

The devb-eide driver causes io-blk.so to adopt various block special devices under /dev. These devices are normally named hdn (or cdn for CD-ROMs), where n is the physical unit number of the device.

This driver could also require the following shared objects:

Binary Required
cam-cdrom.so For CD-ROM access
cam-disk.so For hard-disk access
libcam.so Always

Exit status:

The devb-eide driver terminates only if an error occurs during startup, or if it has successfully forked itself upon startup because it hadn't been initially started in the background.

0
The devb-eide driver wasn't started in the background and therefore forked itself. The original process terminated with a zero exit status, the forked process continued.
>0
An error occurred during startup.

Caveats:

Unless overridden with the blk automount= option (see io-blk.so), devices are mounted as:

Device Mountpoint Filesystem type
/dev/hd0t177 /hd qnx6
/dev/cd0 /cd cd
/dev/hd0t6 /dos dos
/dev/hd0t11 /dos dos

While there's no limit to the size of a disk or partition, the limit on I/O (i.e., the lseek(), read() and write() functions) depends on the type of filesystem mounted and on whether you use the 32- or 64-bit versions of these functions. This I/O limit has no effect on the partition size for mounted filesystems. The maximum number of blocks is 232.

Known supported functions include:

chmod(), chown(), close(), closedir(), creat(), devctl(), dup(), dup2(), fcntl(), fpathconf(), fstat(), lseek(), mkdir(), mkfifo(), mknod(), open(), opendir(), pathconf(), read(), readdir(), readlink(), rewinddir(), rmdir(), stat(), symlink(), unlink() (not supported for directories), utime(), write()

Note that certain calls (such as pipe(), as well as read() and write() on FIFOs) may require the pipe manager.