cvs commit: src/sys/modules/iwi Makefile src/sys/dev/iwi
if_iwi.c if_iwi
Warner Losh
imp at bsdimp.com
Mon Nov 21 11:45:25 PST 2005
> The loader can, that's how the mfsroot.gz file gets loaded
> during install.
/boot/loader can do this certainly. And you can lookup a file based
on its name from the in-kernel loader.
However, there doesn't appear to be a linker class that can load
arbitrary files. The in-kernel linker can only lookup things loaded
at boot time.
I think that creating a link_file might be a good alternative to
having drivers do vfs operations directly. The kernel would load it
safely and hand a reference to the file to the driver. The driver can
then frob it into the hardware and unload the module.
The problem would be that you'd want to make sure that the elf loader
got a chance to reject the module before the arbitrary file loader, or
you'd need to make the arbitrary file loader not load elf. We may be
able to 'widen' the interface to drivers a bit by exposing
linker_load_file to the outside world. We could then have the
arbitrary file loader 'fail' the LINKER_LOOKUP_SET method fail so that
linker_load_module would still give the current behavior. That might
be better than a priority scheme, and would answer my main objection
to kld modules...
Warner
More information about the freebsd-arch
mailing list