both off, haracters with their top bit clear were interpreted as a delay.
This (strange) behaviour is still available if SCC_PARITY_MEANS_DELAY
is defined.
Update TURBOChannel and ioasic interrupt-establish routines to pass on their
device argument as a "void *", since that's how all the pmax interrupt handlers
are declared.
counter on 5k/240s to interpolate to microsecond-resolution clock
in microtime(). Only the "rev B" ASIC in 5k/240s is known to have
this counter; other models may or may not. This gives microsecond
resolution at user-level, and up to 40ns resolution (modulo the
nominal 5(?) 40MHz cpu cycles for reads to complete) in the kernel.
Change the IOASIC reset function to set up the DMA mapping for the
53c94. Allocate 16 Kbytes of DMA buffer for 53c94 ASCs under an IOASIC,
as the 3MAX baseboard and TC options have 128 Kbytes of static
bounce buffer, and the drivers really _should_ support 16Kbyte
I/O requests. (They don't always.)
Give the LANCE a hard reset on 5k/240s, just to be on the safe side.
(the 5k/240 I use sometimes reported errors at boot time.)
"struct pmax_fbtty". Remove most of its fields, since the fields
in the struct fbinfo render most of them unecessary, and the pmax
now uses rcons anyway. Moe the lk-201 keycode definitions to lk201.h,
so rcons can use them too.
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).
Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
Pass softc pointers to the scsi and ethernet kn01 (DS_PMAX) drivers,
rather than having unit numbers wired into the base-level interrupt
handler.
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).
Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
Move consinit() from here to cpu_cons.c.
Eliminate the old old pmax-specific console driver, whcih didn't
know about vnodes. Use sys/dev/cons.c instead.
Delete the old 4.4BSD/pmax TURBOChannel probe routines and ROM-to-driver
name-mapping functions.
"struct pmax_device" to avoid conflict with <sys/device.h>.
Move the glue routines for config.old pmax SCSI device probing from
autoconf.c to conf-glue.c.
old-style pmax polled input for cn_getc(). Needed because the
input side of rcons is not initialized in time for GENERIC kernels
to use it to read a root/swap devicename from /dev/console.
Fix an argument glitch between consinit() and pminit().
Change consinit() to use PROM output for remote consoles, because
the serial drivers aren't yet initializable when consinit() is called.
old-style pmax polled input for cn_getc(). Needed because the
input side of rcons is not initialized in time for GENERIC kernels
to use it to read a root/swap devicename from /dev/console.
"struct pmax_device" to avoid conflict with <sys/device.h>.
Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)
NetBSD/sparc rcons glass-tty console pseudo-device driver, via
the "fb" generic-framebuffer pseudo-device driver.
Individual framebuffer device drivers are now autoconfig glue,
and initialization code for a set of vdac/ramdac-level methods,
called "fbdriver", that's used by all the pmax device drivers.
All the handlers for user-level requests (open/ioctl/read/write/close)
are moved into the fb pseudo-device driver, which uses the
the "fbdriver" methods to work on any given pmax hardware driver.
Framebuffers supported are: sfb cfb mfb xcfb pm.
Move the qvss (pm) -style mmap()ed device interface, kernel tracking
of mouse button/movement events, and placing mouse/keyboard
events in an mmap()ed ring buffer, out of the framebuffer device
drivers and into separate source files. The fb pseudo-device driver
uses the qvss-compatible interface, since that's what the (R5) X
server uses.
the pmax lance driver that uses the machine-independent am7990.c driver
needs some definitions for it. This is a partial re-merge of NetBSD/alpha's
tc/asic.h back to the pmax, with the addition of symbolic #define's
for registers and bits in registers that are pmax model-specific.
drivers have been fixed to not require "needs-count".
Add back the lines for the "rcons" console driver, even though it's
not merged into the pmax port yet, as conf.h was patched to include
"rcons.h". Adding the device here, but not configuring it (e.g., in
GENERIC) keeps conf.c happy until rcons code is merged.
TURBOChannel cfb has a vertical-retrace interupt that cannot be disabled
in software. 4.4BSD and NetBSD don't supply an interrupt hander and
simply neverenable interrupts from slots with a cfb. This has never
ever worked with a cfb in a 3MIN (Decstation 5000/1xx), where a TURBOChannel
card in slot 0 (or 1 or 2) interrupts at the same IPL as spl0() (or spl1
or spl2), and there's also never been support for selectively enabling or
disabling those interrupts on a 3MIN, in either NetBSD or 4.4BSD.
This revision add an interrupt handler for the cfb, used only on 3MINs,
so that a 3MIN can boot with a cfb as console, and enable/disable of TC
slot interrupts can be debugged. (Serial consoles via ioasic SCCs still
don't quite work, and simply clearing the relevant bits in the R3000 cause
register is apparently over-ridden by a subsequent spl0() somewhere else.)
as it's a driver for a device under a TC IOASIC. The Alpha port also
has its scc driver in tc/scc.c, and the pmax driver scc is nearly the same
as the Alpha.
pmax driver, to be diffable with the NetBSD Alpha driver. Specifically,
the pmax driver now uses register names dev/ic/z8530.h. The driver now
uses new-style config and dynamically-allocated softc structures. The
driver no longer resets the "other" channel on an SCC when changing tty
parameters. The #ifdef'ing away of processing of the output clist for
non-console lines is no longer done. (Non-console serial ttys might even
work now.) Other discrepancies between the pmax and alpha drivers, which I
don't understand yet, are marked by XXXes.
The 4.4bsd pmax console redirection code is still present, protected
by #ifdef TK_NOTYET. Diffs from the Alpha scc driver are now minimal.
Verified to boot on a Decstation 5k/240.
Concomitant changes to code that prints driver/unit name: use dv_xname
and dv_unit, instead of doing pointer arithmetic on elements of the static
softc array.
Remove support for old config. The old-config "driver" structure
is still present, because the pmax non-MI SCSI driver needs it.
Merge some off Per Fogelstrom's changes for the Pica driver,
which uses the machine-independent SCSI code. This is #ifdef'ed
out until the DMA is fixed to work on Decstations, too.
and MAXINE (Decstation 5k/xx), instead of setting them to NULL.
New-config kernels should work on those machines now.
Rename the definition of the struct cfdriver for the IO ASIC from "asiccd"
to "ioasiccd", as the config-file name changed from "asic" to "ioasic".
back to the DECstation. Boots on 3MAX and 3MAXPLUS. The bug-fixes
applied to this driver since it forked off the Decstation code also
seem to fix long-standing DMA problems with the Decstation SCSI driver.
All devices except SCSI disks and tapes are found using new config only.
SCSI disks and tapes are configured using a table edited from an ioconf.c
produced by config.old.
Boots multi-user on PMAX, 3MAX and 3MAXPLUS. The old-style "slot hand fill"
functions for those machines, and the old TurboChannel configuration
main loop, have been removed.
Since new-style config runs later in boot than the old pmax turbochannel
probing, we no longer know what devices will be configured when consinit()
is called. Use PROM output until autoconfig is finished.
the Dallas-compatible real-time clock. The missing entry caused the offset
to end up in the "priority" field. New-style config now boots cleanly on a
KN02 (3MAX).
turhsturbochannel machines. Lifted wholesale from cgd's Alpha
turbochannel code, with changes that reflect the slightly different
bus topology and `slot' numbering on Decstations.
into a separate function for readability. Rework interrupt initialization,
so interrupts are never enabled until configuration has found and
attached all devices. Call spl0() just before probing the scsi bus,
as the DECstation scsi code can't poll, and hangs if interrupts
are disabled.
Add preliminary support for new config, protected by #ifdef NEWCONF/#endif.
Cosmetic changes to swapconf() and setroot() to reduce distance
from Alpha versions of same.
only print diagnostic messages about interrrupt enabling when DIAGNOSTIC
is defined.
Remove old buggy 4.4BSD turbochannel interrupt kludge for ioasic machines
inside "#if 0"/"#endif" as the NetBSD code has been working fine for months.
redirection of console serial input (keyboard, mouse). Fixes non-redirection of
keyboard to X server on a 5k/240. The Mfb and sfb drivers are similarly broken.
to have the same interface as native readdisklabel(), call it cleanly
from caller of readdisklabel(), and fix bug that left d_npartitions at 1
for ultrix-compat labels. Ultrix labels now actually work.
pmax conf.c references them. A cut-and-paste job from the pmax
rzwrite() and rzread(). tzwrite() and tzread() are utterly untested.
tzwrite() should also check for write-protect, or handle writes to a
write-protected tape gracefully.
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).
arguments are really off_t's (e.g. to btodb), then you can lose
information. This was the "> 4G file systems don't work" bug; physio
uses btodb, which was broken.
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".