DragonFly kernel List (threaded) for 2007-05
DragonFly BSD
DragonFly kernel List (threaded) for 2007-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: firmware loading


From: Max Laier <max@xxxxxxxxxxxxxx>
Date: Sun, 13 May 2007 17:43:17 +0200

On Saturday 12 May 2007, Matthew Dillon wrote:
> :is it really necessary to do it this way? cause i don't like the idea
> :of using a user space program for directing the driver to load the
> :firmware. instead the firmware can be loaded and cached during the
> :device attach routine.
> :
> :the firmware_image_load_file can be the appropriate candidate for such
> :functionality provided  that it just returns the raw data from the
> :/etc/xxx firmware file without allocating the dma resources.
> :
> :Cheers
> :kmb
>
>     The root filesystem will not be mounted during driver attach so
>     the kernel will not have access to the filesystem.  But there are
>     a couple of other possibilities:
>
>     (1) You could embed the firmware as a const char [] array in the
>     source code itself.  It would depend how big the firmware image
> is... if it's really big I'd rather not embed it in source code.
>
>     There might also be a copyright issue with the firmware that
> prevents it from being embeddable in the source code.
>
>     (2) The firmware could be loaded into kernel memory as a module by
>     the boot loader.  The boot loader does have access to the root
>     filesystem (usually).  The driver would then be able to locate and
>     access it at attach time.

In FreeBSD we have firmware(9) to assist with building and accessing such 
modules.  It now also has support for licenses that require a user to 
acknowledge something before they can use the firmware.  See for instance 
http://www.prweb.com/releases/2007/03/prweb509818.htm

>     (3) There is a kernel firmware loading facility in
>     sys/kern/kern_firmware.c.  Again, the file cannot be loaded at
>     attach time but this way you could have an ioctl that just passes
>     the filename to the driver as part of the RC boot sequence
>     and the driver could then use the kern_firmware.c facility to
>     actually get an image map into kernel memory.
>
>     Method #1 or #3 is probably the best way to do it.  Method #2
> requires more configuration glue and changes in the loader config.
>
> 					-Matt
> 					Matthew Dillon
> 					<dillon@backplane.com>



-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News

Attachment: pgp00003.pgp
Description: PGP signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]