Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss
Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Finding untranslated params for IDE drives (w/ pgm)

24 views
Skip to first unread message

Frank Maclachlan

unread,
Oct 18, 1992, 6:30:07 PM10/18/92
to
Given the numerous inquiries about untranslated geometry on various
IDE hard drives, I wrote a quickie program which can be used under
MSDOS to report the "default" drive geometry. The command used to
query the drive (identify drive, 0xec) is the same command used by
the 386BSD 0.1 wd.c driver.

The program does the following:

1. Reports the drive configuration as reported by the system ROM BIOS.
2. Queries the drive for its configuration and prints the geometry
given by the configuration.
3. Resets the drive/controller and delays approximately 1 second.
4. Again queries the drive for its configuration and prints the
geometry given by the configuration.
5. Asks user to reboot system since translation may have changed.

Steps 3 and 4 were added because I wanted to know if the identify
drive command would return the sames values after the controller/drive
was reset. I tested the program on a Fujitsu M2612ET IDE drive (90 mb,
1334 cyls, 4 hds, 33 sec/trk) and found that the "default" geometry
was 667 cyls, 8 hds, 33 sec/trk. Note that some (albeit simple) trans-
lation occurs on this drive in the "default" state; this was no doubt
done to avoid exceeding the 1024 cylinder limit imposed by the system
BIOS. Also, the "default" geometry didn't change after a reset (it
really shouldn't); the drive's translation mode, however, did change
after a reset (see below).

I noticed some other things while playing with the Fujitsu drive.
The drive is installed in a system w/ an old Mylex 386/20 MB.
The AMI BIOS does not support a type 47 user configurable drive
type, so I chose a drive type having 1024 cyls, 9 hds, 17 sec/trk.
I didn't really believe that the translation was performed in
software (most IDE interface boards don't have an on-board ROM),
so I wrote a program which scanned the disk by talking directly
to the controller registers. The drive looked like it had 9 heads,
17 secs/trk and 1150 cyls. The drive's notion of its geometry
(translation) is determined by the 'Initialize Drive Parameters'
command (0x91). This command sets the number of sectors from the
sector count register and the number of heads from the head
address field in the SDH register. The drive then computes how
many translated cylinders it can support with the specified head
and sector count (that's why I could read 1150 cyls even though the
BIOS configuration indicated 1024 cyls). The translation was cleared
after a controller/drive reset; the drive then behaved as though it
had 667 cyls, 8 hds, 33 secs/trk.

Also, data transfers from this drive averaged about 300 kb/sec when
the drive was set up in translated mode and about 660 kb/sec when
set up in its "default" mode. This was probably partially caused
by the use of 17 secs/trk rather than the native 33 secs/trk; the
80C31 microprocessor has to work harder to translate addresses.

For those IDE drive users with a modern BIOS supporting user configurable
drive types (type 47 on an AMI BIOS), I suggest configuring the drive
or drives to the default geometry given by step 4 above. This results
in the geometry remaining constant throughout the 386BSD's handling of
an IDE drive and possibly better performance.

I am enclosing the program (a .c file and a .h file) and an .exe file
(for those of you who don't have an MSDOS C compiler) in a shell archive.

Hope this helps!

#!/bin/sh
# shar: Shell Archiver (v1.22)
#
# Run the following text with /bin/sh to create:
# ide_conf.c
# wddefs.h
# ide_conf.exe
#
sed 's/^X//' << 'SHAR_EOF' > ide_conf.c &&
X/*------------------------------------------------------+
X| |
X| Name: |
X| ide_conf |
X| |
X| Usage: |
X| ide_conf [drive number] |
X| |
X| Description: |
X| Displays IDE drive configuration under MSDOS. |
X| Optional drive parameter selects drive for query. |
X| Legal values are 0..3 where 0 and 1 are drives 0 |
X| and 1 attached to a primary controller while 2 and |
X| 3 are drives 0 and 1 attached to a controller at |
X| the alternate controller address (0x170 - has not |
X| been tested). If omitted, drive 0 is checked. |
X| |
X| Author: |
X| Frank P. MacLachlan |
X| |
X| Date: |
X| 18-Oct-92 |
X| |
X| Compilation using MSC 6.0: |
X| cl ide_conf.c |
X| |
X+------------------------------------------------------*/
X
X#include <stdio.h>
X#include <sys/types.h>
X#include "wddefs.h"
X
X#define TPS 18 /* ticks/second (really 18.2) */
X
Xtypedef unsigned long ulong;
Xtypedef unsigned int uint;
Xtypedef unsigned short ushort;
Xtypedef unsigned char uchar;
X
X/*
X** The following structure corresponds to the ROM BIOS
X** disk parameter table:
X*/
X#pragma pack(1)
Xtypedef struct parms {
X uint ncyls;
X uchar nheads;
X uint res0;
X uint wpc;
X uchar ebl;
X uchar ctlb;
X uchar res1[3];
X uint lzc;
X uchar nsecs;
X uchar res2;
X} BIOS_PARMS;
X#pragma pack()
X
X/*
X** The following structure corresponds to the values as returned
X** by the ESDI/IDE identify drive command.
X*/
Xtypedef struct {
X ushort gcfg; /* general configuration */
X ushort fcyl; /* number of fixed cyls */
X ushort rcyl; /* number of removable cyls */
X ushort hds; /* number of heads */
X ushort bpt; /* bytes/track */
X ushort bps; /* bytes/sector */
X ushort spt; /* sectors/track */
X ushort isg; /* inter-sector gap */
X ushort plo; /* PLO sync field */
X ushort vsw; /* vendor status word */
X} ID_PARMS;
X
X/*
X** Used to manipulate identify drive data.
X*/
Xunion {
X ID_PARMS id_parms;
X unsigned short id_data[256];
X} id_buf;
X
X/* pointer to low word of system time value at 0040:006c */
Xushort far *TimePtr = (ushort far *)0x0040006cL;
X
Xint drive = 0; /* drive number */
Xint wd_base = WDP_BASE0; /* base I/O port addr of HDC */
Xchar *my_name;
X
Xvoid reboot(void);
Xvoid chk_drv(void);
Xvoid dsp_bios_cfg(void);
Xvoid dsp_hw_cfg(void);
Xvoid reset_hdc(void);
Xvoid delay(int);
Xvoid sel_drv(uint, uint);
Xvoid bsy_chk(void);
Xvoid usage(void);
Xvoid io_delay(void);
Xvoid test_hdc(uint, uint, uint);
X
X
X/*-----------------------------------------------
X |
X | Main program
X |
X +----------------------------------------------*/
Xmain(argc, argv)
Xint argc;
Xchar *argv[];
X{
X my_name = argv[0];
X if (argc > 1) {
X if ( sscanf(argv[1], "%d", &drive) < 1
X || drive < 0
X || drive > 3)
X usage();
X if (drive > 1) {
X drive &= 1;
X wd_base = WDP_BASE1;
X }
X }
X chk_drv(); /* make sure controller, drive present */
X dsp_bios_cfg(); /* display BIOS drive config */
X dsp_hw_cfg(); /* display H/W drive config */
X reset_hdc(); /* reset the controller */
X dsp_hw_cfg(); /* display H/W drive config */
X reboot(); /* ask user to reboot system */
X}
X
X/*-----------------------------------------------
X |
X | Ask user to reboot system.
X |
X +----------------------------------------------*/
Xvoid reboot()
X{
X fprintf(stderr, "Please reboot system!\n");
X while (1)
X ;
X}
X
X/*-----------------------------------------------
X |
X | Check if controller, drive present.
X |
X +----------------------------------------------*/
Xvoid chk_drv()
X{
X#define MASK (WDM_BSY|WDM_RDY|WDM_WTF|WDM_SKC)
X#define EXP (WDM_RDY|WDM_SKC)
X
X test_hdc(wd_base+WDP_CL, 0x55, 0xff);
X test_hdc(wd_base+WDP_CL, 0xaa, 0xff);
X test_hdc(wd_base+WDP_CH, 0x55, 0x01);
X test_hdc(wd_base+WDP_CH, 0xaa, 0x01);
X sel_drv(drive, 0);
X if ((inp(wd_base+WDP_CSR) & MASK) != EXP) {
X fprintf(stderr, "Drive missing or status hosed\n");
X exit(2);
X }
X}
X
X/*-----------------------------------------------
X |
X | Display BIOS configuration info for this drive.
X |
X +----------------------------------------------*/
Xvoid dsp_bios_cfg()
X{
X /*
X * Array of pointers to HD parameter table entries indexed
X * by drive number
X */
X static BIOS_PARMS far * far *dskptr[2] = {
X (BIOS_PARMS far * far *)(4*0x41L),
X (BIOS_PARMS far * far *)(4*0x46L)
X };
X BIOS_PARMS far *bpp = *dskptr[drive];
X
X printf("BIOS reports drive has %u cyls, %u hds, %u secs/trk\n\n",
X bpp->ncyls, bpp->nheads, bpp->nsecs);
X}
X
X
X/*-----------------------------------------------
X |
X | Ask the drive to identify itself.
X |
X +----------------------------------------------*/
Xvoid dsp_hw_cfg()
X{
X int n;
X
X /* select drive */
X sel_drv(drive, 0);
X
X /* Issue Get Drive Parameters cmd */
X outp(wd_base+WDP_CSR, WDC_GDP);
X
X /* Wait for Busy status to be asserted */
X for (n = 1000; n > 0 && (inp(wd_base+WDP_CSR) & WDM_BSY) == 0; n--)
X ;
X
X /* Now wait for Busy status to be negated */
X bsy_chk();
X
X /* Print error msg and bail out if error */
X if ((n = inp(wd_base+WDP_CSR)) & WDM_HER) {
X fprintf(stderr,
X "Identify drive cmd failed: csr=0x%02x, err=0x%02x\n",
X n, inp(wd_base+WDP_ERR) );
X reboot();
X }
X
X /* Wait for Data request to be asserted */
X while ((inp(wd_base+WDP_CSR) & WDM_DRQ) == 0)
X ;
X
X /* Input parameter info from controller */
X for (n = 0; n < sizeof(id_buf.id_data)/sizeof(id_buf.id_data[0]); n++)
X id_buf.id_data[n] = inpw(wd_base+WDP_DAT);
X
X /* Print parameter info */
X printf("Controller reports drive has %u cyls, %u hds, %u secs/trk\n\n",
X id_buf.id_parms.fcyl, id_buf.id_parms.hds, id_buf.id_parms.spt);
X}
X
X/*-----------------------------------------------
X |
X | Reset hard disk controller (or drive if IDE).
X |
X +----------------------------------------------*/
Xvoid reset_hdc()
X{
X printf("Resetting controller/drive\n\n");
X outp(wd_base+WDP_DCR, WDM_RSTGO);
X delay(2);
X outp(wd_base+WDP_DCR, WDM_RSTNO|WDM_HS3);
X delay(1*TPS);
X}
X
X/*-----------------------------------------------
X |
X | Delay n system timer ticks. 18.2 ticks = 1 sec.
X |
X +----------------------------------------------*/
Xvoid delay(n)
Xint n;
X{
X int cur_lsb = *TimePtr & 1;
X
X while (n-- > 0) {
X while ((*TimePtr & 1) == cur_lsb)
X ;
X cur_lsb = 1 - cur_lsb;
X }
X}
X
X/*-----------------------------------------------
X |
X | Select drive.
X |
X +----------------------------------------------*/
Xvoid sel_drv(drv, head)
Xuint drv, head;
X{
X outp(wd_base+WDP_SDH, WDM_ECC|WDM_512|(drv<<4)|head);
X bsy_chk();
X}
X
X/*-----------------------------------------------
X |
X | Wait for Busy status to be reset.
X |
X +----------------------------------------------*/
Xvoid bsy_chk()
X{
X while (inp(wd_base+WDP_CSR) & WDM_BSY)
X ;
X}
X
X/*-----------------------------------------------
X |
X | Display usage message, abort.
X |
X +----------------------------------------------*/
Xvoid usage()
X{
X static char msg[] =
X "Usage: %s [drive]\n"
X "Drive may be 0..3 (2,3 => drives on alternate controller)\n"
X "Default is 0\n";
X
X fprintf(stderr, msg, my_name);
X exit(2);
X}
X
X/*-----------------------------------------------
X |
X | Delay a bit between back to back I/O operations.
X | The delay results from the call/return overhead.
X |
X +----------------------------------------------*/
Xvoid io_delay()
X{
X}
X
X/*-----------------------------------------------
X |
X | Check if hard disk controller is present and
X | probably register compatible with the standard
X | AT controller. Abort if not.
X |
X +----------------------------------------------*/
Xvoid test_hdc(reg, pat, msk)
Xuint reg;
Xuint pat;
Xuint msk;
X{
X outp(reg, pat);
X io_delay();
X io_delay();
X io_delay();
X io_delay();
X io_delay();
X io_delay();
X if ((inp(reg)&msk) != (pat&msk)) {
X fprintf(stderr,
X "Non-compatible or missing Hard Disk Controller!\n");
X exit(2);
X }
X}
SHAR_EOF
chmod 0644 ide_conf.c || echo "restore of ide_conf.c fails"
sed 's/^X//' << 'SHAR_EOF' > wddefs.h &&
X/*------------------------------------------------------+
X | Definitions for WD100x hard disk controllers |
X +------------------------------------------------------*/
X
X/*
X** Port definitions:
X*/
X#define WDP_BASE0 0x1f0 /* base address of primary controller */
X#define WDP_BASE1 0x170 /* base address of alternate controller */
X#define WDP_DAT 0 /* offset to data reg (R/W) */
X#define WDP_ERR 1 /* offset to error reg (R) */
X#define WDP_WPC 1 /* offset to write precompensation reg (W) */
X#define WDP_SC 2 /* offset to sector count reg (R/W) */
X#define WDP_SEC 3 /* offset to sector address reg (R/W) */
X#define WDP_CL 4 /* offset to cyl addr reg - low byte (R/W) */
X#define WDP_CH 5 /* offset to cyl addr reg - high byte (R/W) */
X#define WDP_SDH 6 /* offset to size/drive/head reg (R/W) */
X#define WDP_CSR 7 /* offset to control/status reg (R/W) */
X#define WDP_ASR 0x206 /* offset to alternate status reg (R) */
X#define WDP_DCR 0x206 /* offset to device control reg (W) */
X#define WDP_DAR 0x207 /* offset to device addr reg (R) */
X
X/*
X** Controller command definitions:
X*/
X#define WDC_HOM 0x10 /* restore drv to trk 0 */
X#define WDC_SEK 0x70 /* seek */
X#define WDC_RD 0x20 /* read sectors */
X#define WDC_WRT 0x30 /* write sectors */
X#define WDC_RVS 0x40 /* read verify sectors */
X#define WDC_FMT 0x50 /* format track */
X#define WDC_TST 0x90 /* perform self test */
X#define WDC_IDP 0x91 /* init drive parms */
X#define WDC_GDP 0xec /* get drive parameters */
X#define WDC_SDP 0x91 /* set drive parameters */
X
X/*
X** SDH register mask definitions:
X*/
X#define WDM_ECC 0x80 /* enable ECC */
X#define WDM_128 0x60 /* 128 bytes/sector */
X#define WDM_256 0x00 /* 256 bytes/sector */
X#define WDM_512 0x20 /* 512 bytes/sector */
X#define WDM_1024 0x40 /* 1024 bytes/sector */
X
X/*
X** Command/status register mask definitions:
X*/
X#define WDM_HER 0x01 /* hard error (R) */
X#define WDM_IDX 0x02 /* index pulse status from drive (R) */
X#define WDM_CER 0x04 /* corrected error (R) */
X#define WDM_DRQ 0x08 /* data request (R) */
X#define WDM_SKC 0x10 /* seek complete (R) */
X#define WDM_WTF 0x20 /* write fault (R) */
X#define WDM_RDY 0x40 /* ready (R) */
X#define WDM_BSY 0x80 /* busy (R) */
X#define WDM_DRT 0x01 /* disable retries (W) */
X
X/*
X** Error register mask definitions:
X*/
X#define WDM_DAE 0x01 /* data address mark not found */
X#define WDM_T0E 0x02 /* track 0 error */
X#define WDM_CAE 0x04 /* aborted command */
X#define WDM_NIE 0x10 /* ID not found */
X#define WDM_ICE 0x20 /* CRC error - ID field */
X#define WDM_DCE 0x40 /* CRC error - data field */
X#define WDM_BBE 0x80 /* bad block detected */
X
X#define WDM_HS3 0x08 /* use reduced write current line for HS3 */
X#define WDM_RSTGO 0x04 /* start controller reset */
X#define WDM_RSTNO 0x00 /* end controller reset */
X#define WDM_IEN 0x02 /* interrupt enable */
X
SHAR_EOF
chmod 0644 wddefs.h || echo "restore of wddefs.h fails"
sed 's/^X//' << 'SHAR_EOF' > s2_temp_.tmp &&
Xbegin 600 ide_conf.exe
XM35K!`10`!0`@`,(`__^>`@`(^\MB`P``'@````$`#@!,`G`#``!)!`````#X
XM`?\!_0$`````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````58OL,\#H^`6+7@:+
XM!Z-`"(-^!`%^.+A*`%"Y0@!1_W<"Z#X>B^4]`0!\#H,^2@``?`>#/DH``WX#
XMZ)P"@SY*``%^"X,F2@`!QP9,`'`!Z"D`Z+X`Z/4`Z+P!Z.\`Z`0`B^5=PS/`
XMZ)<%N$X`4+AX`E#HK`B#Q`3K_I`SP.B!!;C_`%"Y50!1BQ9,`(/"!%+H;@*#
XMQ`:X_P!0N*H`4(L.3`"#P011Z%@"@\0&N`$`4+E5`%&+#DP`@\$%4>A"`H/$
XM!K@!`%"XJ@!0H4P`!04`4.@M`H/$!BO`4/\V2@#HN`&#Q`2A3``%!P!0Z*\=
XM@\0")?``/5``=!BX90!0N'@"4.@="(/$!+@"`%#H_0.#Q`+#D%6+[+@$`.CE
XM!(L>2@#1X]'CQ)^Z`":+!R:+5P*.PHO8)HI/#BKM42:*3P)1)O\WN(0`4.@.
XM"(OE7<-5B^RX`@#HJP0KP%#_-DH`Z#D!@\0$N.P`4*%,``4'`%#H.AV#Q`3'
XM1O[H`^L#_T[^@W[^`'X1H4P`!0<`4.@/'8/$`JB`=.;H*0&A3``%!P!0Z/L<
XM@\0"B4;^J`%T(*%,`$!0Z.D<@\0"4/]V_KC"`%"X>`)0Z%L'@\0(Z)G^H4P`
XM!0<`4.C''(/$`J@(=._'1OX``/\V3`#H_AR#Q`*+7O[1XXF'0`;_1OZ!?OX`
XM`7+C_S9,!O\V1@;_-D(&N/4`4.A%!XOE7<.0,\#HY0.X,0%0Z#0'@\0"N`0`
XM4*%,``4&`E#H=QR#Q`2X`@!0Z!\`@\0"N`@`4*%,``4&`E#H7!R#Q`2X$@!0
XMZ`0`@\0"PU6+[+@$`.B;`\0>1@`FB@<E`0#K%I#$'D8`)HH')0$`.T;^=/&X
XM`0`K1OZ)1OZ+1@3_3@0+P'_>B^5=PU6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<"6UW"!`````````#Y`0``````````````````````
XM``````!-4R!2=6XM5&EM92!,:6)R87)Y("T@0V]P>7)I9VAT("AC*2`Q.3DP
XM+"!-:6-R;W-O9G0@0V]R<!@`)60``&P`0````/`!4&QE87-E(')E8F]O="!S
XM>7-T96TA"@!$<FEV92!M:7-S:6YG(&]R('-T871U<R!H;W-E9`H`0DE/4R!R
XM97!O<G1S(&1R:79E(&AA<R`E=2!C>6QS+"`E=2!H9',L("5U('-E8W,O=')K
XM"@H`!`$``!@!``!)9&5N=&EF>2!D<FEV92!C;60@9F%I;&5D.B!C<W(],'@E
XM,#)X+"!E<G(],'@E,#)X"@!#;VYT<F]L;&5R(')E<&]R=',@9')I=F4@:&%S
XM("5U(&-Y;',L("5U(&AD<RP@)74@<V5C<R]T<FL*"@!297-E='1I;F<@8V]N
XM=')O;&QE<B]D<FEV90H*`%5S86=E.B`E<R!;9')I=F5="D1R:79E(&UA>2!B
XM92`P+BXS("@R+#,@/3X@9')I=F5S(&]N(&%L=&5R;F%T92!C;VYT<F]L;&5R
XM*0I$969A=6QT(&ES(#`*`$YO;BUC;VUP871I8FQE(&]R(&UI<W-I;F<@2&%R
XM9"!$:7-K($-O;G1R;VQL97(A"@`````A!0`````%````````````````````
XM````````7T-?1DE,15])3D9//0``````````````````````````````````
XM```4`(&!@0$!````````````````````````````00+Y`0``````````````
XM__]0"P```!8"`A@-"0P,#`<(%A;_`@T2`O\``$((``!""`$``````````@$`
XM```````"`@```````(0#`````````@0`````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM```````````!```"````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````````````,````````@"2T-
XM70!=``8```8``0``$``#!@`&`A`$145%!04%!04U,`!0`````"`@,%!8!P@`
XM,#`P5U`'```@(```````"&!@8&!@8```<'!X>'AX"`<(```'``@("```"``(
XM```(*&YU;&PI!@```"`*!@H&"@8*!@H&"@8`````````("`@("`@("`@*"@H
XM*"@@("`@("`@("`@("`@("`@("!($!`0$!`0$!`0$!`0$!`0A(2$A(2$A(2$
XMA!`0$!`0$!"!@8&!@8$!`0$!`0$!`0$!`0$!`0$!`0$!`1`0$!`0$(*"@H*"
XM@@("`@("`@("`@("`@("`@("`@("$!`0$"``````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````&009!!D$`````/@!````````````
XM``````!Z##P\3DU31SX^``!2-C`P,`T*+2!S=&%C:R!O=F5R9FQO=PT*``,`
XM4C8P,#,-"BT@:6YT96=E<B!D:79I9&4@8GD@,`T*``D`4C8P,#D-"BT@;F]T
XM(&5N;W5G:"!S<&%C92!F;W(@96YV:7)O;FUE;G0-"@#\``T*`/\`<G5N+71I
XM;64@97)R;W(@``(`4C8P,#(-"BT@9FQO871I;F<M<&]I;G0@<W5P<&]R="!N
XM;W0@;&]A9&5D#0H``0!2-C`P,0T*+2!N=6QL('!O:6YT97(@87-S:6=N;65N
X'=`T*`/___V5D
X`
Xend
SHAR_EOF
uudecode < s2_temp_.tmp && rm -f s2_temp_.tmp &&
chmod 0644 ide_conf.exe || echo "restore of ide_conf.exe fails"
exit 0
--
UUCP: {hplabs!hp-sdd ucsd nosc}!crash!fpm
ARPA: crash!f...@nosc.mil
INET: f...@crash.cts.com

Julian Elischer

unread,
Oct 19, 1992, 1:31:31 AM10/19/92
to
In article <1992Oct18.153007.28120@crash> f...@crash.cts.com (Frank Maclachlan) writes:
>Given the numerous inquiries about untranslated geometry on various
>IDE hard drives, I wrote a quickie program which can be used under
>MSDOS to report the "default" drive geometry. The command used to
>query the drive (identify drive, 0xec) is the same command used by
>the 386BSD 0.1 wd.c driver.

this is great, Terry and I were trying to work out the translation
mechanism, so we could better understand the boot.
Terry feels that tehhe translation in IDE drives is done by the BIOS
support routines, though I was dubious about this (but hey
I don't have an IDE drive so what do I know)
This however is the second confirmation of the drive doing it itself,
so it loks as if at least SOME of them do it on the drive.

Terry, I spoke at length with Bill Jolitz on this and he tells
me that he had to talk to several IDE manufacturers to understand
what was going on, and they all told him that they do translation
on the drive.
He also said that some of the drives do not map 1:1
i.e. in translated mode the may not use all the sectors in
a cylinder or similar horrible kludges.
My thought is that with an IDE drive, if this is true, then the
safest thing to do would be to leave it in translated mode all the
time. (of course this is only feasible if the drive translates itself
but that point of view is gaining a lot of support at trhe moment 8-)

A true goldmine of information!

>Also, data transfers from this drive averaged about 300 kb/sec when
>the drive was set up in translated mode and about 660 kb/sec when
>set up in its "default" mode. This was probably partially caused
>by the use of 17 secs/trk rather than the native 33 secs/trk; the
>80C31 microprocessor has to work harder to translate addresses.

is the 'default' the figure the BIOS reborts?


>
>For those IDE drive users with a modern BIOS supporting user configurable
>drive types (type 47 on an AMI BIOS), I suggest configuring the drive
>or drives to the default geometry given by step 4 above. This results
>in the geometry remaining constant throughout the 386BSD's handling of
>an IDE drive and possibly better performance.
>

This is very good news.

Terry, If this is true then we must go back to the original of my two articles..
(The one assuming translation on the drive)
If this is true, then my guess is to use fdisk
to set all figures as if calculated using the 'default' figures.
I still feel this should work. Your drive may be different
of course. have you done any experiments with it?

julian

+----------------------------------+ ______ _ __
| __--_|\ Julian Elischer | \ U \/ / On assignment
| / \ jul...@tfs.com +------>x USA \ in a very strange
| ( OZ ) 2118 Milvia st. Berkeley CA. \___ ___ | country !
+- X_.---._/ USA+(510) 704-3137(wk) \_/ \\
v


A Wizard of Earth C

unread,
Oct 19, 1992, 1:34:18 PM10/19/92
to
In article <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:
>this [IDE data] is great, Terry and I were trying to work out the translation

>mechanism, so we could better understand the boot.
>Terry feels that the translation in IDE drives is done by the BIOS

>support routines, though I was dubious about this (but hey
>I don't have an IDE drive so what do I know)
>This however is the second confirmation of the drive doing it itself,
>so it loks as if at least SOME of them do it on the drive.

I guess this then raises the question: why the heck are the 0xec/0x91's
used at all? Turning off translation makes no sense, then, since the only
apparent effect is to screw up installation for 2/3's of the people with
IDE drives. Why does the WD driver screw with it?

The only potential explanation is non-IDE drives (like the 9 head MFM
Micropolis, 130M). Getting the drive geometry would give you more disk
space to use.

>Terry, I spoke at length with Bill Jolitz on this and he tells
>me that he had to talk to several IDE manufacturers to understand
>what was going on, and they all told him that they do translation
>on the drive.
>He also said that some of the drives do not map 1:1
>i.e. in translated mode the may not use all the sectors in
>a cylinder or similar horrible kludges.

This also means a non-native geometry steals some of your disk space, then.

>My thought is that with an IDE drive, if this is true, then the
>safest thing to do would be to leave it in translated mode all the
>time. (of course this is only feasible if the drive translates itself
>but that point of view is gaining a lot of support at trhe moment 8-)

I have to agree with you now, after running Frank's program. The thing
that confused me was that BIOS calls to the controller apparently changed
the translation; in reality, the controller tells the disk whether or not
to do translation.

Is there any way to find out if the original intent of "turning translation
off" was simply to get more usable disk? If so, perhaps we should support
this only in the "USE ENTIRE DISK FOR 386BSD?" case. I suspect we will
end up with a two disk "basic install" following this path to it's logical
outcome.

We might provide a "working without a net" option for those lucky enough
to have IDE drives with 1:1 mappings or the other two highly unlikely but
possible scenarios where a linear non-1:1 mapping can still work with two
OSs.

One question we should be able to answer with Frank's code, slightly changed,
is "is this a translated drive?". I think we still need a way to "restore"
translation. We can provide an ioctl() in the driver to get the information,
and run the modified code to get the information during the probe. I would
definitely say "screw it" if they are using DOS-partitioning to get more than
one OS on the disk, and *not* disable translation.

This would rely heavily on being able to reset translation without:

>>5. Asks user to reboot system since translation may have changed.

An alternate mechanism to getting translation "turned back on" would be to
disallow the "without a net" option and not try to probe (which would turn
it off) and not explictly disable it by examining the boot track for DOS
style partitioning. This would lose us the disk space we would get from
non-translated drives as well, but eliminate the "turn on translation"
problem.

>>Also, data transfers from this drive averaged about 300 kb/sec when
>>the drive was set up in translated mode and about 660 kb/sec when
>>set up in its "default" mode. This was probably partially caused
>>by the use of 17 secs/trk rather than the native 33 secs/trk; the
>>80C31 microprocessor has to work harder to translate addresses.

Ah, here's the rub! If you don't turn off translation, your performance
is halved (at least for this drive). Well, I knew it was disgusting to
install DOS on my drives, but I didn't know it was *that* bad! ;-). I
think we will have to just eat this if DOS partitioning is on the drive,
just like we may have to eat a loss of space on MFM and RLL drives
because we can't determine from the controller if it's IDE or not (if we
have to make pessimistic assumptions for IDE, like leaving translation
on to avoid buggering it, then we will lose the benefits of knowing the
real geometry on other drive types that are software indistinguishable from
IDE).

>>For those IDE drive users with a modern BIOS supporting user configurable
>>drive types (type 47 on an AMI BIOS), I suggest configuring the drive
>>or drives to the default geometry given by step 4 above. This results
>>in the geometry remaining constant throughout the 386BSD's handling of
>>an IDE drive and possibly better performance.
>>
>This is very good news.
>
>Terry, If this is true then we must go back to the original of my two
>articles.. (The one assuming translation on the drive)
>If this is true, then my guess is to use fdisk
>to set all figures as if calculated using the 'default' figures.
>I still feel this should work. Your drive may be different
>of course. have you done any experiments with it?

I have experimented... and setting the 'default' values still makes my IDE
drives die when I have DOS partitioning on them... I am luck to have 17,
a nice prime number, as the number of sectors per track, so I can't even
make an optimistic assumption and get either of the two workarounds to
work for me (they depend on finding an LCF for a cylinder boundry, and the
only one I can calculate for it occurs way beyond the end of the drive).

I *have* been able to get an second stage boot that knows the physical
location of the partition start to work, but this was prety hairy without
Frank's program. Even with it (modified) to spit out usable cylinder
boundries and untranslated partition information, I could only find 3
usable places for a partition boundry on my disk (this is one more than
I arrived at by hand).

I disagree that we should be turning translation off at all, unless, as
detailed above, we can turn it back on or we aren't using DOS partitioning.


Any ideas on how to turn translation back on so I can provide an ioctl()
interface and modified probe routine for the wd driver to get the drive
set up from user space and set/unset translation?

Also: What about the two IDE problem, when you only have one drive type 47
available? It would seem to me that translation wouldn't want to be on on
an all-386BSD drive, and that the first drive is more likely to boot both
DOS (or some other OS) and 386BSD. It's be a shame to pay half the disk
performance and part of the disk space if we didn't have to.


I think we are coming close to something that can work every time for
everybody, which is what I feel this whole thing has been about anyway...
a few more hammer blows, and we should have it.

Terry Lambert
te...@icarus.weber.edu
terry_...@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
--
-------------------------------------------------------------------------------
"I have an 8 user poetic license" - me
Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------

Brett McCoy

unread,
Oct 20, 1992, 1:43:13 AM10/20/92
to
In <1992Oct19.1...@fcom.cc.utah.edu> te...@cs.weber.edu (A Wizard of Earth C) writes:

>In article <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:
>>this [IDE data] is great, Terry and I were trying to work out the translation
>>mechanism, so we could better understand the boot.
>>Terry feels that the translation in IDE drives is done by the BIOS
>>support routines, though I was dubious about this (but hey
>>I don't have an IDE drive so what do I know)
>>This however is the second confirmation of the drive doing it itself,
>>so it loks as if at least SOME of them do it on the drive.
>
>I guess this then raises the question: why the heck are the 0xec/0x91's
>used at all? Turning off translation makes no sense, then, since the only
>apparent effect is to screw up installation for 2/3's of the people with
>IDE drives. Why does the WD driver screw with it?
>
>The only potential explanation is non-IDE drives (like the 9 head MFM
>Micropolis, 130M). Getting the drive geometry would give you more disk
>space to use.

One reason to turn off translation is so that that all the fancy
Berkeley Fast File System stuff can do it's thing. All the
calculations that it does don't mean a thing if the geometry is
getting translated. Now, the MAXTOR 7120A throws a kink in this.
There are four different "default" translations you can set the drive
in (meaning, after a reset this is what the drive will claim to be),
and non of these is the actual geometry of the disk. If you want to
use that you have to tell it to use that as a translation. However,
since 386BSD shuts off translation there is no way to use the actual
geometry of the disk, only one of the "default" translations settable
by the jumpers on the drive.

The native geometry of the drive has more sectors than is accessible
by any of the translations, and I imagine accessing the drive in it's
natvie geometry would be faster than any of the translations. Being
able to run 386BSD without it throwing the drive back into it's default
setting would be a boon, I think, to me.

++Brett;

Frank Maclachlan

unread,
Oct 21, 1992, 5:43:25 PM10/21/92
to
In article <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:

>In article <1992Oct18.153007.28120@crash> f...@crash.cts.com (Frank Maclachlan) writes:
>

> [ ...discussion deleted... ]


>
>>Also, data transfers from this drive averaged about 300 kb/sec when
>>the drive was set up in translated mode and about 660 kb/sec when
>>set up in its "default" mode. This was probably partially caused
>>by the use of 17 secs/trk rather than the native 33 secs/trk; the
>>80C31 microprocessor has to work harder to translate addresses.
>

>is the 'default' the figure the BIOS reborts?

This discussion should perhaps be in comp.sys.ibm.pc.hardware,
but here goes...

The BIOS sets up interrupt vectors to point to 16 byte drive
parameter structures for up to two drives. The far pointer at
interrupt vector 0x41 (0x0:0x104) points to the drive parameter
structure for hard disk 0 ("C:" in the DOS world) and interrupt
vector 0x46 (0x0:0x118) points to the drive parameter structure
for drive 1 ("D:"). There is no provision for more than two hard
disks in the BIOS. In any case, these drive parameter structures
reflect the drive geometries selected when the user sets up his
(or her) CMOS configuration and have no necessary relation to the
'default' values as reported by the drive. 'Soft' configurations,
such as the AMI BIOS type 47 user configurable drive types, are
stored in RAM; 'hard' configurations (types 1..46), are in an array
of structures in the BIOS itself and are indexed by the CMOS drive
type (-1).

Many ESDI and RLL hard disk controllers which have on board EPROMs
also have on-board RAM where 'soft' drive parameter structures can
be stored; during initialization, the on-board EPROM code queries
the drive, builds the required drive parameter structures, and then
changes the interrupt vectors to point to the new structures. The
Western Digital WD1007[AV] ESDI controllers, for example, do this.

>
> [ ...discussion deleted... ]


>
>
>julian
>
>+----------------------------------+ ______ _ __
>| __--_|\ Julian Elischer | \ U \/ / On assignment
>| / \ jul...@tfs.com +------>x USA \ in a very strange
>| ( OZ ) 2118 Milvia st. Berkeley CA. \___ ___ | country !
>+- X_.---._/ USA+(510) 704-3137(wk) \_/ \\
> v

What does OZ stand for (as opposed to 'au')? Just curious.

In article Message-ID: <1992Oct19.1...@fcom.cc.utah.edu> te...@cs.weber.edu (A Wizard of Earth C) writes:

>I guess this then raises the question: why the heck are the 0xec/0x91's
>used at all? Turning off translation makes no sense, then, since the only
>apparent effect is to screw up installation for 2/3's of the people with
>IDE drives. Why does the WD driver screw with it?

The real killer is the controller/drive reset in wdprobe(). This
causes the drive to revert to its 'default' translation. The 0x91
(Initialize Drive Params) is used to restore the translation once the
disklabel has been read and the drive's geometry is extracted, but
since the translation has changed, we can't read the disklabel if it
isn't at cylinder 0! 0xec (Identify Drive) is used *only* to get the
controller/drive ID string printed in angle brackets during the probe
phase.

One solution would be to *not* reset the drive/controller in wdprobe().
This would preserve the drive's translation mode. Remember that the
drive/controller was already reset and tested by the BIOS, so resetting
it and testing it again is probably unnecessary. I'll hack a copy of
the patchkit wd.c and send it to Terry to try out (a few other things
have to change in wd.c if the reset is removed, so don't just remove the
reset and expect it to work).

>
> [ ...more discussion deleted... ]
>

>>>Also, data transfers from this drive averaged about 300 kb/sec when
>>>the drive was set up in translated mode and about 660 kb/sec when
>>>set up in its "default" mode. This was probably partially caused
>>>by the use of 17 secs/trk rather than the native 33 secs/trk; the
>>>80C31 microprocessor has to work harder to translate addresses.
>
>Ah, here's the rub! If you don't turn off translation, your performance
>is halved (at least for this drive). Well, I knew it was disgusting to
>install DOS on my drives, but I didn't know it was *that* bad! ;-). I
>think we will have to just eat this if DOS partitioning is on the drive,
>just like we may have to eat a loss of space on MFM and RLL drives
>because we can't determine from the controller if it's IDE or not (if we
>have to make pessimistic assumptions for IDE, like leaving translation
>on to avoid buggering it, then we will lose the benefits of knowing the
>real geometry on other drive types that are software indistinguishable from
>IDE).

I suspect that it may not be so bad on the newer IDE drives which can
have a lot of cache memory, can read ahead, and in some cases, also write
behind. The Fujitsu IDE drive used in my tests is a generation or two
out of date. I personally like to use *no* translation.

>
> [ ...stuff deleted... ]


>
>
>I disagree that we should be turning translation off at all, unless, as
>detailed above, we can turn it back on or we aren't using DOS partitioning.
>
>
>Any ideas on how to turn translation back on so I can provide an ioctl()
>interface and modified probe routine for the wd driver to get the drive
>set up from user space and set/unset translation?
>

To establish a new translation:

1. Output the desired number of sectors/track to the sector count
register (0x1f2).
2. Select the drive and highest numbered desired head (number of heads
- 1) w/ the SDH register (0x1f6). This register has several bit
fields.
3. Give the drive time to go BUSY, then wait for it to be not BUSY.
This status can be tested w/ either register 0x1f7 or 0x3f6.
It probably won't go BUSY, but I think a few drives/controllers do.
4. Issue a 0x91 command to the command register.
5. Give the drive time to go BUSY, then wait for it to be not BUSY.
This status can be tested w/ either register 0x1f7 or 0x3f6.
6. Test for errors w/ register 0x1f7.

>Also: What about the two IDE problem, when you only have one drive type 47
>available? It would seem to me that translation wouldn't want to be on on
>an all-386BSD drive, and that the first drive is more likely to boot both
>DOS (or some other OS) and 386BSD. It's be a shame to pay half the disk
>performance and part of the disk space if we didn't have to.

I tested my AMI BIOS and it supports *two* distinct type 47 configurations.
For those folks w/ IDE drives who don't have a user configurable drive
type, I've heard that NCL makes an IDE controller w/ an on-board BIOS
which allows user configuration (I think). Costs about $50.

>I think we are coming close to something that can work every time for
>everybody, which is what I feel this whole thing has been about anyway...
>a few more hammer blows, and we should have it.
>
> Terry Lambert
> te...@icarus.weber.edu
> terry_...@novell.com
>---
>Any opinions in this posting are my own and not those of my present
>or previous employers.
>--
>-------------------------------------------------------------------------------
> "I have an 8 user poetic license" - me
> Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
>-------------------------------------------------------------------------------

I hope so.

Frank

Michael Galassi

unread,
Oct 22, 1992, 12:07:52 PM10/22/92
to
f...@crash.cts.com (Frank Maclachlan) writes:

>One solution would be to *not* reset the drive/controller in wdprobe().
>This would preserve the drive's translation mode. Remember that the
>drive/controller was already reset and tested by the BIOS, so resetting
>it and testing it again is probably unnecessary. I'll hack a copy of
>the patchkit wd.c and send it to Terry to try out (a few other things
>have to change in wd.c if the reset is removed, so don't just remove the
>reset and expect it to work).

The approach is OK but only for devices on the primary controler/host
adapter, disks on alternate controlers are completely transparent to
the bios.

<don't know who this was>


>>>>Also, data transfers from this drive averaged about 300 kb/sec when
>>>>the drive was set up in translated mode and about 660 kb/sec when
>>>>set up in its "default" mode. This was probably partially caused
>>>>by the use of 17 secs/trk rather than the native 33 secs/trk; the
>>>>80C31 microprocessor has to work harder to translate addresses.

More likely the extra seek, the address translation is a table lookup,
an easy matter even for an 80c31 class mpu.

-michael
--
On a scale of 1 to 10 I'd say... Oh, somewhere in there.

Michael Galassi -- ne...@percival.rain.com

Rui Pedro Salgueiro

unread,
Oct 22, 1992, 2:43:22 PM10/22/92
to
brt...@maverick.ksu.ksu.edu (Brett McCoy) writes:
: One reason to turn off translation is so that that all the fancy

: Berkeley Fast File System stuff can do it's thing. All the
: calculations that it does don't mean a thing if the geometry is
: getting translated. Now, the MAXTOR 7120A throws a kink in this.

I don't think you can turn off translation in a modern disk.

If I'm not mistaken most modern disks have a variable number of
sectors per track (they use something called ZBR (Zoned Bit
Recording ???)).
The outer tracks have more sectors than the inner ones in order
to have more capacity and transfer rate.
In the seagate catalogue the information to most disks is only
the number of heads and cylinders and the total capacity.
Also these disks have a variable internal transfer rate, and,
as they have a fixed rotation speed, they must have a variable
number of sectors/track.

So, any geometry in the form: heads/cylinders/sectors has to be
translated.

I think the vision the system has of the disks should be changed
to just a linear array of blocks.
That's the way SCSI works.

Disclaimer: I'm not a expert on disks, altought I have read a lot of
specs lately. I'm not a expert on the FFS altought I have teached it
in an INTRODUCTION course in Operating Systems.

Rui Salgueiro | Dpt. de Matematica | Safe sex doesn't mean no
E-Mail: r...@inescc.pt | Universidade de Coimbra | sex, it just means use your
clc...@ciuc2.uc.pt | Portugal | imagination - Billy Bragg
r...@mat.uc.pt RSN | A guest @ Inesc Coimbra |

Joerg Wunsch

unread,
Oct 23, 1992, 11:53:12 AM10/23/92
to
Hi all,

i find it obvious that translation is done within the drive.
The reason: i've got an (older) ST-1144A which is a zone-bit recording
device. I.e., the bit density isn't constant across the cylinder number,
there are several sector counts on the disk. As far as i know, nobody
(except the disk manufactuerer) would be about translating everything
itself on such a drive. I actually don't know what this drive claims to
have as physical geometry (i'll test the program posted here...), but
seems to me that 386bsd driver is working (with patchkit applied).
Actually, this is a DOS drive in my computer, but at least, i'm able
to hexdump something from it.

J"org
--
J"org Wunsch, TCD GmbH Dresden, R"ahnitzgasse 18, D-O-8060 Dresden
\ ~.~.
joerg_wunsch%bon...@hadrian.hrz.tu-chemnitz.de \ ~ | ~
voice: +49-351-5965 137 \ ===

Christoph Badura

unread,
Oct 23, 1992, 8:43:59 PM10/23/92
to
In <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:
>Terry feels that tehhe translation in IDE drives is done by the BIOS
>support routines, though I was dubious about this (but hey
>I don't have an IDE drive so what do I know)

Terry feels wrong. IDE translation is done "on the drive", because you
can hook up translated IDE drives to machines that know zilch about
IDE, because IDE didn't exist when their BIOS was programmed.
--
Christoph Badura --- b...@flatlin.ka.sub.org

AIX is a better... is a better... is a better... OpenSystem.
IBM Rep at GUUG Symposium '92

A Wizard of Earth C

unread,
Oct 25, 1992, 6:23:32 AM10/25/92
to
In article <BwLop...@flatlin.ka.sub.org>, b...@flatlin.ka.sub.org (Christoph Badura) writes:
|> In <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:
|> >Terry feels that tehhe translation in IDE drives is done by the BIOS
|> >support routines, though I was dubious about this (but hey
|> >I don't have an IDE drive so what do I know)
|>
|> Terry feels wrong. IDE translation is done "on the drive", because you
|> can hook up translated IDE drives to machines that know zilch about
|> IDE, because IDE didn't exist when their BIOS was programmed.

Terry feels this from disassembling the BIOS *on board* an IDE controller;
one wonders how AMI BIOS drive type 47 works when the drive hardware only has
access to the CMOS settings through it's controller firmware?

Terry also feels that, were the translation 100% transparent, no one trying to
load both DOS and 386BSD on an IDE drive would ever have problems related to
translation. Terry wonders *why* the software is sensitive to the "transparent"
translation of cylinder boundries if Christoph is right?

Jim Segrave

unread,
Oct 25, 1992, 10:29:11 AM10/25/92
to

> In article <BwLop...@flatlin.ka.sub.org>, b...@flatlin.ka.sub.org (Christoph Badura) writes:
> |> In <1992Oct19.0...@tfs.com> jul...@tfs.com (Julian Elischer) writes:
> |> >Terry feels that tehhe translation in IDE drives is done by the BIOS
> |> >support routines, though I was dubious about this (but hey
> |> >I don't have an IDE drive so what do I know)
> |>
> |> Terry feels wrong. IDE translation is done "on the drive", because you
> |> can hook up translated IDE drives to machines that know zilch about
> |> IDE, because IDE didn't exist when their BIOS was programmed.
>
> Terry feels this from disassembling the BIOS *on board* an IDE controller;
> one wonders how AMI BIOS drive type 47 works when the drive hardware only has
> access to the CMOS settings through it's controller firmware?

Odd that. I've been doing PC-AT BIOS work for the last year or two and
worked with Quantam, Coneer, Fujitsu, NEC, Maxtor, and Teac IDE drives.
In every single case, the BIOS at power up sets the drive configuration
from the drive type using either a table in EPROM or values stored in
the CMOS RAM of the RTC chip (for the user defined types). The PC BIOS
sets int 0x41/0x46 to be a segment:offset pointer to a 16 byte table
describing the drive. For predefined types, these are set to preset
entries within the BIOS prom. For user defined drives, the BIOS must
locate some free memory (often by reducing the base memory size by 1K),
create a drive table in this memory, and set the pointer to this newly
created table. After the drive configuration is set, all accesses to
the drive are translated in the drive using the configuration details
supplied.

I can believe that there may have been early IDE drives which did not do
mapping in the controller, but these would be quite rare these days.
Every IDE drive I have encountered uses controller mapping - most of
them do not use an constant number of sectors/track, making BIOS level
mapping very difficult. Except for timing problems with some drives -
Quantams in particular - IDE drives can be fitted to ATs with a BIOS
written for ISA MFM controllers without any problems.

> Terry also feels that, were the translation 100% transparent, no one trying to
> load both DOS and 386BSD on an IDE drive would ever have problems related to
> translation. Terry wonders *why* the software is sensitive to the "transparent"
> translation of cylinder boundries if Christoph is right?

At a guess - I'm not running 386BSD - the disc label contains different
parameters than the geometry set by the BIOS and once the OS starts up,
it remaps the drive to a new and incompatible configuration.
--
Jim Segrave (Segrave Software Services) j...@grendel.demon.co.uk

Dick Dunn

unread,
Oct 25, 1992, 1:39:12 PM10/25/92
to
te...@cs.weber.edu (A Wizard of Earth C) writes:
>(Christoph Badura) writes:
>|> (Julian Elischer) writes:
>|> >Terry feels that tehhe translation in IDE drives is done by the BIOS
>|> >support routines...
...
>|> Terry feels wrong. IDE translation is done "on the drive",...
...

>Terry feels this from disassembling the BIOS *on board* an IDE controller;

There is NO BIOS on an IDE controller.

Remember, we're making the distinction between "drive" and "controller",
which are two objects, purchased separately, connected by a cable. The
term "controller" is a misnomer for an IDE card anyway...it's nothing but
a set of connectors and some signal buffering. (The idea of building a
BIOS out of a few 74LS glue chips and maybe a PAL is amusing, though.)

Once again: There is NO BIOS on an IDE "controller".
The logic is all on the drives themselves. That's the whole point of IDE.

>one wonders how AMI BIOS drive type 47 works when the drive hardware only has
>access to the CMOS settings through it's controller firmware?

See command 0x91, variously known as "set parameters", "initialize drive
parameters", etc. This is an AT disk controller command, sent from host to
controller/drive. The "parameters" to the command (the relevant controller
registers) are drive/head, which must contain the unit number and the
number of heads, and sector-count, which must contain the number of sectors
per track. This command is sent by the main-board BIOS code, using CMOS
values, at POST time.

>Terry also feels that, were the translation 100% transparent, no one trying to
>load both DOS and 386BSD on an IDE drive would ever have problems related to

>translation...

The interpretation of "set parameters" varies with the drive/controller.
Old drives would either accept the parameters as given if they matched the
physical configuration, or reject. A more recent drive having only one
translation mode would behave similarly--either accept parameters which
match the one possible translation mode, or reject.

Some drives can operate in more than one logical configuration. This isn't
even a new idea; large ESDI drives did it years ago. (In this case, the
possible configurations may include an untranslated configuration, but they
need not. For a zone-recorded drive, they won't.) In this case, the "set
parameters" command tells the drive which configuration to select...and
*HERE* is where the trouble can happen. If you set the drive parameters,
write stuff on the disk, then reset the drive to different parameters,
you'll scramble the sector sequence because you've changed the logical->
physical mapping.

The translation *is* transparent in the sense that once you've done the
"set parameters" (which is an initialization command), the translation
stays put. The problems happen with drives that allow multiple trans-
lations, and they happen when the drive is explicitly asked to change its
translation.

[Digression: Why do some drives offer multiple translations? To allow them
to work with various old BIOSes that don't have user-defined drive type and
that have a limited table of fixed drive configurations.]

And, one last time, on an IDE drive the translation happens on the drive
itself.
--
Dick Dunn r...@raven.eklektix.com -or- raven!rcd Boulder, Colorado
Mr Natural says, "Get the right tool for the job!"

Paul Southworth

unread,
Oct 25, 1992, 4:52:40 PM10/25/92
to
In article <1992Oct2...@eklektix.com> r...@raven.eklektix.com (Dick Dunn) writes:
>te...@cs.weber.edu (A Wizard of Earth C) writes:
>>Terry feels this from disassembling the BIOS *on board* an IDE controller;
>
>There is NO BIOS on an IDE controller.
>

That depends on your IDE controller. IDE controllers with BIOS are
available. Usually around $60 to $75 -- primary application is to
put an IDE drive in an old 286 or other such machine with old motherboard
BIOS.

The average $15 IDE controller certainly doesn't have one.


Paul Southworth | ftp redspread.css.itd.umich.edu
Consulting and Support Services | Anonymous Political Archives
Information Technology Division | 100% 386BSD 0.1
University of Michigan, Ann Arbor | New submissions welcome

<Representing myself. Everything I say is for educational use only.>

L. Jonas Olsson

unread,
Oct 25, 1992, 5:47:23 PM10/25/92
to
I'm here posting some patches for libg++-2.2 that I have used to
successfully compile libg++ and my own programs. The patches are
derived from patches to bsdi by Jon Block that are available at
bsdi.com. There is at least some problems, the test tRational
fails with floating exception. This could be because of incorrect
values for various floating point limits.
Hopefully other people that have ported libg++-2.2 will correct
the errors I've made/overlooked.
These patches would not have been done without the ref machine
that Julian Elischer has so kindly provided.

Jonas Olsson
l...@po.cwru.edu

Procedure:
==========

Make shure you are using gnu make-3.62
Make shure you have changed the values of DBL_MIN and DBL_MAX
in gcc-2.2.2's include directory. Here's the values I use:
#define DBL_MIN 2.2250738585072014e-308
#define DBL_MAX 1.7976931348623157e+308

get libg++-2.2 from a favorite site
zcat libg++-2.2.tar.Z|tar xvf -
patch -p0 < libg++-2.2.diffs
cd libg++-2.2
./configure i386-bsd
make
make install
And if you want to test it more thoroughly:
cd libg++/tests
make -k check

The only test that should fail is tRational. It fails
with floating exception for me. If you want to debug
why use gdb-4.7.

Diff file:
==========
<start of libg++-2.2.diffs>

diff -rc2N libg++-2.2.orig/config/mh-bsd libg++-2.2/config/mh-bsd
*** libg++-2.2.orig/config/mh-bsd
--- libg++-2.2/config/mh-bsd Wed Aug 5 15:50:19 1992
***************
*** 0 ****
--- 1,2 ----
+ # Define SYSV as -DSYSV if you are using a System V operating system.
+ RANLIB = ranlib
diff -rc libg++-2.2.orig/config.sub libg++-2.2/config.sub
*** libg++-2.2.orig/config.sub Fri Jun 26 14:14:14 1992
--- libg++-2.2/config.sub Sat Oct 24 18:22:40 1992
***************
*** 115,120 ****
--- 115,124 ----
basic_machine=i386-unknown
os=-go32
;;
+ i386-bsd* | bsdi)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
i386-isc* | isc)
basic_machine=i386-unknown
os=-iscsysv
diff -rc libg++-2.2.orig/configure.in libg++-2.2/configure.in
*** libg++-2.2.orig/configure.in Mon Jun 22 23:50:30 1992
--- libg++-2.2/configure.in Sat Oct 24 18:29:37 1992
***************
*** 20,25 ****
--- 20,27 ----
sco*) host_makefile_frag=config/mh-sco ;;
irix4) host_makefile_frag=config/mh-irix4 ;;
linux) host_makefile_frag=config/mh-linux ;;
+ bsd) host_makefile_frag=config/mh-bsd ;;
+ bsdi) host_makefile_frag=config/mh-bsdi ;;
ultrix*)
case "${host_cpu}" in
mips) host_makefile_frag=config/mh-decstation ;;
diff -rc libg++-2.2.orig/libg++/configure.in libg++-2.2/libg++/configure.in
*** libg++-2.2.orig/libg++/configure.in Fri Jun 26 12:32:57 1992
--- libg++-2.2/libg++/configure.in Sat Oct 24 18:22:41 1992
***************
*** 14,19 ****
--- 14,20 ----
i386 | i486)
case "${host_os}" in
linux) my_host=linux ;;
+ bsdi) my_host=bsdi ;;
*) ;;
esac
;;
diff -rc libg++-2.2.orig/libg++/g++-include/grp.h libg++-2.2/libg++/g++-include/grp.h
*** libg++-2.2.orig/libg++/g++-include/grp.h Thu Feb 6 16:44:03 1992
--- libg++-2.2/libg++/g++-include/grp.h Sat Oct 24 18:22:42 1992
***************
*** 28,34 ****
extern struct group* fgetgrent(FILE*);
extern struct group* getgrgid(int);
extern struct group* getgrnam(const char*);
! extern void setgrent();
extern void endgrent();

#endif
--- 28,34 ----
extern struct group* fgetgrent(FILE*);
extern struct group* getgrgid(int);
extern struct group* getgrnam(const char*);
! extern int setgrent();
extern void endgrent();

#endif
diff -rc libg++-2.2.orig/libg++/g++-include/memory.h libg++-2.2/libg++/g++-include/memory.h
*** libg++-2.2.orig/libg++/g++-include/memory.h Thu Apr 30 14:04:14 1992
--- libg++-2.2/libg++/g++-include/memory.h Sat Oct 24 18:22:42 1992
***************
*** 15,21 ****
void* memmove _G_ARGS((void*, const void*, _G_size_t));
void* memset _G_ARGS((void*, int, _G_size_t));
int ffs _G_ARGS((int));
! _G_size_t getpagesize _G_ARGS((void));
void* valloc _G_ARGS((_G_size_t));

void bcopy _G_ARGS((const void*, void*, _G_size_t));
--- 15,21 ----
void* memmove _G_ARGS((void*, const void*, _G_size_t));
void* memset _G_ARGS((void*, int, _G_size_t));
int ffs _G_ARGS((int));
! int getpagesize _G_ARGS((void));
void* valloc _G_ARGS((_G_size_t));

void bcopy _G_ARGS((const void*, void*, _G_size_t));
diff -rc libg++-2.2.orig/libg++/g++-include/signal.h libg++-2.2/libg++/g++-include/signal.h
*** libg++-2.2.orig/libg++/g++-include/signal.h Fri May 29 13:15:44 1992
--- libg++-2.2/libg++/g++-include/signal.h Sat Oct 24 18:22:42 1992
***************
*** 45,53 ****
extern SSignalHandler ssignal _G_ARGS((int sig, SSignalHandler action));
extern int gsignal _G_ARGS((int sig));
extern int kill _G_ARGS((_G_pid_t pid, int sig));
! extern int killpg _G_ARGS((int, int));
extern int siginterrupt _G_ARGS((int, int));
! extern void psignal _G_ARGS((unsigned, char*));

#ifndef hpux // Interviews folks claim that hpux doesn't like these
extern int sigsetmask _G_ARGS((int mask));
--- 45,53 ----
extern SSignalHandler ssignal _G_ARGS((int sig, SSignalHandler action));
extern int gsignal _G_ARGS((int sig));
extern int kill _G_ARGS((_G_pid_t pid, int sig));
! extern int killpg _G_ARGS((short int, int));
extern int siginterrupt _G_ARGS((int, int));
! extern void psignal _G_ARGS((unsigned, const char*));

#ifndef hpux // Interviews folks claim that hpux doesn't like these
extern int sigsetmask _G_ARGS((int mask));
diff -rc libg++-2.2.orig/libg++/g++-include/stdio.h libg++-2.2/libg++/g++-include/stdio.h
*** libg++-2.2.orig/libg++/g++-include/stdio.h Fri May 29 16:11:40 1992
--- libg++-2.2/libg++/g++-include/stdio.h Sat Oct 24 18:22:43 1992
***************
*** 113,119 ****
FILE* fdopen(int, const char*);
int fflush(FILE*);
int fgetc(FILE*);
! char* fgets(char*, int, FILE *);
FILE* fopen(const char*, const char*);
int fprintf(FILE*, const char* ...);
int fputc(int, FILE*);
--- 113,119 ----
FILE* fdopen(int, const char*);
int fflush(FILE*);
int fgetc(FILE*);
! char* fgets(char*, unsigned int, FILE *);
FILE* fopen(const char*, const char*);
int fprintf(FILE*, const char* ...);
int fputc(int, FILE*);
diff -rc libg++-2.2.orig/libg++/g++-include/sys/socket.h libg++-2.2/libg++/g++-include/sys/socket.h
*** libg++-2.2.orig/libg++/g++-include/sys/socket.h Wed Jun 17 18:41:56 1992
--- libg++-2.2/libg++/g++-include/sys/socket.h Sat Oct 24 18:22:45 1992
***************
*** 19,29 ****
#define __libgxx_sys_socket_h 1

// void* in select, since different systems use int* or fd_set*
! int select _G_ARGS((int, void*, void*, void*, struct timeval*));

int accept _G_ARGS((int, struct sockaddr*, int*));
! int bind _G_ARGS((int, const void*, int));
! int connect _G_ARGS((int, struct sockaddr*, int));
int getsockname _G_ARGS((int, struct sockaddr*, int*));
int getpeername _G_ARGS((int, struct sockaddr*, int*));
int getsockopt(int, int, int, void*, int*);
--- 19,29 ----
#define __libgxx_sys_socket_h 1

// void* in select, since different systems use int* or fd_set*
! int select _G_ARGS((int, struct fd_set*, struct fd_set*, struct fd_set*, struct timeval*));

int accept _G_ARGS((int, struct sockaddr*, int*));
! int bind _G_ARGS((int, const struct sockaddr*, int));
! int connect _G_ARGS((int, const struct sockaddr*, int));
int getsockname _G_ARGS((int, struct sockaddr*, int*));
int getpeername _G_ARGS((int, struct sockaddr*, int*));
int getsockopt(int, int, int, void*, int*);
***************
*** 30,43 ****
int listen(int, int);
int rcmd _G_ARGS((char**, int, const char*, const char*, const char*, int*));
int recv(int, void*, int, int);
! int recvfrom _G_ARGS((int, void*, int, int, void*, int *));
int recvmsg(int, struct msghdr*, int);
int rexec(char**, int, const char*, const char*, const char*, int*);
int rresvport(int*);
int send _G_ARGS((int, const void*, int, int));
! int sendto _G_ARGS((int, const void*, int, int, void*, int));
int sendmsg _G_ARGS((int, const struct msghdr*, int));
! int setsockopt _G_ARGS((int, int, int, const char*, int));
int shutdown(int, int);
int socket(int, int, int);
int socketpair(int, int, int, int sv[2]);
--- 30,43 ----
int listen(int, int);
int rcmd _G_ARGS((char**, int, const char*, const char*, const char*, int*));
int recv(int, void*, int, int);
! int recvfrom _G_ARGS((int, void*, int, int, struct sockaddr*, int *));
int recvmsg(int, struct msghdr*, int);
int rexec(char**, int, const char*, const char*, const char*, int*);
int rresvport(int*);
int send _G_ARGS((int, const void*, int, int));
! int sendto _G_ARGS((int, const void*, int, int, const struct sockaddr*, int));
int sendmsg _G_ARGS((int, const struct msghdr*, int));
! int setsockopt _G_ARGS((int, int, int, const void*, int));
int shutdown(int, int);
int socket(int, int, int);
int socketpair(int, int, int, int sv[2]);
diff -rc libg++-2.2.orig/libg++/g++-include/sys/wait.h libg++-2.2/libg++/g++-include/sys/wait.h
*** libg++-2.2.orig/libg++/g++-include/sys/wait.h Wed Jun 3 23:23:06 1992
--- libg++-2.2/libg++/g++-include/sys/wait.h Sat Oct 24 18:22:46 1992
***************
*** 31,37 ****
extern _G_pid_t wait _G_ARGS((int*));
extern _G_pid_t waitpid _G_ARGS((_G_pid_t, int*, int));
extern _G_pid_t wait3 _G_ARGS((int*, int options, struct rusage*));
! extern _G_pid_t wait4 _G_ARGS((int, int*, int, struct rusage*));
#endif
}

--- 31,37 ----
extern _G_pid_t wait _G_ARGS((int*));
extern _G_pid_t waitpid _G_ARGS((_G_pid_t, int*, int));
extern _G_pid_t wait3 _G_ARGS((int*, int options, struct rusage*));
! extern _G_pid_t wait4 _G_ARGS((short int, int*, int, struct rusage*));
#endif
}

diff -rc libg++-2.2.orig/libg++/g++-include/time.h libg++-2.2/libg++/g++-include/time.h
*** libg++-2.2.orig/libg++/g++-include/time.h Wed Jun 17 18:47:16 1992
--- libg++-2.2/libg++/g++-include/time.h Sat Oct 24 18:22:46 1992
***************
*** 94,101 ****
#endif
_G_time_t time(_G_time_t*);
unsigned ualarm(unsigned, unsigned);
! unsigned usleep(unsigned);
! void profil _G_ARGS((unsigned short*, _G_size_t, unsigned int, unsigned));

#endif
}
--- 94,101 ----
#endif
_G_time_t time(_G_time_t*);
unsigned ualarm(unsigned, unsigned);
! void usleep(unsigned);
! int profil _G_ARGS((char*, int, int, int));

#endif
}
diff -rc libg++-2.2.orig/libg++/g++-include/unistd.h libg++-2.2/libg++/g++-include/unistd.h
*** libg++-2.2.orig/libg++/g++-include/unistd.h Fri Jun 19 23:13:42 1992
--- libg++-2.2/libg++/g++-include/unistd.h Sat Oct 24 18:22:57 1992
***************
*** 65,71 ****
#endif

extern unsigned alarm _G_ARGS((unsigned));
! extern int brk _G_ARGS((void*));
extern int chdir _G_ARGS((const char*));
extern int chmod _G_ARGS((const char*, _G_mode_t));
extern int chown (const char*, _G_uid_t, _G_gid_t);
--- 65,71 ----
#endif

extern unsigned alarm _G_ARGS((unsigned));
! extern char* brk _G_ARGS((const char*));
extern int chdir _G_ARGS((const char*));
extern int chmod _G_ARGS((const char*, _G_mode_t));
extern int chown (const char*, _G_uid_t, _G_gid_t);
***************
*** 73,87 ****
extern char* crypt _G_ARGS((const char*, const char*));
extern int dup _G_ARGS((int));
extern int dup2 _G_ARGS((int, int));
! extern void encrypt _G_ARGS((char*, int));
extern int execl (const char*, const char *, ...);
extern int execle (const char*, const char *, ...);
extern int execlp (const char*, const char*, ...);
! extern int exect _G_ARGS((const char*, const char**, char**));
! extern int execv _G_ARGS((const char*, const * char *));
! extern int execve _G_ARGS((const char*, const * char *, char * const *));
! extern int execvp _G_ARGS((const char*, const * char *));
! extern int fchown (int, _G_uid_t, _G_gid_t);
extern _G_pid_t fork _G_ARGS((void));
extern int fsync _G_ARGS((int));
extern int ftruncate _G_ARGS((int, _G_off_t));
--- 73,87 ----
extern char* crypt _G_ARGS((const char*, const char*));
extern int dup _G_ARGS((int));
extern int dup2 _G_ARGS((int, int));
! extern int encrypt _G_ARGS((char*, int));
extern int execl (const char*, const char *, ...);
extern int execle (const char*, const char *, ...);
extern int execlp (const char*, const char*, ...);
! extern int exect _G_ARGS((const char*, char * const *, char* const *));
! extern int execv _G_ARGS((const char*, char * const *));
! extern int execve _G_ARGS((const char*, char * const *, char * const *));
! extern int execvp _G_ARGS((const char*, char * const *));
! extern int fchown (int, int, int);
extern _G_pid_t fork _G_ARGS((void));
extern int fsync _G_ARGS((int));
extern int ftruncate _G_ARGS((int, _G_off_t));
***************
*** 88,94 ****
extern char* getcwd _G_ARGS((char*, _G_size_t));
extern int getdomainname _G_ARGS((char*, int));
extern int getdtablesize _G_ARGS((void));
! extern int getgroups _G_ARGS((int, _G_gid_t*));
extern _G_uid_t geteuid _G_ARGS((void));
extern _G_gid_t getegid _G_ARGS((void));
extern _G_gid_t getgid _G_ARGS((void));
--- 88,94 ----
extern char* getcwd _G_ARGS((char*, _G_size_t));
extern int getdomainname _G_ARGS((char*, int));
extern int getdtablesize _G_ARGS((void));
! extern int getgroups _G_ARGS((int, int*));
extern _G_uid_t geteuid _G_ARGS((void));
extern _G_gid_t getegid _G_ARGS((void));
extern _G_gid_t getgid _G_ARGS((void));
***************
*** 100,106 ****
extern char* getlogin _G_ARGS((void));
extern char* getpass _G_ARGS((const char*));
extern _G_uid_t getuid _G_ARGS((void));
! extern int ioctl (int, int, ... );
extern int isatty _G_ARGS((int));
extern int link _G_ARGS((const char*, const char*));
extern int mkstemp _G_ARGS((char*));
--- 100,106 ----
extern char* getlogin _G_ARGS((void));
extern char* getpass _G_ARGS((const char*));
extern _G_uid_t getuid _G_ARGS((void));
! extern int ioctl (int, long unsigned int, ... );
extern int isatty _G_ARGS((int));
extern int link _G_ARGS((const char*, const char*));
extern int mkstemp _G_ARGS((char*));
***************
*** 111,117 ****
extern int readlink _G_ARGS((const char*, char*, int));
extern int rename _G_ARGS((const char*, const char*));
extern int rmdir _G_ARGS((const char*));
! extern void* sbrk _G_ARGS((int));
extern int syscall _G_ARGS((int, ...));
extern int setgid (_G_gid_t);
extern int sethostname _G_ARGS((const char*, int));
--- 111,117 ----
extern int readlink _G_ARGS((const char*, char*, int));
extern int rename _G_ARGS((const char*, const char*));
extern int rmdir _G_ARGS((const char*));
! extern char* sbrk _G_ARGS((int));
extern int syscall _G_ARGS((int, ...));
extern int setgid (_G_gid_t);
extern int sethostname _G_ARGS((const char*, int));
***************
*** 119,125 ****
extern _G_pid_t setpgrp _G_ARGS((void));
extern _G_pid_t setsid _G_ARGS((void));
#else
! extern _G_pid_t setpgrp _G_ARGS((_G_pid_t, _G_pid_t));
#endif
extern int setregid _G_ARGS((int, int));
extern int setreuid _G_ARGS((int, int));
--- 119,125 ----
extern _G_pid_t setpgrp _G_ARGS((void));
extern _G_pid_t setsid _G_ARGS((void));
#else
! extern int setpgrp _G_ARGS((_G_pid_t, _G_pid_t));
#endif
extern int setregid _G_ARGS((int, int));
extern int setreuid _G_ARGS((int, int));
***************
*** 133,139 ****
extern int ttyslot _G_ARGS((void));
//extern int umask _G_ARGS((int)); /* commented out for now; wrong for SunOs4.1 */
extern int unlink _G_ARGS((const char*));
! extern _G_pid_t vfork _G_ARGS((void));
extern int vadvise _G_ARGS((int));
extern int vhangup _G_ARGS((void));
extern _G_off_t lseek _G_ARGS((int, long, int));
--- 133,139 ----
extern int ttyslot _G_ARGS((void));
//extern int umask _G_ARGS((int)); /* commented out for now; wrong for SunOs4.1 */
extern int unlink _G_ARGS((const char*));
! extern int vfork _G_ARGS((void));
extern int vadvise _G_ARGS((int));
extern int vhangup _G_ARGS((void));
extern _G_off_t lseek _G_ARGS((int, long, int));
diff -rc libg++-2.2.orig/libg++/src/regex.h libg++-2.2/libg++/src/regex.h
*** libg++-2.2.orig/libg++/src/regex.h Wed Jun 3 17:16:02 1992
--- libg++-2.2/libg++/src/regex.h Sat Oct 24 18:33:12 1992
***************
*** 237,244 ****
--- 237,248 ----
char *, int, int, struct re_registers *, int);

/* 4.2 bsd compatibility. */
+ #if !defined(__bsdi__)
+ #if !defined (__386BSD__)
extern char *re_comp (char *);
extern int re_exec (char *);
+ #endif
+ #endif

#else /* !__STDC__ */

diff -rc libg++-2.2.orig/libg++/utils/gen-params libg++-2.2/libg++/utils/gen-params
*** libg++-2.2.orig/libg++/utils/gen-params Fri Jun 26 12:29:41 1992
--- libg++-2.2/libg++/utils/gen-params Sat Oct 24 18:31:34 1992
***************
*** 284,289 ****
--- 284,304 ----
#define ${macro_prefix}NULL ${NULL-0 /* default */}
!EOF!

+ cat >dummy.c <<!EOF!
+ #if !defined(__bsdi__)
+ #if !defined (__386BSD__)
+ this should fail
+ #endif
+ #endif
+ main()
+ {}
+ !EOF!
+
+ if ${CC} -c dummy.c >/dev/null 2>&1 ; then
+ echo "#define ${macro_prefix}USE_PROTOS"
+ else
+ echo "/* #define ${macro_prefix}USE_PROTOS */"
+ fi

cat <<!EOF!
#ifdef ${macro_prefix}USE_PROTOS

L. Jonas Olsson

unread,
Oct 25, 1992, 6:04:27 PM10/25/92
to
I'm here posting some patches for make-3.62 that I have used to
successfully compile libg++. The patches are derived from patches
to bsdi that are available at bsdi.com. The resulting make works
fine, but there is a hidden problem with setgid. The fix to this
is to install make without any setguid bit and not use any load
average.
Hopefully other people that have ported make-3.62 will correct

the errors I've made/overlooked.
These patches would not have been done without the ref machine
that Julian Elischer has so kindly provided.

Jonas Olsson
l...@po.cwru.edu

Procedure:
==========

get make-3.62 from a favorite site
zcat make-3.62.tar.Z|tar xvf -
patch -p0 < make-3.62.diffs
cd make-3.62
make
make install

Diff File:
==========

<start of make-3.62.diffs>
diff -rc make-3.62.orig/Makefile make-3.62/Makefile
*** make-3.62.orig/Makefile Tue Oct 29 18:04:26 1991
--- make-3.62/Makefile Sun Oct 25 14:52:47 1992
***************
*** 38,45 ****
# without complaint but produce losing code,
# so beware.
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines =
!
# Define these for your system as follows:
# -DUMAX Encore UMAX
# -DUMAX_43 Encore UMAX 4.3 (also define UMAX)
--- 38,44 ----
# without complaint but produce losing code,
# so beware.
# NeXT 1.0a uses an old version of GCC, which required -D__inline=inline.
! defines =-UPOSIX
# Define these for your system as follows:
# -DUMAX Encore UMAX
# -DUMAX_43 Encore UMAX 4.3 (also define UMAX)
***************
*** 52,58 ****
# Define:
# -DNLIST_NAME_UNION If `struct nlist' has a n_un member.
# -DNLIST_NAME_ARRAY If `n_name' is an array.
! LOAD_AVG =

# If you don't want archive support, comment these out.
ARCHIVES = arscan.o ar.o
--- 51,57 ----
# Define:
# -DNLIST_NAME_UNION If `struct nlist' has a n_un member.
# -DNLIST_NAME_ARRAY If `n_name' is an array.
! LOAD_AVG =-DNO_LDAV

# If you don't want archive support, comment these out.
ARCHIVES = arscan.o ar.o
***************
*** 80,92 ****
# Comment this out if POSIX.2 glob is installed on your system
# (it's in the GNU C Library, so if you're using that, this is
# not needed at all.)
! globdep = glob/libglob.a

# Library containing POSIX.2 `glob' function.
# Comment this line out if it's in the C library (which is the case if you
# are using the GNU C Library), or change it to the appropriate file name
# or -l switch.
! globlib = $(globdep)

# Name under which to install GNU make.
instname = make
--- 79,91 ----
# Comment this out if POSIX.2 glob is installed on your system
# (it's in the GNU C Library, so if you're using that, this is
# not needed at all.)
! # globdep = glob/libglob.a

# Library containing POSIX.2 `glob' function.
# Comment this line out if it's in the C library (which is the case if you
# are using the GNU C Library), or change it to the appropriate file name
# or -l switch.
! # globlib = $(globdep)

# Name under which to install GNU make.
instname = make
***************
*** 160,167 ****
$(bindir)/$(instname): make
cp make $@.new
# These are necessary for load-average checking to work on most Unix machines.
! chgrp $(group) $@.new
! chmod g+s $@.new
mv $@.new $@

$(mandir)/$(instname).$(manext): make.man
--- 159,166 ----
$(bindir)/$(instname): make
cp make $@.new
# These are necessary for load-average checking to work on most Unix machines.
! # chgrp $(group) $@.new
! # chmod g+s $@.new
mv $@.new $@

$(mandir)/$(instname).$(manext): make.man
Only in make-3.62: Makefile~
diff -rc make-3.62.orig/arscan.c make-3.62/arscan.c
*** make-3.62.orig/arscan.c Tue Oct 22 18:30:25 1991
--- make-3.62/arscan.c Sat Oct 24 19:16:27 1992
***************
*** 95,101 ****
--- 95,105 ----
#if defined(__GNU_LIBRARY__) || defined(POSIX) || defined(_IBMR2)
#include <unistd.h>
#else
+ #ifndef __386BSD__
extern int read (), open (), close (), write (), fstat ();
+ #else
+ extern int read (), close (), write (), fstat ();
+ #endif
extern long int lseek (), atol ();
extern int atoi ();
#endif
diff -rc make-3.62.orig/job.c make-3.62/job.c
*** make-3.62.orig/job.c Thu Oct 24 14:58:33 1991
--- make-3.62/job.c Sat Oct 24 19:03:10 1992
***************
*** 38,44 ****
--- 38,46 ----
#else /* Not POSIX. */
#ifndef USG
#include <sys/param.h>
+ #ifndef __386BSD__
#define NGROUPS_MAX NGROUPS
+ #endif
#endif /* Not USG. */
#endif /* POSIX. */

***************
*** 55,67 ****
--- 57,73 ----
#include <sys/resource.h>

#ifndef wait3
+ #ifndef __386BSD__
extern int wait3 ();
#endif
+ #endif
#define WAIT_NOHANG(status) \
wait3((union wait *) (status), WNOHANG, (struct rusage *) 0)

#if !defined (wait) && !defined (POSIX)
+ #ifndef __386BSD__
extern int wait ();
+ #endif
#endif
#endif /* HAVE_SYS_WAIT || !USG */
#endif /* POSIX. */
diff -rc make-3.62.orig/make.h make-3.62/make.h
*** make-3.62.orig/make.h Sat Oct 26 14:19:58 1991
--- make-3.62/make.h Sat Oct 24 19:13:12 1992
***************
*** 222,233 ****
extern int sigsetmask ();
extern int sigblock ();
#endif
extern int kill ();
extern void abort (), exit ();
extern int unlink (), stat ();
extern void qsort ();
extern int atoi ();
! extern int pipe (), close (), read (), write (), open ();
extern long int lseek ();
extern char *ctime ();
#endif /* GNU C library or POSIX. */
--- 222,238 ----
extern int sigsetmask ();
extern int sigblock ();
#endif
+ #ifndef __386BSD__
extern int kill ();
+ #endif
extern void abort (), exit ();
extern int unlink (), stat ();
extern void qsort ();
extern int atoi ();
! extern int pipe (), close (), read (), write ();
! #ifndef __386BSD__
! extern int open ();
! #endif
extern long int lseek ();
extern char *ctime ();
#endif /* GNU C library or POSIX. */
***************
*** 245,251 ****
--- 250,258 ----

#if !defined(__GNU_LIBRARY__) && (!defined(vfork) || !defined(POSIX))
#ifdef POSIX
+ #ifndef __386BSD__
extern pid_t vfork ();
+ #endif
#else
extern int vfork ();
#endif
diff -rc make-3.62.orig/read.c make-3.62/read.c
*** make-3.62.orig/read.c Thu Oct 10 13:20:54 1991
--- make-3.62/read.c Sat Oct 24 18:50:10 1992
***************
*** 25,31 ****
--- 25,35 ----
#ifdef __GNU_LIBRARY__
#include <glob.h>
#else
+ #ifndef __386BSD__
#include "glob/glob.h"
+ #else
+ #include <glob.h>
+ #endif /*__386BSD__*/
#endif

#include <pwd.h>

<end of make-3.62.diffs>

Stewart Lilley

unread,
Oct 24, 1992, 3:16:28 PM10/24/92
to
To everyone who has been pulling their hair out trying to install both
BSD386 and DOS on their hard drive, and has been trying to figure out
this long discussion about translation, BIOS, booting, etc., here's
help. I have a Connor 120 IDE (114MB formatted capacity- not big enough :)
and AMI BIOS - apparently this is one of the worst combinations for
installing 386BSD. I tried many, many different things and started
over numerous times, but I finally got it to work and I believe this
procedure will work for others as it overcomes the translation
problems by putting 386BSD right at the start of the disk. In this
post I give explicit examples of what I did, so you can do likewise
on your system without having to figure things out from scratch like
I did. The numbers I give are valid for my system only, unless you
also have a Connor 120 and want a 32MB DOS partition your numbers
WILL BE DIFFERENT. I certainly hope this procedure will work for
everyone, but I can't guarantee it as I'm still learning (a week ago
I hadn't even heard of 386BSD). It worked for me; your mileage may
vary. If anyone knows of a good deal on a larger hard drive (330 or
540 would be nice) or has one that could use a new home, please let
me know. I don't even have enough room to extract all of the utilities
much less the source and the X stuff.

1. Low-level format the disk from the CMOS SETUP. Obviously, save any
of your DOS stuff you don't have on disk and want to keep.
2. Boot off of the dist.fs floppy (I used the unpatched ones in the
/pub/386BSD/386bsd-0.1/bootables directory on agate.berkeley.edu)
and run the install program: tell it to use your whole disk.
3. After install has done its installing, shutdown and boot off of the
fixit.fs floppy. Make the floppy writable with mount -u /dev/fd0a /
and run this command: disklabel -r wd0 > /tmp/dlwd0. (don't type
the period) You may get an error message about the filesystem
being full and not creating the file. I got this message every
time I tried to write to the floppy, but the writes seemed to work
anyhow. Basically, ignore it. I was using 3.5" disks.
4. Use vi to look at the file /tmp/dlwd0. It should have information
about your disk and how it's partitioned. Some people have posted
about using your drive's "native geometry." I didn't change a
thing in the CMOS parameters. I think that my drive IS translated,
but since you're installing BSD at the beginning of the disk it
still works translated.
5. Looking at the file /tmp/dlwd0, you should first check to make sure
that the heads, sectors, cylinders, and other physical information
agrees with the parameters in the CMOS. This was not a problem
for me if I installed BSD first on a clean low-level formatted
drive: otherwise it would be corrupted. Figure out how much room
you want for DOS: I gave it 32MB. using the "sectors/cylinder"
information, turn this into a number of cylinders, then round up.
Now multiply by the "sectors/cylinder" to get a number of sectors
to allocate to DOS that will start and end on a cylinder boundary.
6. Your disklabel should have three partitions: a, b, and c. For my
drive it looked like this:

[other parameters]
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 9
sectors/cylinder: 288
cylinders: 813
[other parameters]
3 partitions:
a: 223488 0 4.2BSD 1024 8192 16
b: 10000 223644 unused 0 0 0
c: 234144 0 unused 0 0 0

the 'a' partition is your file space, the 'b' partition is your swap
space, and the 'c' partition represents your entire 386BSD space.
What I did: 32MB for DOS / ( 288 sectors/cylinder * 512 bytes/sector)
= 227.5555 cylinders for DOS (remember that 1MB = 1048576 bytes). Make
this 228. Subtract this from 813 (the total number of cylinders on the
disk): 813 - 228 = 585. Therefore DOS should start at cylinder 585
and continue for 228 cylinders to the end of the disk at cylinder 813.
That means 386BSD must end at cylinder 584. Just to be safe I put a
cylinder of free space between them, so my 386BSD ends at cylinder 583.
that means the 'size' entry in partition 'c' should be: 583 cylinders *
288 sectors/cylinder = 167904 sectors. So I changed that entry to
167904. Next I rounded the swap space to an even number of cylinders:
35 cylinders = 10080. If the swap space ends at 167904 and is 10080
sectors long, it must have an offset of 167904 - 10080 = 157824. I
put 10080 and 157824 in the 'size' and 'offset' fields of partition
'b'. By similar reasoning, the 'a' partition must end where the swap
partition starts, so it must be 157824 sectors long: I put this in the
'size' field. Also, if the 'type' field of partition 'b' does not
read 'swap', change it to do so.

7. Do a :wq to exit out of vi. Due to the filesystem problem, vi
keeps putting messages about not being able to write to the disk
on the screen at inappropriate locations. Just do a CTRL-L to
get your normal screen back. It also warns you that it was
unable to write to the file when you exit. These warnings are
just bogus: for me it wrote the file just fine. If you're not
sure whether vi properly saved the changed file, just use cat to
display it.
8. You should now have a /tmp/dlwd0 file that contains what your
disklabel should be. However, the dist.fs disk install program
has already messed up everything, so do a shutdown and use your
CMOS setup to low-level format your disk again. You may be
tempted to boot off of the dist.fs disk and try the 'install'
again after fixing the disklabel, which you're about to do:
let me warn you that I tried many different ways of using that
intall program and whereever or however I tried it, it just
messed things up where I had to go back and start over. The
only exception to this was when I started from scratch and gave
it the whole disk.
9. Boot from the fixit.fs floppy and issue this command:
disklabel -R -r wd0 /tmp/dlwd0 /usr/mdec/wdboot /usr/mdec/bootwd
this will put the right disklabel on the disk and install the
bootstrap programs. Type 'sync' to make sure that the changes
are written immediately.
10. Use the newfs command to initialize the 'a' partition:
newfs /dev/rwd0a
11. (from here on it's in the FAQ) mount the 'a' partition under
/mnt: mount /dev/wd0a /mnt
12. Use cpio to copy the contents of the fixit floppy to the hard
drive:
cd /
ls | cpio -pdalmu /mnt
cd bin
ls | cpio -pdalmu /mnt/bin
cd ../sbin
ls | cpio -pdalmu /mnt/sbin ....
and keep doing this, cd to each directory, working your way down the
directory tree, and at each directory do the ls | cpio -pdalmu to the
corresponding directory under /mnt.

13. cp /usr/distbin/mount /mnt/mount
cp /usr/distbin/umount /mnt/umount
14. Shutdown and reboot off the hard drive.
15. Do an fsck -p /dev/rwd0a to make sure the filesystem is correct.
16. Make the hard drive writable with mount -u /dev/wd0a /
17. Insert the dist.fs floppy and mount /dev/fd0a /mnt
18. cd /mnt and issue this command exactly as shown:
usr/bin/zcat etc/baselist.Z | usr/bin/cpio -pdalmu /
19. cd/ and issue this command exactly as shown:
/mnt/usr/bin/zcat /mnt/etc/baseutils.cpio.Z | /mnt/usr/bin/cpio -idalmu
20. umount /mnt
21. Shutdown and reboot from the hard drive.
22. Copy the bindist files (bin01.*) to /tmp. First cd /tmp, then
for each floppy do: mread "a:*.*" . (type the period)
23. When this is done, cd /, and issue this command:
cat /tmp/bin01.* | uncompress | cpio -idalmu
24. Put your hostname in the file /etc/myname.
25. Use vi to make the file /etc/fstab: It should look like

/dev/wd0a / ufs rw 1 1
/dev/wd0b / ufs sw 1 2

This file tells the system how to mount the partitions at bootup.

26. vi the file /etc/disktab and find the entry that corresponds to
the message you get at boot time that tells you what kind of
hard drive BSD thinks you have (my drive is a Connor 120, BSD
thinks I have a Quantum 120, it seems to work just fine). Set
the partition parameters to be the same as the ones you put in
the disklabel (the disktab file has a bunch of comments that
tell you exactly which parameters you need to change).
27. Shutdown and reboot off the hard drive: the auto-reboot should
take over and you'll be asked for a login- just login as root,
no password. Congratulations, you now have BSD386 installed
and working on your hard drive!
28. Now you need to get DOS working. Use the Norton Utilities (nu)
and edit absolute sector, drive C:, the first sector on the disk.
this is the partition table, and it should be blank. Make an
entry of type BIGDOS, bootable, starting and ending at the right
places. For my case this was:

System Boot Side Cyl Sec Side Cyl Sec Rel #
BIGDOS Y 0 585 1 8 813 32 168480 65952

Now boot from the MS-DOS distribution floppies. MS-DOS should find
this partition, format it, and install in it just fine.

Any comments, corrections, or suggestions are welcome. If you have
questions, or if this doesn't work for you, I suggest you talk to
someone more knowledgeable about 386BSD than I am.

--
**********************************************************************
* Stewart Lilley * The meek shall inherit the earth: *
* st...@ccwf.cc.utexas.edu * the rest of us will head for the stars. *
**********************************************************************
--
**********************************************************************
* Stewart Lilley * The meek shall inherit the earth: *
* st...@ccwf.cc.utexas.edu * the rest of us will head for the stars. *
**********************************************************************

A Wizard of Earth C

unread,
Oct 26, 1992, 3:32:10 PM10/26/92
to

This is the AMI/HP Vectra/AT&T 386SX-wgs behaviour. While it may be typical
of a newer BIOS, it certainly isn't typical of, for instance, a 1988 Everex
Step/16. I think you are confusing behaviour of an old machine with a
"smart" IDE card and a newer machine with a "smart" BIOS but "dumb" IDE
card. With a "smart" IDE card, you set the BIOS to the closest value you
can get which will allow you to access the largest number of sectors less
than the disk size. As part of power on cycle, the card is made aware of
the translation it should do (if any) when the CMOS settings don't match
the drive parameters. This is basically a soft sector-number to sector-number
translation based on sector*track*cylinder*head (so that sector n from the
start of the disk is sector n from the start of the disk). Controllers like
this ran about $80 and were the only way to get IDE drives to work in some
machines (given their hardware translation occurring at the same time)
until Maxtor came out with a four translation jumperable drive; still, it's
possible that your CMOS table can't match one of the provided geometries
and you won't be able to use the disk with the older hardware without a
"smart" controller.


>I can believe that there may have been early IDE drives which did not do
>mapping in the controller, but these would be quite rare these days.
>Every IDE drive I have encountered uses controller mapping - most of
>them do not use an constant number of sectors/track, making BIOS level
>mapping very difficult. Except for timing problems with some drives -
>Quantams in particular - IDE drives can be fitted to ATs with a BIOS
>written for ISA MFM controllers without any problems.

Well, not that anyone is really running 386BSD on AT's (which are 286's),
I think the rarity you predict has been proven out by the number of people
who are only unable to install 386BSD and DOS on the same drive, but for
which installing 386BSD to take the whole drive seems to work.

>> Terry also feels that, were the translation 100% transparent, no one
>> trying to load both DOS and 386BSD on an IDE drive would ever have
>> problems related to >> translation. Terry wonders *why* the software
>> is sensitive to the "transparent" translation of cylinder boundries if
>> Christoph is right?
>At a guess - I'm not running 386BSD - the disc label contains different
>parameters than the geometry set by the BIOS and once the OS starts up,
>it remaps the drive to a new and incompatible configuration.

The problem is that the OS runs in protected mode with drivers that can't
use the BIOS, and part of the startup to get the disk control information
has to ask the controller not the BIOS.

Old cards cause it to die because soft translation requires that the BIOS
entry points be used.

New cards cause it to die because either the hard translation doesn't match
one of the avilable geometries, or more frequently, as Frank MacLauglin
proved, the initialization sequence followed by 386BSD (whose driver can't
distinguish between IDE and MFM or RLL wd controllers) causes the drive
to be used under it's reported "native" geometry.

People with several models of Maxtor drives and one model of Quantum drive
that I know about wonder what the fuss is, because their drives report
their translated geometries -- so the reset doesn't effect them -- they
have no problems, just like the RLL and MFM users. Thus they can run
with both DOS and 386BSD on the drive without ever seeing the problems
from the "wrong" geometry being used by 386BSD.

When I figure out something from the Byte article that will let me get
rid of the "translation shut off" or hack the wd driver to not query the
original geometry as part of init (thus breaking all installations using
> 1023 cylinders on non-IDE drives), I'll post the "fixes" and upload a
dist.fs to agate (using the new kernel will hose you if you already have
a working IDE drive unless it is one of the Maxtors or the Quantum, so
this will be a "new installation only" fix).

A Wizard of Earth C

unread,
Oct 26, 1992, 3:35:01 PM10/26/92
to
In article <720052...@grendel.demon.co.uk> j...@grendel.demon.co.uk (Jim Segrave) writes:

This is the AMI/HP Vectra/AT&T 386SX-wgs behaviour. While it may be typical


of a newer BIOS, it certainly isn't typical of, for instance, a 1988 Everex
Step/16. I think you are confusing behaviour of an old machine with a
"smart" IDE card and a newer machine with a "smart" BIOS but "dumb" IDE
card. With a "smart" IDE card, you set the BIOS to the closest value you
can get which will allow you to access the largest number of sectors less
than the disk size. As part of power on cycle, the card is made aware of
the translation it should do (if any) when the CMOS settings don't match
the drive parameters. This is basically a soft sector-number to sector-number
translation based on sector*track*cylinder*head (so that sector n from the
start of the disk is sector n from the start of the disk). Controllers like
this ran about $80 and were the only way to get IDE drives to work in some
machines (given their hardware translation occurring at the same time)
until Maxtor came out with a four translation jumperable drive; still, it's
possible that your CMOS table can't match one of the provided geometries
and you won't be able to use the disk with the older hardware without a
"smart" controller.

>I can believe that there may have been early IDE drives which did not do
>mapping in the controller, but these would be quite rare these days.
>Every IDE drive I have encountered uses controller mapping - most of
>them do not use an constant number of sectors/track, making BIOS level
>mapping very difficult. Except for timing problems with some drives -
>Quantams in particular - IDE drives can be fitted to ATs with a BIOS
>written for ISA MFM controllers without any problems.

Well, not that anyone is really running 386BSD on AT's (which are 286's),


I think the rarity you predict has been proven out by the number of people
who are only unable to install 386BSD and DOS on the same drive, but for
which installing 386BSD to take the whole drive seems to work.

>> Terry also feels that, were the translation 100% transparent, no one


>> trying to load both DOS and 386BSD on an IDE drive would ever have
>> problems related to >> translation. Terry wonders *why* the software
>> is sensitive to the "transparent" translation of cylinder boundries if
>> Christoph is right?
>At a guess - I'm not running 386BSD - the disc label contains different
>parameters than the geometry set by the BIOS and once the OS starts up,
>it remaps the drive to a new and incompatible configuration.

The problem is that the OS runs in protected mode with drivers that can't


use the BIOS, and part of the startup to get the disk control information
has to ask the controller not the BIOS.

Old cards cause it to die because soft translation requires that the BIOS
entry points be used.

New cards cause it to die because either the hard translation doesn't match
one of the avilable geometries, or more frequently, as Frank MacLauglin
proved, the initialization sequence followed by 386BSD (whose driver can't
distinguish between IDE and MFM or RLL wd controllers) causes the drive
to be used under it's reported "native" geometry.

People with several models of Maxtor drives and one model of Quantum drive
that I know about wonder what the fuss is, because their drives report
their translated geometries -- so the reset doesn't effect them -- they
have no problems, just like the RLL and MFM users. Thus they can run
with both DOS and 386BSD on the drive without ever seeing the problems
from the "wrong" geometry being used by 386BSD.

When I figure out something from the Byte article that will let me get
rid of the "translation shut off" or hack the wd driver to not query the
original geometry as part of init (thus breaking all installations using
> 1023 cylinders on non-IDE drives), I'll post the "fixes" and upload a
dist.fs to agate (using the new kernel will hose you if you already have
a working IDE drive unless it is one of the Maxtors or the Quantum, so
this will be a "new installation only" fix).

Christoph Badura

unread,
Oct 26, 1992, 6:41:56 PM10/26/92
to
In <1992Oct25.1...@fcom.cc.utah.edu> te...@cs.weber.edu (A Wizard of Earth C) writes:

>In article <BwLop...@flatlin.ka.sub.org>, b...@flatlin.ka.sub.org (Christoph Badura) writes:
>|> Terry feels wrong. IDE translation is done "on the drive", because you
>|> can hook up translated IDE drives to machines that know zilch about
>|> IDE, because IDE didn't exist when their BIOS was programmed.

OK, so I probably should have put half a smiley behind the "feels".

>Terry feels this from disassembling the BIOS *on board* an IDE controller;
>one wonders how AMI BIOS drive type 47 works when the drive hardware only has
>access to the CMOS settings through it's controller firmware?

Sorry, drive type 47 works without support from any BIOS on the IDE
controller. If you use the controller BIOS, you set the CMOS drive
type to 0. At least on all controllers that I have seen, that do their
own translation (e.g. WD1006, WD1007, AHA232x, AHA154x, AHA152x,
AHA174x, DTC etc.).

>Terry also feels that, were the translation 100% transparent, no one trying to
>load both DOS and 386BSD on an IDE drive would ever have problems related to
>translation. Terry wonders *why* the software is sensitive to the "transparent"
>translation of cylinder boundries if Christoph is right?

The problems with translation come from BSD trying to run the disks in
untranslated mode. None of the other PC unixen try to do this and they
have no problems with DOS partitions.

A Wizard of Earth C

unread,
Oct 27, 1992, 1:42:46 PM10/27/92
to

This is ridiculous! "Transparent" means I can't tell that it's there; if
I can "turn it off" it's not "transparent" -- it's damn well opaque! Only
if I could not "turn it off" could you reasonably call it "transparent",
since there would be no way from software to puke it out. Now the
"zone recording" translation --- THAT'S "transparent".

I see four choices:

1) Use the whole drive for 386BSD with translation off.

2) Use a DOS partition table and hack the hell out of things so
that 386BSD can use it "untranslated" while everybody else
uses it "translated".

3) Set it up to operated "translated" when a DOS partition table
is present and "untranslated" when one isn't.

a) This requires the ability to tell the difference between
an IDE and a non-IDE controller do that the init routine
can be different for IDE.

b) Barring this, we have to change the "init" for all wd.c
using drives. We lose disk space in excess of 1023
cylinders for large MFM and RLL and ESDI drives if we
do this.

c) Ask the user what kind of drive it is and encode the
information in the boot; effectively doing (a).

4) Set it up to operate translated at all times (see 3 b). We still
lose a lot of disk space this way catering to the "abnormal" way
IDE's relate to the world.


I'm currently working on 3 (a). If this Fails, I'll work on 3 (c), because
it is better to penalize the IDE users for picking a non-conforming drive
than it is to break all existing installations on MFM, RLL, and ESDI drives
so that they can't use the boot/kernel code without reinstalling 386BSD.
If this fails, I go for 2 and suggest 1 to anyone who asks for advice. If
I can't make this work (no unused fields in the disk label for me to steal
to do it), I'll go (exceptionally reluctantly) for 4, breaking upgradability
of existing MFM, RLL, and ESDI installations so that new installations will
"just work".

In the case of software translations (like my old, old IDE controller in the
Everex Step/16, and yes, it has it's own BIOS) we're pretty much damned to
soloution 1.

Have we hashed over this thing enough?

Othman Ahmad

unread,
Oct 27, 1992, 9:39:06 PM10/27/92
to
A Wizard of Earth C (te...@cs.weber.edu) wrote:
: >
: >The problems with translation come from BSD trying to run the disks in

: >untranslated mode. None of the other PC unixen try to do this and they
: >have no problems with DOS partitions.
:
: This is ridiculous! "Transparent" means I can't tell that it's there; if
: I can "turn it off" it's not "transparent" -- it's damn well opaque! Only

How do you turn it off? You can't turn it off, just like ESDI or even SCSI.
Remember that IDE can be ESDI and SCSI inside the hard-disk.
It is something which you miss. The old expensive IDE controllers
are things of the past, it will never be required. Your old IDE controller
is junk. The bios in your IDE is just to cater for the missing geometry
table. Now bioses come with programmable geometry tables, of type 47.
You can't design for obsolete controllers. If their BIOSes cannot
support the programmable geometry, then upgrade the bios, do not have to
buy new IDE controllers. IDE definition is just a bunch of WIRES, and
ST506 command set.
You cannot turn off translation in IDE disks.
: if I could not "turn it off" could you reasonably call it "transparent",


: since there would be no way from software to puke it out. Now the

IT puke out because the translation parameters can be changed.
: "zone recording" translation --- THAT'S "transparent".

It must be transparent, or else 386bsd will never work h.
What you mean by translation is to use the default" geometry. Traslation
is still done but it uses the recommended geometry which may not be
compatible to DOS. Don't worry, even if the default is not acceptable by
dos, you can still use it but with some loss in capacity.

To find out the default geometry, use ide_conf.exe on DOS.
The program the BIOS for that geometry.

Nowadays, almost all new drives will use default geometry that DOS can use,
so do not worry. In fact this ide_conf is among the most useful utility
around. We do not have to go and hunt for the manufacturer to find out the
disk geometries.
:
: I see four choices:


:
: 1) Use the whole drive for 386BSD with translation off.

No need. Just use the default.
:
: 2) Use a DOS partition table and hack the hell out of things so


: that 386BSD can use it "untranslated" while everybody else
: uses it "translated".

Why bother when it is not necessary.

:
: 3) Set it up to operated "translated" when a DOS partition table


: is present and "untranslated" when one isn't.

Again no need. Why bother.
:
: a) This requires the ability to tell the difference between


: an IDE and a non-IDE controller do that the init routine
: can be different for IDE.
:
: b) Barring this, we have to change the "init" for all wd.c
: using drives. We lose disk space in excess of 1023
: cylinders for large MFM and RLL and ESDI drives if we
: do this.
:
: c) Ask the user what kind of drive it is and encode the
: information in the boot; effectively doing (a).
:
: 4) Set it up to operate translated at all times (see 3 b). We still
: lose a lot of disk space this way catering to the "abnormal" way
: IDE's relate to the world.

In ALL new drives, you do not lose any space at all. Only if you use old drives,
may be. I doubt it.

:
:
: I'm currently working on 3 (a). If this Fails, I'll work on 3 (c), because


: it is better to penalize the IDE users for picking a non-conforming drive
: than it is to break all existing installations on MFM, RLL, and ESDI drives
: so that they can't use the boot/kernel code without reinstalling 386BSD.
: If this fails, I go for 2 and suggest 1 to anyone who asks for advice. If
: I can't make this work (no unused fields in the disk label for me to steal
: to do it), I'll go (exceptionally reluctantly) for 4, breaking upgradability
: of existing MFM, RLL, and ESDI installations so that new installations will
: "just work".
:
: In the case of software translations (like my old, old IDE controller in the
: Everex Step/16, and yes, it has it's own BIOS) we're pretty much damned to
: soloution 1.

Why don't you change your ide controller and bios?

Terry, please note that the endless boot happened to my drives also, but
I solved it by putting a new bootblock, either using disklabel -w -r or
preferable use os-bs?

Why don't you try this first?

I suspect, your 386bsd partition occupy the beginneing cylinders. You
intend to install DOS at higer cylinder numbers. This causes the most problem,
because wdboot, gets its subsequent sectors from sectors 2-15 . The very
first sector, sector 1, is where the bootblk is, where it is used to switch
to "PROTECTED MODE". Without this 1st sector "wdboot", it will never go to
protected mode. However when you install os-bs, you will overide this bootblk.
You need to get it from somewhere else.

install in 386bsd, actually copies wdboot to a higher partition, and let
os-bs bootstrap it.

If you fail to install "wdboot" it to higher cyclinders, you will never be
able to boot 386bsd.

disklabel(by default) will not install it to rwd0a, only rwd0d.
I verified this.

You install it using disklabel -w -r wd0a
The new disklabel allows you to do this, unlike the old one.

Alternatively you can use dd or even cat .
:
: Have we hashed over this thing enough?
:
Why don't we settle on the installation techniques suggested by me
and some others, since we have installed DOS and 386bsd in all the recent
IDE hard-disks?

Your problem is exceptional, as a result of the desire to install
DOS at higher cyclinder numbers.

Can you settle on ide_conf, os-bs, and the installation instructions that
had been posted? At least for the time being.
At least the beginners will have something for them in the FAQ.


I'm trying to work on replacing all those with 386bsd, to make it an independent
software development.

My immediate concern is to be able to change harddisks and run 386bsd without
reprogramming the bios CMOS ram.
os-bs uses dos partition table instead of disklabel, which stored the
default geometry on disk, instead of on the BIOS ram. In this matter, 386bsd
is superior to BIOS method, after all 386bsd comes with its own bios.


--
Othman bin Ahmad, School of EEE,
Nanyang Technological University, Singapore 2263.
Internet Email: eoa...@ntuix.ntu.ac.sg
Bitnet Email: eoa...@ntuvax.bitnet

A Wizard of Earth C

unread,
Oct 29, 1992, 10:55:02 PM10/29/92
to
In article <1992Oct28.0...@ntuix.ntu.ac.sg>, eoa...@ntuix.ntu.ac.sg (Othman Ahmad) writes:
|> A Wizard of Earth C (te...@cs.weber.edu) wrote:
|> : >
|> : >The problems with translation come from BSD trying to run the disks in
|> : >untranslated mode. None of the other PC unixen try to do this and they
|> : >have no problems with DOS partitions.
|> :
|> : This is ridiculous! "Transparent" means I can't tell that it's there; if
|> : I can "turn it off" it's not "transparent" -- it's damn well opaque! Only
|>
|> How do you turn it off? You can't turn it off, just like ESDI or even SCSI.
|> Remember that IDE can be ESDI and SCSI inside the hard-disk.

I refer you to wdboot. SCO doesn't change the IDE drives from the translation
DOS sees. You can't "turn off" zone recording -- if there is more than one
possible translation mode which is software selectable, then the translation
isn't "transparent" to the software -- at the very least, the software doing
the selection can see the difference. So can ide_conf.exe. The problem is
386BSD trying to use it in a mode other than the cold-boot default mode.

|> You cannot turn off translation in IDE disks.

I don't care if you call it "turning it off" or "painting it blue". During
boot of 386BSD, the translation seen by software making calls to the disk
controller changes. This is bad. This is wrong. This should not be done.
This must stop. This is my option 4.

There are significant speed advantages to running in a "native" geometry; it
doesn't matter if you call this "translation off mode" or "yet another
translation mode". If you can, you should run untranslated, unless you don't
care about speed (in which case, I'll trade you a 386/16 for every 486/50 you
want to get rid of; I'll even pay postage). The methods we can use to
accomplish this are my options 1, 2, and 3, and are dependent on how the
translations *other* than the zone recording are implemented (through
software/hardware, closest match from BIOS type 47/closest match for a table
entry/exact mach for a table entry/exact mach of translation paramters/drive
type zero).


|> In ALL new drives, you do not lose any space at all. Only if you use
|> old drives, may be. I doubt it.

Free old drives are better than new ones you are charged for, just like free
food tastes better. 8-).

|> Why don't you change your ide controller and bios?

Because that would only solve the problem for me and wouldn't get people to
stop posting about IDE drives; the only way to do that is to make them always
"just work".

|> Terry, please note that the endless boot happened to my drives also, but
|> I solved it by putting a new bootblock, either using disklabel -w -r or
|> preferable use os-bs?
|>
|> Why don't you try this first?

As an interim soloution for people that it doesn't "just work" for, this is
an excellent suggestion. I guess it would solve perhaps 30% of the problems
with IDE that are posted to this group. It would also require reinstallation
of the DOS partition after translation is "turned off" (set to the ide_conf
suggested parameters).

|> I suspect, your 386bsd partition occupy the beginneing cylinders. You
|> intend to install DOS at higer cylinder numbers. This causes the most
|> problem, because wdboot, gets its subsequent sectors from sectors 2-15.
|> The very first sector, sector 1, is where the bootblk is, where it is used
|> to switch to "PROTECTED MODE". Without this 1st sector "wdboot", it will
|> never go to protected mode. However when you install os-bs, you will

|> overide this bootblk. You need to get it from somewhere else. Installl


|> in 386bsd, actually copies wdboot to a higher partition, and let os-bs
|> bootstrap it.
|>
|> If you fail to install "wdboot" it to higher cyclinders, you will never be
|> able to boot 386bsd.
|>
|> disklabel(by default) will not install it to rwd0a, only rwd0d.
|> I verified this.
|>
|> You install it using disklabel -w -r wd0a
|> The new disklabel allows you to do this, unlike the old one.
|>
|> Alternatively you can use dd or even cat.

I think this still requires that ide_conf.exe be run and translation turned
off (or whatever you want to call what we do as a result of setting drive
type 47). This won't work with older controllers or BIOS. Yes, it would be
nice if everyone upgraded, but telling them to do so will only alienate them,
not get them to upgrade. In most peoples mind, 386BSD is what you run on
unused hardware, not something you buy a machine for.

|> :
|> : Have we hashed over this thing enough?
|> :
|> Why don't we settle on the installation techniques suggested by me
|> and some others, since we have installed DOS and 386bsd in all the recent
|> IDE hard-disks?
|>
|> Your problem is exceptional, as a result of the desire to install
|> DOS at higher cyclinder numbers.
|>
|> Can you settle on ide_conf, os-bs, and the installation instructions that
|> had been posted? At least for the time being.
|> At least the beginners will have something for them in the FAQ.

I certainly think what has been discussed so far is FAQ'able; however, an
installation guide and installation utilities kit would probably be a better
idea. I still vote for doing *all* the work in the boot and installation
code for 386BSD. This is easier for novice users. The sheer volume of new
FAQ'able information has kept me from releasing an updated FAQ. It's hard to
decide what a feature set is and where a cut should be made; I have to make
updates pretty much as the result of a weekend sit-down where I go through
*everything* and cut it down.

The idea of a user being able to install without *needing* an installation
guide is highly attractive to me; this requires an integrated soloution
instead of a set of workarounds, even if they are made available in a
centralized location in a relatively easy to use form.

0 new messages