Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 06 Mar 1999 18:04:57 -0800
From:      Mike Smith <mike@smith.net.au>
To:        "Matthew N. Dodd" <winter@jurai.net>
Cc:        "Daniel C. Sobral" <dcs@newsguy.com>, hackers@FreeBSD.ORG
Subject:   Re: Reading a file inside the kernel. 
Message-ID:  <199903070204.SAA00994@dingo.cdrom.com>
In-Reply-To: Your message of "Fri, 05 Mar 1999 22:05:42 EST." <Pine.BSF.4.02.9903052200080.15262-100000@sasami.jurai.net> 

next in thread | previous in thread | raw e-mail | index | archive | help
> On Sat, 6 Mar 1999, Daniel C. Sobral wrote:
> > Would something like what splash_bmp do be ok with you? It delegates
> > to loader the responsibility of loading the file (ie, expects it to be
> > loaded already).
> 
> If thats all I've got to work with then it will have to do.

Of course it's not all you have to work with; it's quite easy to read 
files inside the kernel.  See eg. the new module code or the gzip image 
activator.

> The file I need to read is a firmware image for a network device that
> cannot be attached until the firmware is loaded.
> 
> I would like to use something like splash_bmp to load a config file that
> specifys a vendor ID/cookie, an image type, offset, and filename.
> 
> The driver would parse this config file and would load the appropriate
> firmware image for each card it detects.
> 
> Due to licensing issues, firmware licensed for use with a particular
> vendor card may not be used with cards from a different vendor, though
> there is no technical reason why the same image can be used (that I know
> of so far.)
> 
> Obviously, I could pre-load all the firmware images available but this
> seems wasteful.  In addition, I would like the ability to upgrade the
> firmware on a card without bringing down the system.  While I might make a
> device node to pipe the firmware image to the card once the system is up,
> giving the driver the ability to request and load the firmware image on
> demand would be nicer.

I guess it depends on how the device might be used; myself I would 
actually almost be inclined to write the probe/download code in 
BootForth so that the adapter could be used to netboot the system.

Failing that, it would make definite sense to demand-load the firmware 
as required, yes.

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199903070204.SAA00994>