Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ sddevinfo(4) — NEWS-os 4.2.1R

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

sd(4)

SDDEVINFO(4)  —  NEWS-OS Programmer’s Manual

NAME

sddevinfo − Disk device information table

SYNOPSIS

struct sddevinfo {
        int         id_len;         /∗ identify length ∗/
        char        ∗id_name;       /∗ vendor & product ID ∗/
        char        ∗revs;          /∗ revision ∗/
        int         capacity;       /∗ drive capacity ∗/
        char        ∗call_name;     /∗ device nickname ∗/
        int         type;           /∗ device type code ∗/
        int         firm_flags;     /∗ firmware spec ∗/
#ifdef FORMAT_PAGE
        char        ∗∗fmt_page;     /∗ Format Parameters ∗/
        int         fmt_time;       /∗ Format time (in seconds) ∗/
        int         fmt_resv;       /∗ reserved ∗/
#else /∗ FORMAT_PAGE ∗/
        int         tr_period;      /∗ synchronous transfer period ∗/
        int         tr_offset;      /∗ synchronous transfer offset ∗/
        int         synctr_reg;     /∗ synchronous transfer register set ∗/
#endif /∗ FORMAT_PAGE ∗/
        struct sdst ∗sdstp;         /∗ device specifications ∗/
        char        ∗ERP_page;      /∗ normal Error Recovery Parameters ∗/
        char        ∗max_ERP_page;  /∗ max Error Recovery Parameters ∗/
        char        ∗∗other_pages;  /∗ Other Parameters ∗/
        int         fmt_opts;       /∗ Format options ∗/
};

DESCRIPTION

sddevinfo is an SCSI device driver information tool. 
Disk devices supported by the device driver sd are listed in the device information table sddevinfo found in the device information file "/sys/newsiodev/sddefs.c".  In addition, it is possible to use new types of disk devices by making the appropriate additions to the device information table sddevinfo. 

Furthermore, it is also possible to connect disk devices devices which are not listed in the device information table sddevinfo.  In such cases, the values used for features such as the error correction method and data destination read cache are the corresponding default values for the disk device so connected. 
 

id_lenSpecifies the number of characters (length) to be used for the vendor and product identification corresponding to the device.  The identification is used in character string comparisons to distinguish which device is connected. 

id_nameSpecifies the character string representing the vendor and product identification corresponding to the device. 

revsSpecifies the character string representing the revision level of the device.  The character ’?’ may be used as a wildcard matching any single character. 

capacitySpecifies the capacity of the device in numbers of blocks. 

call_nameSpecifies the device name.  This name is displayed as the device name during auto-configuration. 

typeSpecifies the number used to distinguish the type of device.  Be sure to specify unambiguous numbers for devices connected. 

firm_flagsSpecifies whether or not the disk device uses a cache, synchronous transfer, and automatic sector exchange (for read/write errors).  Be sure to make the cache and automatic sector exchange settings in accordance with the settings made for the parameters ERP_page, max_ERP_page, and other_pages.  If synchronous transfer is specified, a synchronous transfer message will be passed between the device and the workstation using the values for tr_period and tr_offset. 

fmt_pageSpecifies the parameter FORMAT PAGE for the SCSI command MODE SELECT(0x15).  This information is only used by the device formatting program "/usr/sony/bin/format". 

fmt_timeSpecifies the time (in seconds) necessary for formatting.  This information is only used by the device formatting program "/usr/sony/bin/format". 

fmt_resvReserved. 

tr_periodSpecifies the shortest transfer period supported by the device for synchronous transfer. 

tr_offsetSpecifies the maximum number of REQ signals which can be output before an ACK signal (corresponding to synchronous transfer supported by the device) has been received. 

synctr_regNot used after NEWS-OS 3.3. 

sdstpSpecifies device configuration information.  ns specifies the number of sectors per track.  nt specifies the number of tracks per cylinder.  nspc specifies the number of sectors per cylinder.  ncyl specifies the total number of cylinders.  rps specifies the number of rotations per second.  sizes specifies partition information.  If no partition information is specified, the information will be automatically calculated based on the capacity of the device. 

ERP_pageSpecifies the parameter ERROR RECOVERY PAGE for the SCSI command MODE SELECT(0x15).  Normal read/write operations are performed using this parameter. 

max_ERP_page
Specifies the parameter ERROR RECOVERY PAGE for the SCSI command MODE SELECT(0x15). Recovery operations when an error has occurred are performed using this parameter.

other_pagesSpecifies the parameter FORMAT/ERROR RECOVERY PAGE for the SCSI command MODE SELECT(0x15). 

fmt_optsSpecifies the format of the defect list used when formatting the device. 

If disk information such as partition size is written in the first sector of the device, the information found there is used.  If it is not written there, the information listed in the device information table sddevinfo is used instead.  If partition information is not listed in the table either, it will be calculated based on the storage capacity of the disk device. 

Although it is possible to connect new types of devices to NEWS workstations by making additions and/or changes to the device information file, try to avoid changing any data already listed in the device information table. 

See the header file, "/sys/newsiodev/sdreg.h", for the format used to list data in the device information table. 

EXAMPLES

 /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ size                                ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
struct size example_sizes[PNUM] = {                       /∗ EXAMPLE-1 ∗/
           15884,            0,            /∗ A = cyl   0 thru  51 ∗/
           33440,      52∗34∗9,            /∗ B = cyl  52 thru 161 ∗/
          304470,            0,            /∗ C = cyl   0 thru 994 ∗/
           15884,     162∗34∗9,            /∗ D = cyl 162 thru 213 ∗/
           55936,     214∗34∗9,            /∗ E = cyl 214 thru 396 ∗/
          182988,     397∗34∗9,            /∗ F = cyl 397 thru 994 ∗/
          254898,     162∗34∗9,            /∗ G = cyl 162 thru 994 ∗/
               0,            0,            /∗ H    Not use         ∗/
        };
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ device specifications               ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
struct sdst sdst_example =
 /∗   ns, nt,  nspc,  ncyl, rps, xxx,       sizes ∗/
    { 34,  9, 34∗ 9,   995, 60,  0,    example_sizes };   /∗ EXAMPLE-1 ∗/
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ normal Error Recovery Parameters    ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
char erp_example[] =                                      /∗ EXAMPLE-1 ∗/
    { SDM_PG_ERR, 0x06, SDM_AWRE|SDM_DCR, 0x03, 0x08, 0, 0, 0xff };
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ max Error Recovery Parameters       ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
char max_erp_example[] =                                  /∗ EXAMPLE-1 ∗/
    { SDM_PG_ERR, 0x06, 0, 0x1b, 0x08, 0, 0, 0xff };
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ Other Parameters                    ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
char cache_on_example[] =
    { SDM_PG_CACHE1, 0x0a, 0, 0, 0x02, 0, 0, 0, 0, 0x60, 0, 0x60 };
 char ∗other_example[] =                                   /∗ EXAMPLE-1 ∗/
    { cache_on_example,   NULL };
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗ Format page                         ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
#ifdef FORMAT_PAGE
char fmt_example[] = {
        SDM_PG_FMT1,
        0x16,
        0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x24, 0x02, 0x00, 0x00, 0x01, 0x00, 0x00,
        0x00, 0x12, 0x40, 0x00, 0x00, 0x00
};
 char ∗fmtp_example[] =                                    /∗ EXAMPLE-1 ∗/
    { fmt_example, NULL };
#endif FORMAT_PAGE
  /∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
/∗                                     ∗/
/∗ SD device information               ∗/
/∗                                     ∗/
/∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗∗/
struct sddevinfo example = {                              /∗ EXAMPLE-1 ∗/
        20,                          /∗ identify length                  ∗/
        "SONY    EXAMPLE_DISK",      /∗ vendor & product ID              ∗/
        "1990",                      /∗ revision                         ∗/
        0x04a556,                    /∗ drive capacity                   ∗/
        "sd_example1",               /∗ device nickname                  ∗/
        EXAMPLE-1,                   /∗ device type code                 ∗/
        FIRM_CACHE_ON|FIRM_SYNCTR|FIRM_AWRE,   /∗ firmware spec          ∗/
#ifdef FORMAT_PAGE
        fmtp_example,                /∗ Format Parameters                ∗/
        9 ∗ 60 + 22,                 /∗ Format time (in seconds)         ∗/
        0,                           /∗ reserved                         ∗/
#else /∗ FORMAT_PAGE ∗/
        0x35,                        /∗ MIN synchronous transfer period  ∗/
        15,                          /∗ MAX synchronous transfer offset  ∗/
        0,                           /∗ synchronous transfer register set∗/
#endif /∗ FORMAT_PAGE ∗/
        &sdst_example,               /∗ device specifications            ∗/
        erp_example,                 /∗ normal Error Recovery Parameters ∗/
        max_erp_example,             /∗ max Error Recovery Parameters    ∗/
        other_example,               /∗ Other Parameters                 ∗/
        FMT_DLF_PHYS,                /∗ Format options                   ∗/
};

FILES

/dev/sd[0-1][0-6][a-h] Block devices

/dev/rsd[0-1][0-6][a-h] RAW devices

/sys/newsiodev/sdreg.h
ioctl command and structure definitions

/sys/newsiodev/scu.h ioctl command and structure definitions

SEE ALSO

sd(4)

NEWS-OSRelease 4.2.1R

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026