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.
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.
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.
such as __warn_references() and __weak_reference() which are actually
machine dependant. This will make it easier for ports that are being
bootstraped with ELF and ECOFF based toolchains.
This change also introduces a new macro, _C_LABEL(x). _C_LABEL expands
its argument, an identifier, to a character string of the identifier
name as it is represented in an object file.
For most ports, _C_LABEL(x) will expand to "_x", for ELF based ports
_C_LABEL(x) will expand to "x".