Commit Graph

4666 Commits

Author SHA1 Message Date
se
49a2d456af Fix the off-by-one error in the calculation of the valid port range.
Reduce default value of pcicb_membase to 0x2000000 (from 0x4000000)
since this seems to be the lower bound used by many systems.

Submitted by:	Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
1995-12-15 13:40:20 +00:00
dg
9399fd5a79 Changed arg type for pio functions.
Cast a few things appropriately to shut up the compiler.
1995-12-15 07:31:40 +00:00
peter
636d20f6c7 Update linux_ipc.c to use the now generated prototypes for the shm* calls
it makes while emulating the linux equivalents.
1995-12-15 05:07:20 +00:00
peter
0c52e3131d Update sysv_*.c to get their argument definitions from sysproto.h 1995-12-15 05:00:31 +00:00
peter
c381ba6f3f Regenerated from syscalls.master... 1995-12-15 04:46:32 +00:00
peter
08dbf8bf0e Add the direct sysv shm/sem/msg system calls, in the same way as NetBSD.
This costs very little, we gain prototypes for the calls from the linux
emulator, and this is one less thing in the way of NetBSD binary support.
1995-12-15 04:36:01 +00:00
peter
d50bcb6f79 move typedef for key_t from sys/ipc.h to sys/types.h, as suggested in the
comment in ipc.h.  This is so that prototypes for the sysv ipc functions
can be processed without having to #include <sys/ipc.h> in everything..
1995-12-15 04:22:42 +00:00
peter
af871c6851 Silence a harmless warning... 1995-12-15 03:36:25 +00:00
peter
9d6192fef3 Initial attempt at getting Linux QMAGIC shared lib support. I have
successfully run linux netscape 2.0b3 with a QMAGIC ld.so and libc/libm
that I found on some linux machine that I _think_ is running slackware 3.0.

There are still problems..  ld.so claims the libraries are the wrong
format, but it still runs anyway.. :-/  The QMAGIC ld.so also screams
about needing ld.so.cache, and running a linux ldconfig is quite
educational.  You soon learn to run "chroot /compat/linux /bin/ldconfig"
where ldconfig is living in /compat/linux/bin. :-]

(Lets just say that it puts loads of symlinks in /usr/lib otherwise :-)
1995-12-15 03:28:38 +00:00
peter
8050b72571 Clean up some warnings by using the generated structures in <sys/sysproto.h>
for passing to the bsd system calls, rather than inveninting our own
equivalent structures.
1995-12-15 03:06:57 +00:00
peter
224077960e Oops. I forgot the change to this file for supporting static configuration
of the linux emulator.
1995-12-15 02:57:40 +00:00
bde
91166d8cf2 Changed the maximum output queue count from (TTMAXHIWAT + 200) to
(TTMAXHIWAT + OBUFSIZ + 100) in case someone changes OBUFSIZ.  200
was to allow 100 above high water for ordinary writes and another
100 for kernel printfs.

Increased the reserved output queue count from 512 to the maximum
output queue count.  This prevents exhaustion of clists and increases
the output throughput for 8 cy lines by almost a factor of 2 (on
a system where there aren't many other open ttys so clists become
exhausted after about 4 active lines (or earlier if TTMAXHIWAT is
increased :-]).

ttwrite() behaves very badly when clists are exhausted:
(1) it sleeps on lbolt instead of on TSA_OLOWAT(tp).
    This could be fixed adequately by sleeping on TSA_OLOWAT(tp).
    The nonzero reserved count guaratees that space will become
    available independent of other ttys, and a reserved count
    of 512 is barely enough for efficiency.
(2) it drops output if space runs out in the middle of special
    output processing.  This is too hard to fix without hardening
    the reserved count.  The watermark processing guarantees that
    space doesn't run out only if the advertised space is guaranteed.

Increasing the reserved output queue count defeats the point of
dynamic allocation of clists.  Previously, about 2K of memory per
tty was reserved (the raw queue was already reserved).  Now, about
3.5K is reserved.  Reserving everything would take a whole 0.5K
more.
1995-12-15 02:18:06 +00:00
bde
dc86db9afc Disabled the sleep in ttyflush(). It can't work in general because
ttyflush() might be called from an interrupt handler.  This fixes
panics in IXOFF mode at the cost of more failures to send the START
character to exit from IXOFF mode.
1995-12-15 01:01:00 +00:00
bde
9d9332ea47 Completed function declarations and/or added prototypes and/or added
#includes to get prototypes.
1995-12-15 00:54:32 +00:00
bde
7a861ac077 Removed unused #includes. 1995-12-15 00:40:38 +00:00
bde
466436fc55 Removed duplicated #includes of <sys/conf.h> 1995-12-15 00:29:31 +00:00
bde
5efea6ee6a Completed function declarations and added prototypes. Sorted prototypes. 1995-12-15 00:11:27 +00:00
bde
ca97a3e99c Added a prototype. Merged prototype lists. 1995-12-14 23:59:04 +00:00
bde
2ea7fe5b03 Added a prototype. 1995-12-14 23:50:54 +00:00
bde
104fb3494b Moved some more prototypes outside of ifdefs and grouped them together. 1995-12-14 23:35:17 +00:00
bde
996884f2d5 Completed function declarations and added prototypes. Sorted prototypes. 1995-12-14 23:26:53 +00:00
bde
12d9c589ec Added a prototype. 1995-12-14 23:23:48 +00:00
bde
29203d43e3 Fixed staticization of DDB functions. 1995-12-14 23:01:51 +00:00
bde
17e4e14428 Nuked ambiguous sleep message strings:
old:				new:
	netcls[] = "netcls"		"soclos"
	netcon[] = "netcon"		"accept", "connec"
	netio[] = "netio"		"sblock", "sbwait"
1995-12-14 22:51:13 +00:00
bde
000052aa20 Restored a vm #include. 1995-12-14 22:35:45 +00:00
bde
72a113a4d5 Restored unused function ttrstrt(). It would be used if the low level
drivers supported inter-character delays.
1995-12-14 22:32:52 +00:00
bde
ee0784f15b Removed my devsw access functions [un]register_cdev() and
getmajorbyname() which were a better (sigh) temporary interface to
the going-away devswitches.

Note that SYSINIT()s to initialize the devswitches would be fatal
in syscons.c and pcvt_drv.c (and are bogus elsewhere) because they
get called independently of whether the device is attached; thus
devices that share a major clobber each other's devswitch entries
until the last one wins.

conf.c:
Removed stale #includes and comments.
1995-12-14 22:03:12 +00:00
bde
3aac17aa50 Fixed the type of some sysinit functions. 1995-12-14 20:21:58 +00:00
bde
8ae93048b2 Included <sys/conf.h> and updated to indirect devswitches so that
this compiles again, and added a prototype.
1995-12-14 20:16:15 +00:00
bde
964118393b Moved prototypes to better places.
Fixed indentation of some function headers.
1995-12-14 19:51:15 +00:00
bde
a1da7ed79e Added prototypes. 1995-12-14 19:44:29 +00:00
bde
8547a87e7f Declared functions as static in their definitions as well as in their
prototypes.
1995-12-14 19:38:40 +00:00
bde
fbbd7b144b The change of [cb]devsw was missed here. 1995-12-14 19:13:36 +00:00
bde
bbec6cd258 Restored lost prototypes. 1995-12-14 19:04:09 +00:00
julian
c6619fedf2 another case where cdevsw becoming a pointer makes it neccesary to
check if it's NULL
1995-12-14 18:26:55 +00:00
peter
ae7714f542 GENERIC/LINT: Remove redundant quoting on some option lines.
LINT: add a couple of new/missing/undocumented options
files.i386: add linux code so that you can compile a kernel with static
linux emulation ("options LINUX")
i386/*: use #if defined(COMPAT_LINUX) || defined(LINUX) to enable static
support of linux emulation (just like "IBCS2" makes ibcs2 static)

The main thing this is going to make obvious, is that the LINUX code
(when compiled from LINT) has a lot of warnings, some of which dont look
too pleasant..
1995-12-14 14:35:36 +00:00
peter
b5de650a4b Update the skeleton DEVFS code to match reality a little closer.. :-) 1995-12-14 14:29:10 +00:00
peter
b257e21ac4 *hack alert*! :-) This adds an option to the MFS_ROOT code so that it
is possible to boot a kernel with an empty in-core MFS image, and have
it load the image from floppy directly.  This is admittedly a hack and
would be better replaced by a self-loading ram-disk.
1995-12-14 14:25:03 +00:00
peter
993f341fb5 Change the generic "btintr" function's name to "bt_intr" - the same as
all the other bt_XXX() functions in i386/scsi/bt*.

This the important effect of forcing a link error if the user is
still using the old "vector btintr" which is dangerously wrong
after Justin's updates to the driver.

The correct isa vector line for the bt driver is "vector bt_isa_intr".
Justin mentioned this in the commit message and updated LINT and
GENERIC.  This change is to enforce that.. :-)
1995-12-14 14:19:19 +00:00
phk
50d195499f Another mega commit to staticize things. 1995-12-14 09:55:16 +00:00
phk
c16e905bcf A Major staticize sweep. Generates a couple of warnings that I'll deal
with later.
A number of unused vars removed.
A number of unused procs removed or #ifdefed.
1995-12-14 08:32:45 +00:00
phk
b983e4b613 Two x87 emulators as LKMs.
If somebody with the right HW would make the change to /etc/rc to use
this, we could rip MATH_EMULATE from GENERIC...
1995-12-14 08:26:14 +00:00
phk
4f5f364765 Make math_emulators LKMable. 1995-12-14 08:21:33 +00:00
peter
bb350ca897 Check before dereferencing a possible null pointer (cdevsw[i]->d_open) 1995-12-13 20:08:53 +00:00
julian
c685779913 devsw tables are now arrays of POINTERS to struct [cb]devsw
seems to work hre just fine though  I can't check every file
that changed due to limmited h/w, however I've checked enught to be petty
happy withe hte code..

WARNING... struct lkm[mumble] has changed
so it might be an idea to recompile any lkm related programs
1995-12-13 15:13:57 +00:00
bde
301b77f92a Completed function declarations and added prototypes.
Fixed 3 serious type mismatches that were introduced when the driver
was split up.

Reviewed by:	gibbs
1995-12-13 14:32:59 +00:00
dyson
fc81db1580 There was a bug that the size for an msync'ed region was not rounded
up.  The effect of this was that msync with a size would generally sync
1 page less than it should.  This problem was brought to my attention
by Darrel Herbst <dherbst@gradin.cis.upenn.edu> and Ron Minnich
<rminnich@sarnoff.com>.
1995-12-13 12:28:39 +00:00
phk
b8292b6a66 Staticize. 1995-12-13 10:36:03 +00:00
phk
5fc9e72444 Remove MACH_KERNEL, ORIGINAL, and ZP_DEBUG,
I should have done this before it was imported.
1995-12-13 10:35:36 +00:00
dyson
a3a5fa47dd Fix a problem that was caused by new (partial) support for merged cache
metadata and VBLK type devices.  The code is currently mostly disabled,
and a work-around has been added to disabled attempted clustered writes
for VBLK type device buffers.  Clustered write of meta-data is currently
a work in progress.
1995-12-13 03:47:01 +00:00
gibbs
d20dadbab1 PCI portion of the Buslogic SCSI driver. Needs to be tested and more
PCI ids for Buslogic products added.
1995-12-12 08:58:04 +00:00
gibbs
0285deebce The core of the Buslogic SCSI driver that is shared for all models on
all buses.

Known problems:
-The PCI probe code has not been tested. Someone with a PCI Bt card will
 have to validate it, but even if it is broken all cards the earlier version
 of this driver found in ISA compatibility mode should still be found.
-Still missing the BT956 PCI ID, so it will be found as an ISA card until
 someone suplies it.
-PCI interrupts go through an interrupt stub that returns an int until
 we remove the edge-triggered PCI compatibiliity cruft.
-ISA interrupts go through an interrupt stub until they pass in (void *).
-The driver could support more mboxes and concurrent commands by allocating
 structures separately and hanging them off the bt_data struct to get around
 the 4K page limit. Someone with documentation should do this and also
 enable tagged queuing.
1995-12-12 08:57:22 +00:00
gibbs
c3905d6126 Isa/VL probe portion of the Buslogic SCSI driver. 1995-12-12 08:50:54 +00:00
gibbs
175decbcc3 Have Eisa and PCI probes occur before ISA probes. Buslogic EISA and PCI cards
can be found in ISA compatibility mode by the ISA driver, but since the
EISA and PCI probes are non-invasive, we prefer them to find the card first.
Since both EISA and PCI probes can rely on interrupts, enable them before
probing of any type is performed.  All ISA probes are still "protected" by
splhigh().
1995-12-12 08:50:15 +00:00
gibbs
d056b01108 Eisa Probe portion of revamped Buslogic SCSI driver. 1995-12-12 08:47:11 +00:00
gibbs
2e0e9ee24e Have bt0 entry specify "bt_isa_intr" for its vector. This one entry will
allow one EISA/ISA/PCI/VL Buslogic controller to be probed.  The driver
is almost fully dynamic.  It just needs some kdc work and for the SCSI code
to stop passing unit numbers up in the scsi_xfer struct.
1995-12-12 08:46:40 +00:00
gibbs
8a8596e2b4 Add pci/bt9xx.c - the new PCI probe module of the Buslogic SCSI driver. 1995-12-12 08:44:38 +00:00
dyson
f5d340604a This should have fixed some conditions that could cause the
"getblk" hang.  The B_WANTED flag was being cleared gratuitously,
also the optimization of gbincore for ignoring the B_INVAL flag was
incorrect.  There is no place in the code where buffers are on the
hash list that are B_INVAL and not B_BUSY.
1995-12-12 04:18:10 +00:00
dyson
5808b5e965 Some new anti-deadlock code ended up messing up the paging stats. A modified
version of the code is now in place, and gausspage performance is back
up to where it should be.
1995-12-11 15:43:33 +00:00
dyson
11573668b7 Some DIAGNOSTIC code was enabled all of the time in error. The
diagnostic code is now conditional on #ifdef DIAGNOSTIC again.
1995-12-11 15:41:50 +00:00
peter
3665417c59 Make FIONREAD return the actual that a read() would return, not just the
amount of data in the first mbuf.

Obtained from: Bob Smart <smart@mel.dit.csiro.au> (for NetBSD & SunOS)
1995-12-11 13:24:58 +00:00
phk
15840a7825 Back out this one, must have screwed up somewhere :-( 1995-12-11 10:26:34 +00:00
phk
c45f3ee6e2 Staticize 1995-12-11 09:26:18 +00:00
phk
f2b8b5466d Staticize. 1995-12-11 09:24:58 +00:00
dyson
ebf058dfc1 Undo a change that should not have been committed with the 1Tb enhancements. 1995-12-11 05:02:52 +00:00
dyson
a3d5209b62 Changes to support 1Tb filesizes. Pages are now named by an
(object,index) pair instead of (object,offset) pair.
1995-12-11 04:58:34 +00:00
peter
daedda83da Add a structure definition to the MD* Contexts, so that cvs can use
the standard libmd version of MD5 instead of it's own seperate copy..
1995-12-11 02:18:22 +00:00
bde
10a3368853 Added pcvt option FAT_CURSOR.
Fixed comment about PCVT_VERSION=210.

Fixed tabs and trailing blanks.
1995-12-10 22:14:15 +00:00
bde
534701c86a Added undocumented option EXT2FS so that it gets tested.
Enabled option GPL_MATH_EMULATE so it gets tested.  This will cause linkage
errors.

Fixed comment about PCVT_VERSION=210.
1995-12-10 22:09:14 +00:00
bde
6df7ac9c6b Restored variables that are used iff QUOTA is defined.
ext2fs still uses #if in many cases where the rest of the kernel uses
#ifdef (for QUOTA...).
1995-12-10 21:38:45 +00:00
bde
cc2ae4f73c Unstaticized cx_cdevsw (it is used in if_cx.c).
Added a prototype.
1995-12-10 21:08:11 +00:00
bde
f68e831037 Replaced nxreset by noreset (if the reset function gets called, then the
device must be configured.  It's hard to tell whether a reset function
should be noreset or nullreset since reset functions are never called.
Most drivers use nullreset but noreset has the advantage of complaining
if somehow gets called).
1995-12-10 20:54:38 +00:00
bde
ea0cc9a845 Replaced nxmmap by nommap (if the mmap function gets called, then the
device must be configured).
1995-12-10 20:34:53 +00:00
bde
94494257e4 Replaced odsize by generic nopsize.
Staticized.

Added prototypes.
1995-12-10 20:19:32 +00:00
bde
73e122efca Replaced scdsize by generic nopsize. 1995-12-10 20:10:23 +00:00
bde
4104cf6e31 Replaced cdsize by generic nopsize.
Added prototypes.

Declared statics consistently.
1995-12-10 20:02:47 +00:00
bde
17d4f6e4d5 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:53:42 +00:00
bde
e0d6813568 Replaced nxdump by nodump (if the dump function gets called, then the
device must be configured, so ENXIO is a bogus errno).

Replaced zerosize by nopsize.  zerosize was a temporary alias.
1995-12-10 19:44:58 +00:00
bde
ecb94f627e Reduced and cleaned up #includes. 1995-12-10 19:08:32 +00:00
bde
faa367e907 Removed new alias d_size_t for d_psize_t.
Removed old aliases d_rdwr_t and d_ttycv_t for d_read_t/d_write_t and
d_devtotty_t.

Sorted declarations of switch functions into switch order.

Removed duplicated comments and declarations of nonexistent switch
functions.
1995-12-10 15:55:34 +00:00
bde
80c0c7435e Removed unused functions sudump() and supsize().
Added `extern' to misplaced public prototypes.
1995-12-10 14:57:04 +00:00
bde
b5fe91639a Restored used includes of <vm/vm_extern.h>. 1995-12-10 14:52:10 +00:00
phk
525bf31859 Last commit this round: Staticize.
we are now down to about 1146 symbols being global, of which
I estimate that about 100 are validly so.
1995-12-10 13:45:30 +00:00
phk
d15f2efb88 Staticize and cleanup. 1995-12-10 13:40:44 +00:00
phk
807143f5f7 Staticize and cleanup.
Ohh, forgot this bit:
(covers sio.c too) recognize the 16650 too.
1995-12-10 13:40:33 +00:00
phk
096a1263c9 Staticize and cleanup.
remove a TON of #includes from machdep.
1995-12-10 13:36:34 +00:00
phk
d4465acce4 Staticize and cleanup.
Make debug variable sysctl aware in 1742.
1995-12-10 13:33:49 +00:00
phk
bfb4328724 Staticize and cleanup. 1995-12-10 13:32:43 +00:00
julian
7e21565f06 Make NEW_SCSICONF the default way of doing things
It will need to be changed
but it's the better starting point..

also add '?' to wildcarding in SCSI identification of devices..
so we can catch all PIONEER	CD 6??* devices instead of having
separate entries for the 600, 602, 604X, 624X etc..

it's getting so we should have a small regexp routine in the kernel
maybe just a little one..  matching CDX-6[0-9][0-9][ A-Z] would be better

there will be drastic changes in this
but this is the best starting point..
1995-12-10 10:58:30 +00:00
julian
24e9a82678 Add DEVFS to LINT 1995-12-10 10:50:32 +00:00
bde
cd5dd023d9 Restored used function fusword() (used by GPL math emulator). 1995-12-10 03:11:32 +00:00
bde
cae6e668ef Moved vm includes out of centralized headers again. 1995-12-10 02:53:07 +00:00
bde
71e91da84f Moved the declaration of boolean_t from <vm/vm_param.h> to
<sys/types.h> (if KERNEL is defined).  This allows removing bogus
dependencies on vm stuff in several places (e.g., ddb) and stops
<vm_param.h> from depending on <vm_param.h>

Added declaration of boolean_t to <vm/vm.h> (if KERNEL is not
defined).  It never belonged in <vm/vm_param.h>.  Unfortunately,
it is required for some vm headers that are included by applications.

Deleted declarations of TRUE and FALSE from <vm/vm_param.h>.  They
are defined in <sys/param.h> if KERNEL is defined and we'll soon
find out if any applications depend on them being defined in a vm
header.
1995-12-10 02:34:29 +00:00
bde
e06219cfc3 Restored used variable `name[32]' (used by DEVFS).
Completed function declarations and/or added prototypes.
1995-12-10 01:47:34 +00:00
bde
305951903f Restored used variable `name[32]' (used by DEVFS).
Removed an `#ifdef __FreeBSD__'.  Hundreds, if not thousands of other
FreeBSD-specific things aren't ifdefed.
1995-12-10 01:20:17 +00:00
phk
77f199f486 Staticize, clean lint. 1995-12-09 20:47:15 +00:00
phk
724a295234 Change SYSCTL_OPAQUE to take a format string. 1995-12-09 20:46:06 +00:00
phk
398ac8b115 Staticize. 1995-12-09 20:43:53 +00:00
phk
6517b22ba6 scsi_tape.h had some old cruft that looked like missing typedefs or
something.  Cleanup  some lint in sd.c and st.c.
1995-12-09 20:42:38 +00:00
phk
0b2545a02a Remove various unused symbols and procedures. 1995-12-09 20:40:43 +00:00
phk
6338f54c5f Move sysctl machdep.consdev to cons.c 1995-12-09 20:39:47 +00:00
phk
b771594624 Staticize. 1995-12-09 20:34:16 +00:00
phk
fe72916ebb Remove option ARP_PROXYALL, it's now a sysctl var. 1995-12-09 16:10:20 +00:00
phk
5c80a46138 Remove old ballast, clean up a little bit, staticize.
Add five sysctl variables that you should probably never tweak.
	net.arp.t_prune: 300
	net.arp.t_keep: 1200
	net.arp.t_down: 20
	net.arp.maxtries: 5
	net.arp.useloopback: 1
	net.arp.proxyall: 0

(It's net.arp because arp isn't limited to inet, though our present
implementation surely is).
1995-12-09 16:06:54 +00:00
julian
dc049da4e5 clean a few DEVFS things..
fix a bug where you couldn't place devices in the root directory
of devfs

remove deprecated routines

On my machine devfs now shows:
julian@erf.tfs.com:
julian@erf.tfs.com: ls -RF
bpf0            mem             ptypb           spkr            ttyp8
bpf1            null            ptypc           stderr          ttyp9
bpf2            pcaudio         ptypd           stdin           ttypa
bpf3            pcaudioctl      ptype           stdout          ttypb
console         pt              ptypf           tty             ttypc
cuaa0           ptyp0           random          ttyd0           ttypd
cuaia0          ptyp1           rsd0            ttyid0          ttype
cuala0          ptyp2           rsd1            ttyld0          ttypf
fd/             ptyp3           rvn             ttyp0           tun0
fd0.1440        ptyp4           rworm           ttyp1           urandom
fd1.1200        ptyp5           scsi/           ttyp2           vn
io              ptyp6           sd0             ttyp3           zero
kmem            ptyp7           sd1             ttyp4
lkm             ptyp8           snp0            ttyp5
log             ptyp9           snp1            ttyp6
lpt0            ptypa           snp2            ttyp7

./fd:
0       15      21      28      34      40      47      53      6       9
1       16      22      29      35      41      48      54      60
10      17      23      3       36      42      49      55      61
11      18      24      30      37      43      5       56      62
12      19      25      31      38      44      50      57      63
13      2       26      32      39      45      51      58      7
14      20      27      33      4       46      52      59      8

./scsi:
sctarg  ssc
julian@erf.tfs.com:

which is all devices really there except for disk slices/partitions..
(if I don't have it it's not there, which has GOT to be an improvement..)

no DEVFS fixes from device maintainers yet?
1995-12-09 09:11:25 +00:00
peter
b74c5f04ae Attempt to make the Linux LKM compile again after the recent VM include
de-nesting changes...
(I figured this might be usefulif it actually built, since I've told
 everybody to rebuild it or die.. :-)
1995-12-09 08:17:24 +00:00
peter
bf183833e9 A really gross hack to make more of the source tree compile again.
#include <sys/user> used to be self contained, but now it needs either
half a dozen VM specific includes beforehand (yuck, so much for
portability), or some horrible hack like this for user-mode only
applications..  The kind of stuff that needs this is the libkvm stuff,
w, ps, etc...  I would welcome a better fix for this BTW.. :-)
(note: this is #ifndef KERNEL, so it shouldn't be re-polluting the kernel
 space after it's been so painfully cleaned up...)
1995-12-09 05:10:55 +00:00
peter
7d57d4e621 Update ibcs2 to use the new ps_strings / stack gap arrangements.. 1995-12-09 04:33:27 +00:00
peter
75dc98a50e Update the Linux LKM to use the new ps_strings and stack gap arrangements.
(note you should recompile the linux and ibcs2 lkms after this)
1995-12-09 04:31:47 +00:00
peter
196f865c25 Reorganise ps_strings in order to gain BSD/OS 2.0 binary compatability.
This is now in line with NetBSD as well..

Note that once this series of commits is finished, you must recompile
libkvm, then ps and maybe 'w'.  If you are running the recently imported
sendmail-8.7, you should recompile that too (src/conf.c at least).
1995-12-09 04:29:11 +00:00
phk
34914741e3 Julian forgot to make the *devsw structures static. 1995-12-08 23:23:00 +00:00
wollman
6bd8017823 Added a conditionalized printf for debugging MTU discovery. 1995-12-08 16:46:06 +00:00
julian
2a6a55ef99 Pass 3 of the great devsw changes
most devsw referenced functions are now static, as they are
in the same file as their devsw structure. I've also added DEVFS
support for nearly every device in the system, however
many of the devices have 'incorrect' names under DEVFS
because I couldn't quickly work out the correct naming conventions.
(but devfs won't be coming on line for a month or so anyhow so that doesn't
matter)

If you "OWN" a device which would normally have an entry in /dev
then search for the devfs_add_devsw() entries and munge to make them right..
check out similar devices to see what I might have done in them in you
can't see what's going on..
for a laugh compare conf.c conf.h defore and after... :)
I have not doen DEVFS entries for any DISKSLICE devices yet as that will be
a much more complicated job.. (pass 5 :)

pass 4 will be to make the devsw tables of type (cdevsw * )
rather than (cdevsw)
seems to work here..
complaints to the usual places.. :)
1995-12-08 11:19:42 +00:00
peter
b0b847ca10 The static prototype for setroot() was apparently accidently moved
into a block of code that was #ifdef CD9660, meaning you got a compile
failure if you didn't have the CD9660 filesystem configured.
1995-12-07 20:31:02 +00:00
dg
f102a0eacf Untangled the vm.h include file spaghetti. 1995-12-07 12:48:31 +00:00
peter
75d74a07a0 Implement detection of whether or not bounce-buffering is required
for the particular card in use.  At the moment, I've set it to any of
the bt445S VLB cards (not the bt445C which apparently work) and the
bt5xx series (isa cards).  The 742 and PCI cards should not need it. :-)

It may be useful to have something like this:
#ifndef BOUNCE_BUFFERS
  if (bounce_buffers_required && more_than_16MB_ram)
    panic("this card requires bounce buffers for more than 16MB ram!")
#endif
1995-12-07 09:13:48 +00:00
bde
410524c200 Replaced #includes of <sys/user.h> by less gross headers, usually
<sys/vm.h>.  Many device drivers need only the definition of vtophys()
from vm.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:52:35 +00:00
bde
81dc8c8855 Removed unnecessary #includes of <sys/user.h>. Some of these were just
to get the definitions of TRUE and FALSE which happen to be defined in
a deeply nested include.

Added nearby #includes of <sys/conf.h> where appropriate.
1995-12-06 23:44:23 +00:00
bde
757094581a Removed unnecessary #includes of vm stuff. Most of them were once
prerequisites for <sys/sysctl.h>.

subr_prof.c:
Also replaced #include of <sys/user.h> by #include of <sys/resourcevar.h>.
1995-12-06 23:37:44 +00:00
bde
0e641944e1 Don't #include vm stuff in vnode_if.[ch]. Enough vm stuff (a
single typedef) is now declared in <sys/types.h>.

This is the first of 4 commits that will remove some excessive
includes of vm*.h and user.h.  The total speed improvement isn't
as large as I first thought.  `make depend; make' for LINT only
improved from 2180 seconds to 2108 seconds user time.
1995-12-06 23:33:39 +00:00
bde
6e9ac0ae32 Added explicit #include of <vm/vm.h> so that conf.c doesn't break when
vnode_if.h doesn't include vm stuff.
1995-12-06 22:31:54 +00:00
bde
311fcc25ea Fixed compilation of lfs utilities which I broke the other day by
#including lfs_extern.h and goop to support it in lfs_conv.c.
1995-12-06 19:46:37 +00:00
bde
31b8d1b267 Include <vm/vm.h> explicitly to avoid breaking when vnode_if.h doesn't
include vm stuff.
1995-12-06 19:14:16 +00:00
se
9199c6412d Set default burst length limit to 32 bytes, since this seems to be
an acceptable value for all current chip sets (just a hint to PCI
device drivers, used in the NCR driver, for example).
Add PCI Vendor ID of ACER.
1995-12-06 15:52:23 +00:00
phk
058c5cee9e A couple of minor tweaks to the sysctl stuff. 1995-12-06 13:27:39 +00:00
peter
b9aa4dd688 Moving the kern.dumpdev sysctl handler from kern_sysctl.c to swapgeneric.c
is not real helpful since swapgeneric.c doesn't seem to be used, except
perhaps on a GENERIC kernel. (Sorry Paul.. :-)

I've moved it from swapgeneric.c to autoconf.c, since autoconf.c also deals
with dumpdev things.  There may be a better place.....
1995-12-06 09:04:44 +00:00
bde
f548c47780 Include <vm/vm.h> or <vm/vm_page.h> explicitly to avoid breaking when
vnode_if.h doesn't include vm stuff.
1995-12-05 21:51:45 +00:00
bde
7001111073 Added explicit include of <sys/queue.h>. Currently, some things only
compile because <vm/vm.h> happens to be gratuitously included before
<netinet/in_pcb.h> and <vm/vm.h> happens to include <sys/queue.h>.
1995-12-05 21:26:34 +00:00
bde
be5df16a15 Define FALSE and TRUE in <sys/param.h> (if KERNEL is defined) as well
as in <vm/vm_param.h> so that <vm/vm.h> doesn't have to be included
in kernel sources just to get the definitions of these fundamental
vm (;-) quantities.
1995-12-05 21:03:13 +00:00
bde
edc2a7931d Moved the declaration of vm_object_t from <vm/vm.h> to <sys/types.h>
(if KERNEL is defined).  This allows removing the #includes of vm
stuff in vnode_if.h, which will speed up the compilation of LINT by
about 5%.
1995-12-05 20:54:42 +00:00
bde
6c82ba9713 Renamed TRUE (which has value 2) to M_TR to avoid a clash with the
the boolean TRUE.
1995-12-05 20:40:10 +00:00
bde
050924d73d Fixed ity's d_stop entry. itystop() wasn't used. itystop() is inadequate
but probably harmless.  It's hard to tell because apparently no one runs
ity.

Fixed ity's d_reset entry.  `nx' entries should never be used for existing
devices.

conf.c:
Moved a prototype to a better place.

Removed a stale #define.
1995-12-05 20:33:57 +00:00
bde
543750a46c Moved some prototypes to a better place.
Removed stale prototypes.

Added prototypes.

Added empty lines.
1995-12-05 20:10:41 +00:00
bde
7dc0602ce9 Moved prototypes for rawread(), rawrite() and setconf() to a better place.
Restored order.
1995-12-05 19:53:14 +00:00
bde
d0beda5f72 Removed dummy routines sscstrategy(), sscread(), sscwrite() and
sscselect().  Use the standard dummies nostrategy(), noread(),
nowrite() and noselect() instead.

sscread() and sscwrite() returned bogus errnos.  It isn't possible
to return an error from a select routine so noselect() is just as
bogus as sscselect() (it's equivalent to nullselect()).
1995-12-05 19:36:47 +00:00
bde
30be6b8c7e Restored #include of <sys/tty.h>. fdesc_vnops.c needs to know too much
about tty_tty.c's cdevswitch functions.
1995-12-05 19:12:05 +00:00
wollman
fb34d9a428 Path MTU Discovery is now standard. 1995-12-05 17:46:50 +00:00
dg
44e25516eb Updated my copyright.
Fixed two cases of "=" that should have been "==" in card type comparison.
Simplified expression that checks for interface up/down.
Moved ed_ring_copy to before its first use so that it's inlined as intended.
Change mbuf allocation policy so that a received packet is stored in just
an mbuf header (no cluster) if it will fit in one.
1995-12-05 13:01:33 +00:00
dg
a39092618e Increased the number of Tx segments from 13 to 29 to reduce the need to
recopy to near zero. Wrote the necessary code to recopy the mbuf chain
into another buffer if there are too many mbufs in the chain.
1995-12-05 11:49:55 +00:00
julian
9ddc7d6b48 fix a couple of stuffups in the worm driver and in other associated scsi files 1995-12-05 07:14:27 +00:00
julian
20e33b6b11 If the open fails, don't mark the device as open (duh!)
symptom:.. once an open of a 'can only open it once' device fails..
you can never open it again, as it was marked open but wasn't open..
1995-12-05 04:41:20 +00:00
dg
ef1265ff11 all:
Removed ifnet.if_init and ifnet.if_reset as they are generally unused.
Change the parameter passed to if_watchdog to be a ifnet * rather than
a unit number. All of this is an attempt to move toward not needing an
array of softc pointers (which is usually static in size) to point to
the driver softc.

if_ed.c:
Changed some of the argument passing to some functions to make a little
more sense.

if_ep.c, if_vx.c:
Killed completely bogus use of if_timer. It was being set in such a way
that the interface was being reset once per second (blech!).
1995-12-05 02:01:59 +00:00
peter
86353d95e6 aargh! I tested JREMOD, only to discover that the "good oil" part of
it for si.c was accidently inside some #ifdef DEBUG code....
1995-12-04 17:33:45 +00:00
phk
27e3e437a7 A major sweep over the sysctl stuff.
Move a lot of variables home to their own code (In good time before xmas :-)

Introduce the string descrition of format.

Add a couple more functions to poke into these marvels, while I try to
decide what the correct interface should look like.

Next is adding vars on the fly, and sysctl looking at them too.

Removed a tine bit of defunct and #ifdefed notused code in swapgeneric.
1995-12-04 16:48:58 +00:00
jkh
dfa19e9278 Close PR: kern/865
Submitted by:	Juergen Lock <nox@jelal.hb.north.de>
1995-12-04 02:26:53 +00:00
bde
48f2d7ff2f Added a prototype.
Declared dsioctl() as static consistently.  Note that both if_disc.c
and subr_diskslice.c use the same prefix `ds' and there is a name
conflict for dsioctl().
1995-12-03 19:08:55 +00:00
bde
e23f81d56b Fixed the type mismatch in check for the bogus mmap function `nullop'.
The test should never succeed and should go away.  Temporarily print
a warning if it does succeed.
1995-12-03 18:59:55 +00:00
bde
9516882fe5 Added prototypes.
Staticized.

Moved a NULL-initialized variable to the bss.
1995-12-03 18:46:49 +00:00
bde
5db86e5790 __purified pmap_pte(). This seems to make no difference. 1995-12-03 18:37:44 +00:00
bde
8566d3b3bc Completed function declarations and/or added prototypes. 1995-12-03 18:35:28 +00:00
bde
7ec1b3fb8c Oops, the last commit left a redundant declaration. 1995-12-03 18:00:35 +00:00
bde
e2f7580968 Staticized.
Completed function declarations and added prototypes.

Cleaned up prototypes.

Cleaned up #includes.

Removed unused variable `dkn'.
1995-12-03 17:51:36 +00:00
bde
a5619d8321 Added prototypes.
cd9660_rrip.c:
Added lots of bogus casts to hide type errors exposed by the prototypes.
(Different structs are assumed to have a common prefix.)

cd9660_vnops.c:
Finished staticizing.
1995-12-03 17:14:38 +00:00
bde
b64c83c189 Added prototypes. 1995-12-03 16:42:02 +00:00
bde
8c06a975d2 Added prototypes.
Removed some unnecessary #includes.
1995-12-03 14:54:48 +00:00
bde
ebcae2edc5 null_node_find() and umap_node_find() were sometimes called without a
`struct mount *' arg.  I don't know what the effects of this were.
1995-12-03 14:38:57 +00:00
bde
1a80eac993 Moved inline functions for insque() and remque() to <sys/queue.h>.
Protected them with `#ifdef KERNEL' so that <sys/queue.h> is valid C++.
Added the necessary #includes of <sys/queue.h>.

These functions are bogus and should be replaced by the queue macros.
1995-12-03 13:45:34 +00:00
bde
e38b583bc1 Completed function declarations and/or added prototypes.
Staticized some functions.

__purified some functions.  Some functions were bogusly declared as
returning `const'.  This hasn't done anything since gcc-2.5.  For
later versions of gcc, the equivalent is __attribute__((const)) at
the end of function declarations.
1995-12-03 12:18:39 +00:00
bde
3b0ea037ba Completed function declarations and/or added prototypes and/or #includes
to get the prototypes.
1995-12-03 11:17:15 +00:00
bde
d703b1fc92 Removed unused thread support (partly to get rid of its incomplete
function declarations).

Removed unused #includes (lots of vm ones).
1995-12-03 10:40:16 +00:00
bde
3a9097e8af Completed function declarations and/or added prototypes and/or moved
prototypes to the right place.
1995-12-03 10:03:12 +00:00
phk
dcddb9b1f4 malloc.h: add sysctl class.
sysctl.h add "AUTO" OID.

both of which will be need RSN.
1995-12-02 20:40:20 +00:00
phk
73d56fbc33 I don't know what I messed up in 1.40, but the crynwr mode didn't make it.
Here it is then, I hope.
1995-12-02 20:33:40 +00:00
bde
0a7aa506eb Completed function declarations and/or added prototypes. 1995-12-02 19:38:06 +00:00
bde
6c4f4b8a1f Fixed call to mrt_ioctl(). mrt_ioctl() for some reason has different
number of args when MROUTING is defined.
1995-12-02 19:28:24 +00:00
bde
41dcd73395 Completed function declarations and/or added prototypes. 1995-12-02 18:58:56 +00:00
phk
0d9802294f staticize. 1995-12-02 17:14:34 +00:00
bde
8c6f875d7a Finished (?) cleaning up sysinit stuff. 1995-12-02 17:11:20 +00:00
bde
b985cfd178 Staticized.
Added prototypes.
1995-12-02 16:32:03 +00:00
julian
01bd537d94 I fixed this before than committed it on my machine and not on freefall.
(window confusion)
1995-12-02 13:08:20 +00:00
julian
9f1e55b200 Submitted by: Heikki Suonsivu
Made the pty devices creates in devfs match the present MAKEDEV naming
1995-12-02 07:30:19 +00:00
julian
c138aa272e A quick fix for a problem that will go away in a few days anyway.. 1995-12-01 23:09:20 +00:00
dg
fcbc8e035c Fix minor bug that would cause the packet statistics updates to stop
working under extremely rare circumstances. Also added some additional
comments..
1995-12-01 22:41:56 +00:00
julian
63d438f008 remove typo 1995-12-01 01:38:49 +00:00
se
08507d2a17 Add definition of PROT_NONE=0 for compatibility with SunOS/Solaris/Linux ...
Reviewed by:	julian
1995-11-30 20:59:08 +00:00
julian
bad59b8685 Submitted by: jb@cimlogic.com.au (John Birrell)
Obtained from:  NetBSD as well (He submitted it there too)

make sure that teh shm region is beyond the sum of the text and data segs
as it was big progs could collide with the shm region.
1995-11-30 07:58:50 +00:00
pst
e4bc4230d6 Fix support for QIC_3080 drives...it 1/2 worked before. 1995-11-30 07:43:47 +00:00
julian
5ad930b86a A pair of really tiny patches that not only allow it all to compile
but also IT ACTUALLY WORKS!
FreeBSD with options  JREMOD now runs with no entries in the devsw tables
prior to the devices puting their own entries there..

Thanks to bde and terry for thoughts and comments.
next stop 'Real' devfs support in devices.
1995-11-30 05:59:09 +00:00
ache
5de7699004 Fix my color/attr separation patch.
Swap foreground/background logic to allow DIM REVERSE
1995-11-30 03:29:31 +00:00
wollman
7448c140a0 Delete obnoxious uprintf()s in load/unload procedures. 1995-11-29 20:10:33 +00:00
nate
689991f65b GENERIC - Add a commented out line for adding support for IBM ThinkPad
keyboards

LINT - Add SCANSET=2 support to the LINT kernel and comments reflecting it's
       purpose.
1995-11-29 20:07:49 +00:00
nate
62a4352b7c Add some comments above the npx0 device to make it even more obvious
that it is a mandatory device.
1995-11-29 20:02:29 +00:00
wollman
66bcc8512c Fix Pentium CPU rate diagnosis:
- Don't print out meaningless iCOMP numbers, those are for droids.
	- Use a shorter wait to determine clock rate to avoid deficiencies
	  in DELAY().
	- Use a fixed-point representation with 8 bits of fraction to store
	  the rate and rationalize the variable name.  It would be
	  possible to use even more fraction if it turns out to be
	  worthwhile (I rather doubt it).

The question of source code arrangement remains unaddressed.
1995-11-29 19:57:22 +00:00
wollman
7a30acc257 Disallow LKM manipulations when in seure mode.
Noticed by: bde
1995-11-29 17:45:59 +00:00
bde
058f435a83 Don't staticize again (twice).
Cleaned up includes.
1995-11-29 17:40:47 +00:00
julian
21d3f7d04a missed one..
thanks jim..
(actually I was already aware I'd missed it, but hadn't started
searching for it :)
1995-11-29 15:31:22 +00:00
bde
db9f47ead7 Restored my old changes which were clobbered by the previous commit.
Added prototypes.  The previous version wouldn't have compiled if
prototypes were in scope.
1995-11-29 15:07:59 +00:00
bde
0965a035c8 Removed builtin list of port addresses. The address for sio3
conflicted with S3 graphics cards.  Now users should put sio[2-3]
in the config file if the hardware exisst, even if the probe is
certain to fail due to an interrupt conflict.  Otherwise, ports
sharing the interrupt may fail the probe if the system is warm
booted while sio[2-3] are active (perhaps under another OS).  The
same problem for nonstandard ports is now handled better than
before.
1995-11-29 15:00:07 +00:00
julian
6458dd5afd If you're going to mechanically replicate something in 50 files
it's best to not have a (compiles cleanly) typo in it! (sigh)
1995-11-29 14:41:20 +00:00
julian
5ed45e9584 #ifdef out nearly the entire file of conf.c when JREMOD is defined
add a few safety checks in specfs because
now it's possible to get entries in [cd]devsw[] which are ALL NULL
so it's better to discover this BEFORE jumping into the d_open() entry..

more check to come later.. this getsthe code to the stage where I
can start testing it, even if I haven't caught every little error case...
I guess I'll find them quick enough..
1995-11-29 12:38:49 +00:00
phk
21d20714f1 A test was backwards.
Noticed by:	Cheng, Hsiao-Yang <sycheng@cis.ufl.edu>
1995-11-29 11:28:00 +00:00
asami
aedf416b4f 'see" -> "see" (in the comment).
Noticed by:	hilit19.el (stop laughing! ;)
1995-11-29 11:19:02 +00:00
julian
6c979de707 OK, that's it..
That's EVERY SINGLE driver that has an entry in conf.c..
my next trick will be to define cdevsw[] and bdevsw[]
as empty arrays and remove all those DAMNED defines as well..

Each of these drivers has a SYSINIT linker set entry
that comes in very early.. and asks teh driver to add it's own
entry to the two devsw[] tables.

some slight reworking of the commits from yesterday (added the SYSINIT
stuff and some usually wrong but token DEVFS entries to all these
devices.

BTW does anyone know where the 'ata' entries in conf.c actually reside?
seems we don't actually have a 'ataopen() etc...

If you want to add a new device in conf.c
please  make sure I know
so I can keep it up to date too..

as before, this is all dependent on #if defined(JREMOD)
(and #ifdef DEVFS in parts)
1995-11-29 10:49:16 +00:00
phk
1dc78eae06 staticize. 1995-11-29 10:26:51 +00:00
phk
35f9ff360f Staticized and '#ifdef notused' stuff we don't use. 1995-11-29 10:25:50 +00:00
phk
61c73c59b5 Add crynwr mode to the lp# interface.
Reviewed by:	pst, phk
Submitted by:	tim@sarc.city.ac.uk
1995-11-29 10:17:03 +00:00
phk
eefc5eab3d Staticize again. 1995-11-29 10:12:34 +00:00
jkh
667832b4d1 A batch of Jim Lowe's patches:
o Add signed/unsigned functionality to the matrox meteor device driver.
	o Apply a few fixes to the sound driver.
	o Add a ``SPIGOT_UNSECURE'' compile time definition so, if one defines
	  SPIGOT_UNSECURE in their conf file, then they can use the spigot w/o
	  root.  There is a warning that this allows users access to the IO
	  page which is probably not secure.
Submitted by:	james
1995-11-29 01:07:59 +00:00
dg
421090655c Device driver for Intel Pro/100 PCI Fast Ethernet controller. 1995-11-28 23:55:26 +00:00
joerg
3e0e9304e0 Add Lyndon's man page.
Closes PR # docs/842

Submitted by:	lyndon@orthanc.com (Lyndon Nerenberg)
1995-11-28 21:12:06 +00:00
julian
ac09934a00 oops forgot one.. 1995-11-28 09:44:42 +00:00
julian
75ec7f8588 the second set of changes in a move towards getting devices to be
totally dynamic. (the first was about 7 weeeks ago)

this is only the devices in i386/isa
I'll do more tomorrow.
they're completely masked by #ifdef JREMOD at this stage...
the eventual aim is that every driver will do a SYSINIT
at startup BEFORE the probes, which will effectively
link it into the devsw tables etc.

If I'd thought about it more I'd have put that in in this set (damn)
The ioconf lines generated by config will also end up in the
device's own scope as well, so ioconf.c will eventually be gutted
the SYSINIT call to the driver will include a phase where the
driver links it's ioconf line into a chain of such. when this phase is done
then the user can modify them with the boot: -c
config menu if he wants, just like now..
config will put the config lines out in the .h file
(e.g. in aha.h will be the addresses for the aha driver to look.)
as I said this is a very small first step..
the aim of THIS set of edits is to not have to edit conf.c at all when
adding a new device.. the tabe will be a simple skeleton..

when this is done, it will allow other changes to be made,
all teh time still having a fully working kernel tree,
but the logical outcome is the complete REMOVAL of the devsw tables.

By the end of this, linked in drivers will be exactly the same as
run-time loaded drivers, except they JUST HAPPEN to already be linked
and present at startup..
the SYSINIT calls will be the equivalent of the "init" call
made to a newly loaded driver in every respect.

For this edit,
each of the files has the following code inserted into it:

obviously, tailored to suit..
----------------------somewhere at the top:
#ifdef JREMOD
#include <sys/conf.h>
#define CDEV_MAJOR 13
#define BDEV_MAJOR 4
static void 	sd_devsw_install();
#endif /*JREMOD */
---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT
#ifdef JREMOD
        sd_devsw_install();
#endif /*JREMOD*/
-----------------------at the bottom:
#ifdef JREMOD
struct bdevsw sd_bdevsw =
	{ sdopen,	sdclose,	sdstrategy,	sdioctl,	/*4*/
	  sddump,	sdsize,		0 };

struct cdevsw sd_cdevsw =
	{ sdopen,	sdclose,	rawread,	rawwrite,	/*13*/
	  sdioctl,	nostop,		nullreset,	nodevtotty,/* sd */
	  seltrue,	nommap,		sdstrategy };

static sd_devsw_installed = 0;

static void 	sd_devsw_install()
{
	dev_t descript;
	if( ! sd_devsw_installed ) {
		descript = makedev(CDEV_MAJOR,0);
		cdevsw_add(&descript,&sd_cdevsw,NULL);
#if defined(BDEV_MAJOR)
		descript = makedev(BDEV_MAJOR,0);
		bdevsw_add(&descript,&sd_bdevsw,NULL);
#endif /*BDEV_MAJOR*/
		sd_devsw_installed = 1;
	}
}
#endif /* JREMOD */
1995-11-28 09:43:45 +00:00
julian
c69a51501b the second set of changes in a move towards getting devices to be
totally dynamic.

this is only the devices in i386/isa
I'll do more tomorrow.
they're completely masked by #ifdef JREMOD at this stage...
the eventual aim is that every driver will do a SYSINIT
at startup BEFORE the probes, which will effectively
link it into the devsw tables etc.

If I'd thought about it more I'd have put that in in this set (damn)
The ioconf lines generated by config will also end up in the
device's own scope as well, so ioconf.c will eventually be gutted
the SYSINIT call to the driver will include a phase where the
driver links it's ioconf line into a chain of such. when this phase is done
then the user can modify them with the boot: -c
config menu if he wants, just like now..
config will put the config lines out in the .h file
(e.g. in aha.h will be the addresses for the aha driver to look.)
as I said this is a very small first step..
the aim of THIS set of edits is to not have to edit conf.c at all when
adding a new device.. the tabe will be a simple skeleton..

when this is done, it will allow other changes to be made,
all teh time still having a fully working kernel tree,
but the logical outcome is the complete REMOVAL of the devsw tables.

By the end of this, linked in drivers will be exactly the same as
run-time loaded drivers, except they JUST HAPPEN to already be linked
and present at startup..
the SYSINIT calls will be the equivalent of the "init" call
made to a newly loaded driver in every respect.

For this edit,
each of the files has the following code inserted into it:

obviously, tailored to suit..
----------------------somewhere at the top:
#ifdef JREMOD
#include <sys/conf.h>
#define CDEV_MAJOR 13
#define BDEV_MAJOR 4
static void 	sd_devsw_install();
#endif /*JREMOD */
---------------------somewhere that's run during bootup: EVENTUALLY a SYSINIT
#ifdef JREMOD
        sd_devsw_install();
#endif /*JREMOD*/
-----------------------at the bottom:
#ifdef JREMOD
struct bdevsw sd_bdevsw =
	{ sdopen,	sdclose,	sdstrategy,	sdioctl,	/*4*/
	  sddump,	sdsize,		0 };

struct cdevsw sd_cdevsw =
	{ sdopen,	sdclose,	rawread,	rawwrite,	/*13*/
	  sdioctl,	nostop,		nullreset,	nodevtotty,/* sd */
	  seltrue,	nommap,		sdstrategy };

static sd_devsw_installed = 0;

static void 	sd_devsw_install()
{
	dev_t descript;
	if( ! sd_devsw_installed ) {
		descript = makedev(CDEV_MAJOR,0);
		cdevsw_add(&descript,&sd_cdevsw,NULL);
#if defined(BDEV_MAJOR)
		descript = makedev(BDEV_MAJOR,0);
		bdevsw_add(&descript,&sd_bdevsw,NULL);
#endif /*BDEV_MAJOR*/
		sd_devsw_installed = 1;
	}
}
#endif /* JREMOD */
1995-11-28 09:42:06 +00:00
bde
b50523c7b3 Removed all #includes of the unused file <sys/device.h>. 1995-11-28 07:29:59 +00:00
bde
4e307e4ec1 Removed bogus __BEGIN_DECS/__END_DECLS. 1995-11-28 07:23:09 +00:00
peter
f902f4b1cd After having put on my Asbestos suit, complete the MFS_ROOT part of Terry's
mountroot changes.  This means that the mfs_initminiroot functionality
into the root mfs_mount....
1995-11-28 03:15:58 +00:00
peter
f22c665f0e Implement read/write to kernel space - I use this for a self-loading/
self-decompressing ram disk that I'm fiddling with..

(Note, this depends on the various syscalls having correctly set uio_segflag
 before calling physio - I've checked and they look correct.)
1995-11-28 02:40:38 +00:00
peter
ecca6899e0 Attempt to solve the busy-buffers-on-shutdown caused by MFS once and for all.
What was happening, was that the main mfs loop was sleeping, and when it was
being awoken by a wakeup when it was supposed to process some IO requests.

The problem was that if it was being woken out of the tsleep() by a signal
at shutdown, it was going straight into dounmount() without servicing any
pending IO requests, causing dounmount() to fail because there were busy
buffers (and they could not be "processed" because the processing loop was
trying to unmount rather than dispatching into mfs_doio()).

This (dare I say it :-) appears to be a layering problem....
1995-11-28 02:15:29 +00:00
peter
a0a9d5f696 Mainly cosmetic cleanups... It now uses more consistant message reporting
on the console, and no longer uses "SLXOS" which I suspect may be a
trademark... (I'm not sure, but this is not really a SLXOS driver anyway)
1995-11-28 02:07:36 +00:00
peter
19a120bf36 Implement some rudimentry IPX support... 1995-11-28 01:59:19 +00:00
ache
f20138bfae Separate colors & attributes as Terry points
Reviewed by: soren
1995-11-28 00:17:32 +00:00
bde
ad96c68771 Fixed setting of speed B0 - don't output a bogus divisor of 0 and a
random prescaler, just hang up.  This may fix hangup problems with
mgetty.
1995-11-26 17:13:23 +00:00
bde
2c29d85726 Oops, the previous change was missing the declaration of `struct
buf_queue_head'.  It isn't forward declared in <sys/types.h> like
`struct buf'.
1995-11-24 15:59:11 +00:00
bde
e6e51e5d41 Completed function declarations and/or added prototypes. 1995-11-24 15:15:30 +00:00
bde
4da3391343 Added bogusly placed extern prototypes for functions that should probably
be static.
1995-11-24 15:08:07 +00:00
bde
26cd89c600 Fixed a comment. 1995-11-24 14:56:00 +00:00
bde
2715e7ce43 Declared tqdisksort(). <sys/disklabel.h> is the wrong place, but
<sys.disk.h> isn't used, so the declaration there isn't seen.
1995-11-24 14:50:39 +00:00
bde
dc167d11a8 Completed function declarations and/or added prototypes and/or #includes
to get the prototypes.

Changed some `int's to `boolean_t's.  boolean_t's are ints so they are
hard to distinguish from ints.

Converted function headers to old-style.  ddb is written in K&R1 C
except where we broke it.
1995-11-24 14:13:42 +00:00
bde
ba715c14d9 Completed function declarations and/or added prototypes.
Removed `extern' from prototypes.
Sorted prototypes.
Uniformized idempotency ifdefs.
1995-11-24 13:53:05 +00:00
bde
11b440a71d Staticized. Moved some ero-initialized values to the bss.
Added prototypes.
1995-11-24 13:27:24 +00:00
bde
b9c013d11d Cleaned up prototypes:
- don't #include other headers just to get struct names.
- don't use __BEGIN_DECLS/__END_DECLS for system prototypes.  It is for
  user prototypes.
- don't use extern.
- don't use lines longer than 80 columns.
- use alphabetical order.
- use tabs.

Uniformized idempotency ifdefs.
1995-11-24 12:25:13 +00:00
bde
c91848b575 Fixed a bogus name (ifn_en) that was introduced when a type mismatch
was fixed.
1995-11-24 12:07:33 +00:00
bde
1715fecd0e Added #include <sys/queue.h>. This will be required when I move
the (inline) implementations of insque() and remque() from
<machine/cpufunc.h> to <sys/queue.h>.
1995-11-24 12:01:08 +00:00
bde
050ea1dde2 Undid bogus cleanups. 0 was mistyped as NULL. 1995-11-24 11:43:55 +00:00
dyson
190351e34f Update the wd.c driver to use the new TAILQ scheme for device
buffer queue.  Also, create a new subroutine 'tqdisksort' that
is an improved version of the original disksort that also uses
TAILQs.
1995-11-23 07:24:41 +00:00
bde
d25c47b91e Completed function declarations and added prototypes.
Removed some unnecessary #includes.

Fixed warnings about nested externs.
1995-11-22 07:43:53 +00:00
bde
5f7b506de6 Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 15:51:39 +00:00
bde
6851f5f69a Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 15:14:28 +00:00
bde
e915bce530 Completed function declarations, added prototypes and removed redundant
declarations.
1995-11-21 14:56:02 +00:00
bde
47a5975d28 Made pci.c compile again. It unfortunately depends on the isa interrupt
interface.  Adding prototypes just made the dependency explicit.
1995-11-21 13:59:56 +00:00
bde
e5bf7b988b Completed function declarations and/or added prototypes. 1995-11-21 12:55:26 +00:00
bde
ff5d852f47 Restored static variable `nsio_tty' which is used only by pstat(8). Made
it `const' to inhibit compiler warnings.

Added #include of <pccard/driver.h> to get prototypes.  <pccard/slot.h>
is still necessary for its side effect of exporting non-slot things.
1995-11-21 09:15:04 +00:00
bde
b485910190 New file for pccard driver interface declarations. 1995-11-21 08:49:21 +00:00
bde
27ef45c4e7 Fixed replication error so that this compiles again.
Removed bogus comment and useless braces.
1995-11-21 08:35:49 +00:00
phk
30fb556fec Make the LKM version compile again.
Pointed out by: Michael Smith <msmith@atrad.adelaide.edu.au>
1995-11-21 08:27:00 +00:00
peter
9b4d3546fb Add and document the hooks for John Hay's Arnet sync driver... 1995-11-21 02:50:10 +00:00
peter
bfaf514b4b This commit was generated by cvs2svn to compensate for changes in r12437,
which included commits to RCS files with non-trunk default branches.
1995-11-21 02:32:04 +00:00
peter
3fd166c979 This driver supports the Arnet SYNC/570i ISA cards that is based on the
HD64570 chip. Both the 2 and 4 port cards is supported and auto detected.

Line speeds of up to 2Mbps is possible. At this speed about 85% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the V.35 and X.21 interfaces is supported. The others
may need tweaks to the clock selection code.

Submitted by: John Hay <jhay@mikom.csir.co.za>
1995-11-21 02:32:04 +00:00
peter
1942953117 This driver supports the Arnet SYNC/570i ISA cards that is based on the
HD64570 chip. Both the 2 and 4 port cards is supported and auto detected.

Line speeds of up to 2Mbps is possible. At this speed about 85% of the
bandwidth is usable with 486DX processors.

The standard FreeBSD sppp code is used for the link level layer. The
default protocol used is PPP. The Cisco HDLC protocol can be used by
adding "link2" to the ifconfig line in /etc/sysconfig or where ever
ifconfig is run.

At the moment only the V.35 and X.21 interfaces is supported. The others
may need tweaks to the clock selection code.

Submitted by: John Hay <jhay@mikom.csir.co.za>
1995-11-21 02:32:04 +00:00
peter
c3c8f236e4 If a lcp configure request is received in the lcp opened state and it
is acknowledged, it should go to the lcp ack sent state.

Don't reply on lcp echo requests when not in the lcp opened state.

If the interface is set to CISCO mode, it should still be marked
running when ifconfiged.

Fixed a few indentations that had gone wrong somewhere.

Submitted-by: John.Hay@csir.co.za
1995-11-21 01:23:13 +00:00
bde
13ff2d57d4 Quick fix for stat_imask and intr_mask[8] not having the RTC interrupt
bit set.  I broke stat_imask in Dec 1994 and update_intr_masks() has
copied the breakage to intr_mask[8] since Mar 1995.  This can cause
the RTC to stop interrupting in rare cases (under loads heavy enough
for a new RTC interrupt to occur at a critical time just before Xintr8
finishes handling the previous one) and may have caused worse problems.
1995-11-20 13:24:18 +00:00
phk
a341547c98 Mega commit for sysctl.
Convert the remaining sysctl stuff to the new way of doing things.
the devconf stuff is the reason for the large number of files.
Cleaned up some compiler warnings while I were there.
1995-11-20 12:42:39 +00:00
phk
6f158411f1 Fully prototype physio(). 1995-11-20 12:35:16 +00:00
phk
7dc80330e7 Fix #includes. 1995-11-20 12:29:05 +00:00
phk
34904836a8 fix #includes & warnings. 1995-11-20 12:28:21 +00:00
phk
d95435ebce Add a couple of the easy prototypes. 1995-11-20 12:27:00 +00:00
phk
d97fc115c7 Fix compiler warnings. 1995-11-20 12:25:37 +00:00
phk
4636ba8017 Remove unused vars & funcs, make things static, protoize a little bit. 1995-11-20 12:20:02 +00:00
phk
6ec6816809 Put cbstat() under #ifdef DDB 1995-11-20 12:15:45 +00:00
phk
6301d32913 Remove unused var. 1995-11-20 12:14:40 +00:00
phk
fcc0f2dc02 Fix compiler warnings. 1995-11-20 12:13:32 +00:00
phk
eb32570717 move variables inside the #ifdef. 1995-11-20 12:12:02 +00:00
phk
81e0395a06 Change call to kern_sysctl to userland_sysctl. Not tested. 1995-11-20 12:10:59 +00:00
phk
449e8a39cb Remove unused vars. 1995-11-20 12:10:09 +00:00
phk
748a253862 Close the "unused" warning for things in linker-sets.
This will also allow us to catch typos in the setname by running a
nm through a grep.
1995-11-20 12:08:08 +00:00
phk
ba1e4e47f7 Fix a printf. 1995-11-20 12:03:52 +00:00
dyson
088b4381b3 Yet another small block FS bug fix. 1995-11-20 04:53:45 +00:00
dyson
09fbd60d19 Since FreeBSD clustering code now supports filesystems < PAGE_SIZE,
enable clustering for cd9660, thereby giving a BIG performance boost.
1995-11-20 03:57:50 +00:00
dyson
2d361da6e2 Fix more clustering bugs for FSes with block sizes < PAGE_SIZE. 1995-11-20 03:55:48 +00:00
dg
ca17300bd6 Trim #includes to those that are necessary; other cosmetic changes. 1995-11-20 02:12:34 +00:00
dyson
c4954db8f7 First set of changes to eliminate the ad-hoc device buffer queues,
replacing them with TAILQ's as appropriate.  The SCSI code is the
first to be changed -- until the changes are complete, both b_act and
b_actf will be in the buf structure.  b_actf will eventually be removed.
1995-11-19 22:22:35 +00:00
dyson
eb7795045f Changed an incorrect splhigh to splbio. 1995-11-19 20:42:25 +00:00
dyson
f38f534ded Correct some serious porting errors. The worst one was that the
vnode was being placed upon the mount point twice!!!
1995-11-19 20:24:15 +00:00
dyson
0c97c65ea5 General fixes to the vfs clustring code:
1) Make cluster buffer list be a non-malloced chain.  This eliminates
yet another 'evil' M_WAITOK and generally cleans up the code.
2) Fix write clustering for ext2fs.  It was just broken.  Also, ffs
clustering had an efficiency problem that more bawrites were happening
than should have been.
3) Make changes to buf.h to support the above, plus remove b_pfcent
at the request of David Greenman.

Note that the reallocblocks code is disabled pending rewrite for
the cluster buffer list changes.
1995-11-19 19:55:26 +00:00
dyson
6f8f886a41 General fixes to the vfs clustring code:
1) Make cluster buffer list be a non-malloced chain.  This eliminates
yet another 'evil' M_WAITOK and generally cleans up the code.
2) Fix write clustering for ext2fs.  It was just broken.  Also, ffs
clustering had an efficiency problem that more bawrites were happening
than should have been.
3) Make changes to buf.h to support the above, plus remove b_pfcent
at the request of David Greenman.
Reviewed by: davidg (partially)
1995-11-19 19:54:31 +00:00
dg
b7b7fc96fd i386 is defined by the compiler, so don't define it here. LOAD_ADDRESS
is only used in the Makefile, so don't define it in CFLAGS.
1995-11-19 19:49:43 +00:00
dyson
0bd8f2c080 Change incorrect '#if EXT2FS' to '#ifdef EXT2FS' 1995-11-19 19:46:23 +00:00
dg
d10e894e9f Kill setting of b_pfcent - it's unused. 1995-11-19 13:24:00 +00:00
bde
59dcd1177f Fixed settimeofday():
- don't allow invalid timevals.
- normalize timevals as they are built - don't call timevaladd() with
  a possibly invalid timeval and normalize the result.

Fixed a warning.
1995-11-19 00:59:22 +00:00
bde
3b29598aab Moved the prototype for setsigvec() from kern_sig.c to signalvar.h.
Completed function pointer declarations.
1995-11-19 00:51:29 +00:00
dyson
1e8323a784 Added a missing splx(s). 1995-11-18 23:33:48 +00:00
bde
60b83a65cf Fixed the type of a function pointer. 1995-11-18 13:25:41 +00:00
bde
3e73c0393a Fixed a comment. 1995-11-18 13:07:51 +00:00
bde
f1a68a6d0f Added bogus casts to avoid warnings.
Continued cleaning up sysinit stuff.
1995-11-18 13:01:19 +00:00
bde
7cdb7d8747 KNFized spec_getpages_idone() and spec_getpages().
Moved misplaced #includes.

Completed function pointer declarations.
1995-11-18 12:49:14 +00:00
bde
bbfa57541d Fixed the errno returned by rename("dir1", "dir2/."). It was EISDIR
(duh); translate it to EINVAL which is the errno for other renames
to ".".
1995-11-18 11:35:05 +00:00
bde
87f9f11bbb Improved formatting.
Added a comment about possibly better handling of INPCK.

Added a prototype.
1995-11-18 11:07:00 +00:00
bde
eeec8e6ecb Cleaned up SA_NODEFER changes.
Added prototypes.
1995-11-18 10:01:38 +00:00
bde
40c742a0e7 Moved bogusly placed #endif that hid some prototypes. 1995-11-18 09:37:42 +00:00
bde
b9487a09ef Updated comments. The comments about the unused addresses get broken
almost every time someone uses an address.  This file is probably not
the right place to keep track of the unused addresses (or used
addresses :->).

Fixed comments on #endif's to match code.

Added defines for ASC and GSC sizes.  This file is not the right place
to keep track of scanner addresses, but while there here and we
pretend to keep track of unused addresses, the sizes need to be here
too.

Sorted IO_*SIZE defines.
1995-11-18 09:29:39 +00:00
bde
5ddadd620d Fixed the types of the apm hook functions.
Completed function declarations.

Added prototypes.

Partially fixed the path to cons.h.
1995-11-18 08:58:14 +00:00
bde
9f19384e46 Fixed the types of the apm hook functions.
Completed function declarations.

Added prototypes.
1995-11-18 08:39:28 +00:00
bde
aa1e7ca88e Fixed the type of a timeout function.
Added prototypes.
1995-11-18 08:35:49 +00:00
bde
fcae13d9aa Fixed staticization - use `static' in function headers, not just in
prototypes.
1995-11-18 08:29:04 +00:00
bde
7c9a07bdb8 Fixed a bogus include path.
Removed a bogus include.

Added prototypes.
1995-11-18 08:21:15 +00:00
bde
13f06ee59b Staticized an inline function. All inlines in kernel headers should be
static.  The function shouldn't be here anyway.  It is driver dependent,
while `ic' files are supposed to only depend on the IC.
1995-11-18 08:12:30 +00:00
bde
d78001f846 Fixed (nonexistent) initialization of bp->b_pblkno. disksort() for
floppies must have been random in 2.x since we reintroduced sorting
on b_pblkno on 1995/03/18.  Drivers still initialize b_cylin/b_resid
although this is no longer used.

Removed unused, wrong function fdsize().  (Returning 0 means that the
device exists and has size 0, not that the device doesn't exist.
swaponvp() allows for size 0 by stupidly calling the d_psize function
twice if the size isn't 0.  setdumpdev() doesn't allow for it.)

Continued removing /* ARGSUSED */ from drivers.
1995-11-18 07:48:11 +00:00
bde
144f1ba19f Fixed the type of a timeout function.
Removed related bogus casts of function pointers.
Removed a bogus include.
1995-11-18 07:07:04 +00:00
bde
fc2db8ec84 Fixed the type of vm_fault_quick() - don't convert types back and forth
through bogus immediate types.

Added prototypes.
1995-11-18 06:54:11 +00:00
bde
7311dc05cc Fixed handling of trace traps when cons_unavail is set. Added comments
about handing of other cases.
1995-11-18 06:49:35 +00:00
bde
5e70d82d20 Restored the device-driverness off wd.c. It got lost when wdc was
introduced.
Fixed the device-driverness of atapi.c and spkr.c.

These changes are actually no-ops because ${DRIVER_C} is the same as
${NORMAL_C} for the i386.  I could do without magic CFLAGS.  Special
handling should be in the sources if possible.
1995-11-18 05:34:00 +00:00
bde
137c3918d8 Removed bogus padding that wasted 0x500 bytes.
Improved code and comments.  Don't do anything except transfer control
in the head.o module.
1995-11-18 05:25:24 +00:00
bde
fccace4976 Fixed scrolling. The bottom line wasn't cleared. This caused the
boot to display "Booting the kernelel...done" instead of "Booting
the kernel".

Removed save and restore of BIOS memory.  kzipped kernels haven't
ever overlaid the BIOS memory.
1995-11-18 05:12:10 +00:00
bde
f16021f598 Fixed the types of apm_default_resume() and apm_default_suspend().
Added prototypes.
1995-11-18 04:37:23 +00:00
bde
2281458cfc Fixed the type of nic_listen(). A trailing arg was missing.
Fixed calls to s_intr().  There was sometimes an extra trailing arg.
1995-11-18 04:19:44 +00:00
dg
a3893cb473 Set flag to stop backoff counter from counting when carrier activity is
detected. This dramatically reduces the collision rate (about 1/10th of
what is was previously).

Submitted by:	Matt Thomas <matt@lkg.dec.com>
1995-11-17 12:11:22 +00:00
phk
722156b7d3 All net.* sysctl converted now. 1995-11-16 19:00:27 +00:00
bde
6242c0146e Moved declarations for static functions to the correct place (not in a
header) and cleaned them up.
1995-11-16 11:48:10 +00:00
bde
e47b8d85b8 Moved declarations for static functions to the correct place (not in a
header).

Removed stupid comments.
1995-11-16 11:39:11 +00:00
bde
7e09719a3e Fixed the type of procfs_sync(). Trailing args were missing.
Fixed the type of procfs_fhtovp().  The args had little resemblance to
the correct ones.

Added prototypes.
1995-11-16 11:34:51 +00:00