Commit Graph

1926 Commits

Author SHA1 Message Date
Justin T. Gibbs
7a59208d92 New Kernel device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
1998-09-15 08:16:17 +00:00
John Polstra
c284427561 Remove includes that are no longer needed, now that the core dumping
code has been moved into the respective imgact_xxx.c sources.
1998-09-14 23:25:18 +00:00
John Polstra
8c64af4f75 Viola! The kernel now generates standard ELF core dumps for ELF
executables.

Currently only data and stack are included in the core dumps.  I am
looking into adding the other (mmapped) writable segments as well.
1998-09-14 22:46:08 +00:00
Søren Schmidt
d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
John Polstra
22d4b0fb41 Add provisions for variant core dump file formats, depending on the
object format of the executable being dumped.  This is the first
step toward producing ELF core dumps in the proper format.  I will
commit the code to generate the ELF core dumps Real Soon Now.  In
the meantime, ELF executables won't dump core at all.  That is
probably no less useful than dumping a.out-style core dumps as they
have done until now.

Submitted by:	Alex <garbanzo@hooked.net> (with very minor changes by me)
1998-09-14 05:36:51 +00:00
Doug Rabson
fe3db7c7c7 Implement dynamic loading for ELF. 1998-09-11 08:46:15 +00:00
Doug Rabson
9386468ef8 Avoid a possible memory leak. 1998-09-11 08:45:32 +00:00
Tor Egge
a58915fc10 Don't keep the underlying directory locked while performing the file
system specific VFS_MOUNT operation.
PR:		1067
1998-09-10 02:27:52 +00:00
Bruce Evans
355a2610a7 Don't use CTL_VFS at the wrong level. This caused loops in the sysctl
tree if CTL_VFS happened to get assigned as a type number to a vfs that
has some vfs sysctls.
1998-09-09 07:41:41 +00:00
Bruce Evans
cae300be0f Made unloading of the nfs LKM sort of work. This is mainly to test
detachment of vfs sysctls.  Unloading of vfs LKMs doesn't actually
work for any vfs, since it leaves garbage pointers to memory
allocation control structures.
1998-09-07 05:42:15 +00:00
Tor Egge
572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Andrey A. Chernov
99237364cc Store formatted panic string in static buffer to make it available later
for savecore.
Previous code give only panic format to savecore
1998-09-06 06:25:18 +00:00
Bruce Evans
e99ea9ec2b Ignore the statically configured vfs type numbers and assign vfs
type numbers in vfs attach order (modulo incomplete reuse of old
numbers after vfs LKMs are unloaded).  This requires reinitializing
the sysctl tree (or at least the vfs subtree) for vfs's that support
sysctls (currently only nfs).  sysctl_order() already handled
reinitialization reasonably except it checked for annulled self
references in the wrong place.

Fixed sysctls for vfs LKMs.
1998-09-05 17:13:28 +00:00
Bruce Evans
500b04a257 Instantiate `nfs_mount_type' in a standard file so that it is present
when nfs is an LKM.  Declare it in a header file.  Don't forget to use
it in non-Lite2 code.  Initialize it to -1 instead of to 0, since 0
will soon be the mount type number for the first vfs loaded.

NetBSD uses strcmp() to avoid this ugly global.
1998-09-05 15:17:34 +00:00
Bruce Evans
134e06fe71 Fixed bogotification of pseudocode for syscall args by rev.1.53 of
syscalls.master.
1998-09-05 14:30:11 +00:00
Poul-Henning Kamp
0375c9f2b8 Add a new vnode op, VOP_FREEBLKS(), which filesystems can use to inform
device drivers about sectors no longer in use.

Device-drivers receive the call through d_strategy, if they have
D_CANFREE in d_flags.

This allows flash based devices to erase the sectors and avoid
pointlessly carrying them around in compactions.

Reviewed by:	Kirk Mckusick, bde
Sponsored by:	M-Systems (www.m-sys.com)
1998-09-05 14:13:12 +00:00
Bruce Evans
a8b8bc0730 Fixed recently perpetrated printf format errors. 1998-09-05 13:24:39 +00:00
Andrey A. Chernov
253ab668e2 make sbflush panic messages more descriptive 1998-09-04 13:13:18 +00:00
Doug Rabson
e69763a315 Cosmetic changes to the PAGE_XXX macros to make them consistent with
the other objects in vm.
1998-09-04 08:06:57 +00:00
Garrett Wollman
9898afa1f1 Bow to tradition and correctly implement the bogus-but-hallowed semantics
of getsockopt never telling how much it might have copied if only the
buffer were big enough.
1998-08-31 18:07:23 +00:00
Garrett Wollman
d224dbc106 Correctly set the return length regardless of the relative size of the
user's buffer.  Simplify the logic a bit.  (Can we have a version of
min() for size_t?)
1998-08-31 15:34:55 +00:00
KATO Takenori
582e52862a - hw.machine_arch returns cpu architecture type.
- moved definition of MACHINE_ARCH from cpu.h to parm.h as alpha.
- Added definitions of _MACHINE and _MACHINE_ARCH.
- Added hw.ispc98. The hw.ispc98 is 1 in PC98 kernel and is 0 in
  IBM-PC kernel.

Discussed with:	John Birrell <jb@FreeBSD.ORG>
1998-08-31 08:41:58 +00:00
Bruce Evans
f5ce675296 Oops, the previous revision unconfigured too much pre-Lite2 compatibilty
cruft.  At least lsvfs(1) was broken.
1998-08-29 13:13:10 +00:00
Luoqi Chen
ddae3cb9a0 Close a race window for getnewbuf() between shared lock holders of the vnode.
Reviewed by:	Mike Smith
1998-08-28 20:07:13 +00:00
Matthew Dillon
8e519d1f35 priority comparison in maybe_resched() didn't work properly if current
and chk process were on different scheduler queues.  Fixed.
1998-08-26 05:27:42 +00:00
Poul-Henning Kamp
12e14047a4 Fix DDBs printing of buf-flags after I changed them yesterday. 1998-08-25 14:41:42 +00:00
Poul-Henning Kamp
1d9b3ba13d Remove the last remaining evidence of B_TAPE.
Reclaim 3 unused bits in b_flags
1998-08-24 17:47:25 +00:00
Doug Rabson
069e9bc1b4 Change various syscalls to use size_t arguments instead of u_int.
Add some overflow checks to read/write (from bde).

Change all modifications to vm_page::flags, vm_page::busy, vm_object::flags
and vm_object::paging_in_progress to use operations which are not
interruptable.

Reviewed by: Bruce Evans <bde@zeta.org.au>
1998-08-24 08:39:39 +00:00
Doug Rabson
c49265d091 Regnerate. 1998-08-24 08:32:19 +00:00
Doug Rabson
2e83b28161 Fix a few syscall arguments to use size_t instead of u_int. 1998-08-24 08:29:52 +00:00
Doug Rabson
a4f6773848 Add partial KLD support for ELF. The module loading is not written yet. 1998-08-24 08:25:26 +00:00
Bruce Evans
00671271c3 Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
Poul-Henning Kamp
be18fc123b remove bdevsw arg from dsopen();
Forgotten by:	julian
Reviewed by:	bde
1998-08-23 20:16:35 +00:00
Dag-Erling Smørgrav
70d154a652 Don't check minor number of dump device at all.
Discussed-with: Jörg Wunsch
1998-08-23 14:18:08 +00:00
Bruce Evans
1fcee46997 Fixed printf format errors. 1998-08-23 10:16:26 +00:00
Bruce Evans
cf8c7b0963 Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().

Cleaned up the cdevswitch initializers for all tty drivers.

Removed explicit calls to ttsetwater() from all (tty) drivers.  ttsetwater()
is now called centrally for opens, not just for parameter changes.
1998-08-23 08:26:42 +00:00
Garrett Wollman
cfe8b629f1 Yow! Completely change the way socket options are handled, eliminating
another specialized mbuf type in the process.  Also clean up some
of the cruft surrounding IPFW, multicast routing, RSVP, and other
ill-explored corners.
1998-08-23 03:07:17 +00:00
Bruce Evans
5879dcdb05 Moved `nx' functions to the one place where they are used (su.c).
They shouldn't be used there either.  They should have gone away
about 3 years ago when the statically initialized devswitches went
away, but su.c unfortunately still frobs the cdevswitch in the old
way.
1998-08-20 06:10:42 +00:00
Dag-Erling Smørgrav
9103e8640c Include opt_devfs.h which defines SLICE, to make previous commit
meaningful.

Pointed out by:	Luoqi Chen
1998-08-19 20:20:52 +00:00
Søren Schmidt
e620a1cbed Make struct buf->b_offset reflect the real byte offset which got
in via the uio struct. This enables device drivers to use != DEV_BSIZE
blocking on devices with wierd sector/block sizes (ie CDROM's).
1998-08-19 10:50:32 +00:00
Bruce Evans
5cf40a698b A limit of 200000 for the output buffer high watermark was excessive,
since (hardware) ttys have too low a bandwidth to benefit significantly
from large buffers.  Use twice the old limit for the new-default case
and 8 times the old limit for the driver-specifies-watermark case.
Nothing uses these cases yet.

Removed related debugging code.
1998-08-19 04:01:00 +00:00
Mike Smith
287e61c39f Presently there is only one `currentldt' variable for all cpus
in a SMP system. Unexpected things could happen if each cpu
        has a different ldt setting and one cpu tries to use value
        of currentldt set by another cpu.

        The fix is to move currentldt to the per-cpu area. It includes
        patches I filed in PR i386/6219 which are also user ldt related.

PR:		i386/7591, i386/6219
Submitted by:	Luoqi Chen <luoqi@watermarkgroup.com>
1998-08-18 07:47:12 +00:00
Bruce Evans
2d2f8ae7ad Fixed nonsense overflow checking (checking that a long variable is less
than INT_MAX after it has possibly overflowed).

Removed an unused variable and its associated 2 style bugs.

Removed unused includes.
1998-08-17 17:28:10 +00:00
Dag-Erling Smørgrav
d08b9c139f Enable kernel dumps on SLICE systems. 1998-08-16 11:27:19 +00:00
John Polstra
317c91f4d4 Make ELF kernels build again. 1998-08-16 04:19:03 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans
69ed480f48 pmap.c:
Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to
(uintptr_t)(void *) (as would be more correct).  Don't cast vm_offset_t's
to (u_long) just to do arithmetic on them.

mp_machdep.c:
Cast pointers to (uintptr_t) instead of to (u_long).  Don't forget
to cast pointers to (void *) first or to recover from integral
possible integral promotions, although this is too much work for
machine-dependent code.

vm code generally avoids warnings for pointer vs long size mismatches
by using vm_offset_t to represent pointers; pmap.c often uses plain
`unsigned int' instead of vm_offset_t and didn't use u_long elsewhere,
but this style was messed up by code apparently imported from mp_machdep.c.
1998-08-16 00:41:40 +00:00
Bruce Evans
160bd4c62f Oops, the printf format error fixes confused curp->area with a pointer. 1998-08-15 22:42:20 +00:00
Doug Rabson
7032ad107e Protect all modifications to v_numoutput with splbio(). 1998-08-13 08:09:08 +00:00
Bruce Evans
13950bd2ed Don't configure compatibility code for pre-Lite2 mount() calls by
default.  This code should go away soon.
1998-08-12 20:17:42 +00:00