Commit Graph

1618 Commits

Author SHA1 Message Date
KATO Takenori 4c024bbdf8 Improved CPU identification and initialization routines. This
supports All Cyrix CPUs, IBM Blue Lightning CPU and NexGen (now AMD)
Nx586 CPU, and initialize special registers of Cyrix CPU and msr of
IBM Blue Lightning CPU.

If revision of Cyrix 6x86 CPU < 2.7, CPU cache is enabled in
write-through mode.  This can be disabled by kernel configuration
options.

Reviewed by:	Bruce Evans <bde@freebsd.org> and
            	Jordan K. Hubbard <jkh@freebsd.org>
1997-03-22 18:54:54 +00:00
Bruce Evans 3c81694426 Fixed some invalid (non-atomic) accesses to `time', mostly ones of the
form `tv = time'.  Use a new function gettime().  The current version
just forces atomicicity without fixing precision or efficiency bugs.
Simplified some related valid accesses by using the central function.
1997-03-22 06:53:45 +00:00
David Nugent 4511a3a921 Submitted by: Greg Ungerer <gerg@stallion.oz.au>
Update to version 1.0.0 of stallion.c from author.
1997-03-13 04:13:45 +00:00
David Nugent 1f77b941e5 Submitted by: Greg Ungerer <gerg@stallion.oz.au>
Update istallion driver to version 1.0.0 from author.
1997-03-13 03:51:25 +00:00
KATO Takenori 242b8c5441 Change `#ifdef FreeBSD' to `#ifdef __FreeBSD__'.
Submitted by:	H. Nokubi <h-nokubi@nmit.mt.nec.co.jp>
1997-03-13 02:10:21 +00:00
Stefan Eßer e93e9e7392 Add support for the buggy CMD640B PCI EIDE controller chip, which
can't perform overlapping commands on both of its channels.

To enable the CMD640B work-around, the kernel must be compiled with
"options CMD640". Without that option there should be no difference
in the code produced compared to the previous revision of wd.c.

Submitted by:	Wolfgang Helbig <helbig@ba-stuttgart.de>
1997-03-11 23:17:28 +00:00
Kazutaka YOKOTA d36dc5e36b Made set_controller_command_byte() less verbose. It used to print a
debug message whenever one of lock keys were pressed, if the system
was started with the `-v' option.

Removed a couple of lines of dead code too.
1997-03-07 10:22:55 +00:00
Joerg Wunsch e843ad34c1 Fix a bogon in pcvt that caused a characterset designation to not take
effect immediately, but required a following (normally redundant) G0
into GL mapping.  This adds one layer of indirection (thus might make it
slower), but fixes the broken box character drawing in pcvt.

Hellmuth and Bruce are unfortunately too busy too review this right now,
but i wanna have it in 2.2 since it has often been asked in the past.
1997-03-07 08:56:00 +00:00
Joerg Wunsch f9ba24beed Fix the new (kbdio) keyboard layer to correctly work if PCVT_SCANSET == 2
even early in the boot process (boot -c or -d).

Submitted by:	yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA)
1997-03-07 08:53:16 +00:00
Joerg Wunsch 8a973ca81c Move pcvt towards using kbdio (finally!).
Warning: this won't work yet with PCVT_SCANSET=2 along in early
console mode (boot -c, or boot -d).

A big thanks to Kazutaka, and a word of apologies for delaying the
review for that long time...

Submitted by:	yokota@zodiac.mech.utsunomiya-u.ac.jp (Kazutaka YOKOTA)
1997-03-06 22:34:24 +00:00
Stefan Eßer 81cf5d7aae improve pcibus_check: Only assume PCI if at least one PCI to anything bridge
on bus 0.
This fixes problems with EISA-only systems mistakenly being assumed to support PCI.
1997-03-05 20:52:00 +00:00
Bruce Evans 65ff42dd17 Only print clock calibration messages if the system was booted with -v.
Submitted by:	partly by gpalmer
1997-03-05 08:08:48 +00:00
Gary Palmer 0b146b65d2 Back out the patch to break up the clock probe lines. Instead, follow
Bruce's suggestion of deleting "relative to mc146818A clock ",
thus shortening the line ...
1997-03-05 00:54:00 +00:00
Gary Palmer 5c5e8d766c Split the rather long and line-wrapping clock probe messages on boot.
(2.2?)

Submitted by:	Mathew Dood <winter@jurai.net>
1997-03-04 09:24:01 +00:00
Bruce Evans e4d202a8ae Fixed struct access bug and style bugs in previous revision. The same
fix as for syscons did not work because pcvt uses a struct where syscons
uses a struct pointer.
1997-03-03 16:33:41 +00:00
John-Mark Gurney 4eaede87b0 add the same fix to pcvt that I did to syscons. Make sure that the signals
provided by the user are valid else return EINVAL.

Reviewed-by: joerg
1997-03-02 14:03:33 +00:00
John-Mark Gurney 5ec8909366 make sure that the user supplied signals in struct vt_mode are actually
valid signals, else return EINVAL for ioctl VT_SETMODE.

this fixes a problem that anybody with vty access can panic the system.

2.2-Candidate (and 2.1.0 I believe)

Reviewed-by: sos
1997-03-01 23:53:46 +00:00
Bruce Evans 201d7c413d Fixed spelling error in a variable name. 1997-02-28 14:26:34 +00:00
Kazutaka YOKOTA a87be5f49e Removed an obsolete test which prevented mouse movement from quiting
screen saver. Added a missing `break' statement  in set_normal_mode().

Reviewed by: sos
1997-02-28 08:42:35 +00:00
KATO Takenori 75492a101b Synchronize with NetBSD/pc98 patch level 81.
Submitted by:	Naofumi Honda <honda@Kururu.math.hokudai.ac.jp>
Obtained from:	NetBSD/pc98 patch level 81
1997-02-28 08:34:06 +00:00
Peter Wemm 6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Mike Smith a7d3b81100 Use the same blocks->size-in-MB conversion algorithm as the SCSI code
to avoid overflowing an intermediate value for disks > 2^32 bytes
large.
1997-02-18 23:31:53 +00:00
Bruce Evans 661e2ccd94 Changed #include order to match better order in 2.2. 1997-02-13 22:48:19 +00:00
Søren Schmidt cc5625f0ed Oops, cut/paste could be done on tthe WRONG vty :(
pointed out by Kazu.
1997-02-13 11:58:49 +00:00
Steven Wallace 1a46116d9d Bug fix for SNDCTL_DSP_GETOSPACE ioctl. It would report 0 bytes
available in buffer when buffer was completely empty.
It now correctly reports the total buffer space available.

Reviewed by:	jkh, davidg
Obtained from:  Linux 1.3.20's sound driver code
1997-02-12 06:56:57 +00:00
Julian Elischer db03b748e3 really minor cleanup
sc is set to ifp->if_softc so use it..
1997-02-11 09:29:48 +00:00
John Dyson 996c772f58 This is the kernel Lite/2 commit. There are some requisite userland
changes, so don't expect to be able to run the kernel as-is (very well)
without the appropriate Lite/2 userland changes.

The system boots and can mount UFS filesystems.

Untested: ext2fs, msdosfs, NFS
Known problems: Incorrect Berkeley ID strings in some files.
		Mount_std mounts will not work until the getfsent
		library routine is changed.

Reviewed by:	various people
Submitted by:	Jeffery Hsu <hsu@freebsd.org>
1997-02-10 02:22:35 +00:00
Kazutaka YOKOTA 445605a6e0 Fix for the Compaq Armada laptop.
The PS/2 mouse device responds to a reset command with a sequence of
ACK(fa), RESULT(aa) and ID(00).  Most PS/2 mice immediately returns
ACK, but spend sometime before sending RESULT. The Armada takes time
before ACK; extra delay is necessary before the call to read ACK.

The problem was reported in comp.unix.bsd.freebsd.misc and the patch
was tested by the reporter. No PR was filed, by the way.
1997-02-07 11:41:45 +00:00
Bruce Evans d1adf9f099 Fixed the SMC fifo bug fix. sioopen() hung while input was streaming in
with <= 100 usec between each character arrival time.  This didn't happen
until rev.1.75 of clock.c because DELAY(100) used to delay for closer to
80 usec than 100 usec, and the minimum time between character arrivals is
87.8 usec at the maximum supported speed of 115200 bps 8N1.

Clear DCD timestamp flag on close (the input timestamp flag is already
cleared).
1997-02-01 16:04:16 +00:00
Søren Schmidt ac59a2c67c Fixed the "switch to next screen" command (normally bound to the
key "print scrn".
It used to stop at the first non-open vty, now it skips the non-open
ones and thereby enable one to cycle around all open vty by pressing
"print scrn".
1997-01-30 15:12:17 +00:00
Bruce Evans 49a116737e Estimate an initial overhead of 0 usec instead of 20 usec in DELAY().
I have code to calibrate the overhead fairly accurately, but there
is little point in using it since it is most accurate on machines
where an estimate of 0 works well.  On slow machines, the accuracy
of DELAY() has a large variance since it is limited by the resolution
of getit() even if the initial delay is calibrated perfectly.

Use fixed point and long longs to speed up scaling in DELAY().
The old method slowed down a lot when the frequency became variable.
Assume the default frequency for short delays so that the fixed
point calculation can be exact.

Fast scaling is only important for small delays.  Scaling is done
after looking at the counter and outside the loop, so it doesn't
decrease accuracy or resolution provided it completes before the
delay is up.  The comment in the code is still confused about this.
1997-01-29 22:51:44 +00:00
Bruce Evans 160da193e0 Fixes and workarounds for Hayes ESP:
- don't uselessly initialize the fifo "DMA" bit at attach time.
- initialize the fifo "DMA" bit at open time.  Without this, the device
  interrupts for every character received, reducing input performance
  to that of an 8250.
- don't uselessly initialize the fifo trigger level to 8 (scaled to
  256) at attach time.
- don't scale the fifo trigger level to 512 bytes.  The driver's pseudo-
  dma buffer has size 256, so it can't handle bursts of size 512 or 256.
  It should be able to handle the second lowest ftl (2 scaled to 64).
- don't reset the fifos in siostop().  Reset triggers a hardware bug
  involving wedging of the output interrupt bit  This workaround
  unfortunately requires ESP support to be configured.
1997-01-29 21:50:02 +00:00
Bruce Evans 26add14927 Disabled logging of masked exceptions on exit. Keep the side effect of
saving the state (see rev.1.17).
1997-01-29 13:46:28 +00:00
Bruce Evans 4123678332 Sync with <pci/pcibus.h>. pcibus.c unfortunately still compiled (with
only 3 or 4 warnings) when pb_maxirq went away.
1997-01-25 18:51:01 +00:00
Søren Schmidt 0d3f983ad2 Add save/restore cursor as pr SCO screen(HW) manpage.
Fix ESC[2J to not move cursor home
Clear mouse cutmarking on more cases.
Minor changes by me.

Submitted by:	ache
1997-01-23 20:00:45 +00:00
Garrett Wollman 6a4c899092 Put newlines after log messages.
Submitted by:	seki@sysrap.cs.fujitsu.co.jp PR#2563 (but the patch didn't
		apply)
1997-01-23 16:17:09 +00:00
Søren Schmidt dc31ce3ddb Fix the bug that caused CTRL & ALT keys to be hanging sometimes after
an X seesion. Really stupid error of me, and I've been looking at
this code SO many times. Thanks to Kazutaka YOKOTA for seeing this..

Submitted by:	Kazutaka YOKOTA
1997-01-20 08:05:15 +00:00
Søren Schmidt cf35b775cb Oops, the position of the savefont code was wrong, cur_console
wasn't set yet.
1997-01-19 17:34:14 +00:00
Søren Schmidt 6b2c8fd9c3 Oops! I commented out the waiting for retrace loops, because the
one in draw_mouse causes spontanious hangs on my p5-100 when I
move the mouse excessively. Forgot that on the last commit, so
using the mouse or destructive cursor would produce large amounts
of flicker..
1997-01-18 15:53:48 +00:00
KATO Takenori b2f4ff0875 Fixed unit select code in atapi_probe (PC98 specific). 1997-01-17 16:58:38 +00:00
Søren Schmidt 171b420b11 Bruce pointed out a bogon:
cur_console is NULL when copy_font() is first called from scinit().  This
is apparently harmless when scinit() is called early from sccninit() -
page 0 is apparently mapped r/w then, and 0->status contains suitable
garbage.  However, when there is a serial console, scinit() is first
called from scattach() when the page tables are completely initialized,
so the NULL pointer causes a panic.

Submitted by:	bruce
1997-01-17 15:49:13 +00:00
KATO Takenori a84bc4735a Moved the definition of LPC_ENA into #else ... #endif. Changed
comment of LPC_ENA.
Submitted by:	Bruce Evans <bde@freebsd.org>
1997-01-17 14:40:39 +00:00
Nate Williams 4ee1132018 Bring back the fix from 1.32 that got spammed by recent changes. 1997-01-16 18:57:19 +00:00
Bruce Evans 6bed7e5140 Guard against the i8254 timer being uninitialzed if DELAY() is
called early for console i/o.  The timer is usually in BIOS mode
if it isn't explicitly initialized.  Then it counts twice as fast
and has a max count of 65535 instead of 11932.  The larger count
tended to cause infinite loops for delays of > 20 us.  Such delays
are rare.  For syscons and kbdio, DELAY() is only called early
enough to matter for ddb input after booting with -d, and the delay
is too small to matter (and too small to be correct) except in the
PC98 case.  For pcvt, DELAY() is not used for small delays (pcvt
uses its own broken routine instead of the standard broken one),
but some versions call DELAY() with a large arg when they unnecessarily
initialize the keyboard for doing console output.  The problem is
more serious for pcvt because there is always some early console
output.

Guard against the i8254 timer being partially or incorrectly
initialized.  This would have prevented the endless loop.

Should be in 2.2.
1997-01-16 18:28:20 +00:00
KATO Takenori 280a2265d9 - Modified for PC-98.
- Included IBM-PC specific code in #ifndef PC98.
1997-01-16 14:56:16 +00:00
Jordan K. Hubbard 3b20426160 Add the ex driver (Intel EtherExpress Pro/10).
I have no idea if this works since I don't have one of the cards to test.
I also don't know what the LINT and GENERIC entries should look like,
so I just made up some values for now and left them commented out.
Someone who knows the factory settings for a Pro/10, please contact me!

Submitted-By: Javier Martín Rueda <jmrueda@diatel.upm.es>
1997-01-16 12:19:21 +00:00
Søren Schmidt b6b9dfa17e Upgrade the kbdio rutines to provide queued kbd & mouse events.
Minor other updates to syscons by me.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1997-01-15 18:16:32 +00:00
John Fieber b8a83a83ca Make the sound drivers work with DEVFS.
If you have something other than a Soundblaster 16, please try
this out!
1997-01-15 03:42:30 +00:00
Garrett Wollman e7d4c83b3f Update from driver author. Closes PR#2421.
Submitted by:	 seki@sysrap.cs.fujitsu.co.jp
1997-01-14 18:24:59 +00:00
Jordan K. Hubbard 1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00