Download Coherent Device Driver Kit
Transcript
60 at To access a disk partition through COHERENT, directory l dev must contain a device me that has the appropriate type. major and minor device numbers , and permissions . To create a special me for this device, invoke the command mknod as follows : /etc /mknod /etc /mknod /etc /mknod /etc lmknod /etc/mknod /dev/at Oa /dev/at Ob /dev/at Oc /dev/at Od /dev/at Ox b b b b b 0 11 1 11 2 11 3 11 1 1 12 8 1 1 1 1 1 drive drive drive drive drive o, o, o, o, o, partition partition partition partition partition 0 1 2 3 table Drive Characteristics When processing BIOS 1/0 requests prior to booting COHERENT, many IDE drives use ''translation-mode" drive parameters: number of heads , cylinders, and sectors per track. These numbers are called translation-mode parameters because they do not reflect true physical drive geometry. The translation-mode parameters used by the BIOS code present on your host adapter can be obtained using the dpb utility found on the boot diskette of versions 3 .2 .0 and later of COHERENT. It is often necessary to patch the at driver with BIOS values of translation-mode parameters in order to boot COHERENT on IDE hard drives . In COHERENT versions 3 . 1 .0 and later, drive parameters are stored in table atparm_ in the driver. For the first hard drive, number of cylinders is a two-byte value at atparm_+0, number of heads is a single byte at atparm_+2 . and number of sectors per track is a single byte at atparm_+ l 4. For the second hard drive, number of cylinders is a two-byte value at atparm_+ l 6 , number of heads is a single byte at atparm_+ l 8 , and number of sectors per track is a single byte at atparm_+30. For example, if testcoh is a kernel linked with the at driver and you want to patch it for a second hard drive with 829 cylinders, 1 0 heads, and 2 6 sectors per track. you can do /con f/patch testcoh atparm_+ 1 6 =8 2 9 atparm_+l 8=l 0 1 c atparm_+3 0=2 6 1 c To read the characteristics of a hard disk once the at driver is running, use the call to loctl of the following form: #inc lude <sys /hdioct l . h> hdparm_t hdparms � ioct l ( fd , BDGETA , ( char * ) & hdparms ) � wherefd is a me descriptor for the hard disk device and hdparms receives the disk characteristics . Non-Standard and Unsupported Types of Drives Prior releases of the the COHERENT at hard-disk driver would not support disk drives whose geometry was not supported by the BIOS disk parameter tables. COHERENT adds support for these drives during installation by "patching" the disk parameters into the bootstrap and the I coherent image on the hard disk. Files I devI at• - Block-special rues l devlrat• - Character-special ffies See Also device drivers, fdisk LEXICON