Revamp of interrupt code (INTR_FILTER support)
Marcel Moolenaar
xcllnt at mac.com
Tue Aug 7 16:55:18 UTC 2007
All,
With INTR_FILTER likely going to me the default for FreeBSD 7.0,
some work was necessary for PowerPC to support that. A rather
large diff can be found here:
http://www.xcllnt.net/~marcel/ppc.diff
It contains changes necessary to support INTR_FILTER as well as
some related and/or nearby improvements, such as:
1. Enable interrupts for traps() when interrupts were enabled
at the time of the trap. This improves the interactive
behaviour of the machine. It avoids that syscalls run with
interrupts disabled for example.
2. Revamp the PIC interface to have it not deal with resources,
but rather with access to the hardware. The resource handling
is moved to nexus. This was necessary, because INTR_FILTER
requires EOI and MASK+EOI calback functions.
3. With 2 in place, there's no need for early attach of PIC
drivers anymore. The platform code delays programming the
hardware until all hardware has been enumerated. This makes
the openpic(4) and hrowpic(4) drivers much simpler.
See powerpc_enable_intr() in configure_final().
4. Interrupt handlers are passed the trapframe when they don't
have an argument specified already. This allows the use of
external interrupts for hardclock, statclock and/or profclock.
The OpenPIC has 4 global timers, which seem very suitable.
There are still some lose ends, such as interrupt counters and
psim support, but I'd like to get the patch out for testing and
review.
I would especially appreciate it if someone with an older G3 that
has the Heathrow PIC can test that I didn't break anything there.
I can only test the OpenPIC driver myself.
Thanks,
--
Marcel Moolenaar
xcllnt at mac.com
More information about the freebsd-ppc
mailing list