bug in setup.S / IDE code

Andries.Brouwer@cwi.nl
Thu, 21 Jan 1999 02:44:39 +0100 (MET)


After installing a new large IDE disk in some machine, I found
to my surprise that Linux detects the geometry as 1020/200/62
while the BIOS had 16383/16/63, as was to be expected for
a large disk. The CMOS has the right values.

What goes wrong?

Well, the IDE code gets the BIOS information from setup.S,
and the code there gets hd0 and hd1 data via the INT 41 and INT 46
addresses. But who says that hd0 and hd1 are IDE disks?

This machine (Pentium with Award BIOS) has both IDE and SCSI
disks, and boots from SCSI. And indeed, /dev/sda has geometry
1020/200/62.

Thus, the IDE driver mistook "first disk" for "first IDE disk".

Clearly, we would like to know which disks the BIOS called
"first" and "second" disk. I guess that the first disk is
the one on which the BIOS starts the boot loader.
But the kernel no longer has this information.
Moreover, maybe it was booted by loadlin or so.

Is there something meaningful the kernel can do?
Or should the user just tell the kernel on the command line:
"first disk is sda"?

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/