Commit graph

12677 commits

Author SHA1 Message Date
Tor Egge f0ac792bec Attempt to handle interrupts delivered to all IO APICs by using the first
IO APIC with a sufficient number of pins.
1998-11-26 23:14:23 +00:00
Nick Hibma 0cec007c5f Initial commit of ported NetBSD USB stack 1998-11-26 23:13:13 +00:00
Nick Hibma 48ecb15bdc Removed probes for USB chips 82371xB (done in dev/pci/uhci_pci.c) 1998-11-26 21:57:52 +00:00
Eivind Eklund 29be051d68 Staticize some more. 1998-11-26 18:54:52 +00:00
Eivind Eklund 9fcdafaefc Staticize. 1998-11-26 18:50:24 +00:00
Bruce Evans e7414d1bfa Fixed the previous fix - stathz doesn't give the statclock frequency
when it is 0.

Submitted by:	mostly by Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-26 16:49:55 +00:00
Bruce Evans 44f05f9c92 Oops, yet again back out some local changes that shouldn't have been
in the previous commit.
1998-11-26 14:05:58 +00:00
Bruce Evans e4d0e37b33 Fixed scaling of p_pctcpu. It was wrong by a factor of stathz/hz.
Until recently, this was half compensated for in at least ps and top
by multiplying by 100/stathz to get a better wrong factor of 100/hz.
1998-11-26 14:00:08 +00:00
KATO Takenori 7adae46cd3 Sync with sys/i386/boot/netboot/Makefile revision 1.20. 1998-11-26 11:47:51 +00:00
Joerg Wunsch 4d7b27af07 Make netboot work again. All this depends on the object format being
a.out (by now).
1998-11-26 11:11:29 +00:00
Joerg Wunsch ae1b283631 ...nor does this old TDC3620 like to be asked for compression.
But well, now it's running again!
1998-11-26 10:47:52 +00:00
Paul Richards 1a3376721b Add Id string to if_lnc.h and fix up copyrights to be consistent and up to date. 1998-11-26 00:57:32 +00:00
Paul Richards 6789e41fe6 Despite what people may think the Am79C970 returns the chip id of an Am79C965.
Fix the PCI probe code to accept this id otherwise cards based on the Am79C970
fail to probe.
1998-11-26 00:53:45 +00:00
Warner Losh 46d4978e39 o Patch, slightly altered, from Graham Menhennitt for older aha 1542B
cards.  My machine didn't tickle this problem, so I can't tell if
  it fixed anything or not.  However, it didn't break my already working
  1542-{B,C,CF,CP} probes.
o Minor comment correction
o Minor correction in printf
1998-11-25 19:12:56 +00:00
Joerg Wunsch 36230d67d0 This old firmware of the TDC3620 hangs the SCSI bus upon serial
number requests.  Don't ask it so.
1998-11-25 13:50:10 +00:00
KATO Takenori fcc6e7373f Reorder entries of ed drivers. Many NICs can be automatically
detected, even though a user doesn't disable unused entries with
userconfig.

Submitted by:	Nobuyuki Koganemaru <kogane@koganemaru.co.jp>
1998-11-25 11:00:31 +00:00
KATO Takenori 3bf3b7af20 Cosmetic change. 1998-11-25 10:53:21 +00:00
Doug Rabson d24b518319 Port top to the alpha.
Submitted by: Hidetoshi Shimokawa <simokawa@sat.t.u-tokyo.ac.jp>
1998-11-25 09:45:28 +00:00
David Greenman c699f45e35 Add missing splvm protection around unqueue call. Without this, the page
queues would eventually get corrupted.
1998-11-25 07:40:49 +00:00
Eivind Eklund 38cc2d9316 Move the declaration of PPro_vmtrr from the header file to pmap.c,
replacing the one in the header file with a definition.  This makes it
easier to work with tools that grok ANSI C only.
1998-11-24 20:25:52 +00:00
Eivind Eklund 5b6a440bab Whoops - wrong copy of files, so all wasn't converted. Rest of perl -> perl5 1998-11-24 19:02:43 +00:00
Eivind Eklund 999c8b9450 perl -> perl5, to allow to compile on older boxes with perl5 installed (but
without perl5 as the system perl)
1998-11-24 18:58:43 +00:00
Bruce Evans 976d09b9f2 Untangled the Cyclades offsets a little. CY16_RESET and CY_CLEAR_INTR
were half of their physical offsets for ISA and 1/4 of their physical
offsets for PCI, while all other Cyclades offsets were physical/1 for
ISA and physical/2 for PCI.  Logically wrong macros were used to scale
CY16_RESET and CY_CLEAR_INTR to the correct physical offsets.

Fixed some style bugs (mostly long lines).
1998-11-23 13:58:55 +00:00
Poul-Henning Kamp c2906d55d0 Make timecounters more resistant to badly behaved SW/HW which locks
out interrupts for too long.  If you still see the "calcru: negative
time..." message you can increase NTIMECOUNTER (see LINT).

Sideeffect is that a timecounter is required to not wrap around in
less than (1 + delta) seconds instead of the (1/hz + delta) required
until now.

Many thanks to: msmith, wpaul, wosch & bde
1998-11-23 09:59:02 +00:00
Søren Schmidt 8843cc3508 Add a kludge to prevent panicing when using VM86 and hitting here
with a NULL curproc.

Originally by: Tor Egge (IIRC)
1998-11-23 09:34:19 +00:00
Bruce Evans f6233520ce Fixed a missing include. `SYSININT(...);' garbage in gave null garbage out. 1998-11-23 09:33:35 +00:00
KATO Takenori 76a505024d Sync with sys/i386/isa/sio.c revision up to 1.218. 1998-11-23 07:49:03 +00:00
KATO Takenori 94563b4513 Sync with sys/i386/boot/biosboot/Makefile revision 1.67. 1998-11-23 07:34:37 +00:00
Justin T. Gibbs 08c6fbfa40 Change the delivery mechanism for incoming target commands. We now
use a 256 entry ring buffer of descriptersfor this purpose.  This allows
the use of a simple 8bit counter in the sequencer code for tracking start
location.

Entries in the ring buffer now contain a "cmd_valid" byte at their tail.
As an entry is serviced, this byte is cleared by the kernel and set by
the sequencer during its dma of a new entry.  Since this byte is the last
portion of the command touched during a dma, the kernel can use this
byte to ensure the command it processes is completely valid.

The new command format requires a fixed sized DMA from the controller
to deliver which allowed for additional simplification of the sequencer
code.  The hack that required 1 SCB slot to be stolen for incoming
command delivery notification is also gone.
1998-11-23 01:33:47 +00:00
Don Lewis 9d2b090975 We can't call fsetown() from sonewconn() because sonewconn() is be called
from an interrupt context and fsetown() wants to peek at curproc, call
malloc(..., M_WAITOK), and fiddle with various unprotected data structures.
The fix is to move the code that duplicates the F_SETOWN/FIOSETOWN state
of the original socket to the new socket from sonewconn() to accept1(),
since accept1() runs in the correct context.  Deferring this until the
process calls accept() is harmless since the process can't do anything
useful with SIGIO on the new socket until it has the descriptor for that
socket.

One could make the case for not bothering to duplicate the
F_SETOWN/FIOSETOWN state and requiring the process to explicitly make the
fcntl() or ioctl() call on the new socket, but this would be incompatible
with the previous implementation and might break programs which rely on
the old semantics.

This bug was discovered by Andrew Gallatin <gallatin@cs.duke.edu>.
1998-11-23 00:45:39 +00:00
Kenneth D. Merry 22b9c86cfd Fix a few problems that Bruce noticed about a month ago, and fix oup one
other problem.

- Hold onto splsoftcam() in the peripheral driver open routines until we
  have locked the periph.  This eliminates a race condition.

- Disallow opening the pass driver when securelevel > 1.

- If a user tries to open the pass driver with O_NONBLOCK set, return
  EINVAL instead of ENODEV.  (noticed by gibbs)
1998-11-22 23:44:47 +00:00
Nicolas Souchu f8cf96db8f Remove broken and useless intr interface.
Submitted by: Doug Rabson <dfr@nlsystems.com>
	      Amancio Hasty <hasty@rah.star-gate.com>

Avoid compile warnings.
1998-11-22 22:01:42 +00:00
Bruce Evans a84c84f5b0 Reduce i/o overheads by not preserving the channel access register in
interrupt handlers.  Instead, load and use it atomically as necessary.
This reduces mode switching overhead for "polled" mode interrupt handling
from 5 i/o's to 3 (per service type, per port) so that polled mode is only
slightly more inefficient than "interrupt" mode.
1998-11-22 17:40:32 +00:00
Kazutaka YOKOTA 570f565d11 Oops, I forgot to update this file when I changed moused recently. 1998-11-22 11:57:59 +00:00
Bruce Evans 8280a33470 Deleted the workaround for lockup of certain (hopefully no longer used)
UARTs when their divisor latch registers are selected while they are
doing output.  Waiting for (some) output to drain is not permitted for
the TCSANOW case of tcsetattr().  NIST-PCTS easily detects bugs like
this by testing at at speeds that no one would want to use (50 bps).

Deleted stale comments related to flushing i/o.  Flushing works properly
for 16550s according to NIST-PCTS (it can't work properly for 16450s).
This finishes fixing all sio(16550)-related bugs found by NIST-PCTS.
1998-11-22 10:47:42 +00:00
Bruce Evans 121d04904e Fixed a comment in code that will soon go away. 1998-11-22 09:41:12 +00:00
Bruce Evans 1e1c37f1cd Return ENOTTY instead of EBADF for ioctls on dead vnodes. This fixes
tcsetpgrp() on controlling terminals that are no longer associated
with the session of the calling process, not to mention ioctl.2.
1998-11-22 09:19:07 +00:00
Bruce Evans 7dd89537f1 Fixed some missing cases in the check for ioctls that involve modification.
Many (mostly machine-dependent ones) are still missing.  NIST-PCTS found
this bug for all the ioctls used to implement the POSIX tc* functions
(TIOCCBRK, TIOCDRAIN, TIOCSPGRP, TIOCSBRK, TIOCSTART and TIOCSTOP), and
I found FIOASYNC, TIOCCONS, TIOCEXCL, TIOCHPCL, TIOCNXCL, TIOCSCTTY and
TIOCSDRAINWAIT by inspection.  TIOCSPGRP was ifdefed out for some reason.

Handle tcsetattr()'s historical speed conversions correctly and more
centrally:
- don't store speeds of 0 in the final termios struct.  Drivers can now
  depend on tp->t_ispeed and tp->t_ospeed giving the actual speed.
  Applications can now depend on tcgetattr() being POSIX.1 conformant.
- convert from a proposed input speed of 0 to the proposed output speed
  (except if that is 0, convert to the current output speed).  Drivers
  can now depend on the proposed input speed being nonzero.
- don't reject negative speeds.  Negative speeds can't happen now that
  speed_t is unsigned, and rejecting invalid speeds is a bug - tcsetattr()
  is supposed to succeed if it can "perform any of the requested actions",
  so it shouldn't fail in practice.
1998-11-22 09:04:09 +00:00
Robert Nordier 5103ed619b Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
1998-11-22 07:59:16 +00:00
Andrey A. Chernov 468b3a66d9 add -aout key to cc, size, strip - it not work for elf system 1998-11-21 21:07:17 +00:00
Archie Cobbs 2b81bbcbef Eliminate compiler warning. 1998-11-21 01:57:48 +00:00
Archie Cobbs 3a8dbd82b3 Eliminate some ompiler warnings. 1998-11-21 01:54:50 +00:00
Dmitrij Tejblum bad3d41d83 Support NT VFAT lower case flags.
PR:		8383
(Mostly) Submitted by:	Carl Mascott <cmascott@world.std.com>
1998-11-21 00:20:24 +00:00
Bill Paul 36c84dd2b3 Add missing return statement to rl_phy_writereg(). This bug didn't actually
hurt anything, but it's still a bug.

Pointed out by: Jason Wright <jason@thought.net>
1998-11-20 19:26:37 +00:00
Kazutaka YOKOTA 0e06fe21c6 - Added some configuration flags as workaround for not-so-compatible
keyboard/mouse/display switch products (console switches).  Some
  products claim they emulate the PS/2 mouse when the host computer
  talks to the mouse while the mouse is actually routed to another
  host.

	flags 0x200	Do not try to identify the mouse model. All
			mice will be recognized as "generic PS/2".
	      0x400	Do not reset the mouse.  Some switches' response
			to the reset command is too slow and the psm
			will timeout.
	      0x1000	Relax error checking when probing the mouse
			port.

- Added another flag for pad devices.

	flags 0x800	Assume the pad behaves like ALPS GlidePoint
			when the user `taps' the surface of the pad;
			it will be reported as the fourth button.
1998-11-20 11:46:43 +00:00
Kazutaka YOKOTA 1b11ca6c6b - Added support for Genius Kidspad tablet.
# `moused' is getting too over-loaded now.  If we want something
# more than simple mouse emulation for tablets or remote devices,
# we should start writing a separate daemon...

Submitted by: luigi
1998-11-20 11:22:17 +00:00
Archie Cobbs a8c0f6e542 Fix misallocation of buffer bug (too short) 1998-11-20 02:57:41 +00:00
Paul Richards 9abd5d84ac This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00
John Polstra b2052ac8cf Fix a couple of typos. 1998-11-19 18:07:28 +00:00
Bruce Evans 04258de351 Fixed a null pointer panic in spc_free(). swap_pager_putpages()
almost always causes this panic for the curproc != pageproc case.
This case apparently doesn't happen in normal operation, but it
happens when vm_page_alloc_contig() is called when there is a memory
hogging application that hasn't already been paged out.

PR:		8632
Reviewed by:	info@opensound.com (Dev Mazumdar), dg
Broken in:	rev.1.89 (1998/02/23)
1998-11-19 06:20:42 +00:00