green [Wed, 10 Dec 2003 16:10:34 +0000 (16:10 +0000)]
Implement seeking to earlier offsets in gzipfs. This allows my loader
to e.g. correctly load all .ko.gz's I've tried, as opposed to messing
up trying to read section headers on some of them.
grehan [Wed, 10 Dec 2003 13:11:03 +0000 (13:11 +0000)]
PowerPC-conditional changes:
- include ashldi3.c/ashrdi3.c from libc for UFS 64-bit arith
- pull in syncicache.c from libc, and define _STANDALONE for
loader usage
grehan [Wed, 10 Dec 2003 09:16:22 +0000 (09:16 +0000)]
- Bring Makefile up to rev with sparc64 in terms of config options and rules
- Move loader relocation up to 0x1C00000. This is in line with OSX bootx,
and allows more space for boot-time modules/ramdisks without conflicting
with OpenFirmware's use of RAM
grehan [Wed, 10 Dec 2003 08:55:53 +0000 (08:55 +0000)]
- removed obsolete ppc_exit/ppc_boot functions
- OpenFirmware returns overlapping memory regions. Use a simple
brute force algorithm to merge these into non-overlapping
regions. This fixes bugs in reporting of available memory
and also prevents pages from being added twice in the VM system.
obrien [Wed, 10 Dec 2003 02:49:17 +0000 (02:49 +0000)]
Add just enough of i386/include/pcvt_ioctl.h to amd64/include/pcvt_ioctl.h
such that 'ispcvt' can build. Unforunately 'ispcvt' is needed in order for
/etc/rc.d/syscons to run. This fixes the bug where I could not get my
keymap effective at boot.
marcel [Wed, 10 Dec 2003 02:38:51 +0000 (02:38 +0000)]
Add a short description of the kse_switchin(2) syscall to the kse
manpage and add a kse_switchin link. While here, list kse_thr_interrupt
before kse_wakeup in the MLINKS variable and the synopsis.
marcel [Wed, 10 Dec 2003 01:59:23 +0000 (01:59 +0000)]
Write the thread pointer (val) in the kse mailbox (loc) before we
set the new context in kse_switchin(2). This allows us to return
an error to the calling context when the suword() fails.
deischen [Tue, 9 Dec 2003 23:40:27 +0000 (23:40 +0000)]
accept() returns a file descriptor when it succeeds which is very
likely to be non-zero. When leaving the cancellation point, check
the return value against -1 to see if cancellation should be
checked. While I'm here, make the same change to connect() just
to be consisitent.
jhb [Tue, 9 Dec 2003 21:14:31 +0000 (21:14 +0000)]
Adjust an assertion for the TDF_TSNOBLOCK race handling in
turnstile_unpend(). A racing thread that does not have TDI_LOCK set may
either be running on another CPU or it may be sitting on a run queue if it
was preempted during the very small window in turnstile_wait() between
unlocking the turnstile chain lock and locking sched_lock.
jhb [Tue, 9 Dec 2003 21:09:04 +0000 (21:09 +0000)]
Revert the previous race fix and replace it with a more general fix. The
case of a turnstile having no threads is just one instance of the more
general case where the thread we are examining has been partially awakened
already in that it has been removed from the turnstile's blocked list but
still has TDI_LOCK set. We detect that case by checking to see if the
thread has already had a turnstile reassigned to it.
mtm [Tue, 9 Dec 2003 11:20:01 +0000 (11:20 +0000)]
Take a stab at fixing some of the macro-nightmare.
PTHREAD_NEW_STATE should work as expected now: a thread
marked PS_RUNNING will get sent a SIGTHR.
Still more cleanups necessary.
mtm [Tue, 9 Dec 2003 11:12:11 +0000 (11:12 +0000)]
Fix the wrapper function around signals so that a signal handling
thread on one of the mutex or condition variable queues is removed
from those queues before the real signal handler is called.
marcel [Tue, 9 Dec 2003 09:52:14 +0000 (09:52 +0000)]
Don't panic for misalignment traps when the onfault handler is set.
Not all transfers between kernel and user space are byte oriented
and thus alignment safe. Especially fuword*() and suword*() are
sensitive to alignment but in general more optimal than block copies.
By catching the misalignment trap we avoid pessimizing the common
case of properly aligned memory accesses which we would do if we
were to use byte copies or adding tests for proper alignment.
Note that the expectation that the kernel produces aligned pointers
is unchanged. This change therefore relates to possible unaligned
pointers generated in userland.
mtm [Tue, 9 Dec 2003 08:51:11 +0000 (08:51 +0000)]
o Rename devfs_link() to make_symlink() and turn it into a generic
symlinking routine.
o Modify rc.d/jail to create its own symlink relative to the jail's
filesystem
marcel [Tue, 9 Dec 2003 08:35:17 +0000 (08:35 +0000)]
Fix the build of libski now that we use the "official" MADT table
definitions. Those are slightly different than the ones we used
before ACPI-CA 20031203 got imported. No structural or functional
change.
mtm [Tue, 9 Dec 2003 08:17:33 +0000 (08:17 +0000)]
If rc.d/mountcritlocal is unable to mount local filesystems,
then immediately terminate the shell (during boot this
also terminates the parent rc(8) shell). This was the pre-rcNG behaviour.
imp [Tue, 9 Dec 2003 07:41:07 +0000 (07:41 +0000)]
Older versions of the intersil firmware is a lot slower than newer
versions of the firmware. It responds more slowly to commands, and we
bogusly failed them. We assume that all versions of the intersil
firmware before 1.0 are 10 times slower and will give it 10x the time
to finish.
njl [Tue, 9 Dec 2003 02:55:47 +0000 (02:55 +0000)]
Local change: emulate a ReturnOp if the AML expects one but it isn't
present. Some buggy BIOSs do not have a ReturnOp even though it is
required for a function to return a value.
njl [Tue, 9 Dec 2003 02:54:47 +0000 (02:54 +0000)]
Local change: Allow access to the field if it is within the region
size rounded up to a multiple of the access byte width. This overcomes
"off-by-one" programming errors in the AML often found in Toshiba
laptops.
njl [Tue, 9 Dec 2003 02:29:59 +0000 (02:29 +0000)]
Remove files on the vendor branch that we no longer use. Some are no longer
distributed with ACPI-CA. Note that all of these have been gone from HEAD
since 20030228.
davidxu [Tue, 9 Dec 2003 02:20:56 +0000 (02:20 +0000)]
Rename _thr_enter_cancellation_point to _thr_cancel_enter, rename
_thr_leave_cancellation_point to _thr_cancel_leave, add a parameter
to _thr_cancel_leave to indicate whether cancellation point should be
checked, this gives us an option to not check cancallation point if
a syscall successfully returns to avoid any leaks, current I have
creat(), open() and fcntl(F_DUPFD) to not check cancellation point
after they sucessfully returned.
Replace some members in structure kse with bit flags to same some
memory.
Conditionally compile THR_ASSERT to nothing if _PTHREAD_INVARIANTS is
not defined.
Inline some small functions in thr_cancel.c.
Use __predict_false in thr_kern.c for some executed only once code.
peter [Tue, 9 Dec 2003 02:08:19 +0000 (02:08 +0000)]
Put on some factor 30+ bikeshed repellent and export the internal
Makefile.inc1 underscore targets with a big warning that they are
intentionally undocumented, subject to change without notice and
might poison your dog etc. If you don't know what they are, then they
are not meant for you to use.
I've added these by hand to so many many trees that I've lost count. I
find them rather useful.
gad [Tue, 9 Dec 2003 00:42:44 +0000 (00:42 +0000)]
Fix a problem where 'make installworld' will fail and leave the
system in a messy state *if* the user is upgrading from a system
which has no /libexec to a system which builds a DYNAMICROOT, and
if that user has set DISTDIR (as documented for ports, but it turns
out that the same variable name is used for a completely unrelated
purpose in 'make release').
There are other possible fixes for this issue, and ru@ may later
decide to commit one of those fixes. I just wanted some fix in
ASAP, and this is the fix that I have tested.
tjr [Mon, 8 Dec 2003 23:52:22 +0000 (23:52 +0000)]
Set __mbrtowc and __wcrtomb correctly when changing to the C/POSIX locale.
Save __mbrtowc and __wcrtomb and restore them when changing back to
the cached locale.
peter [Mon, 8 Dec 2003 22:47:59 +0000 (22:47 +0000)]
First pass at attempted debrucification:
- sort the -E switch into the right place.
- add previously missing -p pid in usage (from the last few commits).
- add -E to usage.
- consistently use trfile in the man page.
I knew I shouldn't have touched the man page. If I commit to a man page,
it just makes people suspicious. :-)
deischen [Mon, 8 Dec 2003 13:33:20 +0000 (13:33 +0000)]
Go back to using rev 1.18 where thread locks are used instead of KSE
locks for [libc] spinlock implementation. This was previously backed
out because it exposed a bug in ia64 implementation.
ume [Mon, 8 Dec 2003 11:59:21 +0000 (11:59 +0000)]
- changed the logic in nd6_is_addr_neighbor(); check on-link prefixes
(not interface addresses) to see if a given address is on-link.
- skip offlink prefixes in neighbor determination in nd6_is_addr_neighbor.
- in nd6_is_addr_neighbor, regarded every address as on-link when the
default router list is empty. otherwise, we'd not be able make a neighbor
cache for the address.
this algorithm is applied to hosts only.
- in nd6_is_addr_neighbor, check if the default interface is equal to
the interface in question in addition to check if the default router
list is empty.
sos [Mon, 8 Dec 2003 08:27:52 +0000 (08:27 +0000)]
Fix more problems with the Silicon Image 3112A:
Setup decent transfer mode defaults as some BIOS's seem to put in
things that it *knows* doesn't work.
(Note to BIOS writers: stop doing that nonsense, we will get things
working with your crappy HW anyways, and then recommend users to buy
someone else's products that "just works", thankyou.. )
Limit the device transfer mode to ATA100/UDMA5 on generic SATA.
Since we dont know if the user is using a pure SATA device or an
old PATA drive with a SATA converter dongle, we need to limit the
speed used here to cover up the problems with Marvell ATA-SATA bridges
used in lots of SATA products.
This workaround is enabled for all detectable SATA controllers as they
seem to have semilar problems here. One notable exception is all the
Promise pdc2037x chips which just always work (cudos to Promise!).
obrien [Mon, 8 Dec 2003 07:59:18 +0000 (07:59 +0000)]
Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr
as these ioctl's aren't MD. This also means they are installed in
/usr/include/dev/bktr now. Also provide compatability wrappers for
where these headers lived in 4.x.
marcel [Mon, 8 Dec 2003 07:57:57 +0000 (07:57 +0000)]
Unbreak vmstat -i on ia64:
o nintr and inamlen must by of type size_t, not int,
o Remove now unnecessary casts,
o Handle the aflag differently, because the intr. names have a
fixed width and almost always have trailing spaces.
obrien [Mon, 8 Dec 2003 07:22:42 +0000 (07:22 +0000)]
Move the bktr(4) <arch>/include/ioctl_{bt848,meteor}.h files to dev/bktr
as these ioctl's aren't MD. This also means they are installed in
/usr/include/dev/bktr now. Also provide compatability wrappers for
where these headers lived in 4.x.
Move the ciss quirk to the right section, also update the comment
stating that the controllers do not support SYNC CACHE since ciss
only supports a small subset of the scsi spec.