From owner-freebsd-arch@FreeBSD.ORG Mon Nov 21 23:45:26 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 564B416A442 for ; Mon, 21 Nov 2005 23:45:26 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by mx1.FreeBSD.org (Postfix) with ESMTP id 295D043D45 for ; Mon, 21 Nov 2005 23:45:09 +0000 (GMT) (envelope-from babkin@verizon.net) Received: from verizon.net ([141.153.249.163]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IQB00M5MWN14UO2@vms044.mailsrvcs.net> for arch@freebsd.org; Mon, 21 Nov 2005 17:45:05 -0600 (CST) Date: Mon, 21 Nov 2005 18:45:01 -0500 From: Sergey Babkin Sender: root To: Warner Losh Message-id: <43825BFD.70B5E055@verizon.net> MIME-version: 1.0 X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 4.7-RELEASE i386) Content-type: text/plain; charset=koi8-r Content-transfer-encoding: 7bit X-Accept-Language: en, ru References: <23495346.1132600653230.JavaMail.root@vms068.mailsrvcs.net> <43821E3E.3000106@samsco.org> <20051121.124413.59698313.imp@bsdimp.com> Cc: damien.bergamini@free.fr, arch@freebsd.org, babkin@users.sourceforge.net, nate@root.org Subject: Re: cvs commit: src/sys/modules/iwi Makefile src/sys/dev/iwi if_iwi.cif_iwi X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: babkin@users.sf.net List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2005 23:45:26 -0000 Warner Losh wrote: > > > The loader can, that's how the mfsroot.gz file gets loaded > > during install. > > /boot/loader can do this certainly. And you can lookup a file based > on its name from the in-kernel loader. > > However, there doesn't appear to be a linker class that can load > arbitrary files. The in-kernel linker can only lookup things loaded > at boot time. > > I think that creating a link_file might be a good alternative to > having drivers do vfs operations directly. The kernel would load it > safely and hand a reference to the file to the driver. The driver can > then frob it into the hardware and unload the module. I didn't get the e-mails in between yet, so maybe this has been already mentioned, but I'd also have the offset in the file and maximal length to read as arguments. This would allow the drivers to read large files by loading a reasonably small portion at a time. -SB