tech-kern archive

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

config_mountroot(8) for firmload(9) (Re: [RFC] aftermountroothook)



In article <100613124146.M0116364%mirage.ceres.dti.ne.jp@localhost>
I wrote:

> I wrote:
> 
> > > some network devices require firmware to read MAC address. if such
> > > devices are attached before root directory is mounted, they are not
> > > attached as ordinary network interface.
> >  :
> > > to resolv this issue, following patch introduces "aftermountroothook".
> 
>  :
> 
> > I think it can be implemented as well as config_interrupt().
> > You can register all deferred initializetions via config_mountroot()
> > (or so) like config_interrupt() and they could be established by
> > config_finalize_mountroot() (or so) from init_main.c after mountroot().
> 
> I've posted a patch for this into PR kern/43125:
> http://mail-index.NetBSD.org/netbsd-bugs/2010/06/13/msg018111.html

I've also put a diff for this config_mountroot(9) changes
with man page update here:
http://www.ceres.dti.ne.jp/tsutsui/netbsd/config_mountroot-20100618.diff

This patch adds a new API "config_mountroot(9)" which will be used
for device drivers to defer configration until mountroot(), like
config_interrupt(9) that defers configuration after interrupts are enabled.
It also adds configure3() called after mountroot() in init_main.c.

This API will be used by devices that require firmware files to
complete device attachmenta after mountroot().

There was a comment from mlelstv@ in the PR that we should
rather control device attachment by drvctl(8) to defer it during rc(8),
but I think we should handle such mechanizm in different layer
because firmware files should be in the root file system (in /libdata)
as well as kernel module binaries.

If there is no particular objection to concept of config_mountroot(9)
itself, I'll commit this patch in a few days.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index