RL02 fixed

utzoo!decvax!cwruecmp!ordy utzoo!decvax!cwruecmp!ordy
Thu Sep 23 10:26:29 AEST 1982


	A few days ago I posted an RL02 bug question to this group,
and I would like to thank those who responded. We slugged away here,
and found the real problem.

	RL02's have an additional bit of cylinder address over RL01's.
The cylinder field as stored in the hardware device register is at
the top of the word. When manipulating this field, one must be
careful to avoid sign extension problems. On RL01's OR RL02's in the
first half of the disk, there is no problem, the sign bit is zero.
However, if your RL02 is in the upper half of its cylinders, the sign
bit is set, and depending on the software you can get into trouble.
We checked 2.8, 2.81, V6, and V7 drivers/bootstraps, and found the
trouble most everywhere. Of course some of the software was written
such that if you initially got a correct cylinder address you would
then go on correctly. However, in my case the executable image of Unix
had blocks in the upper half of the disk, and the running kernel
initially calculated an incorrect (negative!) cylinder. Past that
point, everything was quite downhill.

	The killer statement was always something like:

	cylinder = (rl->word & 0177700) >> 6;

	which should have been:

	cylinder = (rl->word >> 6) & 01777;

	In addition, the bootstrap should have a 'ble' changed to 'blos',
so that the comparison is unsigned, NOT signed.

	I will be glad so send changes to anybody who would like them.
In particular I may try and get going the 2.81 RL02 driver, which is
really a V6 driver. It needs the standard changes as well as this fix,
although I have heard that even still it has alot of problems?? Comments??

	Greg Ordy (decvax!cwruecmp!ordy)



More information about the Comp.bugs.2bsd mailing list