mbr [Mon, 16 Aug 2004 00:20:31 +0000 (00:20 +0000)]
MFNetBSD
Decrease log severity to debug if a protocol is not supported by the
kernel (rpcbind checks /etc/netconfig if a protocol is available).
This avoids "rpcbind: cannot create socket for tcp6" messages
at startup on IPv4-only kernels.
njl [Sun, 15 Aug 2004 23:39:37 +0000 (23:39 +0000)]
Comment out the ability to enable/disable ACPI at runtime. This appears
to not work reliably and crash some systems. It is not supported at all
on others. Pending discussion, the underlying ioctls will be removed.
marius [Sun, 15 Aug 2004 22:59:34 +0000 (22:59 +0000)]
Add a kludge for building SBus-only kernels, i.e. kernels without support
for EBus, ISA and PCI, by compiling ofw_isa.c and ofw_pci_if.m unconditio-
nally. The correct way is to rewrite OF_decode_addr() in ofw_machdep.c in
a bus-neutral way. That's certainly possible but we unfortunately didn't
make it for FreeBSD 5.3.
simon [Sun, 15 Aug 2004 22:33:10 +0000 (22:33 +0000)]
- Handle the '\&' mdoc(7) escape sequence.
- Handle the .Sx macro and give a warning if it is used in the
HARDWARE section, since that will probably produce odd text in the
Hardware Notes.
des [Sun, 15 Aug 2004 22:22:35 +0000 (22:22 +0000)]
Fix a couple of edge cases in which sb.st_size may be incorrect or
meaningless. In particular, don't assume that it is left untouched if
stat(2) fails; that assumption happens to fail at high optimization
levels on some platforms.
simon [Sun, 15 Aug 2004 22:14:29 +0000 (22:14 +0000)]
- Auto generate device listings for the following drivers: mpt, trm,
rl, vr, dc, de, and gem.
- hme(4) is not sparc64 only anymore, so update dev.archlist.txt
acordingly.
des [Sun, 15 Aug 2004 21:58:02 +0000 (21:58 +0000)]
Release the vnode cache mutex when calling vgone(), since vgone() may
sleep. This makes pfs_exit() even less efficient than before, but on
the bright side, the vnode cache mutex no longer needs to be recursive.
marius [Sun, 15 Aug 2004 21:37:52 +0000 (21:37 +0000)]
Correct some uses of the wrong members of the *min()/*max()-familiy, e.g.
min() on unsigned long. None of these are believed to have been fatal though.
alc [Sun, 15 Aug 2004 20:54:25 +0000 (20:54 +0000)]
- Make pmap_emulate_reference() MP and preemption safe. Previously, it
contained "sanity" checks that could be violated if another CPU modified
the pmap between the emulation trap and locking the pmap in
pmap_emulate_reference(). As a result, the pte could be inconsistent
with the access that caused the emulation trap. In such cases,
pmap_emulate_reference() now flushes the current CPU's TLB entry and
returns.
- Make pmap_changebit() an inline function, reducing object code size.
simon [Sun, 15 Aug 2004 20:54:07 +0000 (20:54 +0000)]
- Add a HARDWARE section which lists supported devices.
- Add the manufacturer name to each item in the device list.
- Make the note about supporting "IBM e335" into a general list and
change the entry to use the full product name ("IBM eServer xSeries
335").
- Add Dell PowerEdge 1750 to the list of systems with mpt onboard.
marius [Sun, 15 Aug 2004 20:17:29 +0000 (20:17 +0000)]
- Correct the description of the "local-mac-address?" variable. Not all NICs
use it, only those with FCode. Add references to dc(4), gem(4) and hme(4)
for obtaining further information about such devices presently supported
by FreeBSD.
- Correct the HISTORY section. There was an eeprom(8) utility in 4.4BSD and
early versions of FreeBSD 2.x.
- Add an AUTHORS section.
truckman [Sun, 15 Aug 2004 19:17:23 +0000 (19:17 +0000)]
Yet another tweak to the shutdown messages in boot():
Don't count busy buffers before the initial call to sync() and
don't skip the initial sync() if no busy buffers were called.
Always call sync() at least once if syncing is requested. This
defers the "Syncing disks, buffers remaining..." message until
after the initial sync() call and the first count of busy
buffers. This backs out changes in kern_shutdown 1.162.
Print a different message when there are no busy buffers after the
initial sync(), which is now the expected situation.
Print an additional message when syncing has completed successfully
in the unusual situation where the work of syncing was done by
boot().
Uppercase one message to make it consistent with all of the other
kernel shutdown messages.
Discussed with: bde (in a much earlier form, prior to 1.162)
Reviewed by: njl (in an earlier form)
rwatson [Sun, 15 Aug 2004 19:10:05 +0000 (19:10 +0000)]
Add a "fillchar" command line argument to dd(1) that permits the user
to specify an alternative padding character when using a conversion
mode, or when using noerror with sync and an input error occurs. This
facilities reading old and error-prone media by allowing the user to
more effectively mark error blocks in the output stream.
simon [Sun, 15 Aug 2004 18:09:47 +0000 (18:09 +0000)]
- Add a HARDWARE section which lists supported devices.
- Remove reference to the NOTES section in the entry for Sun DMFE,
since ot doesn't work well with the auto generated Hardware Notes. [1]
rwatson [Sun, 15 Aug 2004 18:02:09 +0000 (18:02 +0000)]
Add an "options MP_WATCHDOG" to i386. This option allows one of the
logical CPUs on a system to be used as a dedicated watchdog to cause a
drop to the debugger and/or generate an NMI to the boot processor if
the kernel ceases to respond. A sysctl enables the watchdog running
out of the processor's idle thread; a callout is launched to reset a
timer in the watchdog. If the callout fails to reset the timer for ten
seconds, the watchdog will fire. The sysctl allows you to select which
CPU will run the watchdog.
A sample "debug.leak_schedlock" is included, which causes a sysctl to
spin holding sched_lock in order to trigger the watchdog. On my Xeons,
the watchdog is able to detect this failure mode and break into the
debugger, which cannot otherwise be done without an NMI button.
This option does not currently work with sched_ule due to ule's push
notion of scheduling, similar to machdep.hlt_logical_cpus failing to
work with that scheduler.
On face value, this might seem somewhat inefficient, but there are a
lot of dual-processor Xeons with HTT around, so using one as a watchdog
for testing is not as inefficient as one might fear.
pjd [Sun, 15 Aug 2004 13:58:29 +0000 (13:58 +0000)]
Avoid code duplication by introducing g_mirror_write_metadata() function,
which is used now by g_mirror_clear_metadata() function and
g_mirror_update_metadata() function.
tjr [Sun, 15 Aug 2004 12:34:15 +0000 (12:34 +0000)]
Replace linux_getitimer() and linux_setitimer() with implementations
based on those in freebsd32_misc.c, removing the assumption that Linux
uses the same layout for struct itimerval as we use natively.
davidxu [Sun, 15 Aug 2004 12:31:30 +0000 (12:31 +0000)]
Disable surplus detection of breakpoint event in signal stack, the check
causes a normal breakpoint event in new thread to be ignored unexpectly,
result is process SIGSEGV.
tjr [Sun, 15 Aug 2004 11:52:45 +0000 (11:52 +0000)]
Use sv_psstrings from the current process's sysentvec structure instead
of PS_STRINGS. This is a no-op at present, but it will be needed when
running 32-bit Linux binaries on amd64 to ensure PS_STRINGS is in
addressable memory.
iedowse [Sun, 15 Aug 2004 10:51:21 +0000 (10:51 +0000)]
Use the USBD_FORCE_SHORT_XFER flag when setting up transmit transfers.
Without this, the device cannot detect the end of ethernet packets
whose size is a multiple of the USB packat size.
maxim [Sun, 15 Aug 2004 08:21:50 +0000 (08:21 +0000)]
o Add -l option to jail(8) similar to su(1): before running jail'ed
program under specific user's credentials, clean the environment and
set only a few variables.
jmg [Sun, 15 Aug 2004 06:24:42 +0000 (06:24 +0000)]
Add locking to the kqueue subsystem. This also makes the kqueue subsystem
a more complete subsystem, and removes the knowlege of how things are
implemented from the drivers. Include locking around filter ops, so a
module like aio will know when not to be unloaded if there are outstanding
knotes using it's filter ops.
Currently, it uses the MTX_DUPOK even though it is not always safe to
aquire duplicate locks. Witness currently doesn't support the ability
to discover if a dup lock is ok (in some cases).
marcel [Sun, 15 Aug 2004 02:39:20 +0000 (02:39 +0000)]
Improve the usage. Without any arguments, kgdb(1) works on /dev/mem
with the currently running kernel image. Otherwise, one of -c, -n or
-r is expected for working on a particular core file (-c), working
on a saved dump (-n) or working remotely (-r). When working on a
saved dump, a kernel may be omitted.
For a remote debugging session (-r), kgdb(1) will use the specified
device.
rwatson [Sun, 15 Aug 2004 02:06:27 +0000 (02:06 +0000)]
Add a new sysctl, debug.kdb.stop_cpus, which controls whether or not we
attempt to IPI other cpus when entering the debugger in order to stop
them while in the debugger. The default remains to issue the stop;
however, that can result in a hang if another cpu has interrupts disabled
and is spinning, since the IPI won't be received and the KDB will wait
indefinitely. We probably need to add a timeout, but this is a useful
stopgap in the mean time.
marius [Sun, 15 Aug 2004 00:10:59 +0000 (00:10 +0000)]
sio(4), which never really worked on sparc64, was removed in favour of
uart(4) in sparc64/conf/GENERIC revision 1.63 about 9 months ago. Remove
its source files here, too.
marius [Sat, 14 Aug 2004 23:54:27 +0000 (23:54 +0000)]
- Introduce an uart_cpu_identify() which is implemented in uart_cpu_<arch>.c
and that can be used as an identify function for all kinds of busses on a
certain platform. Expect for sparc64 these are only stubs right now. [1]
- For sparc64, add code to its uart_cpu_identify() for registering the on-
board ISA UARTs and their resources based on information obtained from
Open Firmware.
It would be better if this would be done in the OFW ISA code. However, due
to the common FreeBSD ISA code and PNP-IDs not always being present in the
properties of the ISA nodes there seems to be no good way to implement that.
Therefore special casing UARTs as the sole really relevant ISA devices on
sparc64 seemed reasonable. [2]
marius [Sat, 14 Aug 2004 23:53:04 +0000 (23:53 +0000)]
Add sparc64/pci/ofw_pci_if.m to the list of MFILES so modules can use
sparc64/pci/ofw_pci.h. This is a bit messy right now but (hopefully) will
get better once the MI OFW PCI code has moved from sparc64/pci to dev/ofw.
marius [Sat, 14 Aug 2004 22:38:20 +0000 (22:38 +0000)]
Make hme(4), i.e. the PCI-variant, MI by reading the MAC address on sytems
without Open Firmware directly instead of using OF_getetheraddr(). This is
a bit painful though, as the MAC address is contained in the NA field of
the VPD of the EBus bridge, which is is another function of the same chip.
To make it worse, the VPD of the EBus bridge can't be accessed via the PCI
capability pointer but has to be digged out from the Boot PROM and has a
non-standard format.
The PCI VPD struct and macros used here should be part of the FreeBSD PCI
code nevertheless.
Approved by: tmm
Based on: NetBSD
Tested with: Sun X1032A (hme(4)-isp(4)-combo card) on alpha and i386
imp [Sat, 14 Aug 2004 22:10:26 +0000 (22:10 +0000)]
Next step in making usb more newbus:
o reprobe children when a new driver is added to uhub
o fix the usbd_probe_and_attach to set the ivars to a malloc'd area, as well
as freeing the ivars on child destruction.
o Don't delete children that don't attach. Evidentally, the need to do this
is a common misconception.
o minor formatting foo that may violate style(9) at the moment, but keeps the
diffs against my p4 tree smaller.
This does not solve the ugen gobbling things up problem, but the fixes
I have for that expose bugs in other parts of the tree...
marius [Sat, 14 Aug 2004 21:44:35 +0000 (21:44 +0000)]
- Capitalize Ethernet and Fast Ethernet.
- Add a NOTES section with information regarding the "local-mac-address?"
system configuration variable on sparc64 and add a reference to eeprom(8)
for using it. Dump document date for this.
- In dc.4, add the on-board DM9102A on Sun Netra X1 and Sun Fire V100 to
the list of known working devices.
marius [Sat, 14 Aug 2004 21:43:37 +0000 (21:43 +0000)]
- Make OF_getetheraddr() honour the "local-mac-address?" system config
variable. If set to "true" OF_getetheraddr() will now return the unique
MAC address stored in the "local-mac-address" property of the device's
OFW node if present and the host address/system default MAC address if
the node doesn't doesn't have such a property. If set to "false" the
host address will be returned for all devices like before this change.
This brings the behaviour of device drivers for NICs with OFW support/
FCode, i.e. dc(4) for on-board DM9102A on Sun machines, gem(4) and hme(4),
regarding "local-mac-address?" in line with NetBSD and Solaris.
The man pages of the respective drivers will be updated separately to
reflect this change.
- Remove OF_getetheraddr2() which was used as a stopgap in dc(4). Its
functionality is now part of OF_getetheraddr().
rwatson [Sat, 14 Aug 2004 17:15:16 +0000 (17:15 +0000)]
Cause pfind() not to return processes in the PRS_NEW state. As a result,
threads consuming the result of pfind() will not need to check for a NULL
credential pointer or other signs of an incompletely created process.
However, this also means that pfind() cannot be used to test for the
existence or find such a process. Annotate pfind() to indicate that this
is the case. A review of curent consumers seems to indicate that this is
not a problem for any of them. This closes a number of race conditions
that could result in NULL pointer dereferences and related failure modes.
Other related races continue to exist, especially during iteration of the
allproc list without due caution.
dwmalone [Sat, 14 Aug 2004 15:32:40 +0000 (15:32 +0000)]
Get rid of the RANDOM_IP_ID option and make it a sysctl. NetBSD
have already done this, so I have styled the patch on their work:
1) introduce a ip_newid() static inline function that checks
the sysctl and then decides if it should return a sequential
or random IP ID.
2) named the sysctl net.inet.ip.random_id
3) IPv6 flow IDs and fragment IDs are now always random.
Flow IDs and frag IDs are significantly less common in the
IPv6 world (ie. rarely generated per-packet), so there should
be smaller performance concerns.
The sysctl defaults to 0 (sequential IP IDs).
Reviewed by: andre, silby, mlaier, ume
Based on: NetBSD
MFC after: 2 months
kientzle [Sat, 14 Aug 2004 03:45:45 +0000 (03:45 +0000)]
Eliminate reliance on non-portable <err.h> by implementing a very
simple errx() function.
Improve behavior when bzlib/zlib are missing by detecting and
issuing an error message on attempts to read gzip/bzip2 compressed
archives.
rwatson [Sat, 14 Aug 2004 03:43:49 +0000 (03:43 +0000)]
After completing a name lookup for a target UNIX domain socket to
connect to, re-check that the local UNIX domain socket hasn't been
closed while we slept, and if so, return EINVAL. This affects the
system running both with and without Giant over the network stack,
and recent ULE changes appear to cause it to trigger more
frequently than previously under load. While here, improve catching
of possibly closed UNIX domain sockets in one or two additional
circumstances. I have a much larger set of related changes in
Perforce, but they require more testing before they can be merged.
One debugging printf is left in place to indicate when such a race
takes place: this is typically triggered by a buggy application
that simultaenously connect()'s and close()'s a UNIX domain socket
file descriptor. I'll remove this at some point in the future, but
am interested in seeing how frequently this is reported. In the
case of Martin's reported problem, it appears to be a result of a
non-thread safe syslog() implementation in the C library, which
does not synchronize access to its logging file descriptor.