Commit Graph

119607 Commits

Author SHA1 Message Date
John Baldwin
b34b3c19c6 Bump config(8) version for the DEFAULTS change. 2005-10-27 19:27:55 +00:00
David E. O'Brien
d7f4443e77 Remove information on nVidia nForce3 Pro-150 chipset to match GENERIC change. 2005-10-27 19:07:35 +00:00
Gleb Smirnoff
19bf94288f Keep locks consistent before goto.
Reported by:	pho
Reviewed by:	mohans
2005-10-27 19:02:34 +00:00
Peter Wemm
54903605b3 MFi386: bring over DEFAULTS (repocopy) and adapt. While there isn't a
4.x->6.x amd64 upgrade path, the config files are kept in approximate sync.
2005-10-27 18:54:43 +00:00
David E. O'Brien
537b6cf3ea Remove atpic as we've changed to using the lapic timer vs. using irq0 2005-10-27 18:40:56 +00:00
Murray Stokely
663f4b128b Look for packages in packages-6.0-release or packages-6-stable, as
appropriate.

Approved by:	re (scottl@)
Reviewed by:	portmgr (kris@)
2005-10-27 18:34:51 +00:00
Ruslan Ermilov
1558abf6ce Rename the .dbg extension to .symbols, which matches "symbol-file"
gdb(1) command better, though I must admit it's confusing: these
files have not only [debugging] symbols, but much more than that.

Requested by:	obrien
2005-10-27 17:39:03 +00:00
Xin LI
5340ce189f MFen: 1.883.2.7 -> 1.883.2.8
MT6 candidate

Obtained from:	The FreeBSD Simplified Chinese Project
2005-10-27 17:35:48 +00:00
John Baldwin
85d72e4a2e Create a default kernel config for i386 and move 'device isa' and
'device npx' (both of which aren't really optional right now) and
'device io' and 'device mem' (to preserve POLA for 4.x users upgrading
to 6.0) from GENERIC into DEFAULTS.

Requested by:	scottl
Reviewed by:	scottl
2005-10-27 17:34:35 +00:00
Ed Maste
5d89e1d0af In watchdog_config enable the software watchdog iff the WD_ACTIVE flag is
set.  When watchdogd(1) is terminated intentionally it clears the bit,
which should then disable it in the kernel.

PR:		kern/74386
Submitted by:	Alex Hoff <ahoff at sandvine dot com>
Approved by:	phk, rwatson (mentor)
2005-10-27 17:22:47 +00:00
John Baldwin
dfdbf9be00 Optionally include a DEFAULTS config file if it is present in the current
directory before the specified config file.  This is implemented by
opening DEFAULTS as stdin if it exists, and if so resetting stdin to the
actual config file when DEFAULTS is fully parsed via yywrap().  In short,
this lets us create DEFAULTS kernel configs in /sys/<arch>/conf that can
enable certain options or devices by default and allow users to disable
them via 'nooptions' or 'nodevice' rather than having to create kludge
NO_FOO options.

Requested by:	scottl
Reviewed by:	scottl
2005-10-27 17:13:23 +00:00
John Baldwin
518bf2dcc7 Update example libmap.conf file:
- Remove pointless examples that map libpthread to itself.
- Update shared libraries for 6.0 bumps.

Reported by:	rwatson
MFC after:	1 day
2005-10-27 16:59:02 +00:00
John Baldwin
2851f51eb1 Revert most of revision 1.235 and fix the problem a different way. We
can't acquire an sx lock in ttyinfo() because ttyinfo() can be called
from interrupt handlers (such as atkbd_intr()).  Instead, go back to
locking the process group while we pick a thread to display information for
and hold that lock until after we drop sched_lock to make sure the
process doesn't exit out from under us.  sched_lock ensures that the
specific thread from that process doesn't go away.  To protect against
the process exiting after we drop the proc lock but before we dereference
it to lookup the pid and p_comm in the call to ttyprintf(), we now copy
the pid and p_comm to local variables while holding the proc lock.

This problem was found by the recently added TD_NO_SLEEPING assertions for
interrupt handlers.

Tested by:	emaste
MFC after:	1 week
2005-10-27 16:47:28 +00:00
Søren Schmidt
f373190c49 Enclose the delayed attach in Giant so we dont loose the race with other
drivers trying to attach ATA devices like pccard.
Dont clear the delayed flag before we are acutally finished.

Spotted by: imp
2005-10-27 16:32:39 +00:00
David E. O'Brien
4a55b68732 Clear pending_txs when not "RUNNING".
Submitted by:	Q <q@onthenet.com.au>
2005-10-27 15:39:19 +00:00
Ruslan Ermilov
bebb05211f Use ${S} to pass ${SYSDIR} to ports. This makes PORTS_MODULES
feature work when compiling a kernel via "make buildkernel".

Noticed and tested by:	nork
2005-10-27 14:33:08 +00:00
Ruslan Ermilov
98b45a8ff8 Installing debug modules was a bad idea -- I bogusly assumed that
our kernel linker will only load PT_LOAD segments, apparently not.
Instead, produce .dbg objects from .debug objects, and install
them together with non-debug objects, as described in objcopy(1).

Original code by:	obrien
2005-10-27 14:24:45 +00:00
David Xu
55ac4c3523 Link libthr to libpthread on Alpha and Sparc. 2005-10-27 10:21:23 +00:00
Paul Saab
53f5742d33 Allow 32bit get/setsockopt with SO_SNDTIMEO or SO_RECVTIMEO to work. 2005-10-27 04:26:35 +00:00
David Xu
38478fab7c Disconnect libc_r from buildworld, it is still kept in the tree to
provide some baseline references, but users are encouraged to use
libpthread or libthr in real world.

Discussed on: arch@
2005-10-27 03:09:20 +00:00
Maksim Yevmenkin
9460540740 Do not manually allocate/free device's softc structure.
Pointed by:	jhb
Reviewed by:	imp, jhb
2005-10-26 23:13:51 +00:00
Peter Wemm
40c9966a37 Commit something we found useful at work at one point. Add sysctls for
debug.kdb.panic and debug.kdb.trap alongside the existing debug.kdb.enter
sysctl.  'panic' causes a panic, and 'trap' causes a page fault.  We used
these to ensure that crash dumps succeed from those two common failure
modes.  This avoids the need for creating a 'panic' kld module.
2005-10-26 22:40:07 +00:00
Peter Wemm
a9fbe5d07b MFi386: Various apic fixes and tweaks
* Don't recursively panic if we've already paniced and the local apic is
  now stuck.
* Add hw.apic.* tunables/sysctls for extint controls
* Change "lapic%d timer" to "cpu%d timer" intname to match i386
2005-10-26 22:32:30 +00:00
Peter Wemm
cb89fb11b7 fdread cannot work without opening the /dev/fd node in O_RDWR mode now,
because it sets the floppy controller parameters, which requires O_RDWR.
Specifically, the FD_SOPTS ioctl requires this, and the code errors out
and aborts if it can't do it.  Among other things, it is changing the
FDOPT_NOERRLOG flag.  Broken in 6.0 as well.
2005-10-26 22:28:38 +00:00
Peter Wemm
cb496fcf97 Make fdcontrol work again. It has been broken for a while. It tries
to set the floppy controller parameters, but that requires that the
device node be open in O_RDWR mode now.  I think it is broken in 6.0 as
well.  This line looks like a stray anyway.
2005-10-26 22:23:52 +00:00
Peter Wemm
946bca4fcd Regenerate (with the correct #ifdef COMPAT_43 tests now) 2005-10-26 22:21:03 +00:00
Peter Wemm
767dfc44be There is no 'freebsd3_' prefix for COMPAT_43 syscalls. Those are all
bundled under MCOMPAT and have an 'o' prefix.  Adjust as appropriate.
This re-enables compiling without COMPAT_43 again.
2005-10-26 22:19:51 +00:00
Peter Wemm
8f155a8f2e Change PHYSMAP_SIZE to allow for more memory segments. The old value was
too low for certain Dell amd64 machines.
2005-10-26 22:16:52 +00:00
Bill Paul
4cf9a535a8 Minor nit: in ntoskrnl_finddev(), only free the 'children' device_t
array if device_find_children() actually returned a non-NULL array pointer.
2005-10-26 20:21:45 +00:00
Giorgos Keramidas
fd891a579d Note that the jail setup example is meant to be fed to sh(1), not csh(1).
PR:		docs/87351
Submitted by:	"Eli K. Breen" <bsd@unixforge.net>
Approved by:	simon, brooks
MFC after:	3 days
2005-10-26 20:19:39 +00:00
Pawel Jakub Dawidek
e8c9c9cfd5 Change u_int64_t to uintmax_t and use %ju, so it compiles on 64bit archs.
I changed every u_int64_t to uintmax_t, as we should use eventually
uint64_t anyway those days.
2005-10-26 19:44:17 +00:00
Bill Paul
51d6d0952b Clean up and apply the fix for PR 83477. The calculation for locating
the start of the section headers has to take into account the fact
that the image_nt_header is really variable sized. It happens that
the existing calculation is correct for _most_ production binaries
produced by the Windows DDK, but if we get a binary with oddball
offsets, the PE loader could crash.

Changes from the supplied patch are:

- We don't really need to use the IMAGE_SIZEOF_NT_HEADER() macro when
  computing how much of the header to return to callers of
  pe_get_optional_header(). While it's important to take the variable
  size of the header into account in other calculations, we never
  actually look at anything outside the non-variable portion of the
  header. This saves callers from having to allocate a variable sized
  buffer off the heap (I purposely tried to avoid using malloc()
  in subr_pe.c to make it easier to compile in both the -D_KERNEL and
  !-D_KERNEL case), and since we're copying into a buffer on the
  stack, we always have to copy the same amount of data or else
  we'll trash the stack something fierce.

- We need <stddef.h> to get offsetof() in the !-D_KERNEL case.

- ndiscvt.c needs the IMAGE_FIRST_SECTION() macro too, since it does
  a little bit of section pre-processing.

PR: kern/83477
2005-10-26 18:46:27 +00:00
John Baldwin
90e2fc863a Spell 'argument' correctly.
Submitted by:	Andre Guibert de Bruet andy at siliconlandmark dot com
2005-10-26 17:39:35 +00:00
John Baldwin
444ec0d5f5 Fix misspelled 'argument' and try to make the sentence into English.
Submitted by:	Andre Guibert de Bruet andy at siliconlandmark dot com
2005-10-26 17:37:54 +00:00
John Baldwin
284b6708c4 - Use swi_remove() to teardown swi handlers rather than
intr_event_remove_handler().
- Remove tty: prefix from a couple of swi handler names.
2005-10-26 15:52:16 +00:00
John Baldwin
fe486a370a Add a swi_remove() function to teardown software interrupt handlers. For
now it just calls intr_event_remove_handler(), but at some point it might
also be responsible for tearing down interrupt events created via swi_add.
2005-10-26 15:51:05 +00:00
Bruce Evans
3b46e988e7 Use a better algorithm for reducing the error in __kernel_cos[f]().
This supersedes the fix for the old algorithm in rev.1.8 of k_cosf.c.

I want this change mainly because it is an optimization.  It helps
make software cos[f](x) and sin[f](x) faster than the i387 hardware
versions for small x.  It is also a simplification, and reduces the
maximum relative error for cosf() and sinf() on machines like amd64
from about 0.87 ulps to about 0.80 ulps.  It was validated for cosf()
and sinf() by exhaustive testing.  Exhaustive testing is not possible
for cos() and sin(), but ucbtest reports a similar reduction for the
worst case found by non-exhaustive testing.  ucbtest's non-exhaustive
testing seems to be good enough to find problems in algorithms but not
maximum relative errors when there are spikes.  E.g., short runs of
it find only 3 ulp error where the i387 hardware cos() has an error
of about 2**40 ulps near pi/2.
2005-10-26 12:36:18 +00:00
Giorgos Keramidas
5967e9a271 Typo.
PR:		docs/88015
Submitted by:	Marian Cerny <jojo@matfyz.cz>
MFC after:	3 days
2005-10-26 12:07:23 +00:00
David Xu
07b6889426 Add experiment code to implement POSIX timer's SIGEV_THREAD notification. 2005-10-26 11:08:32 +00:00
Gleb Smirnoff
c0bc2867c1 - Fix leak of struct nlminfo on process exit.
- Fix malloc type collision, that made the above problem
  difficult to understand.

Reported by:	Vladimir Sharun <sharun ukr.net>
2005-10-26 07:18:37 +00:00
David Xu
d7f119abd5 Follow the change in kernel, joiner thread just waits at thread id
address, let kernel wake it up.
2005-10-26 07:11:43 +00:00
David Xu
4938faa635 do umtx_wake at userland thread exit address, so that others userland
threads can wait for a thread to exit, and safely assume that the thread
has left userland and is no longer using its userland stack, this is
necessary for pthread_join when a thread is waiting for another thread
to exit which has user customized stack, after pthread_join returns,
the userland stack can be reused for other purposes, without this change,
the joiner thread has to spin at the address to ensure the thread is really
exited.
2005-10-26 06:55:46 +00:00
Bill Paul
7f3cc43211 Get rid of the timer tracking and reaping code in NdisMInitializeTimer()
and ndis_halt_nic(). It's been disabled for some time anyway, and
it turns out there's a possible deadlock in NdisMInitializeTimer() when
acquiring the miniport block lock to modify the timer list: it's
possible for a driver to call NdisMInitializeTimer() when the miniport
block lock has already been acquired by an earlier piece of code. You
can't acquire the same spinlock twice, so this can deadlock.

Also, implement MmMapIoSpace() and MmUnmapIoSpace(), and make
NdisMMapIoSpace() and NdisMUnmapIoSpace() use them. There are some
drivers that want MmMapIoSpace() and MmUnmapIoSpace() so that they can
map arbitrary register spaces not directly associated with their
device resources. For example, there's an Atheros driver for
a miniPci card (0x168C:0x1014) on the IBM Thinkpad x40 that wants
to map some I/O spaces at 0xF00000 and 0xE00000 which are held by
the acpi0 device. I don't know what it wants these ranges for,
but if it can't map and access them, the MiniportInitialize() method
fails.
2005-10-26 06:52:57 +00:00
Ruslan Ermilov
c9003bc7fa Catch up with new interrupt handling code. 2005-10-26 06:44:59 +00:00
Ruslan Ermilov
e110f39bf3 Catch up with new interrupt handling code. 2005-10-26 06:17:27 +00:00
Yaroslav Tykhiy
9f4abef9a3 Since carp(4) interfaces presently are kinda fake yet possess
IP addresses, mark them with LOOPBACK so that routing daemons
take them easy for link-state routing protocols.

Reviewed by:	glebius
2005-10-26 05:57:35 +00:00
Yaroslav Tykhiy
6fa3ee6c30 Override $command with $foo_program only if $command
has been set in the first place.  This should reduce
unwanted side-effects in rc.d scripts that don't mean
to use $command and rc.subr(8) methods associated with
it at all.

Discussed with:	brooks
Reviewed by:	-rc (silence)
2005-10-26 04:32:31 +00:00
Yaroslav Tykhiy
8d52cc90fb Use consistent punctuation and vertical indenting around .Dl's.
Wrap a too long line.
2005-10-26 04:20:18 +00:00
Yaroslav Tykhiy
5a3c72ce8f Document that `reload' is not provided by default
yet it can be enabled when applicable.
2005-10-26 04:12:34 +00:00
Takanori Watanabe
f83da457dc Add checking for File record magic. 2005-10-26 03:24:28 +00:00