From owner-freebsd-hackers Thu Oct 16 19:54:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id TAA12909 for hackers-outgoing; Thu, 16 Oct 1997 19:54:06 -0700 (PDT) (envelope-from owner-freebsd-hackers) Received: from word.smith.net.au (word.smith.net.au [202.0.75.3]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id TAA12902 for ; Thu, 16 Oct 1997 19:53:58 -0700 (PDT) (envelope-from mike@word.smith.net.au) Received: from word.smith.net.au (localhost.smith.net.au [127.0.0.1]) by word.smith.net.au (8.8.7/8.8.5) with ESMTP id MAA00310; Fri, 17 Oct 1997 12:20:24 +0930 (CST) Message-Id: <199710170250.MAA00310@word.smith.net.au> X-Mailer: exmh version 2.0zeta 7/24/97 To: filo@yahoo.com cc: mike@smith.net.au, freebsd-hackers@freebsd.org Subject: Re: biosboot/start.S needs fix for Intel AL440LX motherboard In-reply-to: Your message of "Thu, 16 Oct 1997 19:12:19 MST." <199710170212.TAA22643@ns2.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 17 Oct 1997 12:20:23 +0930 From: Mike Smith Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > > > The latest BIOS from Intel for their AL440LX board does not pass the > > > drive number in %dl as biosboot/start.S assumes (instead %dl is set to > > > 0). The end result is that you cannot boot from a harddrive if you're > > > not using slices (a "Read error" occurs after the BIOS hands over > > > control). Booting from floppy works fine and using slices with bteasy > > > works as well. > > > > Unpleasant. How are you supposed to differentiate between booting from > > a harddisk (0x8?) and a floppy (0x0?) ? > > > > you know you're booting from harddisk because that's where the code > comes from. the mbr on harddisk assumes it's a harddisk boot. the > mbr on floppy assumes it's a floppy boot. There isn't an MBR on a floppy, and in the dedicated-disk case the first sector on both a harddisk and floppy are identical. There is only one BIOS bootrap. > > > Forcing %dl to $0x80 (which is what bteasy appears to do) solves the > > > problem for me. I assume the real solution is a bit more complex than > > > this. I suppose this could be due to some weird BIOS setting, but I > > > think I pretty much tried everything. This board will be popular, so > > > would be nice to get this fixed. > > > > Unless Intel are angling for compatability with some other standard, I > > think the correct fix will be a BIOS upgrade. If they are, it'd be > > handy to know which one, so that we can detect and support it. > > > > Forcing %dl to 0x80 obviously breaks using the same start.s for both > > harddisk and floppy booting. > > > > yep. but doesn't seem like that big a deal to have separate versions. It's a moderately big deal; it changes something that's been as it is now for quite a long time. You could argue conversely that it would be a good thing in that it would allow the two separate bootstraps to shrink a little. > btw, bteasy can deal with %dl not properly set. the first thing it > does is check for (%dl == 0x81). if this fails it sets %dl to 0x80. > should this solution be used in startup.S as well? No. bteasy is only ever installed on harddisks, and it is broken in that it only supports booting from the first two BIOS fixed disks, ie. if disk unit != 2, it must be 1. > in our setup i don't think 0x81 is even possible (how would you get a > boot1 from any disk other than scsi id 0?). so doesn't seem too bad > to have boot1 on sd0 forced to 0x80. Now you are proposing _three_ BIOS bootstraps; one for floppy, one for harddisk in dedicated mode and a third for harddisk in slice mode. The most correct solution is to find out how, with this new Intel board, you can differentiate between booting from a floppy and booting from harddisk. I appreciate that we're a little short for time here, so we may want to go with the fastest hack that works. 8) mike