update the 4.3bsd/Ultrix-compatible qvss-style mmap'ed framebuffer/input-event
code to use mips_round_page() et.al., not pmax_round_page().
Add explicit "int" return types to functions. Add prototyped forward
declarations.
Fix the the definitions of dtop cdevsw entry point functions to match
their declarations. Add explicit "int" declarations to functions.
Add prototyped declarations for all local functions.
Return zero from dtopstop().
Include the external declarations from dtopvar.h.
Add prototypes to (most of) src/sys/arch/pmax/pmax. (The un-protytyped
parts still have pending merges with the Pica port.)
Fix splx() glitches in pmax/clock.c.
Delete old cpu/fpu identification from pmax/autoconf.c, use r4400/r4600/idt
aware code from Pica port, now in mips/mips/mips_machdep.c.
Delete unused multi-CPU autoconfiguration code; NetBSD/pmax does not
support decsystem 5800s anyway.
Update the pmax SCSI drivers (rz and tz) to use <machine/conf.h>.
Fix the driver entry points to have the correct signatures -- add
"ioflag" args to read() and write(), add "struct proc *p" arg to
open and close.
Stop using __BDEVSW_DUMP_OLD_TYPE, and update the rzdump and tzdump
entry points to have the correct, MI signatures.
NB: this is just syntactic sugar: both the caller and the dump entry
points ignore the additional args, and do exactly what they did before.
This must be fixed before using dump entry points in non-pmax drivers
(e.g., the MI scsi code).
add prototyped declarations for the callbacks which add old-style
(4.4bsd/pmax conf.old) SCSI controllers, and which configure SCSI slaves
on such controllers.
rewriting the SII driver to work with the MI scsi would be a better option,
if time were available, and the MI scsi code supported SCSI controllers with
an 8k upper bound on transfers.
Add prototyped declarations for scsiGroup0Cmd and scsiGroup1Cmd.
Add prototype declarations for scsiPrintSense. Cut the inqiury-response
pretty-printer from tz.c and rz.c and paste it in as scsiPrintInquiry.
-Wall -Wmissing-prototypes:
Add prototypes.
Fix printf() format strings (%x vs pointer-arg, %x with a long int).
Fix a possibly-uninitialized shadowing local variable "resid" in tzdone().
include <sys/systm.h> to get prototypes for printf() and bcopy().
- split softc size and match/attach out from cfdriver into
a new struct cfattach.
- new "attach" directive for files.*. May specify the name of
the cfattach structure, so that devices may be easily attached
to parents with different autoconfiguration semantics.
based on "#ifdef MELLON": examine the framebuffer dimensions in the
fb softc, and initialize the x-axis offset appropriately.
User-level changes to (e.g.) an Xserver are still needed to work
on an SFB.
The dtop driver no longer requires the "needs-count" flag.
Fix a panic in boot-time interrupt establish. The "generic" pmax
interrupt-establish code assumes that all interrupt args are new-config
device structs accessed via a struct cfdriver. Make it so.
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.
* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.
Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
independent TC support in sys/dev/tc/tc.c and sys/dev/tc/tcvar.h:
* Change the tc autoconfiguration tables to use a struct tc_attach_args
instead of the ad-hoc structure.
* Change all pmax device drivers to use a `struct confargs' that's
assignment-compatible with sys/dev/tc/tcvar.h `struct tcdev_attach_args'.
Devices that can be present on a TC or as ioctl asic/mainbus builtins
use the same `struct confargs'.
* Eliminate the `BUS_CVTADDR()' macros which the pmax port inherited from
an old, now-obsolete sys/arch/alpha snapshot.
* Update the comments and debugging code in interrupt handlers to
be consistent with the machine-independent TC support.
Other commits that overlap the same source files include: re-enabling
clock-tick interrupts earlier, and counting hardclock ticks for vmstat -i.
- New metrics handling. Metrics are now kept in the new
`struct disk'. Busy time is now stored as a timeval, and
transfer count in bytes.
- Storage for disklabels is now dynamically allocated, so that
the size of the disk structure is not machine-dependent.
- Several new functions for attaching and detaching disks, and
handling metrics calculation.
Old-style instrumentation is still supported in drivers that did it before.
However, old-style instrumentation is being deprecated, and will go away
once the userland utilities are updated for the new framework.
For usage and architectural details, see the forthcoming disk(9) manual
page.
Eliminate pmax/tc/tc.h. Use dev/tc headers for pmax port. Change pmax TC
autoconfig tables to use structs (mostly) compatible with dev/tc/tcvar.h.
Move TC console search to tc.c.
with pk:
Use dev/rcons/files.rcons in the pmax config file.
Use "rasterconsole" as the tag in pmax/conf, and modify the pmax
framebuffer pseudo-device drivers (fb and rcons) to us rasterconsole.h and
RASTERCONSOLE for compile-time configuration of the rcons pseudo-device.
Modify the pmax rcons pseudo-device driver to initialize a little-endian,
QVSS-compatible font (set its ascent, and set the rconsole structure to
point to that font) before calling rcons_connect().
Tested on a cfb. The ascent may be wrong (or at least, not be aligned with
the hw cursor sprite) on a 3100.
"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.
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.
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.)
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.
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.
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.)
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).