Commit Graph

522 Commits

Author SHA1 Message Date
jonathan 3751946b97 defopt INET, NETATALK. 1998-07-05 00:51:04 +00:00
jonathan 466e784ee1 defopt DDB. 1998-07-04 22:18:13 +00:00
thorpej 816e12eac2 defopt COMPAT_SVR4 1998-06-26 00:07:06 +00:00
thorpej 21592147a1 defopt COMPAT_ULTRIX 1998-06-25 23:27:56 +00:00
thorpej c466f11939 defopt COMPAT_LINUX 1998-06-25 23:18:23 +00:00
thorpej 971b8956ef defopt KTRACE 1998-06-25 21:18:11 +00:00
kleink 1fbd0b3749 GC the unused `physadr' type, which was not able to hold a complete physical
address on 2 architectures anyhow.  Also, move the definition of the `label_t'
type inside _KERNEL protection, since it is specific to the in-kernel
setjmp()/longjmp() implementations.
1998-06-14 20:09:22 +00:00
cgd 651b44e211 Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install.  (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.)  The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change.  Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
1998-06-12 23:22:30 +00:00
kleink 967614df34 Protect against multiple inclusions. 1998-05-25 21:00:32 +00:00
kleink a97fc2f180 If any of _ANSI_SOURCE, _POSIX_C_SOURCE or _XOPEN_SOURCE are defined, don't
provide any identifiers other than sig_atomic_t.
1998-05-25 20:59:01 +00:00
thorpej 6626878e7b It is no longer necessary for pmap_pinit() and pmap_release() to be
pmap interface functions, as NetBSD no longer uses statically allocated
pmaps (except for the kernel pmap, which is special-cased anyhow).
1998-05-19 19:00:11 +00:00
simonb 9b60278e42 Change external declaration of kdbpeek to match reality. 1998-05-19 04:11:50 +00:00
kleink 687ea7404c Fix some arithmetics lossage on typeless pointers. 1998-05-08 16:55:15 +00:00
kleink aa36ad1f55 Fix some arithmetics lossage on typeless pointers. 1998-05-07 21:01:41 +00:00
mhitch 8c45fef21f When changing the mapping on a page, remove the previous mapping if
there is one.  The Mach VM system seems to take care of this, so it
hasn't knowingly caused a problem.  UVM does change mappings without
removing the current mapping, and will pmap_page_protect() hangs
if pmap_enter() doesn't remove the previous mapping.
1998-05-06 21:53:53 +00:00
kleink a53c1863fe Provide definitions for intptr_t and uintptr_t, signed resp. unsigned integral
types large enough to hold any pointer.
1998-04-27 17:39:10 +00:00
jonathan e0a67e8aa8 Commit definition of mips_set_wbflush(). 1998-04-27 07:34:28 +00:00
jonathan b5798a80f0 define mips3 COUNT and COMPARE cp0 registers (onchip cycle counter) 1998-04-23 10:32:08 +00:00
jonathan 3d2cea267e Commit change missed during Decsystem 5100 chagnes:
prototype declearation for method to override wbflush() callback
vector with model-specific code. Used on DEC r2000a machines with
writebuffers which indicate writebuffer drain via cp0 usability bit.
1998-04-23 10:31:02 +00:00
jonathan 216daa4e5e Configure mips_mclock if "clock|mccclock".
All(?) ARC boxes use mcclock, but QBus decstations use the same
time-of-year clock architecturally mandated for VAXes.
1998-04-19 08:24:19 +00:00
jonathan 53c671e26c Add locore assembler functions to read mips3 cycle counter, and
read and write compare register (controls cycle-driven periodic interrupt).

Use cycle counter for microsecond time on mips3, but for now only on
3min motherboards (5000/150).  the MAXINE baseboard microsecond
counter is more stable and I don't ave no 5000/260 to test.

XXX clkread() is a mess, it should be rewritten.
XXX should add nanotime() to give inkernel nanosecond resolution,
    and then microtime() reworked to use nanotime().
1998-04-19 01:48:34 +00:00
jonathan 6b2d0fa8a0 * Create /sys/arch/mips/include/intr.h, with extern declaration of
interrupt-callout vector from mips locore dispatch code to port code.
* Move branch-emulation declaration to mips/include/trap.h.
* Garbage-collect pmax/pmax/trap.h.
  Not needed now pmax/pmax_trap.c is gone, and after above tidy-up.
1998-03-26 12:46:33 +00:00
jonathan 9376fa1a1b Commit MIPS_INT_MASK_FPU change: use MD symbol to check for pending FPU
interrupts.
1998-03-26 09:21:05 +00:00
mhitch 0fb478e609 Define ELF dynamic types for MIPS (some will be used by ld.elf_so). 1998-03-25 04:06:50 +00:00
thorpej afe0f98a85 Fix some obvious problems in my MIPS kcopy() implementation (a significant
typo, plus get delay slots right on the R3000).
1998-03-23 00:57:13 +00:00
thorpej 7819cad7ec Implement pmap_deactivate() (a noop in this pmap) and clean up
pmap_activate() a little.
1998-03-22 23:12:15 +00:00
mhitch a10657ae4f Set the PID before setting up the wired TLB entries for proc0. The
mips3_HitFlushDCache() fails with a TLB miss otherwise.
1998-03-22 06:31:40 +00:00
thorpej 7bb58d92ce Garbage-collect; vm_page_alloc1() and vm_page_free1() are now in MI code. 1998-03-12 06:26:26 +00:00
thorpej e3bda606eb Add support for UVM. 1998-03-12 05:45:04 +00:00
tsubai 2630ce2157 label 1: within #ifdef pmax is referenced from outside.
so it didn't work without -Dpmax.
1998-03-06 13:54:02 +00:00
thorpej 803f5aa188 Remove the memcpy() alternate entry point for bcopy(), a temporary measure
until the memcpy()/bcopy() thing is worked out.
1998-03-02 23:40:42 +00:00
thorpej da6458bfb4 Implement and switch to MACHINE_NEW_NONCONTIG. 1998-02-25 23:26:41 +00:00
thorpej 4673e0c339 Prototype allocsys(), mips_init_msgbuf(), and mips_init_proc0(). 1998-02-25 23:25:16 +00:00
thorpej 469520ccd4 Pull some code out of N mach_init() functions, and place it in a
common place:
- allocsys(), which computes space for and assigns addresses
  to kernel data structures at boot time.
- mips_init_msgbuf(), which initializes the error message
  buffer at the end of core.
- mips_init_proc0(), which initializes the U-area for proc0
  and nullproc.
1998-02-25 23:24:35 +00:00
perry 1ed8ea9966 note second parm of sysarch() is now void *, + trivial KNF, etc. 1998-02-25 21:41:55 +00:00
perry 56c01cbd82 change second parm of sysarch() from char * to void * 1998-02-25 21:24:56 +00:00
jonathan 78b939d4b5 Pull up duplicated CPP definitions from float.h rev 1.10:
>DBL_MIN and DBL_MAX were less precise than they should have been.
1998-02-21 23:50:24 +00:00
thorpej 2f74d0222a savectx() is prototyped in <mips/cpu.h> 1998-02-19 23:10:18 +00:00
thorpej 0743f83f64 Implement new style crash dumps for NetBSD/mips, lifted from NetBSD/alpha. 1998-02-19 23:09:30 +00:00
thorpej cf06aa7c03 Prototype dumpsys() and savectx(). 1998-02-19 23:07:14 +00:00
thorpej c5862712ae New crash dump format definition for NetBSD/mips. 1998-02-19 23:06:11 +00:00
thorpej c3a02725ea Use a reasonable default for NKMEMCLUSTERS. Previous default value wouldn't
run multi-user for very long at all, and every kernel configuration file
overrides it!
1998-02-19 06:40:09 +00:00
mycroft ec9c3ce899 DBL_MIN and DBL_MAX were less precise than they should have been.
Other minor changes to match other float.h files.
1998-02-18 10:37:04 +00:00
wrstuden 2d3036fc0e Add NETATALK support for mips machines. Somehow the NETISR_ATALK code
didn't make it in. Aproved by Jonathan and tested here at Stanford.

While I'm here, add conditional prototypes for clnlintr() and nsintr()
so that NS and ISO will compile correctly.
1998-02-05 21:48:23 +00:00
jonathan 8b8b6ca51d garbage-collect unused MMSEG. From PR# 3898. 1998-02-02 22:21:32 +00:00
jonathan adac7274cc Finish bi-endian support: add code to sum odd start/end bytes
correctly on both big and little endian systems.
From Tsubai Masanari <tsubai@iri.co.jp> in PR# 4434.
1998-02-02 21:27:17 +00:00
jonathan e50f17aab7 Delete incorrect private declaration of db_maxoff. 1998-02-02 12:49:15 +00:00
jonathan 696b21e65f Change VM_WAIT --> vm_wait() in mips pmap code, where waiting after
vm_page_alloc1() fails to return a page for use as a segtab.

XXX there must be a better way to do this.
1998-02-01 01:55:15 +00:00
thorpej 2ee3e0153d Generate dependencies on the exec format options EXEC_AOUT, EXEC_ECOFF,
EXEC_ELF32, EXEC_ELF64, and EXEC_SCRIPT.
1998-01-22 01:32:14 +00:00
perry 6f57e5c573 multiple include protect machine/limits.h, fixes pr 4473 (from Mika Nystrom) 1998-01-09 22:23:44 +00:00
perry b46484bb8a RCSID Police. 1998-01-05 20:51:25 +00:00
perry 015e898c02 RCSID Police. 1998-01-05 07:02:46 +00:00
thorpej b9f1b716f3 Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
1998-01-03 01:12:59 +00:00
mhitch cc997082a5 Someone forgot to update db_tlbdump_cmd() when adding the printf routine
to the TLB dump routines arguements.  Machines would die horibbly when
trying to dump the TLB entries in DDB.  Also don't explicitly "page" the
output, since db_printf takes care of that.
1997-12-06 19:19:07 +00:00
kleink 66c2794142 Add _BSD_SUSECONDS_T_ and _BSD_USECONDS_T_; do some space vs. tab formatting
cleanup
1997-11-23 20:20:53 +00:00
mhitch 44c123573b Define PC_ADVANCE() to advance the PC around the break instruction only
if the break instruction is still there.  This works around a problem with
the software single step in DDB not recognizing the temporary breakpoint
set to emulate the single step.
1997-11-18 21:13:17 +00:00
veego df6d37534b s/NETHER/NARP/ and s/ether.h/arp.h/ for the 'new' arp system. 1997-11-13 10:37:40 +00:00
mhitch c390c7a5e1 The address used by mips1_FlushICache() is a virtual address, not a physical
address.  This caused DDB to hang the machine hard when trying to set a
breakpoint.
1997-11-11 16:50:57 +00:00
thorpej 0b04d28454 Mark uses of long long with /* LONGLONG */ for lint. From
Chris Demetriou <cgd@pa.dec.com>.
1997-11-05 04:36:08 +00:00
thorpej a15938129d asm -> __asm__ 1997-11-05 04:02:26 +00:00
thorpej 4730a8cbec Bug fixes and cleanup from Chris Demetriou <cgd@pa.dec.com>:
- fix _C_LABEL so that it actually works.
- make __RENAME use _C_LABEL.
- fix __RENAME so that it expects an unquoted argument.
- fix __indr_reference and __warn_references so that they
  supply their own final semicolon.
- define __warn_references to nothing if not GNU C (required
  by the way it's used).

The __warn_references semicolon change has to be made
so that __warn_references can be defined into nothing.
(A ; all by itself isn't a great idea.)  The __indr_reference
change was made for consistency.
1997-11-04 23:09:23 +00:00
jonathan ba6431afae Incorporate a 4.4BSD-Lite workaround for a bug in cache invalidation.
From   /sys/news3400/news3400/locore.s, with id
	@(#)locore.s	8.3 (Berkeley) 9/23/93

Kazumasa Utashiro notes that the pmax cacheflush routines don't work:
    #ifndef NOTDEF /* I don't know why Ralph's code doesn't work. KU:XXX */

It's because pmax hardware wries the COP0 bit to external branch
logic.  news3400s don't, and so the bc0f loop fails.  It will also
fail on some other models of pmax, but we dont' support them.
Surround the relevant framgents in locore_r200.S with "#ifdef pmax".

Longer-term,  the cacheflush entry in the locore callback may have
to be a  CPU baseboard-specific entry, not just CPU-version specific.
1997-11-01 06:34:07 +00:00
jonathan 84dcba44e2 Add missing `(void)' cast to big-endian variant of {NTOH,HTON}{L,S}(). 1997-10-30 09:07:50 +00:00
thorpej 665f7d1a6e Implement __RENAME() in <machine/cdefs.h> 1997-10-22 05:20:32 +00:00
jonathan 4d29dd99dd Put back duplicate <XXX>_ENDIAN definitions. Defining them as _<XXX>_ENDIAN
loses on non-POSIX source that re-defines <XXX>_ENDIAN itself (e.g., gdb.)
1997-10-20 19:15:40 +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 b29ce8697c Comment out PT_STEP for 1.3. Defining it causes gdb 4.16 to break.
(inferior debugee children die immediately with SIGTRAP.)
1997-10-20 07:29:23 +00:00
jonathan 04c45d466a Define PT_STEP. 1997-10-19 21:49:50 +00:00
jonathan ed413accab Add PT_GETFPREGS, PT_SETFPREGS and process_{read,write}_fpregs. 1997-10-19 21:02:00 +00:00
jonathan 92ed4b0f7f Make the __mcount entrypoint non-static for kernels, to avoid any
chance of gprof mis-report profile ticks in __mcount to  the following
function in libkern (currently _qdivrem).
1997-10-18 22:31:33 +00:00
jonathan 82526d56fd Prototype __flt_rounds(). 1997-10-18 02:43:06 +00:00
jonathan d385e0e57e Prototype ANSI-safe gcc trampoline entrypoint. 1997-10-18 02:25:14 +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 84d8ac7355 * Performance improvements from July 1997:
Avoid unecessary cache writebacks on mips3. 10% win on kernel builds.
* _KERNEL_RCSID.
1997-10-17 05:57:20 +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
mhitch c7422c2d87 Fix typo - list/libc/gen/nlist_ecoff.c still wasn't compiling. 1997-10-15 00:59:01 +00:00
mycroft 7b89784c31 GC some bogus definitions. 1997-10-11 16:12:55 +00:00
jonathan 2ebcc702b9 Don't check the actual CPU type unless we're in the _KERNEL, or
src/lib/libc/gen/nlist_ecoff.c breaks.
1997-10-10 03:24:49 +00:00
bouyer 6ab3092b11 Add byte-swapping functions (bswap16, bswap32, bswap64) to libkern.
Only assembly version for i386 bswap16 and bswap32 for now (bswap64 uses
bswap32). Contribution of assembly versions of these are welcome.
Add byte-swapping of ext2fs metadata for big-endian systems.
Tested on i386 and sparc.
1997-10-09 15:42:19 +00:00
jonathan ac262c0c2f Allow mips3 ECOFF binaries if running on a mips3 CPU. 1997-10-08 07:36:58 +00:00
jonathan 1203ea77f9 GNU ld script for linking standalone MIPS code (e.g., bootblocks). 1997-10-05 22:17:56 +00:00
mhitch 9769ae9148 Fix error in msgbuf change: add missing '&&'. 1997-09-24 02:20:56 +00:00
mhitch 5bcefb5bc6 Fix another missed *setregs() change. 1997-09-24 02:15:51 +00:00
leo c5ba7a3102 Move the definition of MSGBUFSIZE up to the machine-arch level if
possible. Pointed out by Bernd Ernesti.
1997-09-20 12:06:37 +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
mycroft 16a8787248 Fix execve(2) and *setregs() interfaces so emulations can set registers in a
more correct way.  (See tech-kern.)
1997-09-11 23:01:44 +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 4c88f43717 Get $ra contents from the proper location in the exception/interrupt frames.
Use DDB symbols if available for stack traceback.
1997-08-17 17:02:07 +00:00
mhitch 549e36420e Display jump and branch target with symbols if available.
Clean up indentation - seems to have gotten messed up when the mini-debug
routine was added.
1997-08-17 16:58:53 +00:00
jonathan bf61f3291a Add checks for DS 3100, 2100. Use more generous delay values, these
systems may be memory-bound.
1997-08-14 00:15:37 +00:00
jonathan a5266cdd64 Fix for mbufs that start on odd-byte-aligned boundaries, and use. 1997-08-12 06:05:28 +00:00
jonathan cfc1040a1f Revert syscall interrupt re-enable of previous revision:
introduces a race in trap logging.  Reported by Michael Hitch.
1997-08-10 01:14:49 +00:00
jonathan 85d2b918cd Definition of cpu_mhz. 1997-08-09 19:06:45 +00:00
jonathan baad4266be Fix printf() format strings for VMFAULT_TRACE (see PR port-pmax/3777).
Re-enable interrupts in syscall() before doing anything else; marginal
impprovment (2ms?) in NTP accuracy on 5000/240.
1997-08-09 06:06:37 +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 003ccf3b1c mips pmap_activate:
* prototype and definition for pmap_activate(p). Updates the segtab,
   and changes the active ASID if p == curproc.
 * Make reserved fixed-address (UADDR) kernelstack PTEs global,
   so we still have a kernel stack after pmap_activate() on curproc.
 * make KSEG2 mappings for p_addr global (see above.)

Seems to detune contextswitch and NTP resolution (by 60 ms), but
thepmap_activate() interface is mandatory.  Needs more thought.
1997-08-09 03:41:02 +00:00
jonathan 1c7fa31659 Add mips_read_causereg() 1997-08-08 06:52:59 +00:00
mhitch b4af013102 Resident count in pmap is now valid. I can now see RSS in ps. 1997-07-29 01:43:26 +00:00
mhitch fd5f2fd062 Get rid of the MIPS3 mess I left in pmap_enter_pv(). The cache inhibit
of cache-index incompatible virtual mappings for a physical page may be
required for hardware without secondary (level 2) cache to detect and
correct virtual coherency problems.  I'm not sure this is really needed
anymore, since pmap_prefer() took care of of the cache-index
incompatible mappings that I have seen.  Count the times a page is
cache inhibited in enter_stats if DEBUG.

Wait for memory instead of panic() on failure to allocate a page for the
segtab or segmap [from OpenBSD arc port].  Also check for malloc()
failure on allocation of a new pv entry and panic().

Increment resident_count when adding a new page to a pmap [also from
OpenBSD].  Process resident size is now valid.
1997-07-29 01:41:46 +00:00
jonathan 98d9a419f8 Add comments to pmap_copy_page() and pmap_zero_page() describing the
cache flush operations required on a virtually-indexed, physically-tagged
mips3 with no L2 cache to provide cache-coherence exceptions.

(Similar to what's needed with a virtually-indexed, virtually-tagged cache.)
1997-07-28 20:41:58 +00:00
mhitch 8e145a319b Don't rely on curproc to access the current pcb when testing for kernel
faults.  Use curpcb, which always points to the current pcb.  If curproc
was NULL when the kernel faulted, the trap handling would fault recursively
and the kernel stack would overflow.
1997-07-26 19:46:40 +00:00
jonathan f9e3ce0f92 revert to MI in_cksum code. 1997-07-25 21:01:45 +00:00
jonathan 83ebfc3545 Unroll pmap_copy_page() and pmap_zero_page() inlined loops even further. 1997-07-23 05:41:17 +00:00
jonathan b1032ac9db Substitute Mach 3.0 MK84 mips kernel bcopy() for Sprite bcopy().
Has unrolled loop for aligned-to-aligned copy.

Notes:
  1. this code tuned for DEC 5000/200.  ioasic decstations do more unaligned
     copies.  Better than old non-unrolled loop, but could be improved.

  2. Undoes changes made for MIPS3 with comment implying an r4000 TLB bug.
     We can't reproduce this on 5000/150 (jonathan) or 5000/50 (mhitch).
     Calls to previous  bcopy with a bad address show similar symptoms,
     reporting a trap in bcopy() after bcopy() has returned.  Same thing??
     Needs re-checking on an r4000 with no L2 cache.
1997-07-23 05:36:40 +00:00
jonathan a6c118666a Fix for chains containing interior mbufs with odd length. 1997-07-22 07:36:18 +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 f43c13bff4 Add ddb to mips/conf/files.mips. Garbage-collect mdb. 1997-07-20 20:48:40 +00:00
jonathan 5ba85a4cf8 Kernel profiling. Don't profile the following:
sigcode():
      executed from user-space stack.

  mips1_cpu_switch_resume, mips3_cpu_switch_resume:
      arguments passed in via v0, t0, t1 (outlined from cpu_switch())

  mips3_VCED(), mips3_VCEI():
      called from exception-vector code without any register save,
      $at, $ra are live.
1997-07-20 19:48:03 +00:00
jonathan 01794f87e3 Conditionalize mips1-speciifc locore code on #ifdef MIPS1 1997-07-20 19:40:19 +00:00
jonathan fd7a6758c8 Don't emit ".set reorder ; .set noreorder" around mcount profiling
stubs if _LOCORE or _KERNEL are defined,.  _LOCORE means we're
compiling locore. Locore assumes ".set noreorder" for the whole file.
1997-07-20 09:47:03 +00:00
jonathan 9f89c0da89 Use __attribute__((unused). From Chris G. Demetriou <cgd@pa.dec.com>. 1997-07-20 03:47:29 +00:00
jonathan caea1075c9 * Do staktcraces back through traps from kernel mode.
* Don't take  stack adjustment inside procedures as frame size
  (e.g.,  8-byte stack adjustment for calling _mcount).
1997-07-20 03:46:20 +00:00
jonathan 06df97095c Add ecoff ``struct ext_ext'' header fields to ecoff_extsym.h.
Compatible with mips ECOFF nm from GNu binutils or MipsCo toolchain.
1997-07-20 02:38:02 +00:00
jonathan 39814d8abc Add pointer to _mcount to avoid bogus warnings about unused static function.
(calls from interpolated assembler are invisible to gcc.)

If _KERNEL, add prototypes for non-profiled entrypoints _splhigh(), _splx().
1997-07-19 21:30:25 +00:00
jonathan ccf3801c92 * Re-apply changes from rev 1.6 of sys/arch/mips/include/reg.h accidentally
undone by rev 1.7:
  >redo pmax/include/reg.h
  >so that the definitions needed by locore.S are in a separate file,
  >pmax/include/regnum.h.

* Add explicit `#include <mips/regnum.h>'  where symbolic offsets
  into a mips trapframe or struct reg are used..
1997-07-19 09:54:23 +00:00
perry ad1710ce1e update comment from 1981 on memory and disk prices -- pr-2754 from Curt Sampson 1997-07-12 16:18:36 +00:00
jonathan 1490cbcf7b Rewrite struct ecoff_symhdr using the same field ordering as GNU
binutils and the MipsCo toolchain, not the Alpha ordering (which has a
block of int32_t symbol counts and a block of long offsets) .
1997-07-07 19:37:33 +00:00
jonathan 65e2c70353 Force write-back of D-cache after doing DDB writes on mips3. Flushing
the Icache is not sufficient: a mips3 can write a new insn into
writeback L1 Dcache, leaving stale instructions in the mixed L2 cache.
1997-07-07 04:55:27 +00:00
jonathan 919bc0ce92 Typo in RCS id. 1997-07-07 03:57:55 +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 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 8586e62e14 Enable stack tracebacks if MDB is configured. 1997-06-30 14:42:32 +00:00
mhitch d6b6efec34 Moved the mini-debug routines out of trap.c into their own file, like the
original pica port.
1997-06-28 03:59:46 +00:00
mhitch a503f4436c Mini-debuuger is now included by options MDB.
Move mini-debugger routines to separate file, minidebug.c.
1997-06-28 03:57:55 +00:00
mhitch 566b174c13 Mini-debugger now included by options MDB.
Cpu_regs() is included by options DEBUG, as are the stacktrace routines,
so move it inside the #ifdef DEBUG along with stacktrace().
1997-06-28 03:55:05 +00:00
mhitch 8c12914cdb Fix typo.
Include minidebug.c with options MDB.
1997-06-28 03:43:21 +00:00
mhitch 63f2f12797 Someday I'll learn how the MIPS cpu works; add some delay after the tlbp
when switching to a new process.  This was causing a ktlbmiss and stack
overflow panic on R3000 machines.
1997-06-25 05:06:01 +00:00
mhitch dc1ece0234 Move the mips*_dump_tlb() routines outside the #ifdef so they are always
available.  Used in the locore ktlbmiss/panic to display the TLB contents
that are mapping the kernel stack.
1997-06-23 21:48:28 +00:00
mhitch f200f89fe7 Remove an incorrect store of the SP when displaying information about a
ktlbmiss on the kernel stack.  It was showing the temporary SP, not the
original SP.

Add a display of the first few wired entries of the TLB so when the ktblmiss
occurs, the TLB entries mapping the kernel stack can be verified.
1997-06-23 21:45:05 +00:00
jonathan 0d95f6f43d Align to 8-byte boundary after ASMSTR(), for mips3. 1997-06-23 06:15:28 +00:00
jonathan d2faa7a82b Set kernel text start address in port-specific Makefile, not ldscript. 1997-06-23 02:40:28 +00:00
jonathan 1eba6a6cc9 Disambiguate cache-size message, as suggested by cgd. 1997-06-22 12:22:37 +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 b86aa7f311 Fix typo mips3_mips_switch_exit. 1997-06-22 04:30:01 +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
mhitch a7ac6e48ad Move the CPU-specific shift of the TLB PID into mips_r?000.S. 1997-06-21 06:32:22 +00:00
mhitch b027d98eb5 MachHitFlushDCache is gone. 1997-06-21 04:52:26 +00:00
mhitch edbde97cdf Fix pmap_prefer() to work in merged for mips1/mips3.
Remove unused debug procedure I forgot to remove previously.
Consolidate the vm_page_free1() calls in pmap_release().  Duplicate code
was a result of the way I merged the MIPS3 support from the pica pmap.c.
Enhance the comment on flushing the cache when releasing the segmap pages,
and add a comment about the currently unused code to uncache pages in
pmap_enter_pv().
1997-06-21 04:36:22 +00:00
mhitch 478559dd28 Merged mips1/mips3: cache alias test in pagemove(). 1997-06-21 04:24:45 +00:00
mhitch 51d10edcf2 Restore a lost (int) case in DELAYBRANCH macro - test for BR delay in
unsigned cause register wouldn't have worked.
Add missing ')' in trapdump that shows up when compiled with DEBUG.
Fix (unfix?) previous change to printf formats in mips3_dump_tlb: vad_to_pfn
is now consistant with single-CPU and merged-CPU support.
1997-06-21 04:18:29 +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
mhitch e03cf7a95c Cast mips1-only and mips3-only pfn_to_vad() macros to match the mips1/mips3
merged inline function.  Fixes inconsist printf format usage in trap.c.
1997-06-21 04:10:42 +00:00
jonathan 63b4439556 Correct cast type on mips3_MachHitFlushDCache(). 1997-06-20 07:35:03 +00:00
jonathan 5ed24fd4b4 trapDump(): compute accurate mask for EXC_CODE from CPU type at runtime. 1997-06-20 05:15:36 +00:00
jonathan c6c2263566 MachHitFlushDCache -> mips3_HitFlushDCache().
Add  XXX reminder to d-cache flush I don't understand.
1997-06-20 04:34:38 +00:00
mhitch 9b445e15ea Use same cachesize variables for mips1 and mips3, and rename the variables
per Jonathan's request.
Remove switch_exit() declaration - it's now called via the locore jump vector.
1997-06-19 06:34:16 +00:00
mhitch 4fa507b4fc More merged mips1/mips3 support:
Remove cpu-specific routines from locore.S and add them to locore_r2000.S
and locore_r4000.S.  Add entries in locore jump vector table for switch_exit()
and the cpu_switch() context resume.
Add offsets into the jump vector to genassym.cf for use in locore.S.
1997-06-19 06:31:14 +00:00
mhitch df0701481f Use same cachesize variables for mips1 and mips3, and rename the variables
per Jonathan's request.
1997-06-19 06:30:47 +00:00
mhitch 129320c2ca More merged mips1/mips3 support:
Remove cpu-specific routines from locore.S and add them to locore_r2000.S
and locore_r4000.S.  Add entries in locore jump vector table for switch_exit()
and the cpu_switch() context resume.
Add offsets into the jump vector to genassym.cf for use in locore.S.

Use same cachesize variables for mips1 and mips3, and rename the variables
per Jonathan's request.
1997-06-19 06:30:03 +00:00
jonathan a066eecaf8 MachHitFlushDCache() -> mips3_HitFlushDCache() outside pmap.c. 1997-06-18 04:51:15 +00:00