Commit Graph

104 Commits

Author SHA1 Message Date
jonathan df51f8395d Change MachEmulateBranch() to be able to read an insn from user space.
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.
1995-12-28 16:22:41 +00:00
mycroft cd8fe86bcb Make the type of __builtin_va_list a long. 1995-12-26 01:16:24 +00:00
mycroft 0c00214737 Use __builtin_va_alist. 1995-12-26 00:19:09 +00:00
mycroft fa887628d8 Stylistic changes. 1995-12-25 23:15:31 +00:00
mycroft d1de691efb Stylistic changes. 1995-12-25 22:22:02 +00:00
mycroft 0199e002ad Update for GCC 2.7, and fix bugs. 1995-12-25 21:41:08 +00:00
jonathan 2852152043 Reserve a number in the machine-dependent range for PT_STEP, in
case the kernel-debugger implementation of single-stepping ever works
with user code.
1995-12-21 09:28:36 +00:00
jonathan c0f958f6be Add support for ptrace PT_GETREGS and PT_SETREGS for NetBSD/pmax:
* 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.
1995-12-20 02:00:23 +00:00
jonathan 00b821d6c2 Change mips __warn_references() macro to use the ELF warning features
in binutils 2.6 and (patched) gcc 2.7.2. Only works with gcc in ANSI C
mode, for now.
1995-12-15 01:17:04 +00:00
mycroft 292120bf63 Define __FORK_BRAINDAMAGE. 1995-12-09 04:41:41 +00:00
jtc 0cd793449e merge in changes from 1.1 release branch 1995-11-30 00:56:23 +00:00
jonathan ae1b64d888 Fix btoc()/ctob() typo in reading physical memory that stopped ps
from reading process argument lists.
Allow kernel-virtual memory reads to read the message buffer, since
dmesg needs it.
1995-09-29 21:53:29 +00:00
jonathan b543578236 Add a missing "nop" in a delay slot in the floating-point exception
handler.  Gradual underflow and fp emulation now work correctly.
Proper denorms also fix strtod() inaccuracies and Gcc's "enquire" program.
1995-09-28 20:02:50 +00:00
jonathan cd887a9930 Add "kvtophys()", which maps MIPS R2000 kernel-virtual addresses to physical addresses,
so they can (e.g.) be written to DMA mapping registers.
1995-09-25 20:36:23 +00:00
jonathan d1234038d4 Rename the force-all-pending-writes to memory function to wbflush().
Keep the old Mach-derived name "MachEmptyWriteBuffer()" as an alternate
entry point.
1995-09-21 23:28:31 +00:00
jonathan 0641f09bfb Include <sys/mount.h>, as the new <sys/syscallargs.h> won't compile without it. 1995-09-20 23:33:25 +00:00
thorpej 7d7396c414 Make system calls conform to a standard prototype and bring those
prototypes into scope.
1995-09-19 22:53:47 +00:00
jonathan 9a914b5b01 Rename the Decstation 2100/3100 interrupt functions from "pmax_<func>"
to "kn01_<func>", to avoid confounding a model name (PMAX) with the name of the
entire port (pmax).


Change the signature of interrupt-handlers to take a void *
(a pointer to the softc) and return an int (indicating spurious
interrupts or other conditions.)

Pass softc pointers to the scsi and ethernet kn01 (DS_PMAX)  drivers,
rather than having unit numbers wired into the base-level interrupt
handler.
1995-09-11 22:03:00 +00:00
mycroft fa13d32c41 Add splsoftnet(). 1995-08-13 00:16:08 +00:00
jonathan 6a99440efd Add prototypes for most functions. Fix typo where statements
intended to increment interrupt counters for vmstat -i (i.e., "ctr++")
on 3100s had just a single "+", and hence had no effect.
1995-08-01 06:58:57 +00:00
jonathan 4525afdaeb Add diagnostics for 5k/240 turbochannel interrupts, and clean up IOASIC clock
declarations.
1995-07-23 20:21:17 +00:00
cgd 479fb9e45b add <sys/cdefs.h> inclusions. namsspace-protect physadr, label_t
def'ns against _POSIX_SOURCE and _ANSI_SOURCE.
1995-07-06 03:39:32 +00:00
paulus 08b7596c51 Add code to interrupt to call pppintr. 1995-07-04 12:22:21 +00:00
cgd c83f9c5568 remove unused cpu_exec() definitions. moved "broken swap" markers, for
ports that still need it, to types.h.
1995-06-28 02:55:18 +00:00
cgd 1c0be437b1 define __BDEVSW_DUMP_OLD_TYPE for ports where it's true. clean up
some m68k ports inclusion of common header.
1995-06-26 05:13:37 +00:00
jtc 55fbbc705d Wrap with #ifndef _XXX_FLOAT_H_/#define _XXX_FLOAT_H_/ ... /#endif. 1995-06-20 20:45:22 +00:00
jtc 1d65cdd4ab #include <sys/cdefs.h>.
Wrap __flt_rounds() declaration with __BEGIN_DECLS/__END_DECLS.
1995-06-20 20:32:22 +00:00
mellon 1305dc32df Put parentheses around macro arguments 1995-06-16 02:07:33 +00:00
jonathan ae4eae4f63 Change reference in asm code from ``__mcount'' to ``___mcount'', to be
consistent with the (default) prepending of underscores to identifiers.

Because this reference is inside an ASM string it's too hairy to
conditionalize to support different toolchains that don't prepend underscores.
(Just don't do profiling with  such  toolchains.)
1995-05-31 00:25:06 +00:00
jtc f90f8d10aa Removing -DKERNEL, transition to _KERNEL has been completed 1995-05-16 22:24:17 +00:00
jonathan 4175c2819f Redo 3MAX+ (5k/240) interrupt enable code.
Instead of being a no-op, kn03_intr_enable() sets the sw copy of the
interrupt-enable mask *and* writes it into the IO asic intr-enable
register.  Boot code sets the sw copy (kn03_tc_imask) to something
sane (KN03_IM0, with tc option slots turned off).  Tested and works.
Interrupt code for other IOASIC machines should be redone so that
interrupts for devices are enabled by drivers, rather than by
cpu-specific boot code.  Functions common to all IOASIC machines
(PSWARN?) should be done by asic_init().

Checked in without the above changes so that 3MAX+, MAXINE and 3MIN
interrupt-(enable,handle) can converge.
1995-05-12 23:27:23 +00:00
mellon 214234c937 Fix MAXine interrupt mask routine 1995-05-05 06:48:14 +00:00
cgd 8703076975 define BROKEN_SWAP and/or cpu_swapout as appropriate. 1995-05-05 03:41:51 +00:00
mellon 3ff601e7a1 Don't conditionalize utility routines based on DEBUG flag 1995-05-05 02:45:31 +00:00
mellon c6a24163a3 Use Alpha cdefs.h 1995-05-03 06:04:54 +00:00
jonathan be2c7f3d13 If we panic inside trap(), Do a stack traceback before printing the trap log.
Also change the stack-traceback code to avoid having multiple returns
(and thus multiple stack pops) because with gcc -O2 that breaks the
heuristic that a "jr ra" preceding the PC precedes code to push the
current stack frame.  Which breaks stacktrace() before it even
traces past itself :-(.  Use a goto instead.
1995-05-02 19:51:52 +00:00
jonathan fb9f07db36 Update MIPS stack backtrace code to trace through locore functions,
traps, and interrupts  The earlier (4.4bsd) code didn't do the first two, and
got the last one wrong.  Also print some functions (e.g., trap handlers)
by name.  Add hook to use something other than printf() as the output
function, e.g,. for kernel debugging.
Tested with the `native' toolset, but not ELF format kernels.
(i.e., unwinding the $GP register is not tested.)

The stack backtrace code that interprets and unwinds stackframes is still
opaque and stylistically awkward.
1995-04-29 21:10:31 +00:00
jonathan b2c7420e5a Fix performance bug in pmax MachFlushDCache(). Old code disabled icache
and wasn't unrolled. This code runs cached and unrolled, giving an order
of magnitude improvement in some cases (e.g., DMA-capable network devices).
In use at Stanford DSG since late January 1995.
1995-04-28 23:17:51 +00:00
jonathan 026a077a5d Check in source code actually containing changes in previous log message--
fixes to turbochannel-based DECstation interrupt enabling.
(I hate network firewalls that break rsh and remote CVS.)
1995-04-28 22:50:29 +00:00
jonathan 523e8bccbc Fix hardware interrupt-mask setup in the 5k/240 (3max)+ interrupt handler.
(A similar fix needs to be applied to the 3min and xine handlers.
This fixes a long-standing problem when booting with a card that
wants to interrupt (e.g., a network interface) would have interrupts
enabled before a handler was set up.

Add interrupt-counting code to model-independent interrupt handler,
and 3max (5k/200) and 3max+ (5k/240) md handlers, for vmstat -i.
Similar changes for 3min and xine are obvious but not done.

Add  code for 5k/240 to read, and latch, the current value of the
IOASIC bus-cycle counter at each timer interrupt.  The latched
counter is needed to accurately interpolate the bus-cycle counter value
as a high-resolution clock.
1995-04-28 21:48:11 +00:00
jonathan ef8023a47b Check in changes suggested by Ralph Campbell: update variable names
to use turbochannel slot numbers, add a couple of extra slots, just
in case.
1995-04-28 03:10:41 +00:00
mellon 1992309f8b Fix a few compat code casualties 1995-04-25 19:16:43 +00:00
mellon 3eca8117f7 Fix up args to scdebug_{call,ret} 1995-04-25 05:30:14 +00:00
christos de42a28a1b - added sunos_machdep.c for sun3, atari, amiga and mac68k.
- changed machdep.c and trap.c to use struct emul.
- remove ep_setup references.
- added struct emul to all emulations.
1995-04-22 20:24:40 +00:00
mellon a3c29d62df Use _KERNEL, not KERNEL 1995-04-12 01:55:35 +00:00
jtc 32a6db8a76 Mips specific portions of ieeefp.h (fp_rnd, fp_except, constants, etc.). 1995-04-11 18:20:46 +00:00
jtc 600a989fb6 Changed FLT_ROUNDS from constant to a call to __flt_rounds(), so that the
current rounding mode is accurately reported.
1995-04-11 18:18:35 +00:00
mycroft fecbe784d6 Oops; finish that last change. 1995-04-10 12:45:53 +00:00
mycroft 22cefc03bc Bring back pmap_kernel(), for now always inlined as a pointer to
kernel_pmap_store.
1995-04-10 12:41:29 +00:00
mycroft 127e0761c9 Add mmopen(), mmclose(), and mmmmap() where appropriate. Lock vmmap when
needed.  Make types consistent.
1995-04-10 11:54:47 +00:00