firmware loading

Max Laier max at love2party.net
Sun May 13 08:49:57 PDT 2007


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 at backplane.com>



-- 
/"\  Best regards,                      | mlaier at freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier at EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
Attachment:
pgp00003.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00003.pgp
Type: application/octet-stream
Size: 187 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20070513/6db7d718/attachment-0015.obj>


More information about the Kernel mailing list