Commit Graph

868 Commits

Author SHA1 Message Date
jonathan 0f41aef4b9 Workaround for port-pmax/4438 (pmax kernel glass-tty console code is broken)
until a proper fix is available:
  Perpetuate the 4.4bsd design even further. Change keyboard-driver
  open routines to check for an active raster console. If active, set the
  keyboard struct tty's t_winsize from the rcons t_winsize on first open.
See pr 4438 for remaining problems and discussion of a complete fix.
1997-11-08 21:55:05 +00:00
jonathan 1dfe80f178 Add MODE SENSE code from MI scsi sd.c to rz.c.
* add includes for sys/dev/scsipi headers.
 * cut-and-paste mode_sense and disk-geometry sense code from sd.c,
   with name changes sd -> rz.
 * Write `rz_command()' to send SCSI sense commands based on
   existing rz size-sensing code.
 * get geometry info with page 4 and page 5 mode sense.
 * use resulting geom info for default label, fake label, and when
   using ultrix labels. (ultrix labels have no geometry info).

Fixes incrrect-label bugs with using sysinst to install onto
Ultrix-labelled disks.
1997-11-08 11:28:10 +00:00
jonathan fbac6ffd1b Delete ancient warning printf() from when this code hadn't been
tested on  3MIN or MAXINE motherboards.  Add __KERNEL_RSID while we're here.
1997-11-08 07:15:35 +00:00
jonathan 2d21148a91 Remove long-unused MD pmax console code. 1997-11-03 00:19:30 +00:00
lukem 3e8e744696 getopt returns -1 not EOF 1997-11-01 06:49:14 +00:00
jonathan af17ce204d Remove unused old-config static variables describing TurboChannel slots.
From nisimura@itc.aist-nara.ac.jp in PR pmrt-pmax/4343.
1997-10-29 20:12:11 +00:00
jonathan 2025270865 Fixes for sysinst and installing diskimage:
* Check for a disklabel matching the known values in an install diskimage.
   If found, update incore disklabel's RAW_PART  with the size reported
   by the disk, clobbering the size used by vnd(4).*
 * If geometry info is bogus or /missing, supply a fake geometry
   (as in sd.c).  Saves readdisklabel() and sysinst from divide-by-zero errors.
 * lint: RAWPART -> RAW_PART.
1997-10-26 10:47:14 +00:00
jonathan 64a7794048 <machine/intr.h> is required. Supply an empty one.
VS: ----------------------------------------------------------------------
1997-10-26 10:41:32 +00:00
jonathan 75e6c24f72 Don't turn off RZF_WLABEL flag on last close of raw partition.
It breaks disklabel -W, turning label writes back off again when
disklabel -W closes its open fd on the raw disk.
1997-10-25 22:28:52 +00:00
jonathan a03a434f1b * Use ANSI-clean names for host-specific byte-order definition
(_BYTE_ORDER, _BIG_ENDIAN, _LITTLE_ENDIAN).
  Define old names from the ANSI ones if not _POSIX_SOURCE.
* Define _QUAD_HIGHWORD and _QUAD_LOWWORD properly when
  _BYTE_ORDER == _BIG_ENDIAN.
1997-10-20 09:57:05 +00:00
jonathan bf4f202e7c Merge MINIROOT and NFSINSTALL into a single INSTALL config file,
with  config lines for both root-on-disk and root-on-NFS.
1997-10-20 03:50:05 +00:00
jonathan 8061da06c9 Add "options COMPAT_12". 1997-10-20 03:45:08 +00:00
jonathan 4b537fb807 Warn user if we fail over from framebuffer console to serial console
when no supported framebuffer is found.
1997-10-19 10:25:52 +00:00
jonathan 0fa286f23d Note non-inclusion of up-to-date bootblock source for 1.3, as
suggested by release engineers.
1997-10-18 22:33:28 +00:00
mhitch 20c5359658 If DDB and the boot loader has loaded the kernel symbol tables, save the
symbols and let ddb know about them.
1997-10-18 19:48:02 +00:00
jonathan dd7290db41 Add explicit #include <vm/vm.h> before mips/pte.h is included. 1997-10-17 09:34:43 +00:00
jonathan 22b3f9ebd8 Add bi-endian support to mips locore, <mips/endian.h>, and mips_opcode.h.
Derived from a change request (PR port-mips/4277) from
Tsubai Masanari, (tsubai@iri.co.jp).
1997-10-17 04:43:57 +00:00
lukem 28558b28eb rcsid fascism 1997-10-13 14:22:22 +00:00
explorer 80513cb5ae o Make usage of /dev/random dependant on
pseudo-device   rnd                     # /dev/random and in-kernel generator
  in config files.

o Add declaration to all architectures.

o Clean up copyright message in rnd.c, rnd.h, and rndpool.c to include
  that this code is derived in part from Ted Tyso's linux code.
1997-10-13 00:46:08 +00:00
mycroft 9803f46796 Minor rearrangement to match other files. 1997-10-11 09:12:18 +00:00
mycroft 5c8d588138 Nuke NOOBJ. 1997-10-11 08:44:42 +00:00
mycroft acf0e569a5 Update all the tags goo, and use bsd.subdir.mk. 1997-10-11 08:42:02 +00:00
thorpej f77f4e6084 The MIPS toolchain generates ELF. Don't pretend like it generates a.out
by renaming "netbsd" to "netbsd.elf", and then creating an a.out image
called "netbsd".

Instead, create _both_ ECOFF and a.out versions of the kernels, named
"netbsd.ecoff" and "netbsd.aout" respectively, and drop the ".elf"
from the ELF kernel.

(And, with any luck, the a.out hack will go away completely Very Soon.)
1997-10-08 21:26:16 +00:00
christos 7f41ec0345 PR/4162: Chris Jones: make cleandir does not work properly; it does not
remove the object files and the .depend file in the kernel build directory.
1997-09-30 22:50:53 +00:00
mhitch 56c4befa83 Add an entry for the bus_space_tag in the TC attach argument tables. Fixes
PR #4100.
1997-09-24 02:45:12 +00:00
leo ef6f3f7e25 Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
1997-09-20 12:08:24 +00:00
leo d4713d24c2 Implement the kernel part of pr-1891. This allows for a more flexible sized
msgbuf. Note that old 'dmesg' and 'syslogd' binaries will continue running,
though old 'dmesg' binaries will output a few bytes of junk at the start of
the buffer, and will miss a few bytes at the end of the buffer.
1997-09-19 13:52:37 +00:00
jonathan 034f64c0da Set fixtick to (1000000 % hz) when NTP is configured. 1997-09-01 08:05:05 +00:00
jonathan 5342b11519 Replace copyright notice. 1997-08-30 01:51:02 +00:00
bouyer 6f3bab1f59 Merge scsipi branch in the mainline. This add support for ATAPI devices
(currently only CD-ROM drives on i386). The sys/dev/scsipi system provides 2
busses to which devices can attach (scsibus and atapibus). This needed to
change some include files and structure names in the low level scsi drivers.
1997-08-27 11:22:52 +00:00
mjacob 6ac7f6248f add a before tab to SCSIVERBOSE 1997-08-23 19:16:06 +00:00
mjacob 1a7afa3853 add commented out reference SCSIVERBOSE option 1997-08-20 18:38:13 +00:00
jonathan 43bc0b92d2 Turn DDB on by default in GENERIC kernel; turn DDB_ONPANIC off.
Remove obsolete comments.
1997-08-20 04:33:04 +00:00
jonathan d2ecd3da2a update based on NFSINSTALL. 1997-08-20 04:22:41 +00:00
jonathan 378facc384 consistent whitespace after "options". 1997-08-20 04:21:28 +00:00
jonathan e14d1d4768 Move SSIZE and DELAY() definitions to sys/arch/mips/include/mips_param.h.
Update comment in pmax/include/param.h (pr 3988).
1997-08-20 03:47:17 +00:00
mhitch 5170e3eccc Use the free-running microsecond counter on the Maxine for high-resolution
clock.
1997-08-17 18:13:22 +00:00
mhitch 748703e737 Correct the check for a recovered error (I did it wrong the first time). 1997-08-17 16:51:21 +00:00
jonathan d3a3872e1a Fix 3MIN model-string braino from PR# 3965. 1997-08-12 01:52:10 +00:00
jonathan 95a12ee943 MIPS cpu-speed detection using mc146818 clock.
Compute CPU speed(MHz) and loop multiplier for DELAY() based on
counting empty loop between mcclock ticks.  New global: cpu_mhz.
Change pmax/pmax/machdep.c to build baseboard model names from cpu_mhz.
Set  'cpuspeed' for more realistic DELAY() on mips3 models.

Mips CPU constants, testing, and calibration from D. Sean Davidson
<davidson@zk3.dec.com> and Simon Burge <simonb@telstra.com.au>.
1997-08-09 05:51:56 +00:00
jonathan 5d53ad5ef5 Garbage-collect Mach_clock_addr outside of machdep.c.
Use as mcclock_addr inside machdep.c, to disable clock interrupts
until the clock is autoconfigured.
1997-08-06 12:03:34 +00:00
mhitch dfca3a7721 Add disk and tape devices for a second ASC SCSI option card. 1997-07-29 00:54:22 +00:00
mhitch cd0f6f6375 Add the PMAZ SCSI option. 1997-07-28 21:37:38 +00:00
mhitch b3724cd5cd Add disk and tape devices for a second ASC controller. 1997-07-28 19:56:36 +00:00
mhitch 32060ee91a If the IOASIC ASC SCSI driver is not doing buffered DMA, don't allocate
the buffer memory (recovers 112K of memory!).
1997-07-28 19:40:44 +00:00
jonathan c5be7fca38 NEWCONF was prototype ``new config'' pmax kernel config file. Now obsolete. 1997-07-22 08:54:40 +00:00
jonathan 3234955c06 Identical to NFSINSTALL, bar comments. 1997-07-22 08:49:56 +00:00
jonathan e8414333ac Merge NFSROOT and NFSINSTALL. 1997-07-22 08:49:11 +00:00
jonathan 787738a4f7 Move sys/dev/tc/mcclockvar.h -> sys/dev/dec/mcclockvar.h.
Update pmax clock code.
1997-07-22 07:51:33 +00:00
jonathan 8da32cee34 Include /sys/dev/dec/clockvar.h. Garbage-collect tc/clockvar.h. 1997-07-22 04:49:58 +00:00
jonathan 064c4e515c Create sys/dev/dec and cleanup sys/dev/tc:
* Move clockvar.h (header file for generic clock code) to sys/dev/dec.
* Move if_le_dec.c with DEC padded LANCE-dma (pmax/pmax, ioasic, vax 3400)
  to sys/dev/dec.  Remove from sys/dev/tc.
* Declare attribute le_dec_subr in /sys/dev/dec/files.dec,
  use if_le_dec.c when it's defined.
* Move  IOCTL asic declaration from pmax and Alpha MD machine
  files to sys/dev/tc/files.tc.
* move TurboChannel and ioasic if_le attachments from pmax and Alpha machine
  config files to /sys/dev/tc/files.tc.  Add le_dec_subr attribute.
* Add if_le_dec attribute to if_le_ibus (pmax ds3100 pmax) LANCE attachment.
1997-07-22 04:32:13 +00:00
jonathan 4631885e91 Kill __BROKEN_INDIRECT_CONFIG on pmax.
Based on a patch from Chris G. Demetriou, December 1996.
1997-07-21 05:39:02 +00:00
jonathan 592eeb7378 mips-tuned bcopy from Jon Kay (UCSD) released under BSD copyright,
with standard BSD in_cksum() interface by Jonathan Stone.
1997-07-20 22:42:33 +00:00
jonathan 59b1c9add9 Correct cursor-movement bounds check in ifdef'ed out code, as
for revision 1.7 of sys/arch/pmax/dev/ims332.c:
 >Bound x motion by framebuffer width, not height.
 >Bound y motion by framebuffer height, not width.
1997-07-20 03:57:18 +00:00
jonathan ad4cc08b75 Bound x motion by framebuffer width, not height.
Bound y motion by framebuffer height, not width.
   (cf revision 1.4.)
1997-07-19 12:03:51 +00:00
jonathan 21717110ba Raise spl to spltty() in polled console input routine dtopKBDGetc(),
to ensure polled console I/O really is polled.

From Michael L. Hitch <mhitch@lightning.oscs.montana.edu>.
1997-07-19 12:00:10 +00:00
jtk ca1bba150a use locator defines in "locators.h" to index cf_loc[] 1997-07-17 03:16:39 +00:00
jtk 37f9c6bd88 use locator defines in "locators.h" to index cf_loc[] 1997-07-17 01:17:45 +00:00
leo 198bd713f2 Generate assym.h dependencies when making 'depend'. 1997-07-12 22:07:36 +00:00
jonathan d1ec048977 DDB for mips.
Add DDB interface to /sys/arch/mips/mips..
  Rework heuristic stack traceback to work with DDB.
  Add hooks  to print exception log from DDB.
  Add hooks from pmax console drivers:   call Debugger()
  after break from serial console, or 'DO' key from LK-xxx.
1997-07-07 03:54:24 +00:00
jonathan eca6630217 Fix NSCC tests. Use NSCC > 0 (needs-flag) rather than NSCC > 1 (needs-count).
Fix prototypes previously hidden by same.
1997-07-02 13:59:15 +00:00
jonathan da53d70f23 Move generic mips functions setregs(), sendsig(), sys_signal()
to sys/arch/mips/mips/mips_machdep.c.  Delete from pica, pmax machdep.c.

Delint pica machdep.c.
1997-07-01 09:32:13 +00:00
jonathan dfa33cb24e Remove "untested" comments and messages. 1997-07-01 07:21:14 +00:00
jonathan e0bb7d9370 Establish handler for vertical-retrace interrupts.
Use establish-time argument in handlers, to work with multiple framebuffers.
1997-06-30 22:08:58 +00:00
jonathan 11bfae37bb Update compiled-in default partition. Default root 32Mbytes, swap 64Mbytes.
(appropriate for ELF and growth in / since 4.4bsd/pmax).
Clip default-label partitions against the end of the disk to make installs
easier.
1997-06-25 11:00:32 +00:00
jonathan 1eadfb6db9 Change NetBSD/mips setregs() to pass explicit arguments to a
newly-exec()ed user-land process for the new dl*-capable crt0:

  a0	stack pointer (points to onstack argc)
  a1	rtld cleanup (filled in by dynamic loader)
  a2	rtld object (filled in by dynamic loader)
  a3	ps_strings

From Jason Thorpe (thorpej@nas.nasa.gov).
1997-06-23 22:08:02 +00:00
jonathan d2faa7a82b Set kernel text start address in port-specific Makefile, not ldscript. 1997-06-23 02:40:28 +00:00
jonathan e5e8113990 Copyright to NetBSD foundation. 1997-06-22 22:41:33 +00:00
jonathan 89868a5f07 Import mcclock from NetBSD/Alpha, mostly replacing the Sprite clock code.
interface.   From Toru Nishimura <nisimura@itc.aist-nara.ac.jp>.

Partly merged back with Alpha code by Jonathan Stone. Needs more merging.
1997-06-22 09:34:34 +00:00
jonathan 1f44934407 * Change Sprite MACH_xxx prefix to MIPS_xxx.
* Use standard mips terminology (xxx_KSEG0, xxx_KSEG1) instead of the
  (more meaningful) Sprite names (xxx_CACHED, xxx_UNCACHED).
1997-06-22 07:42:25 +00:00
jonathan 4692a37162 Final changes for configuring MIPS1 and MIPS3 in a single kernel.
* cpuregs.h:
    rename remaining VMMACH_xxx TLB macros to MIPS_TLB_xxx.
    Add compile-time MIPS3-only, compile-time  MIPS1-only, and
    runtime (both) definitions  for number of TLB ASIDs (tlb pids)
    and shift count to extract a TLB pid.

  * locore.h:
    Delete unused vector slot for indexed TLB writes.
    mips1 and mips3 TLBs are different enough that we have
    to break them out at the caller anyway.

  * Add compile-time MIPS3-only andcompile-time  MIPS1-only
    macros to call locore functions directly by name.
    Use the  existing method table only if

  * mips/mips_machdep.c, mips/trap.c, mips/pmap.c, pmax/machdep.c:
    Use MIPS3_ or MIPS1_ specific names for TLB pids in
    mips3 and mips1 specific code paths (e.g., creating the kernel stack
    for process 0).

Add `options MIPS3' to pmax/conf/GENERIC.
1997-06-22 03:17:37 +00:00
jonathan a53329f500 Bump PROM-to-RTC offset hack up by one more year. 1997-06-22 01:31:45 +00:00
jonathan 68863ebd8e More mips1/mips3 changes to cpuregs.h and psl.h:
* cpuregs.h:
  Delete unused VMMACH_ names (e.g., duplicates of PTE bits in  pte.h).
  Change remaining VMMACH_xxx  names to MIPS1_xxx or MIPS3_xx.
  Fold remaining compile-time definitions into a single #ifdef MIPS3.

* Use MIPS1_ names  in locore_r2000.S, mips3_ names in locore_r4000.S

* Garbage-collect MachHitFlushDCache()

* psl.h:
  use MIPS1_, MIPS3_  symbolic names for Cause register bits.
  change  _R3K to MIPS1_,  _R4K to MIPS3. Conditionalize for mips1 only,
  mips3 only, or when both are defined,  use runtime CPUISMIPS3 test.
1997-06-21 04:18:09 +00:00
pk 6b976a7d46 rzsize(): call rzopen()/rzclose() if not yet open, per the
current `openmask'.
1997-06-18 22:19:13 +00:00
jonathan a066eecaf8 MachHitFlushDCache() -> mips3_HitFlushDCache() outside pmap.c. 1997-06-18 04:51:15 +00:00
jonathan 3d2676b809 Garbage-collect '#include <machine/pte.h>'. 1997-06-16 23:52:06 +00:00
jonathan fef3e76b31 Changes for configuring both MIPS1 and MIPS3, from a merge of
similar design and code by Jason Thorpe and Jonathan Stone.

NOTE: the kernel-stack-switching code and cacheflush() calls in
locore.S still use #ifdef MIPS3 and need more work.

mips/include/cpu.h:
    Add CPUISMIPS3 for run-time tests of what CPU architecture level
    we're running on.

mips/include/locore.h:
    Add declarations of locore cache-size variables for ref/def toolchain.

mips/include/mips1_pte.h:
    mips1 TLB bit definitions.

mips/include/mips3_pte.h:
    mips3 TLB bit definitions.

mips/include/pte.h:
    define accesor macros for TLB bits (e.g., mips_pg_m_bit(),
    that expand to CPU constants if only one CPU arch is configured,
    or to inline functions if both MIPS1 and MIPS3 are configured.

mips/mips/locore_r2000.S:
    Use MIPS1_PG_xxx constants inside mips1-specific code.

mips/mips/locore_r4000.S:
    Use MIPS3_PG_xxx constants inside mips3-specific code.

mips/mips/locore.S:
    Use MIPS1_PG_xxx constants inside mips3-specific code.
    Use MIPS1_PG_xxx constants inside mips1-specific code.
    (Needs more  work!)

mips/mips/{pmap.c,vm_machdep.c,trap.c}, pmax/pmax/machdep.c:
    Use MIPS3_PG_xxx constants inside mips3-specific functions,
         and MIPS1_PG_XXX inside mips1-specific code.
    Otherwise, use mips_pg_XXX_bit() macros where they apply,
    and use "if (CPUISMIPS3) { ... } else {... }" where they don't.

mips/mips/mips_machdep.c:
    Import Michael Hitch's fixes from the pmax locore-init code
    into mips_vector_init().

pmax/pmax/machdep.c:
    Use generic mips_vector_init() locore vector-init function.
1997-06-16 23:41:40 +00:00
jonathan 2eec9b0bc3 Back out previous change:
Add placeholder for Ted Lemon's years-old-but-new cursor-movment range checks.
1997-06-16 09:53:14 +00:00
jonathan eb1d8427cc Garbage-collect redundant declarations:
mips/include/locore.h:
  Add prototypes for HitFlushDCache() functions. Moe cpu_prid definition here.
mips/include/cpu.h:
  remove  cpu_prid definition.
pmax/pmax/machdep.c:
   remove local protoypes of HitFlushDCache() functions.
mips/mips/vm_machdep.c, mips/mips/vm_machdep.c::
   remove local protoypes of HitFlushDCache() functions.
1997-06-16 09:50:26 +00:00
jonathan b0e19a6a74 Set model string for 5000/150 (kmin with r4000 daughterboard). 1997-06-16 09:19:25 +00:00
jonathan 2d10220f8f Yet more mips1/mips3 merging:
Move mips-specific pmap definitions (PMAP_PREFER for mips3, declaratin
of pmap_bootstrap() for the system-specific machdep.c) from
arch/pmax/include/pmap.h to arch/mips/include/pmap.h.
1997-06-16 07:47:42 +00:00
jonathan 5db35a8cce Yet more merging:
* Move declaration of locore communcation variables (CPU family,
     cache sizes, etc) to mips/include/locore.h.  Delete from
     pmax/include/cpu.h and older versions from pica/include/cpu.h.

   * Move definitions of CLKF_BASEPRI, CLKF_USERMODE to mips/include/cpu.
   * Delete duplicate definitions in pica/include/cpu.h, pmax/include/cpu.h.
1997-06-16 06:17:25 +00:00
jonathan 3409ae8dcd Garbage-collect <machine/locore.h> 1997-06-16 04:30:15 +00:00
jonathan 157d46c672 Commit addition of `#include <mips/locore.h>' to pmax/include.bus.h. 1997-06-16 04:22:15 +00:00
jonathan c34f92cbd1 <machine/locore.h> -> <machine/bus.h> 1997-06-16 04:18:57 +00:00
jonathan 2557a6fa43 GC more old header files:
<machine/locore.h> -> <mips/locore.h>
    <machine/mips_opcode.h> -> <mips/mips_opcode..h>
1997-06-16 03:29:07 +00:00
jonathan f4dc901780 Use #include <machine/bus.h> in pmax device drivers.
Garbage-collect `#include <pmax/locore.h>' lines.
1997-06-16 02:53:23 +00:00
jonathan 817af928bf Add placeholder for Ted Lemon's years-old-but-new cursor-movment range checks. 1997-06-16 02:18:47 +00:00
jonathan cd48c79960 Remove the machConst.h (wrapper for Sprite-derived source), and all
#includes <machine/machConst.h> uses.
Other header files now include <mips/cpuregs.h> where necessary.
1997-06-16 01:45:05 +00:00
jonathan c6b9463cd1 Remove all references to <machine/machAsmDefs.h>.
Use #include <mips/asm.h> instead.
1997-06-16 01:23:56 +00:00
jonathan f8b757f8f4 Remove. Already copied to arch/mips/mips/fp.S. 1997-06-16 01:14:50 +00:00
jonathan 15628b2d97 Move merged pmax psl.h with mips1/mips3 support to mips/include/psl.h.
Change pmax/include/psl.h to just do #include <mips/psl.h>.

pmax/include/psl.h would go away completely if it wasn't stil required
by compat/common/kern_exit_43.c.
1997-06-16 01:10:03 +00:00
jonathan 8e5f767c50 Use generic MIPS pmap vm_machdep.c 1997-06-16 00:35:10 +00:00
jonathan 5d94de1a79 Moved to arch/mips/mips/ with CVS revsion history. 1997-06-16 00:17:27 +00:00
jonathan 747e2b5e7e Generic mips pmap/vm code: move the merged pmax mips1/mips3 vm_machdep
and pmap code to arch/mips/mips.
Use <mips/XXX.h> header files, not <machine/XXX.h>.
1997-06-16 00:16:08 +00:00
jonathan 8a00c90491 Remove old 4.4bsd/pmax rules and targets. 1997-06-15 22:53:49 +00:00
mhitch ab0eff4a87 From Toru Nishimura: _FORKBRAINDAMAGE is gone, user process entered through
proc_trampoline().
More merged MIPS1/MIPS3 support.
1997-06-15 18:21:17 +00:00
mhitch f42f8eb4e6 More merged MIPS1/MIPS3 support - from pica pmap.c 1997-06-15 18:19:47 +00:00
mhitch bbd8bca4a4 More merged MIPS1/MIPS3 support for DECstations.
From Toru Nishimura: separate out FP registers in user pcb.
1997-06-15 18:18:57 +00:00
mhitch 4eb69e0839 DECstation MIPS3 support: wbflush() is cpu-dependent, need declaration from
machine/locore.h.
1997-06-15 18:03:24 +00:00