consistent with the (default) prepending of underscores to identifiers.
Because this reference is inside an ASM string it's too hairy to
conditionalize to support different toolchains that don't prepend underscores.
(Just don't do profiling with such toolchains.)
Instead of being a no-op, kn03_intr_enable() sets the sw copy of the
interrupt-enable mask *and* writes it into the IO asic intr-enable
register. Boot code sets the sw copy (kn03_tc_imask) to something
sane (KN03_IM0, with tc option slots turned off). Tested and works.
Interrupt code for other IOASIC machines should be redone so that
interrupts for devices are enabled by drivers, rather than by
cpu-specific boot code. Functions common to all IOASIC machines
(PSWARN?) should be done by asic_init().
Checked in without the above changes so that 3MAX+, MAXINE and 3MIN
interrupt-(enable,handle) can converge.
Turbochannel machines with an IOASIC.
After an interrupt is taken, the IOASIC interrupt enable mask is
and'ed with the kernel's interrupt-mask variable. This masks
off any interrupts that were enabled after the hardware interrupt-enable
mask was set. Due to this bug all iynterrupts must be enabled before
the first interrupt is taken. (Interrupts enabled later aren't on in the
ioasic intr-mask register, so they aren't on in (sirm & kernelmask),
which is what used to get written back to the ioasic interrupt-mask
register. Fixed, and tested on on 3MAX+ but not xine/3min.
If this patch perchance breaks on Xines or 3mins, the old code can be
re-enabled by changing the #if 0 in machdep.c to #if 1.
interrupts before it calls configure(). On 3100s, this can result in
the ethernet interface interrupting before leprobe() is ever called.
Be a bit more defensive in leintr(), where it was dereferencing a null
pointer. This reputedly fixes the oft-reported problems of 3100s not
ooting unless they're on an idle net or had a hard reset done before boot.
(Reworking the config code completely would be nice too.)
Also change the stack-traceback code to avoid having multiple returns
(and thus multiple stack pops) because with gcc -O2 that breaks the
heuristic that a "jr ra" preceding the PC precedes code to push the
current stack frame. Which breaks stacktrace() before it even
traces past itself :-(. Use a goto instead.
traps, and interrupts The earlier (4.4bsd) code didn't do the first two, and
got the last one wrong. Also print some functions (e.g., trap handlers)
by name. Add hook to use something other than printf() as the output
function, e.g,. for kernel debugging.
Tested with the `native' toolset, but not ELF format kernels.
(i.e., unwinding the $GP register is not tested.)
The stack backtrace code that interprets and unwinds stackframes is still
opaque and stylistically awkward.
auto-configuration initialization code is missing. It uses "needs-count"
flags to come slightly close to what the old-style pmax source expects.
Perhaps autoconfig code can be lifted from the alpha port or volunteers
found to write some.
and wasn't unrolled. This code runs cached and unrolled, giving an order
of magnitude improvement in some cases (e.g., DMA-capable network devices).
In use at Stanford DSG since late January 1995.
(A similar fix needs to be applied to the 3min and xine handlers.
This fixes a long-standing problem when booting with a card that
wants to interrupt (e.g., a network interface) would have interrupts
enabled before a handler was set up.
Add interrupt-counting code to model-independent interrupt handler,
and 3max (5k/200) and 3max+ (5k/240) md handlers, for vmstat -i.
Similar changes for 3min and xine are obvious but not done.
Add code for 5k/240 to read, and latch, the current value of the
IOASIC bus-cycle counter at each timer interrupt. The latched
counter is needed to accurately interpolate the bus-cycle counter value
as a high-resolution clock.
state of the world as expected by the networking headers/mi code.
i changed one or two things in his patch slightly (do the lestart()
proto the right way, actually delete the if_output assignment line).