Commit Graph

68594 Commits

Author SHA1 Message Date
joe
6b4b04d210 Link with libm to take advantage of the -h flag to ls.
Submitted by:	Mike Makonnen <mike_makonnen@yahoo.com>
2001-12-29 10:22:13 +00:00
joe
42e2c5321a LSCOLOURS should be spelt LSCOLORS.
Submitted by:	Jordan DeLong <fracture@allusion.net
2001-12-29 10:13:43 +00:00
jake
a8a4f464ef Make these compile. 2001-12-29 09:55:37 +00:00
jake
30c904f5f2 Remove local change that crept in. 2001-12-29 09:55:10 +00:00
yar
11da1a2ed8 Don't reveal a router in the IPSTEALTH mode through IP options.
The following steps are involved:
a) the IP options related to routing (LSRR and SSRR) are processed
   as though the router were a host,
b) the other IP options are processed as usual only if the packet
   is destined for the router; otherwise they are ignored.

PR:		kern/23123
Discussed in:	freebsd-hackers
2001-12-29 09:24:18 +00:00
jake
734a071e5d Add a header for user trap types required by the sparc abi.
For simplicity the corresponding kernel types use the same
numerical values.
2001-12-29 08:59:33 +00:00
jake
3be11fedf8 Adapt for used by upcoming fp emulation code.
Comment.

Submitted by:	tmm
2001-12-29 08:55:56 +00:00
jake
ca60729366 Print the correct v9 opcodes.
Submitted by:	tmm
2001-12-29 08:52:50 +00:00
jake
ef3b03fd4a Don't concatenate __func__. 2001-12-29 08:49:28 +00:00
jake
fc59b98b83 sparc64 needs the same alingment fixes that alpha and ia64 do.
Submitted by:	tmm
2001-12-29 08:45:17 +00:00
jake
c69f44476f sparc64 needs the same alignment fixes that ia64 and alpha need.
Submitted by:	tmm
2001-12-29 08:44:08 +00:00
jake
0bff76ae56 Change traces in hardclock and statclock to use the KTR_CLK trace
facility, rather than KTR_INTR.
2001-12-29 08:39:57 +00:00
jake
c9cd53a3eb Update to new constants. 2001-12-29 08:37:58 +00:00
jake
55292ad79d Make cont in ddb work. 2001-12-29 08:37:35 +00:00
jake
8c6d251d8b Prototype dcache_inval_phys.
Submitted by:	tmm
2001-12-29 08:35:49 +00:00
jake
8a9bb45f63 Forced commit to note that the wierd soft bit is actually a wired bit. 2001-12-29 08:33:53 +00:00
jake
21d74ce377 Add comments as to why VM_MAXUSER_ADDRESS is magic (abitrary).
Define the KVA_RANGE in terms of ttes, not sttes.
Remove UPT_MIN_ADDRESS.  We no longer use a hard coded address for
the user tsb.
2001-12-29 08:25:43 +00:00
jake
b8a65955b6 Make tte bit constants explicitly unsigned and long.
Add a wierd soft bit.
Remove struct stte.
2001-12-29 08:24:02 +00:00
jake
c48facc984 Add definitions for dcache color bits, which may move to cache.h.
Add fields to md_page for tracking virtual page color, and pv entry
lists.
Fix pmap_track_modified to work for non-kernel pmaps.  This is due to
kernel virtual addresses potentially overlapping with userland addresses.
2001-12-29 08:19:24 +00:00
jake
904d1a21fd Implement pv entries as separate structures from the ttes, like other
architectures do.
2001-12-29 08:17:16 +00:00
jake
3b182663f7 Remove support for multi level tsbs, making this code much simpler and
much less magic, fragile, broken.  Use ttes rather than sttes.
We still use the replacement scheme used by the original code, which
is pretty cool.

Many crucial bug fixes from:	tmm
2001-12-29 08:15:43 +00:00
jake
006b03a914 Implement pv entries as separate structures from the ttes, as other
architectures do.

Many crucial bug fixes from:	tmm
2001-12-29 08:12:22 +00:00
jake
07744ac345 Great pmap rewrite to use a much simpler one level tsb of ttes, instead
of sttes.  Also removes many differences between this and the other pmaps.
Reserve the kva space used by the openfirmware translations.
Use physical addresses directly in pmap_zero_page and pmap_copy_page, now
that we have the cache line shooting support.
Add code to track the virtual cachability of mapped pages.  The dmmu
requires that multiple mappings of the same phsyical address have the
save virtual address bits up to a colour boundary.  Violating this
requires all mappings to be mapped uncacheable.  We do not yet handle
the case of a badly aliased mapping becoming cachable again.

Many crucial bug fixes from:	tmm
2001-12-29 08:11:02 +00:00
jake
45a8b05849 Use fprs to track floating register usage. Clear it once we've saved
the registers so we don't uselessly save them over and over again for
each context switch until another floating point instruction is executed.
Use a non-specific tlb slot for the tsb, which needs to have a locked
entry.
Remove overly verbose traces.
2001-12-29 08:03:15 +00:00
jake
8ceb62488c Add .register directives for gcc3.
Add macros to atomically increment an integer variable in the data
section and to atomically set a bit in a tte.  Note that the latter
does not return the new value.
Rewrite RESUME_SPILLFILL_MAGIC to use more sensical calculations, and
to preserve all alternate globals religiously.  Must now be called on
alternate globals.
Defer switching to the kernel stack until inside the syscall, trap,
interrupt wrappers.  Splitting the windows is all that's really urgent.
Adapt to new trap types.
Add %xcc where appropriate in order to not use v8 opcodes inadvertantly
(which work fine).
Modify the low level tlb fault handlers to operate on a tsb made up of
ttes, not sttes.  This effectively makes the tsb twice as large.
After atomically updating tte bits in memory, also set the bit in the
register that holds the data which will be loaded into the tlb.  The
macro returns the old value.
Use the preloaded mmu global which holds the address of the current
user tsb.
Add back a low level protection fault handler instead of just punting
into the vm system.  This effectively saves a soft fault per COW fault.
Add a trace to intr_enqueue.
Pass arguments to the trap, interrupt, syscall wrappers in the out
registers instead of some on the stack, some in registers.
Use the preloaded alternate global pcb register.
2001-12-29 07:59:04 +00:00
jake
48c13aa566 Add needed include of fsr.h.
Use fprs to track floating point usage.
Remove misguided comment.
Clear fprs in a child process's new trapframe.
2001-12-29 07:47:33 +00:00
jake
8d86fe1163 1. Adapt to new trap types.
2. Make trap_pfault more like it is on other architectures.
3. Fix a bug in syscall() which caused system calls with more than
   six arguments that are called through the wild card syscall to
   have their arguments scrambled.  This affected mmap due to the
   (bogus) wrapper in libc.

Submitted by:	tmm (3)
2001-12-29 07:45:49 +00:00
jake
d4c9aeb452 Add .register directives for gcc3.
Add some traces that can be useful but are also very loud.
Use defines for offsets into jmpbuf instead of magic numbers.
Fix a style bug.
Fixup comments.
2001-12-29 07:34:42 +00:00
jake
db696058e8 Assert at compile time that structures which need to be a power of
2 really are.
Move a trace to before flushw in case it goes off the deep end.
2001-12-29 07:32:56 +00:00
jake
0fd4afe777 Remove a debug printf.
Setup new dedicated global register (alternate, and mmu).
Make setregs readable again.
Adapt to moving of many things into trapframe.
2001-12-29 07:28:20 +00:00
jake
ae6ea0bdb1 intr_handlers is an array of function pointers, not small structures.
Assert at compile time that structures which need to be a power of 2
in size really are.
2001-12-29 07:24:57 +00:00
jake
1c81a8edd7 Add .register directive for gcc3.
Enforce in hardware the non-use of floating point in the kernel.
2001-12-29 07:22:27 +00:00
jake
5491e87b91 1. Make this more name space friendly (* -> emul_*).
2. Don't whine about unaligned fixups by default.
3. Adapt to removal of mmuframe.

Submitted by:	tmm (1, 2)
2001-12-29 07:20:20 +00:00
jake
4e971946c3 Be paranoid about the sizeof passed to db_get_value, not all trapframe
fields are u_long.
Print useful information about traps in backtraces.
GC some dead code.
2001-12-29 07:16:45 +00:00
jake
14f9eb3c0f Implement dcache_inval_phys, which shoots the cache lines that correspond
to a specific physical address.  This is used for page copy and zero
routines which use physical addresses directly.

Submitted by:	tmm
2001-12-29 07:14:07 +00:00
alfred
f097734c27 Make AIO a loadable module.
Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO
will use at_exit(9).

Add functions at_exec(9), rm_at_exec(9) which function nearly the
same as at_exec(9) and rm_at_exec(9), these functions are called
on behalf of modules at the time of execve(2) after the image
activator has run.

Use a modified version of tegge's suggestion via at_exec(9) to close
an exploitable race in AIO.

Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral,
the problem was that one had to pass it a paramater indicating the
number of arguments which were actually the number of "int".  Fix
it by using an inline version of the AS macro against the syscall
arguments.  (AS should be available globally but we'll get to that
later.)

Add a primative system for dynamically adding kqueue ops, it's really
not as sophisticated as it should be, but I'll discuss with jlemon when
he's around.
2001-12-29 07:13:47 +00:00
jake
f96a367719 Rename definitions to better match the hardware wstate fields.
Don't include WSTATE_TRANSITION in WSTATE_NORMAL_MASK.
2001-12-29 07:12:30 +00:00
jake
2fa6dd41be Add definitions for TSTATE_MM_* and TSTATE_{I,X}CC_*.
Implement TSTATE_SECURE in terms of PSTATE_SECURE.
2001-12-29 07:11:00 +00:00
jake
2b14434bd9 Rename and renumber trap types to comply with the user trap types as
specified by the sparc abi.  We use numerically higher values for all
internal kernel types.
Remove soft trap types which need to be exposed to userland.  They will
move to utrap.h.
2001-12-29 07:09:50 +00:00
jake
a3769d0f6a 1. Certain tlb operations need to be atomic, so disable interrupts for
their duration.  This is still only effective as long as they are
   only used in the static kernel.  Code in modules may cause instruction
   faults which makes these break in different ways anyway.
2. Add a load bearing membar #Sync.
3. Add an inline for demapping an entire context.

Submitted by:	tmm (1, 2)
2001-12-29 07:07:35 +00:00
jake
63826f10fa jmpbuf is no longer a ucontext_t since it does not need to be passed
to sigreturn.
Add definitions for array offsets.
2001-12-29 07:03:09 +00:00
jake
a97bd61c68 Add fprs to struct fpreg. 2001-12-29 07:02:12 +00:00
jake
1483b41331 Define PSTATE_MM_MASK in terms of PSTATE_MM_SIZE.
Implement PSTATE_SECURE.
2001-12-29 07:01:34 +00:00
jake
afadfc3910 Remove pcb_y. It has moved to trapframe. 2001-12-29 07:00:30 +00:00
jake
8b50e3dd58 Don't concatentate __func__.
Make page size constants explicitly long and unsigned.
Add a macro for compile time assertions.
2001-12-29 07:00:04 +00:00
jake
a086b0a1b0 Make it clear that IH_SHIFT is expected to be that of a pointer.
Make intr_handlers an array of function pointers instead of
small structures.
2001-12-29 06:57:55 +00:00
jake
9ca32fc440 Add definitions for magic numbers used in asm.
Bloat trapframe with many extra fields so we don't need extra structures.
Use small data types where possible.
Remove second copy of TF_DONE.
Remove mmuframe.
2001-12-29 06:56:11 +00:00
jake
fc3b645fd1 Change fpblock to be an array of ints instead longs.
Change fp_init_thread to take a thread instead of a pcb so we
can get at the trapframe.
2001-12-29 06:53:19 +00:00
jake
7404706e58 Add "memory" to the clobber list for membars.
Submitted by:	tmm
2001-12-29 06:51:50 +00:00
jake
b06f1a496e Implement CLKF_USERMODE so that user time is accounted properly.
Submitted by:	tmm
2001-12-29 06:51:14 +00:00