jake [Mon, 25 Feb 2002 18:37:17 +0000 (18:37 +0000)]
Implement a nested window state. This avoids attempting to spill a user
window to the user stack while in a nested kernel trap. We do this for
entry to the kernel from user mode, but if we get an interrupt in kernel
mode while there are still user windows in the cpu, and we attempt to spill
to the user stack, we may take too many nested traps and overflow the trap
stack, causing a red state exception. This is needed by upcoming changes
to allow the user tsb to not be locked in the tlb.
phk [Mon, 25 Feb 2002 09:51:17 +0000 (09:51 +0000)]
Add a new test_counter() function which tries to determine the width of
the inter-value histogram for 2000 samples. If the width is 3 or less
for 10 consequtive samples, we trust the counter to be good, otherwise
we use the *_safe() method.
This method may be too strict, but the worst which can happen is that
we take the performance hit of the *_safe() method when we should not.
Make the *_safe() method more discriminating by mandating that the three
samples do not span more than 15 ticks on the counter.
Disable the PCI-ident based probing as a means to recognize good
counters.
sobomax [Mon, 25 Feb 2002 09:17:44 +0000 (09:17 +0000)]
Fix a bug introduced in rev.1.23 - for some reason mkdir("/", ...) system
call returns `EISDIR', not `EEXIST', so that be prepared for that. This should
fix number of ports, that often call `mkdir -p //usr/local/foobar'. This
is just a quick workaround, the real fix would be either to avoid calling
mkdir("/", ...) or fix VFS code to return consistent errno for this case.
cjc [Mon, 25 Feb 2002 08:29:21 +0000 (08:29 +0000)]
The TCP code did not do sufficient checks on whether incoming packets
were destined for a broadcast IP address. All TCP packets with a
broadcast destination must be ignored. The system only ignored packets
that were _link-layer_ broadcasts or multicast. We need to check the
IP address too since it is quite possible for a broadcast IP address
to come in with a unicast link-layer address.
Note that the check existed prior to CSRG revision 7.35, but was
removed. This commit effectively backs out that nine-year-old change.
bde [Mon, 25 Feb 2002 05:16:22 +0000 (05:16 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval. Intentionally
don't follow the local style of polluting the local headers.
bde [Mon, 25 Feb 2002 05:09:12 +0000 (05:09 +0000)]
Unremoved used includes. <sys/time.h> is needed if <sys/stat.h> isn't
polluted, and <sys/types.h> is strictly a prerequisite for <sys/stat.h>
untiil we drop support for pre-2001 versions of POSIX.
jake [Mon, 25 Feb 2002 04:56:50 +0000 (04:56 +0000)]
Modify the tte format to not include the tlb context number and to store the
virtual page number in a much more convenient way; all in one piece. This
greatly simplifies the comparison for a matching tte, and allows the fault
handlers to be much simpler due to not having to load wierd masks.
Rewrite the tlb fault handlers to account for the new format. These are also
written to allow faults on the user tsb inside of the fault handlers; the
kernel fault handler must be aware of this and not clobber the other's
registers. The faults do not yet occur due to other support that is needed
(and still under my desk).
obrien [Mon, 25 Feb 2002 04:49:17 +0000 (04:49 +0000)]
Use the default 'ld' emulation rather than hard coding it.
For FreeBSD, 'ld' 2.12.0 uses a different emulation than in the past.
So this change makes the upgrade easier.
bde [Mon, 25 Feb 2002 04:47:39 +0000 (04:47 +0000)]
#include <sys/time.h> instead of depending on namespace pollution in
<sys/stat.h> for the declaration of struct timeval (sys/stat.h> only
needs timespecs even when its POSIX support is not turned on, so it
shouldn't declare timevals).
bde [Mon, 25 Feb 2002 04:31:25 +0000 (04:31 +0000)]
Declare time(not3) instead of depending on namespace pollution 3 layers
deep in <stand.h> to eventually include <time.h> to declare the user
version.
This is not quite the right place to declare it, but <stand.h> would
be worse because time() is very MD so it isn't in libstand.
Many places in the boot sources still get the user version using only
1 layer of pollution (#include <sys/time.h>. Some pollute themselves
directly (#include <time.h>). But the boot Makefiles are too broken
to enable warnings for redeclarations.
bde [Mon, 25 Feb 2002 02:18:36 +0000 (02:18 +0000)]
Removed unused include of <sys/resource.h> instead of depending on
namespace pollution only 1 layer deep in <sys/stat.h> for its
prerequisite <sys/time.h>
iedowse [Mon, 25 Feb 2002 00:03:34 +0000 (00:03 +0000)]
Sockets passed into uipc_abort() have been allocated by sonewconn()
but never accept'ed, so they must be destroyed. Originally, unp_drop()
detected this situation by checking if so->so_head is non-NULL.
However, since revision 1.54 of uipc_socket.c (Feb 1999), so->so_head
is set to NULL before calling soabort(), so any unix-domain sockets
waiting to be accept'ed are leaked if the server socket is closed.
Resolve this by moving the socket destruction code into uipc_abort()
itself, and making it unconditional (the other caller of unp_drop()
never needs the socket to be destroyed). Use unp_detach() to avoid
the original code duplication when destroying the socket.
PR: kern/17895
Reviewed by: dwmalone (an earlier version of the patch)
MFC after: 1 week
dillon [Sun, 24 Feb 2002 22:58:15 +0000 (22:58 +0000)]
Tests by numerous people have shown that many chipsets do not properly
latch the acpi timer, resulting in weird deltas. The problem is severe
enough to adversely effect the timecounter code.
Default to the 'safe' version of the get-timecount function. The probe
will override it if a known-good chipset is found. This is temporary
until a more complete solution is found.
phk [Sun, 24 Feb 2002 19:56:41 +0000 (19:56 +0000)]
Fix a typo (?) in previous commit told ttyprintf() to print the integer
part of the user-time as a 64bit quantity. This resulted in weird
output from SIGINFO.
obrien [Sun, 24 Feb 2002 18:49:38 +0000 (18:49 +0000)]
Sync with the Alpha's GENERIC configuration.
Most of the contents are commented out as they are as-yet untested.
However, I wanted the contents to match our other arches, so that when
people make changes to {i386,alpha,ia64}, they will also make the same
changes here.
dougb [Sun, 24 Feb 2002 10:22:14 +0000 (10:22 +0000)]
* Add a feature to do a "pre {build|install}world" check of (so far)
master.passwd, group, and make.conf
* Add a feature to check variables in rc.conf[.local] to their
counterparts in /etc/defaults/rc.conf after a run
* Twiddle whitespace a little
* Change some "[ -f file ] && rm file" to "rm -f file"
obrien [Sun, 24 Feb 2002 06:05:22 +0000 (06:05 +0000)]
Use libgcc_p.a when -pg is in effect.
I am committing this here rather than in gcc/config/freebsd.h because the
profiled libgcc only exists with the native system compiler. It is not
created by a stock FSF build and we will never be able to get these bits
committed to the FSF CVS repo. Thus this is very much a FreeBSD "native"
issue.
des [Sun, 24 Feb 2002 00:49:43 +0000 (00:49 +0000)]
Add a sysctl, sysctl hw.snd.report_soft_formats, that controls whether the
AIOGCAP ioctl reports software-emulated formats. It defaults to on. People
who use performance-sensitive audio software and do not want it to pick a
software-emulated audio format instead of one supported by their hardware
should turn it off.
This unbreaks isdnphone(1) on systems with PCM-only sound cards.
jake [Sat, 23 Feb 2002 22:18:15 +0000 (22:18 +0000)]
Make use of the ranged tlb demap operations where ever possible. Use
pmap_qenter and pmap_qremove in preference to pmap_kenter/pmap_kremove.
The former maps in multiple pages at a time, and so can do a ranged
flush. Don't assume that pmap_kenter and pmap_kremove will flush the tlb,
even though they still do. It will not once the MI code is updated to use
pmap_qenter and pmap_qremove.
tmm [Sat, 23 Feb 2002 21:37:18 +0000 (21:37 +0000)]
Add userland floating point emulator code for sparc64. This is a port
of the (never committed) in-kernel version (with some optimizations and
cleanups), which in turn was ported from NetBSD.
jake [Sat, 23 Feb 2002 21:10:06 +0000 (21:10 +0000)]
Add inlines for demapping a range of pages from the itlb and dtlb. This
will be used to reduce the number of tlb shootdown ipis in an smp system
by sending one ipi for a whole range of pages, instead of one per page.
Munge the context demap operations slightly to support demapping a non-primary
context.
jake [Sat, 23 Feb 2002 20:25:20 +0000 (20:25 +0000)]
Adapt the tsb_foreach interface to take a source and a destination pmap so
that it can be used for pmap_copy. Other consumers ignore the second pmap.
Add statistics gathering for tsb_foreach.
Implement pmap_copy.
jake [Sat, 23 Feb 2002 20:00:33 +0000 (20:00 +0000)]
Remove CADDR1 and CADDR2 which are no longer used. On other architectures
these are used for copy and zeroing physical pages; we use physical addresses
directly.
jake [Sat, 23 Feb 2002 19:00:30 +0000 (19:00 +0000)]
Add space for %fsr and %tstate to utrapframe. Save them in the generic
user trap entry code. Restore %asi and %ccr from the saved %tstate before
returning to the trapping user code.
jake [Sat, 23 Feb 2002 18:55:21 +0000 (18:55 +0000)]
1. Setup the user stack pointer before returning to a user trap handler.
If we don't do this here there's a 1 instruction race where an interrupt
could come in and crash the user process due to having no stack.
2. Pass %fsr to the user trap handler in %l4. Since %fsr can only be loaded
from or stored to memory, we need to do some contortions and temporarily
save it to the alternate global stack.
3. Reload the pcb and pcpu registers for traps in kernel mode, for sanity.
iwasaki [Sat, 23 Feb 2002 16:38:45 +0000 (16:38 +0000)]
Use the regular expression form to solve the ambiguous card parameters
which have tailing spaces.
Some card entries had problem because of incorrect number of spaces.
jake [Sat, 23 Feb 2002 11:06:37 +0000 (11:06 +0000)]
Keep track of the ttes used to map the kernel and pass them to it as loader
metadata. Modify tlb handling functions to take a tte, instead of virtual
address, physical address and flags.
msmith [Sat, 23 Feb 2002 05:29:23 +0000 (05:29 +0000)]
Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.
Convert to using a kthread rather than timeout() to avoid problems
with the interpreter sleeping.
msmith [Sat, 23 Feb 2002 05:28:22 +0000 (05:28 +0000)]
Match namespace cleanup changes in ACPI CA 20020217 update.
Use ACPI_SUCCESS/ACPI_FAILURE consistently.
The AcpiGetInto* interfaces are obsoleted by ACPI_ALLOCATE_BUFFER.