Commit Graph

453 Commits

Author SHA1 Message Date
mycroft 540f9550c0 Make `make depend' work for libraries. 1996-05-11 16:11:30 +00:00
thorpej c3c4b6f9f3 Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.

Changed struct ifnet to have a pointer to the softc of the underlying
device and a printable "external name" (name + unit number), thus eliminating
if_name and if_unit.  Updated interface to (*if_watchdog)() and (*if_start)()
to take a struct ifnet *, rather than a unit number.
1996-05-07 01:23:31 +00:00
thorpej b97689cdfb Make the MI LANCE driver standalone, and use cfattach to resolve
naming conflicts between bus attachments on ports that can have
multiple instances of the LANCE.
1996-05-07 01:16:36 +00:00
christos 78403e6c0c Add a hardware dependent initialization function lehwinit() 1996-04-22 02:25:54 +00:00
cgd d7d306aeb7 change LANCE copy & zero functions' names to start with amd7990_, and
remove their 'integrate' (usually defined to be 'static') keywords.
when lance drivers are split up by attachment, more than one file will
reference the copy/zero functions (i.e. not just the file that pulls in
am7990.c... and eventually inclusion of am7990.c should go away entirely).
1996-04-18 00:25:11 +00:00
jonathan 274c2bd80d Add a prototype for generic_intr_establish(), the bus-independent
pmax interrupt-establish function.
1996-04-14 00:58:21 +00:00
jonathan 28986d8126 Add cdev_decl() declarations for the "dtop", "fb" , and "rcons" drivers. 1996-04-14 00:56:59 +00:00
jonathan 4a04d76c65 Fix the definition of TC_PHYS_TO_UNCACHED(addr): make it change a mips
kernel addressed to uncached space.

Add prototypes for pmax-specific TC functions used in probing for
a framebuffer console.
1996-04-14 00:55:19 +00:00
jonathan f0d175fd22 Commit version that _really_ has only the innocuous fixes in the
last CVS message.

Possible uninitialized use of variables in the SII state machine,
requiring more thought, are still present.
1996-04-12 18:22:35 +00:00
jonathan f6897c8eb6 fixes for -Wall -Wmissing-prototypes:
pass 1 over pmax SII driver: change "MachEmptyWriteBuffer()" to
"wbflush()", add prototyped forward declarations.
1996-04-12 18:15:23 +00:00
jonathan 368824e74c Fixes for -Wall -Wmissing-prototypes:
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.
1996-04-10 17:38:18 +00:00
jonathan 66e92bbfaf fixes for -Wall -Wmissing-prototypes:
prototype the function-pointer member of the pmax struct pdma.
1996-04-10 17:38:04 +00:00
jonathan 39917746c1 fixes for -Wall -Wmissing-prototypes:
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).
1996-04-10 16:33:44 +00:00
jonathan beaeb261bf fixes for -Wall -Wmissing-prototypes:
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.
1996-04-10 16:27:38 +00:00
jonathan 68a943bdf6 Create pmax-specific <machine/conf.h>, with prototyped declarations
for the cdevsw and bdevsw entries into pmax device drivers.
1996-04-10 16:17:23 +00:00
jonathan 7822ce0c03 ANSIfy:
Add prototypes and fix printf format strings to compile cleanly with
cc -Wall -Wmissing-prototypes.
1996-04-08 00:57:37 +00:00
jonathan aff8e70475 Fix hanging open comment. 1996-04-08 00:52:10 +00:00
jonathan 223eb30b4e ANSIfyto compile with -Wall -Wmissing-prototypes:
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.
1996-04-07 22:53:54 +00:00
jonathan 61a27eb882 Fix old pmax scsi disk and tape (rz and tz) drivers to compile with
-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().
1996-04-07 22:46:29 +00:00
jonathan 73b62487b0 ANSIfy for gcc -Wall:
fix glitch in the comments describing the glyph for semicolon.
Somehow, instead of ":" they had an open-comment.
1996-04-07 19:54:37 +00:00
jonathan 69b52a3f4a ANSIfy for -Wall: add prototype declaration for rcons_font(). 1996-04-07 19:53:36 +00:00
jonathan d115f89b5f Update arch/pmax/pmax/genassym.c to compile with -Wall: use offsetof().
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.
1996-04-07 14:27:00 +00:00
cgd 83f9bdc359 update for the fact that config_found() and config_rootfound() now
return pointers.  (Check vs. NULL, rather than just boolean tests.)
1996-04-04 06:25:00 +00:00
jonathan 5163f64c0f merge mips and pica locore.S, pass 0:
* 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.
1996-03-31 03:38:21 +00:00
jonathan 34ab2734da Resolve all differences between the Pica and pmax versions of machConst.h:
* 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.
1996-03-28 11:34:05 +00:00
jonathan 449a7f5b59 Remove files moved to mips/mips; they are included in mips/conf/files.mips.
Add the pmax-specific portion of trap handler, pmax/pmax_trap.c, which
was split off from pmax/trap.c.
1996-03-26 12:21:39 +00:00
jonathan 467aeaf9f5 Remove src/sys/arch{pmax/pmax,pica/pica}cpu_exec.c; no significant differences,
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
1996-03-26 11:43:41 +00:00
jonathan 97f32908b1 Split trap handler into mips-generic and port-specific functions:
* 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.
1996-03-25 06:44:17 +00:00
jonathan 458024d39d Random additions from the Pica r4k port:
* 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.
1996-03-25 06:40:39 +00:00
jonathan 522f8705a1 Copy src/sys/arch/pmax/pmax/trap.c to pmax_trap.c.
trap.c will contain the port-independent mips trap-handling functions.
pmax_trap.h will contain the pmax-specific interrupt handlers.
1996-03-25 05:55:30 +00:00
jonathan e920e8f829 Force reporting of memory errors for the 3MAX (aka kn02 aka 5000/200) to
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.
1996-03-25 03:18:15 +00:00
jonathan 36424c73cf Rename the original pmax/include/machAsmDefs.h file, with CVS history,
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.
1996-03-25 02:55:18 +00:00
jonathan 29aa0d22ca Replace pica and pmax include/trap.h with versions that #include <mips/cpu.h>,
after merging the definition of T_USER in the pmax port, and moving
the result to mips/cpu.h.
1996-03-24 08:17:04 +00:00
jonathan 71b212b66a Change pmax T_USER bit (software only) to be 0x20, the same as the
Pica port. (The r4000 CPU used in the pica has more hardware execption types.)
1996-03-24 08:12:53 +00:00
jonathan c5f3b155a3 Replace pica and pmax include/cpu.h with versions that #include <mips/cpu.h>,
and add port-specific and r3k vs. r4k definitions.
1996-03-24 07:54:42 +00:00
jonathan cc54da72aa Just include the merged pica/pmax r2000/r4000 mips_opcode.h from
mips/include/mips_opcode.h.
1996-03-23 19:10:06 +00:00
jonathan 78aac1c7b9 Merge in additions of missing MIPS-I opcodes, and r4000-in-32-bit mode
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:: ----------------------------------------------------------------------
1996-03-23 18:49:29 +00:00
jonathan 8fb3add520 * Change setregs() to copy the initial entry point to $t9, to support PIC
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.
1996-03-23 04:35:03 +00:00
jonathan 212f41c0da Merge more header files with arch/mips/include, by replacing
with versions that #inlude the <mips/XXX.h> file:
	reloc.h regnum.h varargs.h
1996-03-20 09:49:29 +00:00
jonathan 69a70ec129 Merge in changes from the Pica port.
Still needs more thought for single-stepping and process_write_regs().
1996-03-20 01:30:49 +00:00
jonathan 5d4883f9ed Add "mips" to the machine line, to make config create a link
compile/XXXX/mips ->  mips/include, and to use mips/conf/files.mips.
1996-03-20 01:17:06 +00:00
jonathan e3bc270a69 Change "XXX_pmax" to "XXX_mips" in preparation for merging with
Pica reloc.h.
1996-03-19 22:18:45 +00:00
jonathan f8342fcf97 Remove #ifdef LANGUAGE_C - protected definition of "struct reg".
(It was a duplicate of the real definition reg.h and was never used.)
1996-03-19 15:20:39 +00:00
jonathan 4758b69e7b Replace ansi.h with a version that just does #include <mips/ansi.h>. 1996-03-19 11:00:16 +00:00
jonathan 53143b46f1 more merged pmax/mips header files: types.h
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).
1996-03-19 05:18:26 +00:00
jonathan e1373a1fbf Replace the following additional header files from src/sys/arch/pmax/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
1996-03-19 04:39:01 +00:00
jonathan d2c42783a3 Add trap definitions added for the r4000 port.
Note: T_USER is different in the pmax and pica ports!
1996-03-19 04:34:57 +00:00
jonathan ac7c6304db Add eight 32-bit (XXX) words of reserved space to struct sigcontext,
for binary compatibilty with the pica port.
1996-03-19 04:22:04 +00:00
jonathan ad4d94c4f3 Change "pmax_xxx" macros to "mips_xxx" macros, in preparation
for moving to src/sys/arch/mips/include/pmap.h.
1996-03-19 04:15:15 +00:00
jonathan ed6c35ae96 Replace the following 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).

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
1996-03-19 03:06:28 +00:00