weird fxp / timecounter interaction in top-of-tree
Dag-ErlingSmørgrav
des at ofug.org
Sun Apr 6 11:19:15 PDT 2003
des at ofug.org (Dag-Erling Smørgrav) writes:
> - loading the if_fxp module (and miibus as a dependency) switches the
> timecounter hardware to PIIX.
This turns out to be caused by a combination of bugs in tc_init() and
the piix driver. The piix driver initializes the PIIX timecounter in
piix_attach(), which is called whenever the PCI bus is rescanned (e.g.
when a driver for a PCI device such as fxp is loaded) instead of
piix_probe() which is only called once. The other problem is that
tc_init() will actually install the timecounter being initialized, so
in effect, unless you explicitly select one after boot, your machine
will use whichever timecounter was probed and attached last.
I've modified the piix driver to only initialize the timecounter once,
and tc_init() to use the *first* timecounter it runs across (on i386,
this is generally the i8254), leaving the admin to pick another one if
the default does not suit her. See the attached patch.
> - switching the timecounter hardware manually to PIIX when if_fxp and
> miibus are loaded causes the machine to lock up.
This problem seems to have disappeared now that the PIIX timecounter
only gets initialized once.
DES
--
Dag-Erling Smørgrav - des at ofug.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: timecounter.diff
Type: text/x-patch
Size: 1654 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20030406/594cbce8/timecounter.bin
More information about the freebsd-current
mailing list