Commit Graph

12615 Commits

Author SHA1 Message Date
Peter Wemm
a533143f79 regenerate (+kldsym) 1998-11-11 13:05:29 +00:00
Peter Wemm
ba031106b1 kldsym(2) prototype implementation 1998-11-11 13:04:40 +00:00
Peter Wemm
de8a10f07a regenerate (+kldsym) 1998-11-11 12:57:05 +00:00
Peter Wemm
325e13dd19 A kldsym(2) syscall prototype for extracting information from the in-kernel
linker.  This is intended to replace kvm_mkdb etc.  The first version
only does name->value lookups, but it's open ended.  value->name lookups
would probably be a good thing to do too.

It's been suggested to try and connect the symbol tables to sysctl (which
is probably a more flexible way of doing it if it's done right), but that
is far more complex and difficult than I was ready to have a shot at.
1998-11-11 12:45:14 +00:00
Don Lewis
62d6ce3af2 I got another batch of suggestions for cosmetic changes from bde. 1998-11-11 10:56:07 +00:00
Don Lewis
831d27a9f5 Installed the second patch attached to kern/7899 with some changes suggested
by bde, a few other tweaks to get the patch to apply cleanly again and
some improvements to the comments.

This change closes some fairly minor security holes associated with
F_SETOWN, fixes a few bugs, and removes some limitations that F_SETOWN
had on tty devices.  For more details, see the description on the PR.

Because this patch increases the size of the proc and pgrp structures,
it is necessary to re-install the includes and recompile libkvm,
the vinum lkm, fstat, gcore, gdb, ipfilter, ps, top, and w.

PR:		kern/7899
Reviewed by:	bde, elvind
1998-11-11 10:04:13 +00:00
Robert Nordier
21ffb6774a Revise error messages. 1998-11-11 08:56:17 +00:00
Peter Wemm
1e216ab590 Use a name less likely to collide with source files without an obj dir. 1998-11-11 07:40:44 +00:00
Peter Wemm
0ddd3cf262 Rename joy,ibcs2,linux to joy.sh,ibcs2.sh,linux.sh (via repo copy). 1998-11-11 07:04:10 +00:00
Peter Wemm
8f1dc34cf9 Reenable /usr/bin/ibcs2 installing from here; it works now that the
guaranteed kernel stack overflow is fixed.
1998-11-11 05:18:22 +00:00
Bruce Evans
c5f25b1912 Don't forget to remove opt_mfs.h.
Fixed style bugs (bitrotted FOOFS options and hard-coded ${.TARGET}).
1998-11-11 03:06:46 +00:00
Mike Smith
2831f40f0b Use an at_shutdown hook to drop back to the SRM in the case where the system
is being halted, rather than hanging waiting for a keypress.

Submitted by:	Andrew Gallatin <gallatin@freebsd.org>
1998-11-11 00:02:25 +00:00
Doug Rabson
d44f5a8a2b Allow the use of NODEV in CDEV_MODULE and BDEV_MODULE to make the system
auto-allocate the major number.  Not terribly useful without DEVFS.
1998-11-10 21:45:18 +00:00
Jordan K. Hubbard
aab22db753 We need to install the linux shell script or the lkm version will
still be in place.
1998-11-10 19:39:58 +00:00
Luigi Rizzo
ac1e654ef7 Add entry for AOpen AW37 1998-11-10 10:44:56 +00:00
Peter Wemm
1c5bb3eaa1 add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE() 1998-11-10 09:16:29 +00:00
Peter Wemm
c6105dce78 Register and unregister vnodeops the new way rather than leaking on
unload.
1998-11-10 09:12:40 +00:00
Peter Wemm
5ad3d2212f kzipboot uses kern/inflate.c outside the kernel by providing its own
minimal malloc/free implementation.  Stop passing M_GZIP to it.
1998-11-10 09:08:49 +00:00
Peter Wemm
4e61198e8f Make the vnode opv vector construction fully dynamic. Previously we
leaked memory on each unload and were limited to items referenced in
the kernel copy of vnode_if.c.  Now a kernel module is free to create
it's own VOP_FOO() routines and the rest of the system will happily
deal with it, including passthrough layers like union/umap/etc.

Have VFS_SET() call a common vfs_modevent() handler rather than
inline duplicating the common code all over the place.

Have VNODEOP_SET() have the vnodeops removed at unload time (assuming a
module) so that the vop_t ** vector is reclaimed.

Slightly adjust the vop_t ** vectors so that calling slot 0 is a panic
rather than a page fault.  This could happen if VOP_something() was called
without *any* handlers being present anywhere (including in vfs_default.c).
slot 1 becomes the default vector for the vnodeop table.

TODO: reclaim zones on unload (eg: nfs code)
1998-11-10 09:04:09 +00:00
Peter Wemm
edfbe15080 Arrange for unload-time linker set hooks to be called. While cut/pasting
some code, I changed the original to be consistant with the rest of the
file rather than duplicating the problems.
1998-11-10 08:49:28 +00:00
Peter Wemm
db66937855 Have MALLOC_DECLARE() initialize malloc types explicitly, and have them
removed at module unload (if in a module of course).
However; this introduces a new dependency on <sys/kernel.h> for things
that use MALLOC_DECLARE().  Bruce told me it is better to add sys/kernel.h
to the handful of files that need it rather than add an extra include to
sys/malloc.h for kernel compiles. Updates to follow in subsequent commits.
1998-11-10 08:46:24 +00:00
Peter Wemm
3234f9c00f New macro for building a linker set of things to do at module unload
time (eg: disconnect malloc types contained within a module), opposite
of SYSINIT().
1998-11-10 08:41:41 +00:00
Justin T. Gibbs
712463b1fa Noop Commit - Change was in last revision.
If the next available mailbox is not in the free state, print a warning
and handle the condition as a temporary resource shortage.  The condition
should never happen, but we shouldn't panic since recovery is possible.
1998-11-10 06:47:11 +00:00
Justin T. Gibbs
4ff057c7b0 Convert to change in ISA compatiblity port handling in the base bt driver. 1998-11-10 06:45:14 +00:00
Justin T. Gibbs
3c1cabf7a2 Fix probes when a port address is specified. 1998-11-10 06:44:54 +00:00
Justin T. Gibbs
d0993d7584 Fix probes when a port address is specified.
Convert from BT'isms to AHA'isms

Don't fail the probe if the illegal command bit is set in the status
register.  If the BusLogic MultiMaster probe preceeded us, it may well
have determined that the card we are attaching to was not a true MultiMaster
by sending us a command that fails on the 154X.

Reset the adapter before doing the inquiry.  This provides extra sanity
and will also clear the illegal command status bit that my be left over
from the MultiMaster probe.
1998-11-10 06:44:42 +00:00
Nicolas Souchu
a6530ace00 Release the ppbus when probe fails. 1998-11-09 22:22:01 +00:00
Don Lewis
643a8daaaf If the session leader dies, s_leader is set to NULL and getsid() may
dereference a NULL pointer, causing a panic.  Instead of following
s_leader to find the session id, store it in the session structure.

Jukka found the following info:

	BTW - I just found what I have been looking for. Std 1003.1
	Part 1: SYSTEM API [C LANGUAGE] section 2.2.2.80 states quite
	explicitly...

	Session lifetime: The period between when a session is created
	and the end of lifetime of all the process groups that remain
	as members of the session.

	So, this quite clearly tells that while there is any single
	process in any process group which is a member of the session,
	the session remains as an independent entity.

Reviewed by:	peter
Submitted by:	"Jukka A. Ukkonen" <jau@jau.tmt.tele.fi>
1998-11-09 15:08:04 +00:00
Dima Ruban
46e79a3c0e Add some bogus stuff to make systat/vmstat happy.
Reviewed by:	dfr
1998-11-09 10:47:19 +00:00
Peter Wemm
dfab6b6416 ifioctl takes a u_long rather than an int on 3.0 1998-11-09 09:34:00 +00:00
Peter Wemm
08274d68df Add #include to get a prototype for update_intr_masks(). 1998-11-09 09:30:55 +00:00
Peter Wemm
5187e87901 "fix" a warning that has been bugging me for ages. Eliminate a couple
of temporary variables since they are only used once and their types
were the cause of the warnings.
1998-11-09 09:21:25 +00:00
Peter Wemm
96fca41fcf s/%#p/%p/ to fix a warning. This looks like a leftover of once being
%#x, which causes a leading 0x to be prepended. %p has this by default
and the '#' is ignored by the kernel prinf code for %p.
1998-11-09 08:08:06 +00:00
Peter Wemm
dd31125d72 Fix a warning (#include the apic_next_irq() prototype for APIC_IO) 1998-11-09 08:03:01 +00:00
Peter Wemm
497e02e364 Delete stray extern declaration for non-existing variables. 1998-11-09 07:03:04 +00:00
Peter Wemm
dad00f4e9c Remove [apparently] bogus casts to u_long for the vnode_pager_setsize()
second argument.  np_size is a 64 bit int, so is the second arg.  This
might have caused needless 2G/4G file size problems.

I believe it was Bruce who queried this.
1998-11-09 07:00:14 +00:00
Poul-Henning Kamp
5adee71e55 Update interface to timecounter to last change to the generic code. 1998-11-08 19:26:23 +00:00
Nicolas Souchu
31a7daae9e Add semicolon to INTERFACE declaration. 1998-11-08 18:51:38 +00:00
Doug Rabson
66d22cfe03 Port the ps/2 mouse driver to the alpha. 1998-11-08 18:43:03 +00:00
Nicolas Souchu
7d70baf7b2 Check if devclass exists for probed devices before
declaring the device 'alive'.
1998-11-08 18:42:34 +00:00
Nicolas Souchu
710c119cf7 Update configuration files for the perl based makedevops script.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
Approved by:  Doug Rabson <dfr@nlsystems.com>
1998-11-08 18:39:57 +00:00
Robert Nordier
0293eac42c Prevent boot.config being parsed more than once. 1998-11-08 18:37:28 +00:00
Nicolas Souchu
7a8ecb9e64 Add semicolon to INTERFACE declarations 1998-11-08 18:35:53 +00:00
Nicolas Souchu
1864a32626 "Here is the most recent version of makedevops.pl. I've made the parsing
of the input file more strict and the error messages more elaborate.
Second, the output file has slightly improved looks when >80 character
lines are concerned (I needed a 80 character line formatter anyway for
work...)."

Submitted by: Nick Hibma <nick.hibma@jrc.it>
1998-11-08 18:33:11 +00:00
Robert Nordier
7ac90f7d65 Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while
loading.  This eliminates noise when loading boot/loader; and when
loading a kernel, they generally flash by too fast to be
intelligible anyway.
1998-11-08 18:29:29 +00:00
Robert Nordier
9888bdcd29 boot1: Eliminate EDD detection and optional use of disk packet
interface.  Do some general consistency fixes and space optimizations.
Use of some freed-up space to defend against possible BIOS misfeatures.

boot2: Revise disk read interface to provide for boot1 changes.  Free
up space for this.
1998-11-08 15:36:35 +00:00
Doug Rabson
7095ee912b * Fix a couple of places in the device pager where an address was
truncated to 32 bits.
* Change the calling convention of the device mmap entry point to
  pass a vm_offset_t instead of an int for the offset allowing
  devices with a larger memory map than (1<<32) to be supported
  on the alpha (/dev/mem is one such).

These changes are required to allow the X server to mmap the various
I/O regions used for device port and memory access on the alpha.
1998-11-08 12:39:07 +00:00
Peter Wemm
ba5e60d11c Missing newline at end of file causes syntax error. 1998-11-08 09:57:28 +00:00
Mike Smith
1916cd2927 Enable 686 class optimisations for all 686-class processors, not just the
Pentium Pro.  This resolves the "Dog slow SMP" issue for Pentium II
systems.
1998-11-08 02:26:14 +00:00
Jordan K. Hubbard
37869e957d o Add proper stack checking to all file words
o add fkey and fread
o eliminate fexists now that this can be expressed in HLL forth
  ( : fexists fopen dup -1 <> if fclose 1 else drop 0 then ; ) :-)

Once we get the ability to write files, it should be possible to do
stand-alone rescue work from the 3rd stage boot. :)
1998-11-07 17:38:40 +00:00
Nicolas Souchu
623bdbdb0a Change METHODE (french) to METHOD.
Submitted by: Nick Hibma <nick.hibma@jrc.it>
1998-11-07 14:56:04 +00:00
Nicolas Souchu
376ba00c94 Define DEBUG only if not already defined, avoiding confusions with
opt_global.h
1998-11-07 14:35:41 +00:00
Nicolas Souchu
99a6f52d8f Add iic driver iff the corresponding devclass exists. 1998-11-07 14:33:46 +00:00
Nicolas Souchu
dec0ec9e81 Return to previous check_for_i2c_devices() behaviour.
Cast the cmd parameter to unsigned char in every smbus call.

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-11-07 14:30:48 +00:00
Jordan K. Hubbard
335edb957d Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.
1998-11-07 06:18:06 +00:00
Jordan K. Hubbard
ed82a24960 Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.  Also look for /boot/boot.4th now and, if found,
load its contents.
1998-11-07 06:18:00 +00:00
Jordan K. Hubbard
d6a0c2b58d Take init out of here - it's a layering violation. 1998-11-07 05:01:25 +00:00
Peter Wemm
7c8faeb31f oops! s/vfs_register/vfs_unregister/ in the unload case..
Mentioned by: dfr
1998-11-07 04:51:36 +00:00
Peter Wemm
5c23153cac Don't define the module glue if building as an LKM, this happens to have
a same symbol name as the LKM glue.
1998-11-07 04:34:02 +00:00
Jordan K. Hubbard
c412a7ae32 Don't have debugging on by default - it makes testing annoying. :) 1998-11-07 03:44:10 +00:00
Jordan K. Hubbard
65e7b066b3 OK, fload/fexec work properly when both compiling and interpreting
now.  Gack.
1998-11-07 01:56:06 +00:00
Jordan K. Hubbard
ebc4b7c4fb switch words to default mode. 1998-11-06 23:50:08 +00:00
Jordan K. Hubbard
e1266cedab Submit better fix to the prompt bug. 1998-11-06 23:22:26 +00:00
Jordan K. Hubbard
f476d38a01 Make fexists/fload work with existing string literals instead. Doing
my own string literal handling is just too wonky.
1998-11-06 23:20:32 +00:00
Mike Smith
ed91f3baaf USERCONFIG_BOOT -> INTRO_USERCONFIG
Submitted by:	des
1998-11-06 20:32:22 +00:00
Jordan K. Hubbard
c6c128e122 Argh, I had this right[er] before. More commits to follow. 1998-11-06 19:17:03 +00:00
David Greenman
bd81f199b5 Added support for non-blocking sockets to sendfile(2). 1998-11-06 19:16:30 +00:00
Peter Wemm
a429d69f4a Remove trailing ';' - use the one supplied by the caller: "VFS_SET(foo);" 1998-11-06 16:36:31 +00:00
Peter Wemm
9fe66b94a2 Make this work now; fixing the kstack overflow allows the dependency to
be added to the symbol search order safely.
1998-11-06 16:02:14 +00:00
Peter Wemm
578c822198 Don't use a glue file for the module; use the one in the kernel. 1998-11-06 16:01:19 +00:00
Peter Wemm
43dfe295b0 Create an 'ibcs2' module so that scripts can tell if it's statically
linked in or needs to be loaded.
1998-11-06 16:00:47 +00:00
Peter Wemm
caab6e909e Don't put aggregate structs 4K large on the kernel stack, especially when
we can recurse when loading dependencies and that the kstack is limited
to something like 6 or 7KB.  Having a single dependency caused an instant
double panic, and I stronly suspect some of the other strange "events"
that I have seen are possibly as a result of taking a couple of interrupts
with a large chunk of the stack already in use.

While here, fix a minor logic hiccup in a sanity check.
1998-11-06 15:16:07 +00:00
Peter Wemm
21ce23eb91 Define the kld_debug variable if KLD_DEBUG is enabled 1998-11-06 15:10:17 +00:00
David E. O'Brien
9e22648b54 make lnc0 definition in LINT match GENERIC 1998-11-06 09:37:38 +00:00
David E. O'Brien
9a0931701a add AMD Am7990 & Am79C960 to description of lnc(4) 1998-11-06 09:35:32 +00:00
KATO Takenori
f3284683fb Sync with sys/i386/i386/userconfig.c revision up to 1.115. 1998-11-06 08:08:05 +00:00
KATO Takenori
c70606fd9f Sync with sys/i386/i386/machdep.c revision up to 1.315. 1998-11-06 08:07:32 +00:00
KATO Takenori
48ba888a6a Sync with sys/i386/conf/options.i386 revision 1.91. 1998-11-06 08:07:00 +00:00
KATO Takenori
a0a1e229e8 Sync with sys/i386/conf/Makefile.i386 revision 1.128. 1998-11-06 08:06:32 +00:00
Jordan K. Hubbard
11adc0d65e Use proper literal names. 1998-11-06 04:01:32 +00:00
Mike Smith
8a34f8ba88 Ack. Create parseable command tail properly, and eat args out of the TIB. 1998-11-06 03:50:44 +00:00
Mike Smith
8190a019a5 Don't not print the prompt string; not doing this has funny side-effects.
Make the prompt an empty string instead.
1998-11-06 03:47:08 +00:00
Mike Smith
84924924e1 Don't use the poxy vmGetString interface (who uses counted strings these
days?), get the input buffer ourselves.  Add some debugging code.
1998-11-06 03:45:36 +00:00
Peter Wemm
f9d919e98f put a \n on an error message printf 1998-11-06 02:18:57 +00:00
Peter Wemm
cf3e757633 If this is going to have checks for kernel versions, it might as well
do it so that it works.  This code should run on 2.2.x now.
1998-11-06 02:13:14 +00:00
Peter Wemm
5ebfc07dce Remove machine/cputypes.h - it's an i386 only thing 1998-11-06 01:34:06 +00:00
Robert Nordier
548bf5dd17 Make use of BIOS int 0x13 extensions configurable, and disabled
by default.
1998-11-05 20:52:25 +00:00
David Greenman
9dab07768f Document the new NSFBUFS option. 1998-11-05 14:36:37 +00:00
David Greenman
dd0b2081f4 Implemented zero-copy TCP/IP extensions via sendfile(2) - send a
file to a stream socket. sendfile(2) is similar to implementations in
HP-UX, Linux, and other systems, but the API is more extensive and
addresses many of the complaints that the Apache Group and others have
had with those other implementations. Thanks to Marc Slemko of the
Apache Group for helping me work out the best API for this.
Anyway, this has the "net" result of speeding up sends of files over
TCP/IP sockets by about 10X (that is to say, uses 1/10th of the CPU
cycles) when compared to a traditional read/write loop.
1998-11-05 14:28:26 +00:00
Jordan K. Hubbard
82f35547c9 Remember a bit more of my forth and do:
o Add fexists word to check for the presence of a file
o make fexists and fload immediate words which DTRT both interpreted
  and compiled (doh!)
o add an init word which gets run at bootstrapping time to do extra
  post-coldload initialization (in the default implementation, we
  look for /boot/boot.4th and load it if found).
1998-11-05 08:39:43 +00:00
Jordan K. Hubbard
5eb1c6c169 1. rebuild all elements of testmain properly for safety.
2. add fload and key prims for doing simple file and terminal I/O, respectively
1998-11-05 07:27:55 +00:00
Mike Smith
875e602afe Explicitly invoke perl to run the softwords.pl script in case the
script is not executable.
Submitted by:	Don Lewis <Don.Lewis@tsc.tdk.com>
1998-11-05 04:54:05 +00:00
Peter Wemm
ce6bd34722 Build linux_genassym static, this should help aout-to-elf builds 1998-11-05 04:39:26 +00:00
Peter Wemm
6a1a9040f4 Do not overwrite the lkm versions of the install scripts for now. linux
works but ibcs2 has a load failure and joy doesn't look like it'll work.
1998-11-05 04:22:52 +00:00
Peter Wemm
38266231ef Update to use kldload, no temporary files! 1998-11-05 04:19:26 +00:00
Peter Wemm
92892ca7a5 Do not add ${KMOD} to the CLEANFILES list. We want ${PROG} which is either
${KMOD}.o or ${KMOD}.ko.  Otherwise we can delete the source shell script
for linux, joy and ibcs2.
1998-11-05 04:01:55 +00:00
Nicolas Souchu
d3cf287966 iicbus probe and attach deferred until root_bus_configure() call. 1998-11-04 22:09:17 +00:00
Nicolas Souchu
804ec04759 Properly reset parent to get interface addr. 1998-11-04 22:07:24 +00:00
Bill Fenner
0931333f8d Fix sbcheck() to check all packets on socket buffer.
Also fix data types and printf formats while I'm here.

PR:	misc/8494

Panic instead of looping forever in sbflush().  If sb_mbcnt counts
more mbufs than sb_cc counts bytes, the original code can turn into an
infinite loop of removing 0 bytes from the socket buffer until it's empty.
1998-11-04 20:22:11 +00:00
Kenneth D. Merry
25e5ca272b Generalize the quirk entry that disables multi-lun probing for Sony CDROM
drives.  It seems that quite a few (possibly all?) of their drives respond
to inquiries on multiple luns.  Hopefully we can detect problems like this
in the probe phase at some point.  For now, this is a pretty functional
solution.
1998-11-04 19:56:24 +00:00