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().
Move to mips/pmax/genassym.c, as (most of) the assembler locore code is
being merged into a generic-MIPS locore.
Remove the redundant pmax/pmax/genassym.c.
* cut-and-paste all the code for both r2000 (MIPS-I) and r4000 (MIPS-III)
into both the pica and pmax locore.S.
* Change the names of the small segments of vector code that are
bcopied to the machine vector locations, to avoid clashing.
Get rid of the Sprite MachXXX names for the vector code, and
use use mips_r2000_xxx and mips_r4000_xxx instead.
Update the names used in the vector-copying code and trap handlers
to match.
* Most of the rest of the pica locore.S was copied from the pmax
locore.S, and then edited to work on an r4000. The names of
functions and of manifest constants stayed the same, although
both assmbler code and constant values changed.
cut-and-paste such code into contiguous blocks protected by
#if / #endif. Much of the cache and trap-handling code
needs r3000-only register fields, on the r3000, and r4000-only
insns and registers on the r4000.
* change the pmax r2000 exception-handling code to extract a trap
code with the user/kernel bit at 0x20 rather than 0x10.
(r2000s have 4-bit execption codes, r4000s have 5-bit.)
Use the a 16 from-user-space + 16-from-kernel space jump table,
just like on the r4000 pica port.
* add NOPs to the common code where required by the r4000 pipeline
constraints.
* add _C_LABEL() macros to the r4000 locore.
Comitted to provide a snapshot for others to test, and work on a cleaner merge.
* add "MIPS_3k_" for the MIPS-I r[23]000-specific register definitions.
* add "MIPS_4k_" for the MIPS-II/III r4000-specific register definitions.
* add #defines that provide the old values for locore and user
code, so the existing code continues to compile.
Regression-tested against the old headers by grepping for #define's,
editing out the defined symbols, and preprocessing with both the previous
machConst.h headers and this version.
Some unused symbols (CPU and FPU must-be-zero constants) are no longer defined.
Pica interrupt masks are now constant expressions instead of constant
values.
TODO:
* factor out the common #defines into src/sys/arch/mips.
* Get rid of the Sprite coding-style names (MACH_xxx).
* Separate out the r3k/r4k differences from the Pica/pmax differences.
* Figure out how to have a run-time choice of r3k vs. r4k support,
instead of a compile-time choice.
or for which the Pica port is an older revision of the pmax branch.
A merged version with the NetBSD/pmax revision history is in mips/mips/.
cpu_exec.c
elf.c
mem.c
process_machdep.c
* Delete pmax-specific functions and declarations from trap.c
* Delete mips-geeneric functions and declaratinos from pmax_trap.c
* Rename the function pointer used to handle hardware interrupts to
"mips_hardware_intr". Define it in trap.c. Change references elsewhere,
including machdep.c.
Verified to boot on a 5000/200.
* Add spl4() and spl5() functions from the Pica port.
* Add MachFPTrap() as an alternate entry point for MachFPInterrupt.
The r4k reports floating-point execptions as a trap, not an interrupt,
and the Pica port uses the name MachFPTrap().
* Add nops to the Mach_spl?() functions and MachFPInterrupt, as required
for the r4k port.
Commit "floppy" interrupt counter for vmstat -i.
always be eight digits.
Copy the kn02 memory-interrupt reporting function to the kn03 (5k/240)
memory-error handler, since the 3MAXPLUS seems to use the same ECC hardware
as the 3MAX.
to mips/include/asm.h.
Until all references to <machine/machAsmDefs.h> in the pmax and
pica tree are changed to use <mips/asm.h> directly, just do
#include <mips/asm.h>, for compatibility.
opcodes from the Pica port. Per Fogelstrom claims the latter are all
supposedly MIPS-II (r6000) instructions, rather than MIPS-III (R4000),
but we haven't checked to be sure. Are LL/SC really in MIPS-II?
CVS:: ----------------------------------------------------------------------
code following the MIPS ELF abi.
* Move the kn01 interrupt handler outside of #ifdef DS5000, to support
3100-only kernels.
* Add #ifdef DS3100 around kn01_enable_intr() to allow configuring
turbochannel-only kernels.
Configuration-time support for specific models of DECstation still needs
more thought/work.
Replace header files from src/sys/arch/pmax/include/ with versions that
include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).
with versions that include equivalent files from <mips/include>,
after merging changes from the pmax and pica ports into the
src/sys/arch/mips/include tree.
ptrace.h cdefs.h pmap.h signal.h kdbparam.h
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).
bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).
[bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h]
[profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h]
plus (missed one:)
ecoff.h
with versions that include equivalent files from <mips/include>.
(cvs magic copied the previous revisions, with history, to
src/sys/arch/mips/include).
bsd-aout.h elf.h endian.h exec.h float.h ieeefp.h limit.h pcb.h proc.h
profile.h reg.h regdef.h setjmp.h stdarg.h vmparam.h
the NetBSD-1.1 convention. Change the mainbus `struct confargs'
and the "generic" interrupt-establish method, used by devices that
appear on both a kn01 and TC decstations, to match.
Change the macros in autconf.h accordingly.
Add new device-attach struct cfattach le_tc_ca and struct cfdriver le_cd.
Change IOASIC cfdriver references from "ioasiccd" to "ioasic_cd".
Change "mainbuscd" to "mainbus_cd"
update the old-config to new-config glue used with the 4.4bsd/pmax
SCSI drivers to use new device attach declarations and names for
the "oldscsibus", "tz" and "rz" drivers.
- 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.
execpt without quotes. meant to be __CONCAT()ted for easy #includes
of machine-dependent headers for MI code (e.g. for the MI ISA/EISA/PCI/TC
bus code).
works with the revamped machine-independent TC code in sys/dev/tc.
A name change is necessary to avoid a name clash with sys/dev/tc/tc.c,
which also creates a tc.o.
versions work correctly; at some point between then and the immediately
preceding revisions, the "stylistic" changes to one (or both) stdarg.h
and varargs.h broke passing doubles to printf().
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.
code. Substantially the same code tested on a 5k/240. Should work on a
5k/1xx. Not tested on a MAXINE, where the single unit may break the
PROM-channel-number to driver-channel-number mapping.
parameter parameters shadowing locals. Replace vmapbuf() and vunmapbuf()
with the Alpha-port versions, which are cleaner (use round_page(),
trunc_page(), etc.)
* add a new enum decstation_intr_t to trap.c, naming each instrumented
interrupt symbolically, and used to index into intrcnt[]. Change the
model-specific interrupt handlers to use the decstation_intr_t when
updating interrupt counters.
* add instrumentation to the kmin and maxine interrupt handlers.
* fix a bug that counted each hardclock interrupts on the kn02 twice.
The hardcoded mapping from locore names to units is gross; but these
counters will hopefully be useful in identifying interrupt hot-spots
and PPP problems on the 3MIN.
Rename the ioctl asic register and slot macros from ASIC_<xxx> to
IOASIC_<xxx>, to be compatible with the machine-indpendent names in
sys/dev/tc/ioasicvar.h. The pmax code still uses
sys/arch/pmax/pmax/asic.h, as some of the registers and offsets
defined there are not yet defined in sys/dev/tc/ioasicvar.h.
Rename the ioctl asic base-address pointer from `asic_base' to `ioasic_base'.
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.
the sys/dev/tcvar.h TurboChannel configuration structures. (the initializers
in sys/arch/pmax/tc were already changed; the structure definition wasn't,
which broke autoconfiguration.)
- 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.
be in 1972 or 1973. If the clock is set to the actual time, the PROM
appears to reset the chip date to 1972 at each reboot.
Change the "year offset" from 22 years to 24 years (good till 1997)
until this code is replaced with something that uses the chip as a
seconds-since-beginning-of-year clock (encoded as a date, relative to
1972-01-01 00:00:00).
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.
Kernel-debugger breakpoints in user space, or FP insns that cause
underflow in a delay slot, should now work properly. Single-stepping
of arbitrary user processes, from user level, should be added.
* define PT_GETREGS and PT_SETREGS in pmax/include/ptrace.h
* Flesh out the stubs in pmax/pmax/process_machdep.c to handle
those requests.
* Now that "struct reg" is actually used, remove the bogus
#ifdef LANGUAGE_C around its definition, and redo pmax/include/reg.h
so that the definitions needed by locore.S are in a separate file,
pmax/include/regnum.h.
* update locore.S to match.
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.
Add as-yet-unused speed entries for a 1x SCC clock, up to 200 Kbits.
Remove old top-bit-means-delay code, since nothing seems to need it,
and it apparently partially broke lk-201 initialization anyway.
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.)