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: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 12 May 2007 00:11:29 -0700 (PDT)

: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.

    (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>



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