Commit Graph

366 Commits

Author SHA1 Message Date
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