Sebastian Kuzminsky wrote:

[snip]

>>     This call will create a directory with the given name under
>>     /sys/class/firmware and populate it with two files called
>>     loading and data. A hotplug event is then generated which,
>>     presumably, will inspire user space to find some firmware
>>     to feed the device.
>>
>>So we need hooks into the hotplug system.  More documentation to read,
>>more code in our drivers, more connections to Linux APIs that have
>>little or nothing to do with machine control.  (I sure hope nobody is
>>hotplugging machine control components.)
>>    
>>
>
>The hostmot2 drivers already use the PCI hotplug system.  The entire
>kernel device model is transitioning to that.  For firmware loading in
>particular, it's literally just request_firmware().
>  
>
As far as I can tell, all that does is get the firmware file into a 
kernel buffer.  It does not appear to program the image into the device 
(how could it?).  I think bitfiles need a little massaging to be 
programmed into the FPGA (you have to extract various sections and send 
those, but not the headers, etc.).  The actual device programming code 
would need to be in the kernel, and it would need to have a bitfile 
parser in it.

>>     The resulting user-space process starts by setting the loading
>>     sysfs attribute to a value of one. The actual firmware can then
>>     be written to the data file; when the process is complete, the
>>     loading file should be set back to zero.
>>
>>Is this user space process already provided by the hotplug system, or do
>>we have to write it?  If the latter, how is it any better than bfload,
>>which is already a user space process?
>>    
>>
>
>It already exists, it's udev and its associated helpers (firmware.sh or
>firmware_helper or similar).
>
How would you propose to load different (or the same) firmware into 
several cards?  Would you rewrite the driver so that it can be loaded 
more than once, and send separate bitfiles to different cards?  (this 
would likely require some HAL/RTAPI work as well, since you can't have 
more than one copy of each named module loaded at once)  Is it possible 
to have an array of char pointers to point at multiple firmware images?

- Steve


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to