Commit Graph

2289 Commits

Author SHA1 Message Date
Joerg Wunsch
86a727d96d BIOS manufacturers don't seem to have a unique idea about 2.88 MB
floppy drive types in the CMOS; add 0x50 as an alias for 2.88 MB.
1995-10-09 15:00:39 +00:00
David Greenman
c79867680a Include <sys/systm.h> 1995-10-09 05:54:32 +00:00
Bruce Evans
029b0fc88f Fix tracing of syscalls. The previous fix required the undocumented
option DDB_NO_LCALLS to stop ddb getting control and broke all ddb
tracing.  Now there is no option and no way for ddb to trace at
address _Xsyscall or to _Xsyscall, but tracing everywhere else
works.  The previous fix did unnecessary things for Linux syscalls.

Don't bother checking that syscall frames are for user mode.

Make debugger traps inside the kernel (except at addresses _Xsyscall
and _Xsyscall+1) fatal if ddb is not configured.  They "can't happen".

Add prototypes.

Remove stupid comments, e.g., /*ARGSUSED*/ for args that are used.
1995-10-09 04:36:01 +00:00
Bruce Evans
c402cd1545 Restore my changes from revisions 1.8, 1.9 and 1.10. They were blown away
be the previous commit.  It didn't even compile.
1995-10-07 20:07:18 +00:00
Jordan K. Hubbard
2bcff10177 matcd -> matcdc 1995-10-06 05:36:51 +00:00
Peter Wemm
c196603b4d Part 2 of the overlapping kzip changes.
Submitted by:	Gary Jones(?) <gj@freefall>
1995-10-06 02:57:26 +00:00
Poul-Henning Kamp
e8413d1db1 Make the netboot more tolerant about the config file. 1995-10-05 20:51:39 +00:00
Poul-Henning Kamp
92a69bc337 remove GCC divsi3 routines which are never used. 1995-10-05 10:32:47 +00:00
Jordan K. Hubbard
429e99f1d2 Change kernel name to make a more unique target for sed. 1995-10-05 04:34:30 +00:00
David Greenman
edeea08413 1) Fixed irq logic so that it uses the kernel configured irq if it doesn't
match the board setting.
2) Fixed the warning message to properly print the irq mismatch (as opposed
   to the bit encoded value).
3) Add irq autodetection if the kernel has "?" or no irq specified.
4) Add missing splimp protection in ixioctl().
1995-10-05 03:01:13 +00:00
Jordan K. Hubbard
9e8433e6e0 This upgrades the driver for Cronyx-Sigma multiplexor boards
from version 1.2 to version 1.9.
Submitted by:	Serge Vakulenko, <vak@cronyx.ru>
1995-10-04 22:24:16 +00:00
Jordan K. Hubbard
dce7e5c9d4 Add the kernel config file (only for 2.1) that I'll be using
to generate my special IDE CDROM installation boot floppy.
1995-10-04 08:25:24 +00:00
Julian Elischer
00c6cadad3 Submitted by: Juergen Lock <nox@jelal.hb.north.de>
Obtained from: other people on the net ?

1. stepping over syscalls (gdb ni) sends you to DDB, and returned
to the wrong address afterwards, with or without DDB.  patch in
i386/i386/trap.c below.

2. the linux emulator (modload'ed) still causes panics with DIAGNOSTIC,
re-applied a patch posted to one of the lists...
1995-10-04 07:08:04 +00:00
Joerg Wunsch
16b04b6ae7 Hide the "input/output timeout" messages behind the bootverbose case.
This message has been confusing innocent ft users.

It should go into 2.1 as well, it's a very simple fix.
1995-10-04 07:01:23 +00:00
Bill Paul
b6e1531773 Make swapgeneric.c compile and (sort of) work again.
This is really just a token gesture at this point. We can't really turn
on swapping here anymore because (I think) we need to do a namei() lookup
in order to get a vnode which we can pass to swaponvp(). But to do a
namei(), we need a properly initialized proc structure, and we don't
have one. (I was hopping to toss it proc0, but that isn't initialized
until later.) We could conceiveably fabricate a dummy proc structure
to make namei() happy, but that's too much work for too little payoff.

For now, swapgeneric's only remaining saving grace is that it lets
you set the root device with -a.
1995-10-03 14:49:38 +00:00
Jordan K. Hubbard
8e4115484c Whoops, I misunderstood this. IRQ *12* is a better GUS default. 1995-10-03 01:12:59 +00:00
David Greenman
23e56ee8d7 Insert zeroed pages at the head of the zero queue rather than at the tail.
A measurable performance improvement results from the potential for the
page to be partially cached when it is eventually used.
1995-10-01 20:10:20 +00:00
Peter Dufault
5dde8b2750 Support the 1542CP by recognizing the new ID. Try to make future
1542 revs work by assuming the next few sequential ID codes are
new Adaptec boards and enabling them after printing a warning.

Conditionalize the informational boot messages with "if (bootverbose)".
1995-10-01 15:09:51 +00:00
David Greenman
90b8a1a5c7 Make ATAPI support completely optional - if ATAPI isn't defined, the
original code/algorithm is used completely (with one bugfix). This makes
it "safe" to bring these changes into -stable.
1995-09-30 15:19:44 +00:00
Jordan K. Hubbard
5f614f1df9 Bring IDE CDROM support up to latest version (1.8a?) from Serge.
Submitted by:	vak@cronyx.ru
1995-09-30 00:11:19 +00:00
Bruce Evans
abc260cb3f Fix FAT_CURSOR to give scanlines 0-15 instead of (the current start)-15. 1995-09-28 18:43:40 +00:00
Jordan K. Hubbard
0134f4737b o Support for CDIOCPREVENT and CDIOCALLOW ioctls that xcdplayer
were making and were no-brainers.  However, the xcdplayer
    eject button didn't work because xcdplayer gave up and didn't bother
    to try the EJECT ioctl anyway when CDIOCALLOW was not available.
    This all works now.

o   A change so that xcdplayer gets TOC entry data for the lead-out area
    on the disc.  Xcdplayer can now play the last track on a CD, which
    it would not do in earlier versions (but no one reported).
    Cdplayer gets the TOC data differently and it works in old and new
    versions.

o   Eliminated a race condition that caused the driver to sleep forever
    on very slow and heavily loaded systems on rare occasions when
    the system was doing lots of audio-related ioctls to the drive.

o   Fixed a problem where a locked drive could be unlocked by accessing
    one of the non-locking devs.  Door locking now follows the documented
    rules.

o   Made all wait channel strings unique to matcd.

Submitted by: Frank Durda IV <uhclem%nemesis@fw.ast.com>
1995-09-28 13:15:49 +00:00
Andrey A. Chernov
50c15f2110 Back out MTUDISC description per Garrett request, yet not ready 1995-09-27 19:12:20 +00:00
Andrey A. Chernov
aa3b19e087 Document MTUDISC 1995-09-27 17:26:30 +00:00
Poul-Henning Kamp
2b76bec4e6 if_ze.c was derived from if_ed.c about 42 (!) versions ago. It is now
scheduled for demolition.  This is a first step: get rid of if_zereg.h,
by adding the five extra definitions to if_edreg.h.
Also add some definitions which will become needed when if_ze.c gets
replaced entirely by pccard and if_ed.c.  (this is a 2.1.0 candidate)
1995-09-26 08:57:47 +00:00
Garrett Wollman
e508a00419 Add BPF and IP multicast capabilities to the tun' and lp' network
interfaces.

Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1995-09-25 16:57:54 +00:00
David Greenman
b025187719 siostop() is a void function, so don't return a value. 1995-09-24 04:59:16 +00:00
Peter Wemm
0d04cf6a1b Tone down the doom-and-gloom prediction if one enables the si driver.. 1995-09-23 08:52:30 +00:00
Peter Wemm
e0ad6557c5 Add some hooks visible from outside via nlist, so pstat can read the tty
state.
1995-09-22 20:00:12 +00:00
Stefan Eßer
77b573149a New approach to the PCI bus configuration mechanism probe problem:
- try to make sure there is any kind of PCI device
- if there is anything at port 0x0cf8, then check for mech. 1 or 2
1995-09-22 19:10:54 +00:00
Peter Wemm
b769f8efd6 Remove the "Danger will robinson!" printf's at the start. I'm pretty happy
with the driver's stability now.  I've not had a single problem with it for
weeks..  All that remains is a bit of performance tuning, and finishing
the manpages.
1995-09-22 18:28:21 +00:00
David Greenman
0704324a55 Fix rounding bug in last commit that would have caused the problem to not
be completely fixed.
1995-09-20 13:01:17 +00:00
Jordan K. Hubbard
92e1dc86fa Add `visual' command to help menu.
Fix a small benign display bug.
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-20 12:07:22 +00:00
Jordan K. Hubbard
8355a05ba8 Now supports expand all' and collapse all'.
Now comes up in the old line-oriented interface by default for serial
and pcvt folk with a `visual' command for going to the visual interface.
Best of both worlds, no?
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-20 06:48:54 +00:00
Bruce Evans
2e69f359d1 Fix benign type mismatches in isa interrupt handlers. Many returned int
instead of void.
1995-09-19 18:55:37 +00:00
Poul-Henning Kamp
ccdbc84cba The stuff needed to remove a pccard with a sio port on it...
Not optimal, but pretty solid.
1995-09-19 12:37:41 +00:00
Stefan Eßer
a3adc4f8c5 Revert most changes of previous commit.
Changes relative to 1.12:
- Put extra instruction between outl()/inl() sequence to prevent the
  old value being read back because of the bus capacitance.
- Additional check for existence of register at CONF2_ENABLE_PORT.
1995-09-18 21:48:39 +00:00
Paul Traina
0b4a1769be Our existing Cyrix cache-disable code was short-cutting the steps for
setting the control register.  Make the read and write operations two
completely separate steps.

While we're at it, pull in the whole set of Cyrix cache control options
from NetBSD-current,  since a few motherboards do the right thing with
the Cyrix chip.

There is no option to disable the internal cache completely (yet).

Reviewed by:	pst
Obtained from:	NetBSD
1995-09-16 21:31:55 +00:00
Bruce Evans
191e1a59da Remove transitory labelling code. Labels are now handled by essentially
the original 4.4lite code.  Machine Specific Partitions are now handled
separately.
1995-09-16 17:04:06 +00:00
Bruce Evans
72b3459d61 Add comments about the bogus zeroing of the drive number for floppies
and the bogus dummy partition table.
1995-09-16 13:51:20 +00:00
Bruce Evans
45c7e5044d Fix recent breakage of non-floppies with 36 sectors/track.
Disable support for not looking at the label when booting from fd2d
(15-sector floppies in drive 2) and fd2b (other floppies in drive 2).
1995-09-16 13:03:59 +00:00
Nate Williams
e21fd30049 When confronted with a drive that says there are 36 sectors/track,
ignore and set it to 18 sectors/track.  This allows FreeBSD to boot with
2.88MB floppies which are used in older ThinkPads.

Submitted by:	Random Net person whose name I lost
1995-09-16 05:02:37 +00:00
David Greenman
97e112628f Check for page being resident when doing I/O with /dev/kmem and return
EFAULT if it is not resident. This prevents the system from manufacturing
a zero-fill page for unused but allocated areas of the kernel's VM. This
should fix the "CMAP busy" panic that some people saw during system
startup.
1995-09-15 23:49:23 +00:00
Jordan K. Hubbard
6c11cc590a Make dsp0 work for playback.
Submitted by:	Alain Kalker <alain@Wit401402.student.utwente.nl>
1995-09-15 22:04:03 +00:00
Stefan Eßer
2d14418625 Another try to determine the PCI bus configuration mode (and whether
there is a PCI bus at all) ...

- Do not expect the chip sets to follow even very clearly expressed
  requirements of the PCI 2.0 spec.
- Do not read back the value just written to an I/O port without making
  sure that some other data have crossed the bus in between ...
1995-09-15 21:43:45 +00:00
Andreas Schulz
9af3551d46 Correct the calculation of the unit number. it is not minor(x) & 3. It need
to be shifted >> 3. The last bits are the partition info.
1995-09-15 10:45:42 +00:00
David Greenman
0937c08c4e 1) Killed 'BSDVM_COMPAT'.
2) Killed i386pagesperpage as it is not used by anything.
3) Fixed benign miscalculations in pmap_bootstrap().
4) Moved allocation of ISA DMA memory to machdep.c.
5) Removed bogus vm_map_find()'s in pmap_init() - the entire range was
   already allocated kmem_init().
6) Added some comments.

virual_avail is still miscalculated NKPT*NBPG too large, but in order to
fix this properly requires moving the variable initialization into locore.s.
Some other day.
1995-09-15 08:31:19 +00:00
David Greenman
d69caef5ed Killed isa_allocphysmem() and isa_freephysmem(). They are completely used
functions. This file is disgusting; the isa DMA stuff is especially bad and
should be rewritten.
1995-09-15 03:10:06 +00:00
David Greenman
6ce5b54918 1) Don't double map the kernel page tables. The double mapping was never
used and went a long way toward confusing the code.
2) Fix proc0's initial stack to not be 48 bytes smaller than it needs to
   be.
3) Correct comment about 'first' arg to init386().
1995-09-15 02:13:18 +00:00
Stefan Eßer
d7ea35fc88 Improved verification of configuration space accesses working:
Scan for devices instead of assuming that device 0 is present on bus 0
of every PCI motherboard.
1995-09-14 20:27:31 +00:00
Stefan Eßer
cda6791190 Make the PCI host bridge probe code more robust when dealing with chip sets
that use configuration mode 1, but still violate the PCI 2.0 specs ...
(Required for the Compaq Proliant, for example.)
1995-09-13 17:03:47 +00:00
Peter Wemm
832e06d4dc From Bruce Evans: (prototype related changes, other cleanups)
Add prototypes.  Use static for function definitions to match existing
prototypes.  Otherwise leave functions that should be static as extern.
TODO: declare everthing except sidriver and siintr as static.  I use
some new cdevs registration functions to do this for syscons and pcvt.

Fix siintr() to match its prototype in ioconf.c (don't return anything).
This may break the eisa support, but Julian says that eisa interrupts
never worked anyway.

(EISA support was never tested anyway - Peter)

Submitted by:	bde
1995-09-13 08:45:28 +00:00
Peter Wemm
fbb8b7bb60 Move some kernel-only stuff to a kernel-only file.
Submitted by:	bde
1995-09-13 08:39:28 +00:00
Sean Eric Fagan
e6df7bbb57 Unlock the vnode after checking permissions; this is necessary to prevent
a panic whenever an iBCS2 file is exec'd.

Obtained from: FreeBSD
1995-09-13 02:12:51 +00:00
Peter Wemm
c91214d4b8 Restore two checks for TS_ISOPEN.. I managed to panic my machine
without them..  I thought TS_CONNECTED implied TS_ISOPEN, but apparently
that's not the case.
1995-09-11 06:28:38 +00:00
Bruce Evans
e7451974bb Make pcvt and syscons live in the same kernel. If both are enabled, then
the first one in the config has priority.  They can be switched using
userconfig().

i386/i386/conf.c:
Initialize the shared syscons/pcvt cdevsw entry to `nx'.

Add cdevsw registration functions.

Use devsw functions of the correct type if they exist.

i386/i386/cons.c:
Add renamed syscons entry points to constab.

i386/i386/cons.h:
Declare the renamed syscons entry points.

i386/i386/machdep.c:
Repeat console initialization after userconfig() in case the current
console has become wrong.  This depends on cn functions not wiring down
anything important.

sys/conf.h:
Declare new functions.

i386/isa/isa.[ch]:
Add a function to decide which display driver has priority.  Should be
done better.

i386/isa/syscons.c:
Rename pccn* -> sccn*.

Initialize CRTC start address in case the previous driver has moved it.

i386/isa/syscons.c, i386/isa/pcvt/*
Initialize the bogusly shared variable Crtat dynamically in case the
stored value was changed by the previous driver.

Initialize cdevsw table from a template.

Don't grab the console if another display driver has priority.

i386/isa/syscons.h, i386/isa/pcvt/pcvt_hdr.h:
Don't externally declare now-static cdevsw functions.

i386/isa/pcvt/pcvt_hdr.h:
Set the sensitive hardware flag so that pcvt doesn't always have lower
priority than syscons.  This also fixes the "stupid" detection of the
display after filling the display with text.

i386/isa/pcvt/pcvt_out.c:
Don't be confused the off-screen cursor offset 0xffff set by syscons.

kern/subr_xxx.c:
Add enough nxio/nodev/null devsw functions of the correct type for syscons
and pcvt.
1995-09-10 21:36:12 +00:00
Bruce Evans
f2cb5630d0 cons.c:
Split off cdevsw initialization in cninit() into a new function
cninit_finish() that isn't called until all hardware device drivers
have been attached.  The bdevsw entry of the driver for the physical
console needs to be hooked after the physical driver has been
attached in case the attachment modified the entry.

Rearrange cninit() to avoid changing cn_tab until the driver for the
physical console has been initialized, so that the previous driver
(if any) can be used for debugging.

Start removing half-baked lint support.  bdevsw functions usually have
unused args but /*ARGSUSED*/ was used for only about 5% of them.

cons.h:
Declare cn_init_finish().

autoconf.c:
Call cn_init_finish().

Start adding prototypes.  Functions with bogus linkage (extern where
static is probably should be static) are explicitly declared as extern
so that the can be found easily (extern in a non-header is usually
wrong).

All:
Continue cleaning up init stuff: init functions shall be static;
INITs should be at the start of files...
1995-09-10 18:57:26 +00:00
David Greenman
4590fd3a2a Fixed init functions argument type - caddr_t -> void *. Fixed a couple of
compiler warnings.
1995-09-09 18:10:37 +00:00
Søren Schmidt
2bf07b2bd7 Patch to the atapi driver, by Serge V.Vakulenko, minor changes
by me...

Original message:

This patch upgrades the ATAPI CD-ROM driver to version 1.3.

It has three bugs fixed:

1) The `controller not ready' message at startup and later.
   It was caused by staled media change bit.

2) Incorrect shuffling of model string for some drives (NEC, Mitsumi).

3) Handling of drives which report itself as been of direct-access type,
   instead of CD-ROM type.

There is one known bug which is not fixed yet -- probing
in absense of IDE disks. A work-around exists though (thanks Steve!).
If you have no IDE disks attached, then remove them from the kernel
config file to make the CD-ROM attach correctly.
Unfortunately, there is no way to disable them from the kernel
interactive config mode.

Reviewed by:	sos (Soren Schmidt)
Submitted by:	vak@gw.cronyx.msk.su (Serge V.Vakulenko)
1995-09-09 11:41:04 +00:00
Bruce Evans
11d2504079 Actually, 97 out of 304 devsw functions had benignly mismatched types. 1995-09-08 19:57:13 +00:00
Julian Elischer
5116eb02e2 Added devfs nodes for other devices.. (didn't read the docs correctly) 1995-09-08 19:01:28 +00:00
Julian Elischer
f6b98df677 added ID strings so we know what version we have... 1995-09-08 18:30:34 +00:00
Bruce Evans
1c6d84074a Declare `geomtab' as static. It was bogusly shared between the asc and
the gsc drivers.
1995-09-08 16:38:52 +00:00
Bruce Evans
4fbadacb81 3 out of 5 new devsw functions had benign type mismatches. 1995-09-08 16:27:55 +00:00
Bruce Evans
6003967057 Fix benign type mismatches in devsw functions. 82 out of 299 devsw
functions were wrong.
1995-09-08 11:09:15 +00:00
Julian Elischer
084860b349 DAng! forgot this as well
cdevsw entry (71) for the asc scanner driver
1995-09-08 03:37:51 +00:00
Julian Elischer
c1ab55a72e Submitted by: Luigi Rizzo
Obtained from: Luigi and gunther
yeah I forgot this one....
1995-09-08 03:22:00 +00:00
Julian Elischer
a800f455b2 Submitted by: Luigi Rizzo (luigi@iet.unipi.it)
Obtained from: Luigi Rizzo and Gunther Schadow
config support for the asc driver and an example in LINT
1995-09-08 03:20:10 +00:00
David Greenman
f6eca02d7a 1) Really print 'real' memory - use Maxmem, not physmem.
2) Output K bytes instead of pages as this means something to more people.
3) Moved printf of avail memory to after vm_bounce_init() call so that
   bounce buffers are included in the figure.
4) Killed initcpu(); it's an unused vestige from the VAX.
1995-09-08 03:19:47 +00:00
Julian Elischer
819fb11f5e Submitted by: Luigi Rizzo (luigi@iet.unipi.it)
Obtained from: Luigi Rizzo and Gunther Schadow
Kernel support for the asc scanner driver
1995-09-08 03:14:00 +00:00
Jordan K. Hubbard
8152c5c72c Render devices inactive properly.
Protect against name overflow.
Submitted by:	Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-07 22:19:45 +00:00
David Greenman
0e1815bb54 Minor cleanup and (very) small micro optimization to Xsyscall (and the
linux one)..
1995-09-07 21:36:17 +00:00
David Greenman
dd4e7c343b Killed unnecessary \r. 1995-09-07 21:11:34 +00:00
Steven Wallace
6edd39c483 Make files get the NWDC definition from "wdc.h" instead of "wd.h".
This way, if using wd and/or wcd devices, the wdc controller code
will get compiled.
1995-09-07 08:20:18 +00:00
Steven Wallace
ad1472b217 Change atapi.c to depend on the ATAPI option.
Add wd.c entry based on the wdc controller.
This will enable compilation of wcd device without wd.
1995-09-07 08:17:19 +00:00
Bill Paul
ee1d861fbe Put back the "real memory =" printf() that vanished when the code to
handle holes in memory was added.
1995-09-06 16:13:31 +00:00
John Dyson
5e887e181c Correct the location of a "return". This can/will cause system crashes. 1995-09-06 05:06:18 +00:00
Jordan K. Hubbard
af72df8477 New version of userconfig from Michael Smith. Give this one a try,
folks!  Let him know what you think.
Submitted by: Michael Smith <msmith@atrad.adelaide.edu.au>
1995-09-06 03:36:36 +00:00
Justin T. Gibbs
67f06b6142 Clean up a few nits in the aic7xxx driver:
1) Make the driver "quiet" by sticking most boot messages behind
	bootverbose conditionals.  This means that you won't see the
	sync and wide negotiation, but you will find out if they fail.

2) Add support to the 93cx6 serial eeprom code to read at an abitrary
	offset.  This is needed so that we can access the second half
	of the eeprom on 3940 cards where the second channel's config
	is stored.

3) Add flags argument to ahcprobe().  This is used by the pci probe code
	to tell the generic driver that an adapter should be treated
	as a channel B device as well as notify it of the presence of
	external SCB SRAM.  These are needed for some motherboard
	implementations of the aic7870 and for the 3940 controllers.

4) Print "Channel A"/"Channel B" instead of "Single Channel" for the
	two busses of the 3940.  I received many reports of confusion
	about how the 3940 was probed since most people belived that
	only one ahc entry was needed.  This will hopefully make it
	clearer.

5) Walk the SCBs to determine just how many their are if external SCB
	ram is detected.

6) Hard code that external SCB ram is present for the 3940 since it doesn't
	use the documented reporting facility for reporting the SRAM. :(
	255 commands per channel are supported on the 3940.

7) Read the seeprom starting at addres 32 for the second channel of the
	3940 so we get the right info for that channel.

8) Clean up printing of the "Disabling tagged queuing message".

9) Queue timeouts if they occur while we are handling a timeout.  The code
	was totally unprotected in this scenario.
Reviewed by: Timeout code reviewed by David Greenman <davidg>
1995-09-05 23:52:03 +00:00
Justin T. Gibbs
0be4f315f7 ahcprobe now takes a flags argument. For EISA/VL adapters set it to
AHC_FNONE.
1995-09-05 23:39:31 +00:00
Jordan K. Hubbard
c734076e9c Yet Another Sound Patch (YASP :-). This should fix the problems with
the cs4231, soundblaster, and pas-16 that people have been reporting.
Submitted by:	james
1995-09-05 19:48:58 +00:00
Bruce Evans
08ab924c0d The cmd' and addr' args to psmioctl() were in the wrong order. This
probably broke MOUSEIOCREAD which is the only ioctl supported.
1995-09-05 06:23:39 +00:00
Julian Elischer
193e7834a5 Submitted by: John Lind (john@starfire.mn.org)
/*
+  * Code for MTERASE added by John Lind (john@starfire.mn.org) 95/09/02.
+  * This was very easy due to the excellent structure and clear coding
+  * of the original driver.
+  */
1995-09-05 05:45:34 +00:00
Jordan K. Hubbard
8d928fda4e Now apply local changes to make this compile in 2.2-current (sorry about
delay between commit of original author's sources and my changes - I was
called away).
1995-09-03 23:55:53 +00:00
John Dyson
a29b63cb73 Machine dependent routines to support pre-zeroed free pages. This
significantly improves demand zero performance.
1995-09-03 20:39:22 +00:00
Jordan K. Hubbard
a50cd483d2 Bring the Digiboard driver (ALPHA version) into -current. Includes
latest patches for PC/Xe boards.
Submitted by:	"Serge A. Babkin" <babkin@hq.icb.chel.su>
1995-09-03 19:53:11 +00:00
Julian Elischer
8af5d536ff devfs changes..
changes to allow devices that don't probe (e.g. /dev/mem)
to create devfs entries
this required giving 'configure' its own SYSINIT entry
so we could duck in just before it with a DEVFS init
and some device inits..
my devfs now looks like:
./misc
./misc/speaker
./misc/mem
./misc/kmem
./misc/null
./misc/zero
./misc/io
./misc/console
./misc/pcaudio
./misc/pcaudioctl
./disks
./disks/rfloppy
./disks/rfloppy/fd0.1440
./disks/rfloppy/fd1.1200
./disks/floppy
./disks/floppy/fd0.1440
./disks/floppy/fd1.1200
also some sligt cleanups.. DEVFS needs a lot of work
but I'm getting back to it..
1995-09-03 05:43:50 +00:00
Julian Elischer
623463ca4a Cosmetic changes to make a comment more nearly reflect reality 1995-09-03 05:36:13 +00:00
Jordan K. Hubbard
d1a599c2de Something got spammed in my 2.2 work tree (don't know how :( ) and
had a 2.1 tag, thus sending these two changes into the 2.1 branch instead
of -current.  Argh.  I may bring these changes into the 2.1 anyway (they're
benign there) so I'm not going to admin them out of 2.1 for the time
being.
1995-09-01 20:53:44 +00:00
Jordan K. Hubbard
4fb1d90a95 Jim's attempt to fix the new sound code somewhat. Tested with
the pas-16, GUS, and GUS-MAX cards.  Sound blaster owners, please
test also!
Submitted by:	Jim Lowe <james>
1995-09-01 19:09:11 +00:00
Jordan K. Hubbard
49148d6390 Jim's latest fixes.
Submitted by:	james
1995-09-01 00:25:18 +00:00
Bruce Evans
8d7459c596 Declare vfs_mountroot() in the right place. 1995-08-30 01:34:28 +00:00
Bruce Evans
154042d309 Remove relocation of Crtat. Drivers already relocate it (somewhat
bogusly).  We used to undo the driver relocation here before doing
a somewhat less bogus relocation.  The result was a null relocation
here.
1995-08-29 23:45:20 +00:00
Jordan K. Hubbard
dbae4437e2 Address Bruce's mmap concerns in this driver too.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1995-08-29 16:44:46 +00:00
Jordan K. Hubbard
1d86961e14 Kernel components of Matrox Meteor driver.
Submitted by:	Mark Tinguely <tinguely@plains.nodak.edu> and Jim Lowe <james>
1995-08-28 17:03:18 +00:00
Guido van Rooij
de319b9419 Add SIOCGIFADDR ioctl so rarpd actually works with the if_ep interface. 1995-08-28 12:01:17 +00:00
Julian Elischer
2b14f991e6 Reviewed by: julian with quick glances by bruce and others
Submitted by:	terry (terry lambert)
This is  a composite of 3 patch sets submitted by terry.
they are:
New low-level init code that supports loadbal modules better
some cleanups in the namei code to help terry in 16-bit character support
some changes to the mount-root code to make it a little more
modular..

NOTE: mounting root off cdrom or NFS MIGHT be broken as I haven't been able
to test those cases..

certainly mounting root of disk still works just fine..
mfs should work but is untested. (tomorrows task)

The low level init stuff includes a total rewrite of init_main.c
to make it possible for new modules to have an init phase by simply
adding an entry to a TEXT_SET (or is it DATA_SET) list. thus a new module can
be added to the kernel without editing any other files other than the
'files' file.
1995-08-28 09:19:25 +00:00
Steven Wallace
fe89a532f1 Modified linux_readdir() function to properly handle Linux readdir()
calls with a byte size of 1.  This special case was not
correctly emulated.  Now programs such as a simple 'ls' to a commercial
Macintosh emulator called 'executor' will work correctly.
1995-08-28 00:50:08 +00:00
Joerg Wunsch
0f700bfda2 Add a comment that a user with many open windows under X might need to
bump CHILD_MAX.

Closes PR # conf/708: CHILD_MAX set rather low...

Submitted by:	careilly@monoid.cs.tcd.ie
1995-08-27 14:13:04 +00:00
Bruce Evans
512644a44d Don't declare a nonexistent function.
Fix formatting of recent changes.
1995-08-26 20:46:43 +00:00
Bruce Evans
fadc51bdc6 Remove "memory" clobber statement from enable_intr(). Enabling interrupts
doesn't invalidate loaded variables.

Fix formatting of recent changes.
1995-08-26 20:45:59 +00:00
Bruce Evans
826c5c4980 Convert \n to \r\n in serial_putchar(). 1995-08-26 20:03:43 +00:00
Bruce Evans
7ae06c2b2e Remove extra arg from one call to uha_done(). 1995-08-25 20:39:01 +00:00
Bruce Evans
ac0418c3ae Remove extra arg from the call to ds_crc(). 1995-08-25 19:50:15 +00:00
Bruce Evans
b2c4393679 Remove extra args from the calls to getit(). The bug was benign with the
default function call convention.
1995-08-25 19:24:56 +00:00
David Greenman
c0e5de7d88 Moved setting of VTEXT flag into the appropriate image activators. This
fixes a bug where linux binaries would get the flag set inappropriately.
1995-08-24 10:32:37 +00:00
Poul-Henning Kamp
0d2966d3f2 Andrew McRae's pcmcia/pccard code, the kernel part.
This is still very green, but I have managed to get my modem working.
Lots of work still to do, but now at least we can commit it. /phk

Reviewed by:	phk
Submitted by:	Andrew McRae <andrew@mega.com.au>
1995-08-24 08:56:20 +00:00
Justin T. Gibbs
07b1c6b3c9 Remove hard coded assumption that SCSI busses have 7 targets.
This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:34 +00:00
Justin T. Gibbs
ea46ac014f Remove hard coded assumption that SCSI busses have 7 targets.
Change some leading spaces to tabs.

This change forces the controller drivers to allocate a scsibus_data struct
via a call to scsi_alloc_bus(), fill in the adapter_link field, and optionally
modify any other fields of the struct.  Scsi_alloc_bus() initializes all fields
to the default, so the changes in most drivers are very minimal.  For drivers
that support Wide controllers, the maxtarg field will have to be updated to
allow probing of all targets (for an example, look at the aic7xxx driver).

Scsi_attachdevs() now takes a scsibus_data* as its argument instead of an
sc_link*.  This allows us to expand the role of the scsibus_data struct for
other bus level configuration setings (max number of transactions, current
transaction opennings, etc for better tagged queuing support).

Reviewed by: Rodney Grimes <rgrimes>, Peter Dufault <dufault>, Julian Elischer <julian>
1995-08-23 23:03:17 +00:00
Jordan K. Hubbard
215b0e62d5 Don't clip d_ncylinders to value used by partitions. 1995-08-23 11:43:45 +00:00
Jordan K. Hubbard
b8ef36f62e Properly initialize the d_ncylinders field to the maximum number of
cylinders.
1995-08-23 10:41:57 +00:00
Paul Traina
abdd03a364 Clean up compilation warning. 1995-08-23 05:26:21 +00:00
Peter Wemm
5275513295 Fix some outstanding bugs in the DCD modem control..
Implement the slip/ppp "hotchar" detection to improve latency
Debug the L_RINT bypass code..
Fix an interesting feature that caused 8-bit chars to loose their top bit
in some circumstances..

This finishes the remaining outstanding problems that I'm aware of, with
the exception of efficiency...  Optimizing can come later after it's fully
debugged.
1995-08-22 00:48:17 +00:00
Peter Wemm
d3497bc8de add a new Debug mode.. "DBG_OPTIM" - for observing the L_RINT bypass 1995-08-22 00:42:07 +00:00
David Greenman
4219d2b2ac A couple of micro optimizations to improve NULL syscall performance by
about 2%.
1995-08-21 18:06:48 +00:00
Andreas Schulz
3852c3082c Correct a pathname. The isdn tells to look for a
/usr/src/gnu/usr.sbin/docs/INSTALL but this files resides in
/usr/src/gnu/usr.sbin/isdn/docs/INSTALL.
1995-08-20 15:52:10 +00:00
David Greenman
b131795bda Fixed a few bugs and annoyances with boot():
1) deal with cold flag better
2) check for key input more often
3) get rid of unused variables
4) minor formatting improvements
1995-08-20 04:41:02 +00:00
Joerg Wunsch
ea76f9453e First part of importing the Japanese `od' driver.
Claim the major numbers (before sombedoy else jumps in again and
claims the slots for his foocd driver :-), install all the hooks that
are required.

While i've been at this, i've cleaned up some of the routines at the
end of i386/conf.c; all the importers of the latest CDROM drivers
forgot to fill in the appropriate information.  The `ata' driver
(vapourware?) does only occupy a slot in the bdevsw[] array, btw.

The actual import of the code does require a minor change in the SCSI
subsystem, and i want to have this reviewed by Peter first, so it will
be deferred for some days.  The driver is already working for me
though.

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-08-19 15:59:35 +00:00
Jordan K. Hubbard
6788ce49a0 Bring in Serge Vakulenko's IDE CDROM (ATAPI) driver. A number of
people have now indicated to me that it's working more than well
enough to bring into -current.
Submitted by:	Serge Vakulenko <vak@cronyx.ru>
1995-08-18 11:26:35 +00:00
David Greenman
d0d1c65888 Killed some unused stuff inherited from Bill Jolitz. Note that since
this changes the size of the pcb struct, gdb will need to be rebuilt
or debugging won't work correctly.

Reviewed by:	Bruce Evans
1995-08-17 11:30:03 +00:00
Nate Williams
a16b708542 Fix the 3C589 driver to work with the BNC connector.
Note, I tested this on a NEC Versa, IBM 750C, and a IBM 755CX w/out
problems.  The card still works fine in TP mode.

Submitted by:	schwarz@alpharel.com (Steve Schwarz)
Reviewed by:	jleppek@suw2k.ess.harris.com (James Leppek)
1995-08-16 23:34:28 +00:00
Nate Williams
a42b8f1321 Added missing semi-colon in the XT_KEYBOARD code. W/out it the code
would not compile.
1995-08-16 22:36:43 +00:00
Bruce Evans
bf25be48a5 Make everything except the unsupported network sources compile cleanly
with -Wnested-externs.
1995-08-16 16:14:28 +00:00
Bruce Evans
8c13738f38 Make everything except the unsupported network sources compile cleanly
with -Wnested-extern.
1995-08-16 16:11:48 +00:00
Jordan K. Hubbard
cb470b8660 Remove the fundamentally useless probe and attach commands I added.
They're landmines.
1995-08-16 07:32:51 +00:00
Joerg Wunsch
54e98df56b Increase the DELAY_GETREPLY to 5000000. Not dangerous, this is
actually a timeout only.  The existing behaviour caused a

  mcd0: timeout getreply

at halt/reboot time.

Submitted by:	graichen@sirius.physik.fu-berlin.de (Thomas Graichen)
1995-08-15 19:56:59 +00:00
Joerg Wunsch
75da8757fa Install kzip.o with BINMODE=444.
Submitted by:	graichen@sirius.physik.fu-berlin.de (Thomas Graichen)
1995-08-15 19:36:02 +00:00
Bruce Evans
a722b904d7 Fake a call frame for traps so that `gdb -k' can report where fatal
traps occurred.  This also helps ddb backtrace through trap frames.
Backtracing through syscall and interrupt frames still doesn't work
but it is relatively unimportant and more expensive to fix.
1995-08-15 19:23:33 +00:00
Justin T. Gibbs
a8f7c59522 Properly prototype the ahc_done routine, and pass the right number of
arguments to it in one call in the reset code. (doh!)
1995-08-15 08:54:21 +00:00
Justin T. Gibbs
7825f18854 Correctly timeout scb instead of active_scb which is carying the bus device
reset in this case.
1995-08-14 08:29:15 +00:00
Peter Wemm
1cf4903ecd Slight change to the location of the default termios flags to make them
a little easier to change, and revert to the "standard" specialix behavior
with CRTSCTS enabled in the initial cflag (but configurable).
1995-08-13 15:44:37 +00:00
Peter Wemm
bb65956af3 Next round of cleanups. Some more debugging hooks added, si_softc definition
moved to the driver proper, so that <machine/si.h> can be #included by user
programs without needing to include stuff from /sys/i386/isa..
Various (now) redundant features removed, eg: the locks on IXANY and HWFLOW
as these are now done with the "initial" and "lock" termios devices.
Note that it still (for reasons unknown) appears to be masking data to
7-bit with ppp - hence the cleanup to support the debugging via 'sicontrol'
1995-08-13 15:18:05 +00:00
Bruce Evans
6097a1e94f Disable fifos in sioclose(). Closes PR 576. 1995-08-13 07:49:35 +00:00
Andreas Schulz
b192d8d90b Correct a little typo in LINT. trouble is -> trouble if. 1995-08-12 13:40:42 +00:00
Joerg Wunsch
7fe369dc9c Document two specials of the `lpt' driver: the port address can be
specified as `?', and the irq and vector clauses may be omitted,
forcing the port into polled mode.
1995-08-11 17:18:42 +00:00
Peter Wemm
f64003830d Remove a deliberate #warning.. It's not polite, because I listed the the
driver in i386/conf/LINT...
Reviewed by:
Submitted by:
Obtained from:
1995-08-10 08:48:34 +00:00
Peter Wemm
1d0be877a4 Drat! I forgot to add this part of the Specialix Driver..
This is the firmware that is downnloaded onto the host card during boot.
Obtained from:Specialix International, via Andy Rutter <andy@acronym.co.uk>
1995-08-10 08:10:57 +00:00
Peter Wemm
b77990be3e Bring in my long-overdue version of the Specialix driver.
This was originally ported to BSDI by Andy Rutter <andy@acronym.co.uk>.
At the end of the day, this code has very little in common with Andy's
version, or the Specialix SYSV version.  Essentially it has been gradually
and almost completely rewritten, with LOTS of advice and inspiration from
Bruce Evans.  There are a couple of missing bits still, but they are minor.

The user-mode "sicontrol" program is in sad shape and will come in soon.
Transparent printing died a timely death.. Maybe later..

Jeremy Rolls @ Specialix (Development directory) has confirmed this is OK
to distribute, and Andy personally sent me his version that I started from.

Although this driver stood up to a nasty stress-test in this form, I am not
confident that there are no nasty bugs lurking.

People are welcome to try it, but dont go out and buy one just yet.. :-)
And *DONT* use it on a mission-critical machine... This is ALPHA QUALITY!
1995-08-09 13:13:47 +00:00
Peter Wemm
ffe1908145 Add hook for EISA probe for Specialix EISA card.
Reviewed by:
Submitted by:
Obtained from:
1995-08-09 13:00:25 +00:00
Peter Wemm
c48237107d Add Specialix driver to LINT
Reviewed by:
Submitted by:
Obtained from:
1995-08-09 12:58:50 +00:00
John Dyson
a4353b3b5e Fixed my usage of "asm" instead of "__asm" and "volatile" instead
of "__volatile".  Note also that the original mods that were submitted
by me were as a result of a discussion between various FreeBSD contributors.

Submitted by:	peter@haywire.dialix.com (Peter Wemm)
1995-08-09 02:39:32 +00:00
John Dyson
302cf5869a Fixed a problem that malloc(..,..,M_NOWAIT) was being called without checking
for return values.  It just so happens that in the cases where it is likely
to fail, it is okay to change the M_NOWAIT to M_WAITOK -- and all will
be well.  This problem was manfest as a panic very regularly on a 4MB
system right after bootup.
1995-08-08 05:14:40 +00:00
John Dyson
8966b85c8f Make the spl oriented inline functions less likely to allow
potentially volatile memory to be kept in registers during
the "call" (inline expansion.)  Do the same for pmap_update.
1995-08-08 04:50:52 +00:00
Peter Wemm
958c15a053 Grab next major (68) for the Specialix SI/XIO driver which is due to
come in RSN.  As Jordan said "First in, first served.."
1995-08-05 21:33:04 +00:00
Justin T. Gibbs
c83d01159a Update the SCB controll byte bit definitions to match new SCB_DISCENB bit.
Remove "#ifdef NOT_YET"s since the features they pertain too are committed
now.
1995-08-05 17:32:55 +00:00
Andrey A. Chernov
f49f5fa852 Allow any speed from 0..76800
Reviewed by:
Submitted by:
Obtained from:
1995-08-02 10:17:35 +00:00
Jordan K. Hubbard
d660e3ae8d Sync to author's Version 1.3.
Submitted by:	james
1995-08-01 07:07:42 +00:00
Jordan K. Hubbard
a2048b9c26 Sync to reality for the Gravis Ultrasound MAX card. 1995-08-01 07:05:16 +00:00
Jordan K. Hubbard
8f5171930e Reserve space for Jim Lowe's impending Matrox Meteor card driver.
Submitted by:	james
1995-07-31 22:06:55 +00:00
Bruce Evans
7922019b1c Eliminate the use of TS_TIMEOUT and ttstrt(). These are for handling
tab delays etc.  pcvt was using them to recover from a (rarely lost)
race.  Use a little more locking to avoid the race.
1995-07-31 21:35:17 +00:00
Bruce Evans
1856afe955 Sleep on a better address to wait for output to drain out of the
hardware.  Set the sleep-on flag for the address so there is more
than a small chance that the sleep address is actually used (this
used to work by timing out).  Don't bother clearing the sleep-on
flag after a timeout here or elsewhere since leaving it set just
generates a few null calls to wakeup().
1995-07-31 21:10:36 +00:00
Bruce Evans
9fa18570a2 Obtained from: partly from ancient patches of mine via 1.1.5
Introduce TS_CONNECTED and TS_ZOMBIE states.  TS_CONNECTED is set
while a connection is established.  It is set while (TS_CARR_ON or
CLOCAL is set) and TS_ZOMBIE is clear.  TS_ZOMBIE is set for on to
off transitions of TS_CARR_ON that occur when CLOCAL is clear and
is cleared for off to on transitions of CLOCAL.  I/o can only occur
while TS_CONNECTED is set.  TS_ZOMBIE prevents further i/o.

Split the input-event sleep address TSA_CARR_ON(tp) into TSA_CARR_ON(tp)
and TSA_HUP_OR_INPUT(tp).  The former address is now used only for
off to on carrier transitions and equivalent CLOCAL transitions.
The latter is used for all input events, all carrier transitions
and certain CLOCAL transitions.  There are some harmless extra
wakeups for rare connection- related events.  Previously there were
too many extra wakeups for non-rare input events.

Drivers now call l_modem() instead of setting TS_CARR_ON directly
to handle even the initial off to on transition of carrier.  They
should always have done this.  l_modem() now handles TS_CONNECTED
and TS_ZOMBIE as well as TS_CARR_ON.

gnu/isdn/iitty.c:
Set TS_CONNECTED for first open ourself to go with bogusly setting
CLOCAL.

i386/isa/syscons.c, i386/isa/pcvt/pcvt_drv.c:
We fake carrier, so don't also fake CLOCAL.

kern/tty.c:
Testing TS_CONNECTED instead of TS_CARR_ON fixes TIOCCONS forgetting to
test CLOCAL.  TS_ISOPEN was tested instead, but that broke when we disabled
the clearing of TS_ISOPEN for certain transitions of CLOCAL.

Testing TS_CONNECTED fixes ttyselect() returning false success for output
to devices in state !TS_CARR_ON && !CLOCAL.

Optimize the other selwakeup() call (this is not related to the other
changes).

kern/tty_pty.c:
ptcopen() can be declared in traditional C now that dev_t isn't short.
1995-07-31 21:02:00 +00:00
Bruce Evans
f3b37f91c1 Improve input flow control.
Use input buffer watermarks of TTYHOG-512 (high) and (high)*7/8
(low) instead of TTYHOG/2 (high) and TTYHOG/5 (low) to agree with
some drivers.  512 is magic and some things depended on TTYHOG/2
>= TTYHOG-512 to work; now they depend on the 512 magic not changing
and TTYHOG-512 being significantly larger than 0.  This should be
handled in ttsetwater().

Separate the decision about whether to do input flow control from
doing it.  ttyblock() now just starts input flow control (hardware
and/or software) and there is a new function ttyunblock() to stop
it.  The decisions are the same except for the watermark changes
and allowing for input expansion for PARMRK.

When flushing input, try harder at first to send a start character
if required, but give up if the first attempt fails.

cy.c, rc.c, sio.c:
Simplify: let ttyinput() handle input flow control if it is not
being bypassed.  Use ttyblock() to start flow control otherwise.

rc.c:
Use same input flow control test as elsewhere: test in a more
efficient order and start flow control at >= highwater instead of
at > highwater.
1995-07-31 18:29:51 +00:00
Peter Dufault
c8bb1269a8 Return the correct number of I/O ports as part of the probe so that the
conflict resolution works.
1995-07-31 09:38:21 +00:00
Justin T. Gibbs
185363acb2 Long overdue, more complete, reset code. These changes implement a
BUS DEVICE RESET followed by BUS RESET failure recovery strategy including
the necesary renegotiation of sync/wide transfers after recovery completes.

Clean up debugging code to make it more finely selectable.  Reset code
debugging is enabled for now so I can get more feedback on how this
code behaves in real life.
1995-07-31 08:25:36 +00:00
David Greenman
a705fd3e48 Fix a bug in my disabled version of trap_pfault()...curpcb may be NULL even
when curproc isn't. This condition occurs at system startup and perhaps
at other times.
1995-07-30 17:49:24 +00:00
Bruce Evans
d49c99ba9c Fix enough of the recently introduced brokenness for LINT to compile.
The U6850* changes in sound_config.h are probably wrong.

Recent commits lost:
- include paths.
- copyrights.
- cvs Ids.
- infamous whitespace changes.
- other cosmetic changes.
1995-07-29 14:20:54 +00:00
Paul Richards
73f0203186 The lemac driver didn't pass transmitted packets to bpf. Now it does.
Reviewed by:
Submitted by:
Obtained from:
1995-07-29 13:00:17 +00:00
Bruce Evans
28f8db1403 Eliminate sloppy common-style declarations. There should be none left for
the LINT configuation.
1995-07-29 11:44:31 +00:00
Bruce Evans
772ec2b7a9 Removed the poorly named unused bogus common variable `total'. It was
obsoleted by the VM_METER sysctl a long time ago.
1995-07-29 10:47:05 +00:00
Bruce Evans
611c22c117 Don't let IXOFF or ECHONL stop the setting of TS_CAN_BYPASS_L_RINT. IXOFF
is handled at a low level, and ECHONL only applies if ICANON is set,
although tty.c sometimes bogusly applies it when ICANON isn't set.
1995-07-29 08:33:13 +00:00
Bruce Evans
4ce7d32178 Always wake up writers after clearing TS_BUSY. This will soon be
essential when I fix excessive wakeups for output-below-low-water.
In cy.c and sio.c, wake up via the driver start routine to also
eliminate duplicated code involving the clearing of TS_TTSTOP.

Always (except in code to be replaced soon) call driver start
routine directly instead of going through ttstart().
1995-07-29 04:05:57 +00:00
Jordan K. Hubbard
8000cec155 This file got left out for some reason - merge it in with the rest of
the VOXWARE 3.05 stuff.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from: Hannu Savolainen
1995-07-28 23:37:32 +00:00
Jordan K. Hubbard
8bdcfa2a8b Merge in changes for VOXWARE 3.05
Submitted by:	Amancio Hasty and Jim Lowe
1995-07-28 22:30:53 +00:00
Jordan K. Hubbard
550eed9cb5 Support for voxware 3.05.
Submitted by:	Amancio Hasty and Jim Lowe
1995-07-28 22:25:52 +00:00
Jordan K. Hubbard
ae28ee13b4 Update the sound driver to VOXWARE 3.05 with one GUS patch from
Amancio.  There is some SoundSource support here that is primitive and
probably doesn't work, but I'll let the two submitters let me know
how my integration of that was since I don't have this card to test.
I've only tested this on my GUS MAX since it's all I have.

This all probably needs to be re-done anyway since we're widely variant
from the original VOXWARE source in the current layout.
Submitted by:	Amancio Hasty and Jim Lowe
Obtained from:  Hannu Savolainen
1995-07-28 21:40:49 +00:00
David Greenman
c5bb0d718c Fixed bug where a bogus packet length could cause a panic if the length
was less than sizeof(struct ed_ring).
1995-07-28 12:15:16 +00:00
David Greenman
6b837e5dda Fixed bug I introduced with the memory-size code rewrite that broke
floppy DMA buffers...use avail_start not "first". Removed duplicate
(and wrong) declaration of phys_avail[].

Submitted by:	Bruce Evans, but fixed differently by me.
1995-07-28 11:21:06 +00:00
Bruce Evans
3e3de3f369 Change bogus extern inline' to static inline'.
This finishes making the kernel compile without -O.

The "optimized" asm version of the function being inlined
(translate_bytes()) uses slow instructions.  On a 486, assuming
everything is in the cache (unlikely), it is 21/15 times slower
than the dumb C version and 21/3 times slower than the best
possible bytewise method.
1995-07-25 23:03:22 +00:00
Bruce Evans
1c85ed9abd Change memcmp() to bcmp(). memcmp() isn't declared or implemented
for the kernel, but gcc provides an inline version of it if the
kernel is compiled with -O.
1995-07-25 22:18:56 +00:00
Bruce Evans
8089a0432e Fix bogus constraint "i" that only worked with -O. The cases where it
didn't work are somewhat bogusly optimized away before the constraint
is checked.  We still expect constants passed to inline functions to
remain constant, but if the compiler ever decides that they aren't
constant then it will just generate slightly slower code instead of
an error.
1995-07-25 21:28:47 +00:00
Bruce Evans
e150a6d25b Restore the the fix in revision 1.23 that was blown away by a later commit:
remove unused variable `u_char bt_scratch_buf[256];'.
1995-07-25 16:06:06 +00:00
Bruce Evans
3ba7df0ba7 First step of fixing the remaining sloppy common-style declarations.
Declare `cheat' as static.  It was bogusly shared between the aha1742 and
ultrastor drivers.

Even static variables should have unique names so that they can be
debugged, but fixing them can wait.
1995-07-25 15:53:11 +00:00
Bruce Evans
9c0dc173cc Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
Bruce Evans
5542b158d8 Fix clean rule to remove remove everything that isn't created by config
except .depend and `version'.
1995-07-22 23:55:41 +00:00
Bruce Evans
d348ccec2e Fix clean rule for aic7xxx_asm. 1995-07-22 23:53:30 +00:00
Joerg Wunsch
f6027d9b3d this avaids the "lineoverflow" which you'll always get at 80 column
displays at bootup

Reviewed by:
Submitted by:	graichen@omega.physik.fu-berlin.de (Thomas Graichen)
Obtained from:
1995-07-22 22:32:49 +00:00
Bruce Evans
abe8bea470 Obtained from: partly from ancient patches of mine via 1.1.5
Give names to the magic tty i/o sleep addresses and use them.  This makes
it easier to remember what the addresses are for and to keep them unique.
1995-07-22 16:45:22 +00:00
Bruce Evans
3ec9b35e8a Remove vat_audio driver support here too.
Clean up formatting for reserved and Talisman driver entries.

Fix d_select entry for unused driver.
1995-07-22 13:56:06 +00:00
Bruce Evans
a16721a13a Move the inline code for waking up writers to a new function
ttwwakeup().  The conditions for doing the wakeup will soon become
more complicated and I don't want them duplicated in all drivers.

It's probably not worth making ttwwakeup() a macro or an inline
function.  The cost of the function call is relatively small when
there is a process to wake up.  There is usually a process to wake
up for large writes and the system call overhead dwarfs the function
call overhead for small writes.
1995-07-22 01:30:45 +00:00
Bruce Evans
2ce42987d3 Obtained from: partly from ancient patches of mine via 1.1.5
Move static termioschars() from a couple of drivers to tty.c.  Now there
is only one copy of ttydefchars[].
1995-07-21 22:52:01 +00:00
Bruce Evans
0d1de831ea Obtained from: partly from an ancient patch of mine via 1.1.5
Temporarily nuke TS_WOPEN.  It was only used for the obscure MDMBUF
flow control option in the kernel and for informational purposes
in `pstat -t'.  The latter worked properly only for ptys.  In
general there may be multiple processes sleeping in open() and
multiple processes that successfully opened the tty by opening it
in O_NONBLOCK mode or during a window when CLOCAL was set.  tty.c
doesn't have enough information to maintain the flag but always
cleared it in ttyopen().

TS_WOPEN should be restored someday just so that `pstat -t' can
display it (MDMBUF is already fixed).  Fixing it requires counting
of processes sleeping in open() in too many serial drivers.
1995-07-21 16:30:59 +00:00
Paul Traina
cfb5972713 Remove vat_audio driver support 1995-07-20 16:31:22 +00:00
David Greenman
e9857eee2b Rewrote memory sizing code to generally deal with holes in extended memory.
This code change should allow certain Compaq machines with a 128K hole
at 16MB to work.
1995-07-19 06:37:12 +00:00
Justin T. Gibbs
eb62827d8a Specify the controller bus in the scsi_link structure to allow hardwired
buses on multi-bus controllers.  Currently only affects the 274xT controllers.

Reviewed by: Peter Dufault(dufault@hda.com), Rod Grimes(rgrimes@FreeBSD.org)
1995-07-17 23:35:16 +00:00
Justin T. Gibbs
4fbaf9a7c0 Add examples for wiring down scbuses to drivers as well as specifying
controller buses for multi-bus controllers.
1995-07-17 23:32:53 +00:00
David Greenman
6263a19a10 Added crdselect definition for !NCRD case. 1995-07-16 14:34:57 +00:00
Peter Wemm
1174c7d121 This fixes a compiler warning, and a cosmetic problem with the linux
emul code when compiling with "options KTRACE".
ktrsyscall() was expecting an array of integers, this was passing the
address of a structure containing an array of integers..
The cosmetic problem was that it was calling the "enter syscall"
trace hook twice - this looks like a cut/paste error/typo.
1995-07-16 14:10:55 +00:00
Poul-Henning Kamp
8a7580c3fe Reviewed by: phk
Submitted by:	Andrew McRae <andrew@mega.com.au>

Some initial commits from the pcmcia stuff, to make life easier for the
testers.

We will use the name "pccard" since that is really the buzzword at present.
1995-07-16 10:45:06 +00:00
Poul-Henning Kamp
7a2dada545 Make the bootinfo structure visible from sysctl.
This can be used in libdisk to guess a better bios-geometry.
1995-07-16 10:33:38 +00:00
Joerg Wunsch
446cee6e6d Include ``options POWERFAIL_NMI'' for owners of older (non-apm)
notebooks where a powerfail condition (external power drop; battery
state low) is signalled by an NMI.  Makes it beep instead of panicing.

Reviewed by:	davidg
1995-07-16 10:31:26 +00:00
Bruce Evans
97e156674d Don't include <sys/tty.h> in drivers that aren't tty drivers or in general
files that don't depend on the internals of <sys/tty.h>
1995-07-16 10:13:08 +00:00
Bruce Evans
1be9be9647 Fix compiler warnings (systm.h wasn't included). 1995-07-16 10:07:40 +00:00
Bruce Evans
567e21c2c0 Add tw. 1995-07-16 08:55:04 +00:00
David Greenman
9e951f36f1 Truncate the fault address to a page boundry when calling vm_fault(). The
last change to fix the fault-twice bug with page tables wasn't quite
complete.
1995-07-16 05:39:22 +00:00
David Greenman
4a67eb7121 Fixed bug that caused page tables to be faulted twice instead of once.
Submitted by:	John Dyson
1995-07-14 09:25:51 +00:00
Jordan K. Hubbard
2c3c9fc440 The following patch for v1.8 (2.0.5R) of seagate.c allows it to work with
Future Domain TMC-885 controllers. These beasts were just different enough in
a number of perverse ways to be recognised but not work with the seagate
stuff. I also whacked in blind transfers for DATAIN and DATAOUT phases - this
more than doubles my throughput. If you're dubious about that, comment out the
definition of SEA_BLINDTRANSFER. Anyway if you're running an ST01 or TMC-950
controller, please give this a go, I'd like to see if anything's broken for
those beasts.

Submitted by:	Stephen Hocking <sysseh@devetir.qld.gov.au>
1995-07-13 15:01:38 +00:00
David Greenman
24a1cce34f NOTE: libkvm, w, ps, 'top', and any other utility which depends on struct
proc or any VM system structure will have to be rebuilt!!!

Much needed overhaul of the VM system. Included in this first round of
changes:

1) Improved pager interfaces: init, alloc, dealloc, getpages, putpages,
   haspage, and sync operations are supported. The haspage interface now
   provides information about clusterability. All pager routines now take
   struct vm_object's instead of "pagers".

2) Improved data structures. In the previous paradigm, there is constant
   confusion caused by pagers being both a data structure ("allocate a
   pager") and a collection of routines. The idea of a pager structure has
   escentially been eliminated. Objects now have types, and this type is
   used to index the appropriate pager. In most cases, items in the pager
   structure were duplicated in the object data structure and thus were
   unnecessary. In the few cases that remained, a un_pager structure union
   was created in the object to contain these items.

3) Because of the cleanup of #1 & #2, a lot of unnecessary layering can now
   be removed. For instance, vm_object_enter(), vm_object_lookup(),
   vm_object_remove(), and the associated object hash list were some of the
   things that were removed.

4) simple_lock's removed. Discussion with several people reveals that the
   SMP locking primitives used in the VM system aren't likely the mechanism
   that we'll be adopting. Even if it were, the locking that was in the code
   was very inadequate and would have to be mostly re-done anyway. The
   locking in a uni-processor kernel was a no-op but went a long way toward
   making the code difficult to read and debug.

5) Places that attempted to kludge-up the fact that we don't have kernel
   thread support have been fixed to reflect the reality that we are really
   dealing with processes, not threads. The VM system didn't have complete
   thread support, so the comments and mis-named routines were just wrong.
   We now use tsleep and wakeup directly in the lock routines, for instance.

6) Where appropriate, the pagers have been improved, especially in the
   pager_alloc routines. Most of the pager_allocs have been rewritten and
   are now faster and easier to maintain.

7) The pagedaemon pageout clustering algorithm has been rewritten and
   now tries harder to output an even number of pages before and after
   the requested page. This is sort of the reverse of the ideal pagein
   algorithm and should provide better overall performance.

8) Unnecessary (incorrect) casts to caddr_t in calls to tsleep & wakeup
   have been removed. Some other unnecessary casts have also been removed.

9) Some almost useless debugging code removed.

10) Terminology of shadow objects vs. backing objects straightened out.
    The fact that the vm_object data structure escentially had this
    backwards really confused things. The use of "shadow" and "backing
    object" throughout the code is now internally consistent and correct
    in the Mach terminology.

11) Several minor bug fixes, including one in the vm daemon that caused
    0 RSS objects to not get purged as intended.

12) A "default pager" has now been created which cleans up the transition
    of objects to the "swap" type. The previous checks throughout the code
    for swp->pg_data != NULL were really ugly. This change also provides
    the rudiments for future backing of "anonymous" memory by something
    other than the swap pager (via the vnode pager, for example), and it
    allows the decision about which of these pagers to use to be made
    dynamically (although will need some additional decision code to do
    this, of course).

13) (dyson) MAP_COPY has been deprecated and the corresponding "copy
    object" code has been removed. MAP_COPY was undocumented and non-
    standard. It was furthermore broken in several ways which caused its
    behavior to degrade to MAP_PRIVATE. Binaries that use MAP_COPY will
    continue to work correctly, but via the slightly different semantics
    of MAP_PRIVATE.

14) (dyson) Sharing maps have been removed. It's marginal usefulness in a
    threads design can be worked around in other ways. Both #12 and #13
    were done to simplify the code and improve readability and maintain-
    ability. (As were most all of these changes)

TODO:

1) Rewrite most of the vnode pager to use VOP_GETPAGES/PUTPAGES. Doing
   this will reduce the vnode pager to a mere fraction of its current size.

2) Rewrite vm_fault and the swap/vnode pagers to use the clustering
   information provided by the new haspage pager interface. This will
   substantially reduce the overhead by eliminating a large number of
   VOP_BMAP() calls. The VOP_BMAP() filesystem interface should be
   improved to provide both a "behind" and "ahead" indication of
   contiguousness.

3) Implement the extended features of pager_haspage in swap_pager_haspage().
   It currently just says 0 pages ahead/behind.

4) Re-implement the swap device (swstrategy) in a more elegant way, perhaps
   via a much more general mechanism that could also be used for disk
   striping of regular filesystems.

5) Do something to improve the architecture of vm_object_collapse(). The
   fact that it makes calls into the swap pager and knows too much about
   how the swap pager operates really bothers me. It also doesn't allow
   for collapsing of non-swap pager objects ("unnamed" objects backed by
   other pagers).
1995-07-13 08:48:48 +00:00
Bruce Evans
d800e06858 Fix races in scstart(). q_to_b() wasn't called at spltty(), so there
were two races:
- q_to_b() might unexpectedly return 0 (e.g, after a keyboard signal
  flushes the output queue and isn't echoed).  ansi_put() interprets
  0 bytes as 4GB...
- more output (e.g. for echoes) might arrive afer q_to_b() returns 0.
  Then scstart() returns presumably and the new output might not be
  handled for a long time.

Remove unused function scxint().

Fix prototypes (foo() isn't a prototype).
1995-07-11 18:34:30 +00:00
Bruce Evans
f2fb20ef41 Speed up the inner loop of ansi_put() by a few percent.
syscons' output is now only about 4-5 times slower than I want.
It loses a factor of 2 for scrolling output by unnecessarily copying
the screen buffer, a factor of 4/3 for dumb OPOST processing, and
a factor of 3/2 for clist processing.
1995-07-11 17:59:22 +00:00