From owner-freebsd-current Tue Sep 30 00:03:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id AAA08056 for current-outgoing; Tue, 30 Sep 1997 00:03:27 -0700 (PDT) Received: from usr01.primenet.com (tlambert@usr01.primenet.com [206.165.6.201]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id AAA08051 for ; Tue, 30 Sep 1997 00:03:24 -0700 (PDT) Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id AAA16827; Tue, 30 Sep 1997 00:03:22 -0700 (MST) From: Terry Lambert Message-Id: <199709300703.AAA16827@usr01.primenet.com> Subject: Re: buf struct & scsi disk IO availability. To: julian@whistle.com (Julian Elischer) Date: Tue, 30 Sep 1997 07:03:21 +0000 (GMT) Cc: current@FreeBSD.ORG In-Reply-To: <343082D9.41C67EA6@whistle.com> from "Julian Elischer" at Sep 29, 97 09:40:57 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > I have hit a point on which I am not on firm ground.. > > I would like to do some IO from a disk at PROBE time. > In my original SCSI code, this would have been ok, as long as > I didn't need interrupts. I thought I should check the following > points with thre readers of -current before I go further however.. > > 1/ is the buf system set up fully by this time, > i.e. can I user getebuf()? > david? bruce? john? Heh. I wrote the original SYSINIT stuff and you checked it in, but you have to ask??? 8-). SI_SUB_DRIVERS = 0x23000000, /* Let Drivers initialize */ SI_SUB_CONFIGURE = 0x24000000, /* Configure devices */ SI_SUB_VM_CONF = 0x38000000, /* config VM, set limits*/ This should mean "no". Probably the "probe" and the "attach" need to be seperated. Can you live with attach time instead of probe time? I think if the answer is "no", an architectural change is required. See /sys/sys/kernel.h and search for "SI_". If this is for a "registry" type mechanism, a BIOS-based I/O is not out of the question, I think. > 2/ Jason, if I use the disk as a direct result of the scsi_attach() > routine, does that catch you off guard in the aic driver? I don't know this, but the attach should be much more ready than the probe. > In other words, when you call scsi_attach() and friends, > are you set up enough to handle that routine looping back and in turn > asking you to perform IO (e.g. to read the fdisk table). > > If this is not the case, I have a work-around which would be to queue > further configuration to occur at some later time (but before > mounting root), but it wouldn't be so clean. This sounds most reasonable. Windows does the same thing, and generates certain "subsystem is read for use" initialization events which drivers and other things can catch and then do incremental work using. Despite the source of the idea, it's a good idea, IMO. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.