From owner-freebsd-hackers Sat Jan 21 21:55:35 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id VAA29402 for hackers-outgoing; Sat, 21 Jan 1995 21:55:35 -0800 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id VAA29396 for ; Sat, 21 Jan 1995 21:55:21 -0800 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id QAA31999; Sun, 22 Jan 1995 16:47:34 +1100 Date: Sun, 22 Jan 1995 16:47:34 +1100 From: Bruce Evans Message-Id: <199501220547.QAA31999@godzilla.zeta.org.au> To: rgrimes@gndrsh.aac.dev.com, terry@cs.weber.edu Subject: Re: More serial console stuff... Cc: freebsd-hackers@FreeBSD.org Sender: hackers-owner@FreeBSD.org Precedence: bulk >> IDE disks do not require any special BIOS support. We can not boot from >> a disk that has not had BIOS support installed via int 13 hooking. >This is not true. There *must* be code to actually *do* something when >you do an int-13 call. Even if this is the *default* code, the int-13 >vector is hooked in order to instantiate the code. All BIOS's have code to support IDE disks. >That you can only have one hook or the other is the whole crux of the >problem. No, hooks form a chain. You can have as many as will fit in memory. >> Take a system with 1 IDE drive and n SCSI drives. >> DOS drive BSD drive BSD unit rootdev(maj,min) >> 0x80 wd0 0 0,0 >> 0x81 sd0 0 4,0 >> 0x82 sd1 1 4,1 >OK, I definitely agree with most of this, only your first example is >flawed... >1) The BIOS does the boot by making INT 13 calls following the > POST. >2) The INT 13 hook active is *either* the wd0/1 hook *or* the > sd0/1 hook. >3) In the first case, you can *only* boot from the wd controller > *or* the sd controller. Both BIOS hooks to INT 13 can *not* > be active simultaneously. I thought the example was a real one. It's easy for the sd driver to make it work, e.g.: unit = drive & 0x7f; if (unit > max_sd_unit) /* max_sd_unit = min_sd_unit * + nr_sd_units - 1 */ return ERROR; if (unit < min_sd_unit) /* min_sd_unit = number of drives * at the time we hooked */ jumpto(saved_vector); /* restore regs and continue with * the driver that owned INT 0x13 * at the time we hooked */ unit -= min_sd_unit; /* actual SCSI unit number */ Whether the bootstrap can determine all the mappings done by all the hooked drivers is another question. >4) Your DOS drive numbering is invalid, unless the post-boot OS > hacks the INT 13 vector with something more than simple BIOS > code -- specifically, an INT 13 redirector that does DOS > drive number translation before calling the previous-to-load > POST initialized INT 13 vector, if the drive number is less > than or equal to 0x80 OR'ed with the number of drives (option DOS is not involved, except for the special version of the bootstrap that boots from DOS. Complicated redirections are just more likely if DOS has been used to load special drivers. Bruce