Commit Graph

247 Commits

Author SHA1 Message Date
lukem 0635de35a3 Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more. 2002-11-26 23:30:07 +00:00
scw 918d34d917 Quell an uninitialised variable warning. 2002-11-24 12:07:52 +00:00
scw 2fcea657de Implemented #2: Improved TLB management 2002-11-23 09:27:03 +00:00
scw a3885e9bdd - Change VM_MIN_KERNEL_ADDRESS to start at KSEG1 instead of KSEG0.
- Overhaul the TLB management code such that we now keep track of
   the exact TLB slot at which a mapping was inserted, both for user-
   space and kernel mappings. This addresses #2 on the TODO list.
2002-11-23 09:25:54 +00:00
scw dbaff62d21 Make this compile again. 2002-11-23 09:14:14 +00:00
manu d584ed9598 Add a realcode argument to trace_enter and ktrsyscall. realcode is the
original system call number, which can be negative for a Mach trap.
We cannot just replace code by realcode, because ktrsyscall uses it as
an index in the system call table, thus crashing the kernel when the
value is negative.
2002-11-15 20:06:00 +00:00
scw bc159224ed Missing newline. 2002-10-31 14:52:54 +00:00
scw 78aeffb90b Add an explicit ULL suffix to a 64-bit constant to appease gcc-current. 2002-10-31 14:52:30 +00:00
scw 3795c4e6f4 Since we keep a list of all mappings for a given physical page (even
unmanaged mappings) so we can deal with cache aliases, make sure to
skip unmanaged/wired mappings (added via pmap_kenter_pa()) when doing
things like pmap_page_protect().
2002-10-31 14:34:17 +00:00
scw 6a3f09110b Catch NMIs when DDB is defined, instead of DEBUG.
Drop the interrupt level to zero when before handling ASTs in the
exit path of h/w interrupts.
2002-10-31 14:24:16 +00:00
scw 8bf915f645 When setting the SP for a process, copy the same value to the
process' FP for the sake of consistency.
2002-10-31 14:20:39 +00:00
jdolecek c82ab2eb79 now that mem_no is emitted by config(8), there is no reason to keep
copy of more or less identical iskmemdev() for every arch; move the function
to spec_vnop.c, and g/c machine-dependant copies
2002-10-26 13:50:17 +00:00
scw b67ad48827 Put bit definitions for the FP control/status register in <sh5/fpu.h> and
use them instead of "magic" numbers in the source.
2002-10-24 13:58:48 +00:00
scw 511275734b Format string fixes. 2002-10-24 13:48:44 +00:00
scw b28965836d Tick off another item. 2002-10-23 13:37:05 +00:00
scw c774ffbae4 MD glue for COMPAT_NETBSD32 on SH-5. 2002-10-23 13:26:35 +00:00
scw 31397fedc3 Make the compile if PMAP_DIAG is not defined. 2002-10-23 13:24:28 +00:00
jdolecek e0cc03a09b merge kqueue branch into -current
kqueue provides a stateful and efficient event notification framework
currently supported events include socket, file, directory, fifo,
pipe, tty and device changes, and monitoring of processes and signals

kqueue is supported by all writable filesystems in NetBSD tree
(with exception of Coda) and all device drivers supporting poll(2)

based on work done by Jonathan Lemon for FreeBSD
initial NetBSD port done by Luke Mewburn and Jason Thorpe
2002-10-23 09:10:23 +00:00
scw 949919c48e Tick off another item. 2002-10-22 13:11:06 +00:00
scw 2a52019c1e As per TODO item #13, clear the Referenced bit in the PTE after purging
a mapping from the TLB/cache to prevent duplicate purges for pages
which were not touched since the last purge.
2002-10-22 13:10:28 +00:00
scw 8496cdaeb7 - Fix REDUCE16 to ignore the upper 32-bits of the input operand.
- Shift a leading misaligned quad to compensate for the implicit shift
  in the "ldlo.q" instruction. (And remove the "XXX:" comment which correctly
  hinted that this might be necessary).
- Clean up some comments.
2002-10-22 12:22:43 +00:00
scw 6a2132797e - Simplify early initialisation so we do most of it in C.
- Call allocsys() much earlier so we can use uvm_pageboot_alloc() to
  steal KSEG0 pages for system tables.
2002-10-22 09:30:26 +00:00
scw b7d8acc608 In switch_exit(), load the SP and FP from proc0's PCB instead of using
a "null" stack.
Also be sure to clear curproc, and update curpcb.
2002-10-21 15:37:20 +00:00
scw 87df298d3e Unroll the zero/copy page loops to do 128 bytes per loop instead of 32,
paying particular attention to cache-lines and sets.
2002-10-19 13:18:55 +00:00
scw 28cf032416 If the incoming buffer is already quad aligned, skip the initial
alignment code. (There was nothing wrong with the original code path
other than it was slightly slower if the buffer was already aligned).

Also, catch another corner case related to alignment/length of the
last 1-7 bytes.
2002-10-19 13:17:33 +00:00
scw 7feac76e17 Tick off a few more items, and add a new one. 2002-10-19 11:13:11 +00:00
scw 873eee59ff Add fast assembler versions of in_cksum() and in4_cksum().
(Well, as fast as can be expected on a cpu with no carry flag)
2002-10-19 09:01:44 +00:00
scw 80b7fbca17 Ditch the crude and slow bytewise copyin()/copyout()/kcopy() code in favour
of the asm memcpy() in libkern.
2002-10-19 08:56:45 +00:00
scw 1e0542ac19 Fix a spurious looping PC/FP message when we stop due to not finding
the caller's stack frame.
2002-10-19 08:50:30 +00:00
scw c01b319dcc There seem to be some stability problems with the scif serial port driver
at the moment, possibly as a side-effect of some yet-to-be-committed SH5
speed-ups.

Work-around it for now by using com0 as the console.
2002-10-19 08:43:32 +00:00
scw a7be530a95 Add code to support tracing back through a stackframe which was created
using a "movi imm, Rn / sub R15, RN, R15" pair. This is how the compiler
creates frames which are too big to fit in the immediate field of "addi";
something which happens a lot with -O0 ...

While I'm here, add a simple heuristic to detect infinite loops caused by
tracing back through some non-leaf asm routines which don't set up frames.
2002-10-18 09:16:14 +00:00
scw fd0556a4dc Interrupt handles are now allocated from KSEG0. 2002-10-14 14:22:44 +00:00
scw 89612efe30 Interrupt overhaul:
- Allocate interrupt handles dynamically from a pool(9) to reduce the
   number of TLB misses during interrupt dispatch.
 - Fully support evcnt(9) in all interrupt dispatchers.
2002-10-14 14:19:27 +00:00
scw 041aef4bee Preparation for compat_netbsd32. 2002-10-14 14:13:27 +00:00
scw bd8765b9da Add a couple more items. 2002-10-14 10:52:41 +00:00
scw e52022da42 Mark a couple of items as done. 2002-10-14 09:48:20 +00:00
scw 278e4d7886 Quell an uninitialised variable warning. 2002-10-14 09:46:31 +00:00
scw 48d75c2893 Work around yet another compiler optimisation bug.
I don't even want to think about where else in the kernel
this one could bite...
2002-10-12 12:02:16 +00:00
scw 2991c538da Add support for Restartable Atomic Sequences.
XXX: ptrace(2) does not currently work on SH5, so there are no checks for
tracing through a RAS at this time.
2002-10-12 11:39:53 +00:00
scw 7135f0329f Fixes for LP64. 2002-10-10 09:47:17 +00:00
scw 58c1858c31 More fixes/tweaks:
- Use the PVO_CACHEABLE flag in the pvo as the One True Indicator of
   the cacheable status of a mapping instead of peeking at the PTEH.
 - Don't inline some of the larger routines, in an effort to appease
   the somewhat buggy compiler.
 - Fix some comments.
 - Fix some casts.
 - Add a bunch more debugging instrumentation.
2002-10-10 08:57:52 +00:00
scw bbb7b848b6 Don't try to trace back through proc_trampoline. 2002-10-10 08:53:22 +00:00
scw a3d166c50b - Add kcr0 and kcr1 to db_regs.
- Move usr, sr, pc, and the branch-target registers to the top of
   the listing so that it is no longer necessary to scroll through
   64 integer registers to see them.
2002-10-10 08:52:31 +00:00
scw 4401a03fd4 Tweak the "ffs" code in cpu_switch so we can ditch __HAVE_MD_RUNQUEUE. 2002-10-09 20:27:35 +00:00
scw 1d99b44e36 Adjust the size of intrcnt members to match sizeof(u_long). 2002-10-09 18:52:36 +00:00
scw 16c5b1b5a8 - g/c an accidentally committed debug hack
- use sh5_trunc_page() instead of masking with SH5_PTEH_EPN mask
  where appropriate. The latter is not safe in 64-bit mode.
2002-10-08 16:01:07 +00:00
scw ae8f4bf362 Fix tyop. 2002-10-08 15:59:32 +00:00
scw 71de7dd5e6 - Tweak the kernel's start address for 64-bit kernels.
- Use a local hacked-up-for-sh64 dbsym(8).
2002-10-08 15:59:11 +00:00
scw f30b5f8e54 Cast to caddr_t via intptr_t. 2002-10-08 15:56:13 +00:00
scw 2729bcfb69 - Use intrnames[] instead of rolling our own.
- Update intrcnt[level] in sh5_intr_dispatch().
2002-10-08 15:55:07 +00:00