DragonFly kernel List (threaded) for 2010-05
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: firmware discussion
Johannes Hofmann wrote:
> Matthew Dillon <dillon@apollo.backplane.com> wrote:
>> Well, the DFly kernel has some very easy-to-use file access functions
>> ala fp_open() and friends (see kern_checkpoint.c for a use case), so
>> accessing the firmware file directly is easy enough.
>
> I thought about writing a generic firmware module using the new
> FreeBSD API which reads firmware files from a certain directory
> using fp_open().
> However, it seems that available firmware images need to be announced
> with firmware_register() to make them available, so I would need some
> sort of opendir() in kernel to scan the firmware directory and
> register the available files with firmware_register().
. .. and also to monitor the directory for changes :)
> Alternatively we could adjust subr_firmware.c to trigger a file read
> attempt in case the requested image has not yet been registered.
Yah, in firmware_get(), it already handles the case where the module
containing the firmware isn't loaded yet. You can add the directory
search in loadimage() or better yet in a separate function (i.e. have
loadimage() call load_image_module() and load_image_blob()). This makes
much more sense IMO.
HTH,
Aggelos
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]