ru [Fri, 21 Mar 2003 14:45:46 +0000 (14:45 +0000)]
Fixed a typo in ${.CURDIR} spelling, fatal on systems
without the /sys symlink pointing to the current tree.
(Revision 1.2 made it non-fatal, but anyway.)
tjr [Fri, 21 Mar 2003 05:13:23 +0000 (05:13 +0000)]
Map VAPPEND to VWRITE in nfsspec_access() - VAPPEND is never set in the
mode returned by VOP_GETATTR. This fixes incorrect "Permission denied"
errors when trying to append to a file on an NFSv2 mount.
iedowse [Fri, 21 Mar 2003 00:30:53 +0000 (00:30 +0000)]
Attempt to automatically read in kernel module symbols when a live
or dead kernel core is loaded into gdb. This extends gdb's existing
shared library support, so the "info sharedlibrary", "sharedlibrary"
and "nosharedlibrary" commands can be used to view and change the
list of loaded symbol files.
The current implementation is more than a kludge however, and it
will not always manage to find the .ko.debug file corresponding to
the loaded module. In particular, for modules whose build directory
cannot be easily guessed from the module name such as all the
netgraph modules, the debug version of the .ko will not be found
automatically.
The logic for finding the module file first attempts to guess at
the module build directory by parsing the version[] string. Then
using that directory ($DIR), it tries the following paths in turn:
ru [Thu, 20 Mar 2003 23:46:22 +0000 (23:46 +0000)]
Pass the target machine architecture down to disklabel(8).
Do it so that systems without the -m option in disklabel(8),
e.g. 5.0-RELEASE, can still build current snapshots.
While here, drop the -s option from doFS.sh; we have not
been using the .size files for a long time.
dwmalone [Thu, 20 Mar 2003 22:42:22 +0000 (22:42 +0000)]
Clean up some warnings that don't result in a change in the object file:
Constness, missing prototypes, non-ansi prototypes, missing
initialisers, unnecessary declarations, shadowing.
jhb [Thu, 20 Mar 2003 21:12:31 +0000 (21:12 +0000)]
Use td_ucred of curthread instead of p_ucred of curproc. This required
changing sem_perm() and sem_hasopen() to take a thread instead of a proc
for the first argument.
mux [Thu, 20 Mar 2003 19:45:26 +0000 (19:45 +0000)]
Use atomic operations to increment and decrement the refcount
in busdma tags. There are currently no tags shared accross
different drivers so this isn't needed at the moment, but it
will be required when we'll have a proper newbus method to get
the parent busdma tag.
grehan [Thu, 20 Mar 2003 10:28:20 +0000 (10:28 +0000)]
Enable the FPU on first use per-thread and save state across context
switches. Not as lazy as it could be. Changing FPU state with sigcontext
still TODO.
fpu.c - convert some asm to inline C, and macroize fpu loads/stores
swtch.S - call out to save/restore fpu routines
trap.c - always call enable_fpu, since this shouldn't be called once
the FPU has been enabled for a thread
genassym.c - define for pcb fpu flag
grehan [Thu, 20 Mar 2003 10:18:01 +0000 (10:18 +0000)]
- Add PCI ID for Paddington i/o controller, used in old G3's
- Add ID for the Intrepid i/o controller, used in new 12"/17" PowerBooks
- put IDs in chronological order
arun [Wed, 19 Mar 2003 21:38:27 +0000 (21:38 +0000)]
Fix for ia64/48024 - ensure function pointer equality across elf
objects.
Programs such as sshd depend on two pointers to the same function being
equal in a given process. However, the current ia64 implementation
ensures that they're equal when both the pointers are instantiated in
the same ELF object. The attached patch ensures that they're equal
irrespective of where they're instantiated.
robert [Wed, 19 Mar 2003 14:17:24 +0000 (14:17 +0000)]
- Revamp the function _nis_initshells() to make getusershell() backed
by NIS work, like nsswitch.conf(5) promises to be able to.
(These modifications will be fed back to NetBSD, of course)
- In endusershell(), do not set `sl' to NULL if we know it already has
that value.
grehan [Wed, 19 Mar 2003 08:33:21 +0000 (08:33 +0000)]
Add machine check handler. While generally useful, it's required when
issuing PCI config cycles on MPC106-based PowerMacs, which cause machine
checks when accessing non-existent/empty slots.
mtm [Wed, 19 Mar 2003 08:07:15 +0000 (08:07 +0000)]
o initialize a couple of local flags so the user can re-edit groups
next time the subroutine is re-entered
o s/configrun/configflag/
o Make the prompt make sense if the user was creating a configuration file
jake [Wed, 19 Mar 2003 06:55:37 +0000 (06:55 +0000)]
- Remove unused cache flushing routines. These will not necessary work
on future UltraSPARC cpus for which the data cache is not direct mapped.
- Move UltraSPARC I and II (spitfire, blackbird, sapphire, sabre) specific
functions to spitfire.c, and add cheetah.c for UltraSPARC III specific
functions. Initially just cache flushing, but there are a few other
functions that will need to move here.
- Add an ipi handler for data cache flushing on UltraSPARC III.
- Use function pointers to select the right cache flushing functions based
on cpu_impl.
With this it is possible to boot single user from an mfs root on UltraSPARC
III systems, including spinning up secondary processors. There is currently
no support for the host to pci bridge, and no documentation for it is
publically available.
Thanks to Oleg Derevenetz for providing access to a system with UltraSPARC
III+ cpus.
jake [Wed, 19 Mar 2003 05:51:21 +0000 (05:51 +0000)]
- Set cpu_impl early in sparc64_init so that we can use it to detect
UltraSPARC III and higher cpus and do needed setup.
- Disable the "system tick" interrupt for UltraSPARC III. This avoids
an interrupt storm on startup since we're not prepared for these at
all. This feature has questionable use anyway.
- Clear tick on startup and then leave it alone.
davidxu [Wed, 19 Mar 2003 05:49:38 +0000 (05:49 +0000)]
Adjust code for userland preemptive. Userland can set a quantum in
kse_mailbox to schedule an upcall, this is useful for userland timeout
routine, for example pthread_cond_timedwait().
Also extract upcall scheduling code from kse_reassign and create
a new function called thread_switchout to include these code.
grog [Wed, 19 Mar 2003 00:58:32 +0000 (00:58 +0000)]
Add birthdays of NetBSD and FreeBSD projects. For the former, take
the general opinion of the NetBSD community, 21 March 1993. For the
latter, take David Greenman's first mention of the project name, 19
Jun 1993.
gallatin [Tue, 18 Mar 2003 18:27:33 +0000 (18:27 +0000)]
Fix a race condition in socow_setup(): The page must be wired before
sf_buf_alloc() is called, as sf_buf_alloc() may sleep. If it does sleep,
the page might be reclaimed before wiring occurs.
fanf [Tue, 18 Mar 2003 14:19:26 +0000 (14:19 +0000)]
The POSIXly-correct /dev/stdout handling added in rev 1.44 makes
careless users vulnerable to terminal control sequence attacks,
since they expect uudecode to just drop (or overwrite) a file in
the current directory. POSIX also says that the full pathname from
the input should be used when writing a file, which we only do if
the -s (shoot me in the foot) option is specified; therefore this
revision means that you now need to use -s for standard /dev/stdout
handling.
phk [Tue, 18 Mar 2003 09:30:31 +0000 (09:30 +0000)]
If devstat_new_entry() is passed a unit number of -1 assume that
the devstat is for an "interior" GEOM node and register using the
name argument as a geom identity pointer. Do not put these devstat
structures on the list returned by the sysctl.
This gives us the ability to tell the two kinds of nodes apart and
leave the current "strictly physical" view of devstat intact without
modifications, yet be able to use devstat for both kinds of devices.
It also saves us bloating struct devstat with another 48 bytes of
space for the name. At least for now.
phk [Tue, 18 Mar 2003 09:20:20 +0000 (09:20 +0000)]
Make devstat fully Giant agnostic:
Add a mutex and protect the allocation and traversal of the list with it.
When we allocate a page for devstat use we drop the mutex and use
M_WAITOK this is not nice, but under the given circumstances the
best we can do.
In the sysctl handler for returning the devstat entries we do not want to
hold the mutex across copyout(9) calls, so we keep a very careful eye on
the devstat_generation count, and abandon with EBUSY if it changes under
our feet.
Specifically test for BIO_WRITE, rather than default non-read,non-deletes
as write. Make the default be DEVSTAT_NO_DATA.
Add atomic increments of the sequence[01] fields so applications using the
mmap'ed view stand a chance of detecting updates in progress.
phk [Tue, 18 Mar 2003 08:45:25 +0000 (08:45 +0000)]
Including <sys/stdint.h> is (almost?) universally only to be able to use
%j in printfs, so put a newsted include in <sys/systm.h> where the printf
prototype lives and save everybody else the trouble.
silby [Tue, 18 Mar 2003 06:29:51 +0000 (06:29 +0000)]
Instead of relying on a compile time define to determine whether the xl
driver should use port or memory based IO, determine it dynamically
at runtime, preferring MMIO where possible. This helps us support newer
arches which dislike port based access better.
Tested on i386 & sparc64, with 3c900, 905, 905b, and 905C cards.
(in varying combinations by both jake and myself)
imp [Tue, 18 Mar 2003 04:22:42 +0000 (04:22 +0000)]
o Lucent cards don't seem to like multiple buffers for tx. Use only
one tx buffer for these cards. The old driver only used one. We use
1 for symbol, and 3 for prism cards.
o Don't do the maximum loops thing in the ISR. In fact, revert to the
old interrupt handler. Lucent cards don't seem to work too well if
you don't disable/enable interrupts from the card in the ISR.
Between these two changes, Lucent cards suck less. They work in
autoselect mode only. And seem to get 1Mbps or 2Mbps only. Setting a
specific media speed doesn't work, and I've had a few issues even with
these patches. They turn a former brick into a nearly useful card.
These patches work on the prism 2 and 2.5 PC Card cards that I have.
I've not tested this on PCI cards. I suspect, but couldn't find
proof, that they were the reason that the ISR was changed so radically
from its FreeBSD roots in NetBSD. We might need to have a variant ISR
if so.
imp [Tue, 18 Mar 2003 02:54:39 +0000 (02:54 +0000)]
Move symbol reset detection code back into wi_reset. This is a more
reliable way to detect if the symbol cards have been reset or not.
This makes symbol cards work better.