Commit Graph

2445 Commits

Author SHA1 Message Date
Jordan K. Hubbard
36607a387c MF22: Robert Swindells' patch for correct probing of more AMD cards.
Merged by:	Max Khon <fjoe@iclub.nsu.ru>
1998-09-17 13:09:16 +00:00
Justin T. Gibbs
9f02ad6073 Nuke uninitialized varible fd from retrier(). Change the devstat code
to reference fdc->fd instead.
1998-09-15 22:07:24 +00:00
Søren Schmidt
a8445737e7 Add VESA support to syscons.
Kazu writes:

The VESA support code requires vm86 support. Make sure your kernel
configuration file has the following line.
        options "VM86"
If you want to statically link the VESA support code to the kernel,
add the following option to the kernel configuration file.
        options "VESA"

The vidcontrol command now accepts the following video mode names:
VESA_132x25, VESA_132x43, VESA_132x50, VESA_132x60, VESA_800x600

The VESA_800x600 mode is a raster display mode. The 80x25 text will
be displayed on the 800x600 screen. Useful for some laptop computers.

vidcontrol accepts the new `-i <info>' option, where <info> must be
either `adapter' or `mode'.  When the `-i adapter' option is given,
vidcontrol will print basic information (not much) on the video
adapter. When the `-i mode' option is specified, vidcontrol will
list video modes which are actually supported by the video adapter.

Submitted by:   Kazutaka YOKOTA yokota@FreeBSD.ORG
1998-09-15 18:16:39 +00:00
Justin T. Gibbs
bd9d336e40 Obsoleted by CAM. 1998-09-15 10:40:55 +00:00
Justin T. Gibbs
26dc5ba614 The Buslogic driver is smart enough to set it's own interrupt vector now. 1998-09-15 10:04:08 +00:00
Justin T. Gibbs
b2dfb1f906 Update system to new device statistics code.
Submitted by:	"Kenneth D. Merry" <ken@plutotech.com>
		mike@smith.net.au (Mike Smith)
1998-09-15 08:15:30 +00:00
Justin T. Gibbs
5d55526b65 Adaptec 154X SCSI-Host Adapter driver for CAM.
Submitted by:	Warner Losh <imp@village.org>
1998-09-15 07:39:55 +00:00
Justin T. Gibbs
532abf3b7a Mylex/Buslogic MultiMaster SCSI-Host Adapter Driver for CAM. 1998-09-15 07:32:57 +00:00
Justin T. Gibbs
a5a2d1bfe9 Advance Systems SCSI Host Adapter driver for CAM. Currently only support
the 8bit SCSI AdvanSys products.
1998-09-15 07:03:43 +00:00
Søren Schmidt
d024c95599 Remove the SLICE code.
This clearly needs alot more thought, and we dont need this to hunt
us down in 3.0-RELEASE.
1998-09-14 19:56:42 +00:00
Søren Schmidt
c77c6e0cbb Make /dev/vga a softlink to /dev/ttyv0 under DEVFS using /etc/rc.devfs
Remove the hack from syscons that added a /dev/vga node in DEVFS
it broke root acces on ttyv0 because dev_mkdb screwed up.
1998-09-14 09:14:46 +00:00
Eivind Eklund
dfef928b1c Support PnP compatibility IDs. This allow e.g. the ed driver to pick
up any PnP NE2000 compatible card, instead of forcing us to always
update ID lists.

Submitted by:	Ugo Paternostro <paterno@dsi.unifi.it>
1998-09-13 22:15:44 +00:00
Nicolas Souchu
41990851b8 invalid printf call fixed -> compile time warning removed 1998-09-13 20:57:06 +00:00
Nicolas Souchu
54ad6085b1 ppbus enhanced to support ZIP+ : microseq improved 1998-09-13 18:26:44 +00:00
Warner Losh
89afdb2434 Print warning about block size not being optimal once per open rather than
once per offending write.
1998-09-09 17:20:32 +00:00
Søren Schmidt
eeded4d82e Add new atapi-cd driver that supports atapi CD-R/RW drives.
This is only a stop-gab solution to get atapi burner support into 3.0.
1998-09-08 20:57:47 +00:00
Luigi Rizzo
ac38e6e338 fix a problem with our definition of SNDCTL_DSP_GETBLKSIZE, to let
the FreeBSD x11amp work (same as in -stable)
1998-09-08 07:21:00 +00:00
Tor Egge
572d053e17 Maintain a mapping from irq number to (ioapic number, int pin) tuple,
and use this when masking/unmasking interrupts.

Maintain a mapping from (iopaic number, int pin) tuple to irq number,
and use this when configuring devices and programming the ioapics.

Previous code assumed that irq number was equal to int pin number, and
that the ioapic number was 0.

Don't let an AP enter _cpu_switch before all local apics are initialized.
1998-09-06 22:41:42 +00:00
Luoqi Chen
02c71890cd Make irq forwarding truely functional. 1998-09-04 23:03:04 +00:00
Nicolas Souchu
4e190a62f8 Reviewed by: Doug Rabson
Submitted by:	nsouch
Philips PCF8584 chipset support. Chipset controller for the I2C bus.
1998-09-03 21:01:22 +00:00
Nicolas Souchu
edcfcf270b printing with compatible mode fixed if ECP available + more verbose if bootverbose set 1998-09-02 20:34:34 +00:00
Mike Smith
8abff6b13b Enable duplex autodetection if UTP media are autodetected.
Add a sysctl 'machdep.cs_recv_delay' to specify how long to wait after
receiving a packet in order to check for a subsequent (back-to-back)
packet.  The cs8900 has a very small receive buffer, so this helps avoid
overflows at the cost of some extra CPU overhead.

Submitted by:	Oleg Sharoiko <os@rsu.ru>, MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
1998-08-27 22:41:18 +00:00
Bruce Evans
00671271c3 Fixed printf format errors. Only one left in LINT on i386's. 1998-08-24 02:28:16 +00:00
Poul-Henning Kamp
be18fc123b remove bdevsw arg from dsopen();
Forgotten by:	julian
Reviewed by:	bde
1998-08-23 20:16:35 +00:00
Bruce Evans
1fcee46997 Fixed printf format errors. 1998-08-23 10:16:26 +00:00
Bruce Evans
ae5a10cad0 Fixed printf format errors. `struct eisa_device' uses a strange type
for the unit number (like most SCSI drivers).
1998-08-23 10:12:12 +00:00
Bruce Evans
3441a318d8 Fixed printf format errors.
Fixed style bugs in the int to u_long ioctl command arg changes.  This
driver doesn't use the u_foo BSDism.

Don't smash ioctl command args back to int.
1998-08-23 09:57:09 +00:00
Bruce Evans
cf8c7b0963 Added D_TTY to the cdevswitch flags for all tty drivers. This is required
for the Lite2 fix for always returning EIO in dead_read().

Cleaned up the cdevswitch initializers for all tty drivers.

Removed explicit calls to ttsetwater() from all (tty) drivers.  ttsetwater()
is now called centrally for opens, not just for parameter changes.
1998-08-23 08:26:42 +00:00
Bruce Evans
87c95fa5dc Removed cxpoll(). Just use ttpoll() like all other tty drivers. It's
equivalent except for the bad-minor-number case (which probably can't
happen).
1998-08-23 07:52:48 +00:00
Mike Smith
b63b587cb3 A better fix for kern/7144:
The check for dropping unicast packets not sent to our ethernet
address is after the bpf tap, but not conditioned on it.  All packets
received should get handed to bpf, and unicast packets not to us (mac)
should get dropped whether or not there is a bpf listener.  I believe
that the common optimization that the interface is in hw promisc mode
iff there is a bpf listener is in general wrong, but more frequently
so on wavelans.

I think Max's fix makes bpf listeners not see unicast packets sent to
others, but I'm not sure.

One can argue that checking on MOD_ENAL is wrong, but the code only
drops packets that shouldn't be received.  The correctness condition
is that it be run whenever unicast packets without our mac address can
be received.

PR:		kern/7144
Submitted by:	Greg Troxel <gdt@ir.bbn.com>
1998-08-20 05:49:59 +00:00
Bruce Evans
e4b6edc65b Fixed bogus spelling nx*' of some no*' devswitch functions. 1998-08-20 05:48:17 +00:00
Bruce Evans
4a74956bf7 Fixed devfs initialization which I broke in the previous commit.
Fixed an old name and disorder in the sio dictionary.
1998-08-20 05:21:50 +00:00
Bruce Evans
9a02ad618f Fixed devfs initialization which I broke in the previous commit. 1998-08-20 05:12:48 +00:00
Bruce Evans
3fd2d29816 Enabled dynamically sized tty input buffers (with enough buffering
for 1 second's worth of input) and larger tty output buffers.  The
interrupt-level buffers are still too small for speeds above 115200
bps (only a little too small for 230400 bps if RTS flow control is
enabled).

Don't call ttsetwater() explicitly in open().  It is now called for
the TTYDISC l_open() and should be static.

Don't attempt to register the cdevsw more than once.
1998-08-19 04:17:38 +00:00
Joseph Koshy
db1ab08ec9 Correct handling of ASCII DEL (0x7F).
I don't have access to a real VT220 to verify this against.
However, I'm committing the patch in `good faith' because
(a) getting hold of a real VT220 is going to be increasingly difficult
    the longer the PR sits around,
(b) some one was troubled enough to in a PR and
(c) the fix is minor and has no other implications.

PR: 7559
Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:39:40 +00:00
Joseph Koshy
1d26c935fe Correct glyph displayed by PCVT in ISO Latin-1 mode.
PR: 7610
Submitted-by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
1998-08-19 03:07:16 +00:00
Søren Schmidt
95332616af Fix one forgotten instance of \n to \r 1998-08-18 07:36:47 +00:00
Bruce Evans
0492d857d1 Removed unused includes. 1998-08-17 19:09:36 +00:00
Bruce Evans
c31c5c44b0 Fixed a type mismatch.
Fixed a missing extern declaration (bug for bug compatibly including
style bugs.  Should probably be static).
1998-08-17 18:47:36 +00:00
Bruce Evans
162886e237 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
Bruce Evans
86a14a7a0a Use [u]intptr_t instead of [u_]long for casts between pointers and
integers.  Don't forget to cast to (void *) as well.
1998-08-16 01:21:52 +00:00
Bruce Evans
9d97be3511 Cast an int to (intptr_t) before casting it to (void *).
Don't cast a pointer to a long just to print it.
1998-08-16 01:04:48 +00:00
Bruce Evans
5014fe3b58 Fixed yet more ioctl breakage due to the type of the `cmd' arg chaninging
from int to u_long but not changing here.
1998-08-16 00:57:07 +00:00
Bruce Evans
8705accbe7 Use offsetof() to avoid some casts from pointers to integers (of a
possibly different size).
1998-08-15 21:36:16 +00:00
Søren Schmidt
45696a866c Only write a filemark on close when data has actually been written. 1998-08-14 15:54:57 +00:00
Søren Schmidt
b5be0bd29d Changed \n to \r in the mouse cutbuffer, this makes pine & Emacs
behave better when using the cut&paste functionality.

Submitted by: Barry Bierbauch <pivrnec@vszbr.cz>
1998-08-14 06:32:03 +00:00
Mike Smith
87fffb7ca3 Fix BNC/AUI autodetection.
Submitted by:	MIHIRA "Sanpei" Yoshiro <sanpei@sanpei.org>
Submitted by:	Oleg Sharoiko <os@rsu.ru>
1998-08-13 20:31:17 +00:00
Bruce Evans
87543489d0 Cleaned up previous commit, mainly by moving repetitive calculations
of invariants to cyattach().

Fixed minor bugs:
- cyparam() returned without restoring the ipl in the error cases.  This
  was harmless because cyparam() is always called at spltty().
- one check for "rev. J or higher" actually checked for precisely rev. J.
1998-08-13 19:03:22 +00:00
Bruce Evans
fc64b69498 Updated for not-so-new version of Cyclom-Y boards (with 60MHz clock and
swapped RTS/DTR).  Merge the vendor's modification of the 2.2.6-release
version into -current for reference.  Will be cleaned up in next commit.

Obtained from:	ftp://ftp.cyclades.com/pub/cyclades/cyclom-y/freebsd/2.2.6/cyy226.tar.gz
1998-08-13 13:54:10 +00:00
Bruce Evans
001ca7cc09 Removed support for FreeBSD-1.x. 1998-08-12 18:32:42 +00:00
Bruce Evans
3dcbf6cec0 Fixed printf format errors.
Removed support for FreeBSD-1.x.
1998-08-12 18:16:38 +00:00
Bruce Evans
0e4801883f Removed unused includes. 1998-08-12 18:02:48 +00:00
Bruce Evans
9b94cfc031 Don't depend on "implicit int". 1998-08-11 17:22:42 +00:00
Bruce Evans
92971f1fd7 Register tty software interrupt handlers at run time using register_swi()
instead of at compile time using ifdefs.

Use _swi_null instead of dummycamisr.  CAM and dpt should call
register_swi() instead of hacking on ihandlers[] directly.
1998-08-11 17:01:32 +00:00
Bruce Evans
18c5a6c435 Implemented dynamic registration of software interrupt handlers. Not
used yet.

Use dummy SWI handlers to avoid some checks for null pointers.
1998-08-11 15:08:13 +00:00
Bruce Evans
8f5eb45899 Fixed null setting of multiple wakeup prevention variable.
Fixed printf format errors.
1998-08-10 20:47:22 +00:00
Bruce Evans
b97fc94873 Use [u]intptr_t instead of [unsigned] long to convert and/or represent
pointers.

This finishes fixing conversions between pointers and integers of
possibly different sizes in GENERIC.
1998-08-10 17:21:49 +00:00
Bruce Evans
c41141b002 Fixed the formatting of some tables (mainly the one produced by ps
in ddb) which I broke by changing %8[l]x to %8p.  Hacked the central
printf routine to not add an "0x" prefix for %p formats if the field
width is nonzero.  The tables are still horribly misformatted on
64-bit machines.

Use %p instead of %8p to print pointers when the field width isn't
important.
1998-08-10 14:27:34 +00:00
Kazutaka YOKOTA
4da170bcf6 A workaround for screen flicker; eliminate some I/O access to the VGA
chip.

It has been observed that the problem is most apparent:

a) in notebook computers,
b) and/or in the systems with C&T video chips.

Define the new configuration option SC_BAD_FLICKER in the kernel
configuration file to remove outb()/outw() calls in question.
1998-08-10 08:39:19 +00:00
Poul-Henning Kamp
22126f4208 The machine dependent disk slice manager does not recognize
DOS partition type 15 (Extended DOS, LBA) as a container for
DOS logical volumes, so the appropriate slices (e.g. sd1s5)
are not initialized.

PR:		7549
PR:		4120
Reviewed by:	phk
Submitted by:	Jim Mattson <jmattson@sonic.net>
1998-08-10 07:22:14 +00:00
Jordan K. Hubbard
afc2d1c74e A few misc changes to get the spigot and meteor board working in 3.0.
Submitted by:	Jim Lowe <james@miller.cs.uwm.edu>
1998-08-08 19:26:08 +00:00
Mike Smith
46f3ff7986 Major ppbus updates from the author.
- ppbus now supports PLIP via the if_plip driver
 - ieee1284 infrastructure added, including parallel-port PnP
 - port microsequencer added, for scripting the sort of port I/O
   that is common with parallel devices without endless calls up and down
   through the driver structure.
 - improved bus ownership behaviour among the ppbus-using drivers.
 - improved I/O chipset feature detection

The vpo driver is now implemented using the microsequencer, leading to
some performance improvements as well as providing an extensive example
of its use.

Reviewed by:	msmith
Submitted by:	Nicolas Souchu <Nicolas.Souchu@prism.uvsq.fr>
1998-08-03 19:14:33 +00:00
Kazutaka YOKOTA
88a5f0cca7 1. Reorganized screen saver related code so that both the LKM screen
saver and splash screen can all work properly with syscons.  Note that
the splash screen option (SC_SPLASH_SCREEN) does not work yet, as it
requires additional code from msmith.

- Reorganized the splash screen code to match the latest development
  in this area.
- Delay screen switch in `switch_scr()' until the screen saver is
  stopped, if one is running,
- Start the screen saver immediately, if any, when the `saver' key is
  pressed. (There will be another commit for `kbdcontrol' to support
  this keyword in the keymap file.)
- Do not always stop the screen saver when mouse-related ioctls
  are called.  Stop it only if the mouse is moved or buttons are
  clicked; don't stop it if any other mouse ioctls are called.

2. Added provision to write userland screen savers.  (Contact me if you
are interested in writing one.)

- Added CONS_IDLE, CONS_SAVERMODE, and CONS_SAVERSTART ioctls to
  support userland screen savers.

3. Some code clean-ups.
1998-08-03 11:30:45 +00:00
Kazutaka YOKOTA
855458e47b - When the system is shut down, switch to the vty0 if possible.
- Don't try to ring bell when system is going down. Beacuse the clock
  code is about to be stopped, the timeout routine won't be called
  anymore.
1998-08-03 09:18:58 +00:00
Kazutaka YOKOTA
2f803c851e Fix the bug which always reallocated the cut buffer whenever
the screen mode is changed even if another vty has larger size.
Reallocate the buffer only when the new screen size is larger than
the current cut buffer size.
1998-08-03 09:17:06 +00:00
Kazutaka YOKOTA
16d7bd5278 Don't accept the blank time value, if it is too big.
PR: bin/6188
1998-08-03 09:15:36 +00:00
Kazutaka YOKOTA
30f3a4598b - Add new bell types: "quiet.normal" and "quiet.visual".
When bell is of "quiet" types, the console won't ring (or flush)
  if the ringing process is in a background vty.
  PR: i386/2853

- Modify the escape sequence 'ESC[=%d;%dB' so that bell pitch and
  duration are set in hertz and msecs by kbdcontrol(1).
  There will be a corresponding kbdcontrol patch.
  PR: bin/6037
  Submitted by: Kouichi Hirabayashi (kh@eve.mogami-wire.co.jp)
1998-08-03 09:09:35 +00:00
Bruce Evans
34e9dea435 Added a flags arg to dsopen() and updated drivers. The DSO_ONESLICE
and DSO_NOLABELS flags prevent searching for slices and labels
respectively.  Current drivers don't set these flags.  When
DSO_NOLABELS is set, the in-core label for the whole disk is cloned
to create an in-core label for each slice.  This gives the correct
result (a good in-core label for the compatibility slice) if
DSO_ONESLICE is set or only one slice is found, but usually gives
broken labels otherwise, so DSO_ONESLICE should be set if DSO_NOLABELS
is set.
1998-07-30 15:16:06 +00:00
Bruce Evans
7010319f16 Fixed sign extension bugs awoken by changing speed_t to an unsigned
type.  19200, 1200 and other relatively uninteresting speeds were
broken.

Submitted by:	Rob Mallory <rmallory@qualcomm.com>
1998-07-29 18:48:20 +00:00
Bruce Evans
5c1a1eae83 Fixed error handling:
- Call isa_dmadone() whenever necessary to stop DMA and/or free bounce
  buffers.  Undead DMA corrupted the malloc freelist fairly consistently
  in the following configuration: SLICE kernel, 2 floppy drives, no disk
  in fd0, disk in fd1.
- Don't call fdc_reset() from fd_timeout().  Doing so gave an "extra"
  interrupt which was usually misinterpreted as being for completion
  of the next FDC command; the interrupt for completion of the next
  FDC command was then usually misinterpreted...  There were further
  complications for interrupts latched by the soft-spl mechanism so
  that they were delivered after all the h/w interrupts went away.
  This caused at least wrong head settle delays and may be why the
  FreeBSD floppy driver seems to munch floppies more than most floppy
  drivers.  The reset was unnecessary anyway in cases that didn't have
  the bug described next, since is was repeated a little later for
  the IOTIMEDOUT state.  The state machine has complications to handle
  resets correctly, so just use it.
- Don't call retrier() from fd_timeout().  The IOTIMEDOUT state needs
  to be processed next, and it isn't valid to set to that state if
  retrier() has aborted the current transfer.  Doing so caused null
  pointer panics after the previous bug was fixed.

Improved error handling:
- If an i/o is aborted, arrange to reset in the state machine before
  doing the next i/o.  New fdc flag for this.  This fixes spurious
  warnings and lengthy busy-waiting for the next i/o.
- Split STARTRECAL into RESETCOMPLETE and STARTRECAL and only check
  for the results from reset if we actually reset.  This fixes spurious
  warnings for other paths to STARTRECAL.  [Oops, it may break reset
  handling for motor-off resets.]

Cleanups in fd_timeout():
- Renamed to fd_iotimeout() to make it clearer that it is only used
  for i/o.
- Don't handle the bp == 0 case.  This case can't happen for i/o.
- Don't check for controller-busy.  We know it must be.
- Don't print anything.  retrier() already prints too much for normal
  errors.
- Fudge the state differently so that the state machine advances
  fdc->retry and the status is invalid (perhaps this should fudge a
  valid state like the one for WP).
- Style fixes.
1998-07-29 13:00:42 +00:00
Jonathan Lemon
a69546de82 Extend cpl workaround so that it applies when we are returning to
user-mode as well as vm86 mode.
1998-07-27 16:51:33 +00:00
Bruce Evans
f69c53b019 Don't pass the label to diskerr(), since the label is being constructed
and may be invalid.  In particular, d_secpercyl may be 0, and diskerr()
divides by it.
1998-07-25 16:35:06 +00:00
Mike Smith
b16d163da1 Add the 'cs' driver for Crystal Semiconductor CS89x0 devices. This
supports PnP and if_media.  I've been running a slightly older version
here for several weeks now.
Submitted by:	Maxim Bolotin <max@rsu.ru>
1998-07-20 20:00:43 +00:00
Mike Smith
2512c3e67b Add support for PCNet PCI chips that only work when we talk to them as ISA
devices. Specifically fix the case for the Hitachi version as used in
their VisionBook models.

Submitted by:	Ted Faber <faber@isi.edu>
1998-07-20 17:33:01 +00:00
Bruce Evans
92d1f65ed2 Moved allocation of the slices struct to the right place. Initialize
everything in it (the devsw pointers were not initialized early or at
all for the !DEVFS case, but this was harmless on i386's).
1998-07-20 13:39:45 +00:00
Bruce Evans
f2bd332e7c Stop physical DMA for the non-auto case in isa_dmadone(). This fixes a
small part of a bug suite beginning in the SLICE probes but mostly in the
floppy driver.  This is a quick fix: the auto case shouldn't be special;
DMA should also be stopped in isa_dma_release(); isa_dmastop() probably
shouldn't exist; common DMA registers should not be accessed without
locking.
1998-07-19 04:22:55 +00:00
Bruce Evans
e5d7d24361 Fixed error handling after a seek error that can't happen. When the
controller reports a successful seek, it is very unlikely to report
seeking to a cylinder other than the one requested, but we check for
this, and botched the error handling for the requested_cylinder != 0
case.  This error happened when the bug fixed in rev.1.52 of <sys/buf.h>
caused the head of buffer queue to change to one starting on a different
cylnder - the requested cylinder was found, but it wasn't what we
thought we requested.  The fix is simply to arrange to reset the state
machine.

Corruption of the buffer queue seems to only have been a problem in the
floppy driver.  Other drivers dequeue the head of the queue before doing
physical i/o on it, so the corruption at worse broke the elevator sort
order.  Dequeueing breaks it anyway.
1998-07-18 03:15:33 +00:00
Bruce Evans
18da528d41 Changed %n to %r in devfs name format strings. %n has almost gone away. 1998-07-15 12:18:34 +00:00
Bruce Evans
1be1e72fd8 Don't cast pointers to longs in asm statements.
These asm statments are not quite as pessimal as when I complained
about them in rev.1.9 of audio.c.  They seem to be only 40% slower
than the C version on P5's and the same speed on K6's.
1998-07-15 11:47:58 +00:00
Bruce Evans
51d5e97efa The ioctl request arg is unsigned log, so don't attempt to pass it
around as signed int.

Fixed printf format error for ioctl request arg hidden in ifdefed code.
1998-07-15 10:11:21 +00:00
Bruce Evans
29d6b96d69 The ioctl request arg is unsigned long, so don't attempt to pass it
around as signed int.
1998-07-15 09:59:31 +00:00
Bruce Evans
ea878c61f1 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.
1998-07-15 09:38:10 +00:00
Bruce Evans
3cc954df66 Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.  Doing so broke i386's with 64-bit
longs.
1998-07-14 11:42:05 +00:00
Bruce Evans
8f5aca410f Don't pretend to support ix86's with 16-bit ints and 32-bit registers
by using longs just to ensure 32-bit variables.  Long variables don't
fit in 32-bit registers on ix86's with 64-bit longs.
1998-07-14 06:17:28 +00:00
Bruce Evans
9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
Julian Elischer
ad27f8d9a5 SLICE probing becomes asynchronous. It can now be triggered by
interupt level events. This needs a lot of cleanup, but has been working
here for a month or two.. originally needed for CAM integration
but that hasn't happenned yet. The probing  state machines for each
handler should be replaced by a more generic state-service. It's
still quite messy in there..
1998-07-13 08:23:05 +00:00
Poul-Henning Kamp
3bc7e56592 Improve a couple of comment.
PR:		7242
Reviewed by:	phk
Submitted by:	Peter Jeremy <peter.jeremyp@alcatel.com.au>
1998-07-11 08:01:18 +00:00
Bruce Evans
ac1e407b32 Fixed printf format errors. 1998-07-11 07:46:16 +00:00
Bruce Evans
a838d83d8f Don't pretend to support ix86's with 7-bit ints by using longs just to
ensure 8-bit variables.  Doing so mainly bogotified some printf formats.
1998-07-11 06:35:39 +00:00
Eivind Eklund
c8cedb4e27 "vender" -> "vendor"
Requested by:	Aage Røbekk <aagero@aage.priv.no>
1998-07-06 16:10:06 +00:00
Warner Losh
f71f5262b1 Add the ability to suspend as well as hibernate to the system. This
is the kernel part of my commits, the userlevel stuff will be done in
a separate commit.  Add the ability to suspend as well as hibernate to
syscons.  Create a new virtual key like hibernate for suspend.  Update
apm_bios.h to define more apm bios goodies.
1998-07-06 06:29:07 +00:00
Julian Elischer
f7ea2f55d1 There is no such thing any more as "struct bdevsw".
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries.  The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).

rawread()/rawwrite() went away as part of this though it's not strictly
the same  patch, just that it involves all the same lines in the drivers.

cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.

Reviewed by: Eivind Eklund and Mike Smith
	Changes suggested by eivind.
1998-07-04 22:30:26 +00:00
Jordan K. Hubbard
24fa2d131e Check for missing keyboard.
PR:		7108
Submitted by:	Hellmuth Michaelis <hm@hcs.de>
1998-07-03 14:34:28 +00:00
John-Mark Gurney
a9e837f479 document options to hardwire GUS irq/dmas... 1998-06-30 08:24:02 +00:00
Poul-Henning Kamp
761b9eeed9 Add D_DISK flag. 1998-06-26 18:13:57 +00:00
Poul-Henning Kamp
b62591052c Remove bdevsw_add(), change the only two users to use bdevsw_add_generic().
Extend cdevsw to be superset of bdevsw.
Remove non-functional bdev lkm support.
Teach wcd what the open() args mean.
1998-06-25 11:28:07 +00:00
Kazutaka YOKOTA
bf41934ccb Don't refer to mouse_info.u.datea.[xyz] while processing MOUSE_BUTTON_EVENT
ioctl.  These fields don't have valid values for this ioctl.
PR: kern/6928
Submitted by: Bill Fenner <fenner@parc.xerox.com>
1998-06-24 10:21:30 +00:00
Poul-Henning Kamp
e29bc9add4 Avoid some panics in sio_unload which gets called with various dirt
if the attach of a modem card failed.
1998-06-24 09:23:32 +00:00
Bruce Evans
be160d60ab Removed unused includes. 1998-06-21 18:02:50 +00:00
Bruce Evans
86ef30b746 Removed unused includes.
Ifdefed conditionally used includes.
1998-06-21 17:08:08 +00:00
Bruce Evans
2d7fa8d877 Removed unused includes.
Ifdefed conditionally used includes.
Finished rev.1.39.  (I only submitted the request.)
1998-06-21 16:51:06 +00:00
Bruce Evans
4d2540b074 Removed unused includes.
Don't depend on "implicit int".
1998-06-21 15:54:11 +00:00
Bruce Evans
2773aa0ef6 Removed unused includes.
Don't depend on "implicit int".
Don't bloat the data section with explicit initialization to 0.
1998-06-21 15:49:39 +00:00
Bruce Evans
e5b19842ef Removed unused includes. 1998-06-21 14:53:44 +00:00
Bruce Evans
316bbd5c6f Converted add_interrupt_randomness() to take a `void *' arg. Rewrote
mmioctl() to fix hundreds of style bugs and a few error handling bugs
(don't check for superuser privilege for inappropriate ioctls, don't
check the input arg for the output-only MEM_RETURNIRQ ioctl, and don't
return EPERM for null changes).
1998-06-21 11:33:32 +00:00
Bruce Evans
5a2ae61fec Converted isa_strayintr() to take a `void *' arg. 1998-06-18 16:08:46 +00:00
Bruce Evans
9a2daf9190 Changed the type of an isa/general interrupt handler to take a
`void *' arg.  Fixed or hid most of the resulting type mismatches.
Handlers can now be updated locally (except for reworking their
global declarations in isa_device.h).
1998-06-18 15:32:09 +00:00
Bruce Evans
a5211c115d Renambed sbintr to sb_intr to avoid a conflict with the (now
unconditionally declared although it can't be configured together
with snd) extern function sbintr.
1998-06-17 16:59:30 +00:00
Bruce Evans
e9b998f0be Don't depend on <sys/conf.h> declaring isa device structs or isa
interrupt handlers.  pcm is not in LINT, so it is hard to test.
1998-06-17 16:54:22 +00:00
KATO Takenori
a880d1a224 Declare bsintr when PC98 is defined. 1998-06-17 16:32:23 +00:00
Bruce Evans
084d9853ca Don't declare isa device structs or isa interrupt handlers in <sys/conf>,
and don't depend on them being declared there.  This will cause lots of
warnings for a few minutes until config is updated.  Interrupt handlers
should never have been configured by config, and the machine generated
declarations get in the way of changing the arg type from int to void *.
1998-06-17 14:58:04 +00:00
Bruce Evans
f878d7eebd Include <i386/isa/pnp.h> after including its prerequisite
<i386/isa/isa_device.h> - don't depend on pollution in <sys/conf.h>
including the prerequisite earlier.
1998-06-17 14:01:00 +00:00
Bruce Evans
b6f37c1954 Added used include of <i386/isa/isa_device.h> - don't depend on
pollution in <sys/conf.h>
1998-06-17 13:54:59 +00:00
Bruce Evans
eca52014bd Don't log "unexpected" events on never-opened devices. Events left
over from the probe are now expected for incompatible UARTs that
deliver IRQs as a strobe (low) instead of a level (high).

Discard events on going-away devices too.  Endless loops may have
been possible when an active pccard was removed.
1998-06-16 11:05:59 +00:00
Bruce Evans
26d7294956 Avoid 64-bit divisions and modulos. Fixed related overflows for weird
args.

This driver should not be used, since it calls uiomove() with interrupts
disabled.
1998-06-14 10:52:52 +00:00
Steve Price
396ffb2e6b Add a macro tweak.
PR:		6932
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-13 19:36:22 +00:00
Steve Price
56cef66e8c Add a symlink from /dev/vga to /dev/ttyv0 when using DEVFS
for programs like doscmd.

PR:		6920
Submitted by:	Luoqi Chen <luoqi@chen.ml.org>
1998-06-13 18:53:22 +00:00
Poul-Henning Kamp
4342fa9172 Correct name and number for sxdc modules
PR:		6891
Reviewed by:	phk
Submitted by:	Nick Sayer <nsayer@quack.kfu.com>
1998-06-10 12:49:54 +00:00
Poul-Henning Kamp
a58f0f8e66 Add a tc_ prefix to struct timecounter members.
Urged by:	bde
1998-06-09 13:10:54 +00:00
Bruce Evans
a09bee1aa8 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (this doesn't change the struct layout, size or
alignment in any of the files changed in this commit, at least for
gcc on i386's.  Using bitfields of type u_char may affect size and
alignment but not packing)).
1998-06-08 09:47:47 +00:00
Søren Schmidt
1747fd3131 Correct even more ioctl breakage :(
Doesn't people check their code before committing anymore, it could
at least compile  ????
1998-06-08 09:00:28 +00:00
Bruce Evans
387905a6b3 Fixed pedantic semantics errors (bitfields not of type int, signed int
or unsigned int (don't do this in one case where it would change the
object file)).
1998-06-08 08:50:43 +00:00
Bruce Evans
ea0be99955 Updated yet another ioctl, and put wst in LINT to inhibit further bitrot. 1998-06-08 06:18:53 +00:00
Poul-Henning Kamp
48115288df Add a member function more to the timecounters, this one is for use
with latch based PPS implementations.  The client that uses it will
be committed after more testing.
1998-06-07 20:36:55 +00:00
Doug Rabson
498b291e26 Fix some more ioctls which I missed becausese they were hidden by options
which were not in LINT.
1998-06-07 19:40:41 +00:00
Doug Rabson
ecbb00a262 This commit fixes various 64bit portability problems required for
FreeBSD/alpha.  The most significant item is to change the command
argument to ioctl functions from int to u_long.  This change brings us
inline with various other BSD versions.  Driver writers may like to
use (__FreeBSD_version == 300003) to detect this change.

The prototype FreeBSD/alpha machdep will follow in a couple of days
time.
1998-06-07 17:13:14 +00:00
Poul-Henning Kamp
dbb3475507 Add a "this" style argument and a "void *private" so timecounters can
figure out which instance to wount with.
1998-06-07 08:40:53 +00:00
Steve Price
810e1311d2 keymap -> key_map so that the kernel will compile with
-DESKEYMAP.

PR:		6864
Submitted by:	Javier Rueda <jmrueda@diatel.upm.es>
1998-06-06 17:45:11 +00:00
Bruce Evans
12e1ed28e2 Force success of the probe (after doing it as before except in one
miscconfigured case) if the port is the console.  This fixes several
bugs:
- if all sioprobe()s failed, then the console driver followed null
  pointers in cdevsw[].
- if the sioprobe() for the console failed but another sioprobe()
  succeeded, then init hung early when the console couldn't be
  opened.
- it was silly for the console to not be there after printing boot
  messages on it.
Bugs introduced by this are hopefully no worse than old ones caused
by forcing the success of the `cn' level probe.
1998-06-03 12:30:10 +00:00
Bruce Evans
b76bb1d472 Fixed a printf() arg botch in the previous commit.
Only complain about an irq mismatch in the probe if the configured
irq doesn't become active, and then print the bitmap of irqs that
became active (including clock irqs) instead of just the first
(not including clock irqs).

Bugs reported by: msmith
1998-06-03 09:43:38 +00:00
John Dyson
e8f367853b Correct sleep priority. 1998-06-02 05:39:13 +00:00
Bruce Evans
cd55b8f46c Converted the ICU-level interrupt tests (3, 5 and 8) in sioprobe() into
a test of the irq number, and made failure of this test non-fatal.
Removed related unused complications for the APIC_IO case.  Removed the
no-test3 flag.

Deverbosified the failure messages for the other tests.  Removed the
per-port verbose flag - just use the general verbose flag.
1998-05-31 10:53:55 +00:00
Poul-Henning Kamp
bfb925ba31 most recent code for Loran driver. 1998-05-29 08:04:44 +00:00
Poul-Henning Kamp
e796e00de3 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
Paul Richards
aa6b464e36 Fix some bitrot in the multicast support, the move from TAILQ macros wasn't implemented fully. 1998-05-27 11:05:17 +00:00
Paul Richards
697990295f This time add an Id string that'll actually get expanded :-) 1998-05-27 09:59:13 +00:00
Paul Richards
f0a5342dc5 Add an ID string (can't believe it never had one!) 1998-05-27 09:58:00 +00:00
Jonathan M. Bresler
29c98bc624 code was using wrong temporary variable "i", in place of "j".
i contains the contents of the EP_W0_CONFIG_CTRL register.
	i was being used as the array index into an array on the stack.

	j is initialized to 0 as it should be.

PR:		kern/6757
Reviewed by:	jmb
Submitted by:	Stephane E. Potvin <sepotvin@videotron.ca>
1998-05-26 02:28:18 +00:00
Poul-Henning Kamp
d53fd54d9f LoadSoftModem() routine at sio.c does not trap general serial I/Os.
It fauls to probe eather DSI Modem or others.

PR:		4657
Reviewed by:	phk
Submitted by:	Kenji Saito <marukun@mx2.nisiq.net>
1998-05-20 06:46:58 +00:00
Poul-Henning Kamp
4b9afc97a7 Change a data type internal to the timecounters, and remove the "delta"
function.

Reviewed, but not entirely approved by: bde
1998-05-19 18:48:30 +00:00
Tor Egge
2f1e70693d Add forwarding of roundrobin to other cpus. This gives a more regular
update of cpu usage as shown by top when one process is cpu bound
(no system calls) while the system is otherwise idle (except for top).

Don't attempt to switch to the BSP in boot().  If the system was idle when
an interrupt caused a panic, this won't work.  Instead, switch to the BSP
in cpu_reset.

Remove some spurious forward_statclock/forward_hardclock warnings.
1998-05-17 22:12:14 +00:00
Tor Egge
167a4d818c Use a higher priority interrupt vector for 8254 timer interrupts. 1998-05-17 21:15:18 +00:00
Poul-Henning Kamp
c21410e119 s/nanoruntime/nanouptime/g
s/microruntime/microuptime/g

Reviewed by:	bde
1998-05-17 11:53:46 +00:00
Poul-Henning Kamp
bdb8446393 The PnP code in 2.2.6 detects the Motorola ModemSurfer 56K,
but doesn't do much of anything with it.  I added it to siopnp_ids[]
and it was found and recognized as a serial port.

PR:		6605
Reviewed by:	phk
Submitted by:	Dave Marquardt <marquard@zilker.net>
1998-05-13 07:26:55 +00:00
Søren Schmidt
e855c8bedc Oops, only apply the CHS size from lbasize thing when disk reports
"too big for CHS" ie 16383 cyls..
1998-05-11 15:30:43 +00:00
Steve Price
a396970306 Add support for the Yamaha YMF-719.
PR:		6348
Submitted by:	Yoshiak Uchikawa <yoshiaki@kt.rim.or.jp>
1998-05-10 23:53:27 +00:00
Julian Elischer
d210b3552c cleanup:
take out duplicated dump code
1998-05-07 01:15:23 +00:00
Julian Elischer
9b7408fe46 There is no dump routine for fd so give it an explicit NULL entry
in the SLICE table.
1998-05-06 23:35:36 +00:00
Julian Elischer
7f2f1b784e Add dump support to the DEVFS/slice code.
now we can actually catch our crashes :-)

Submitted by: Luoqi Chen <luoqi@chen.ml.org> (the man who's everywhere)
1998-05-06 22:14:48 +00:00
Søren Schmidt
eb011aea8d Fix the 4-8G LBA geometry it was wrong.
Support >8G drives in CHS mode. This is done by guesstimating the
cylinder count from the LBA size reported. It works on my shiny
new Maxtor 11.5G drive, YMMV.

Reports from users of other big drives (read Quantum bigfoot's)
are welcome...
1998-05-05 14:27:26 +00:00
Poul-Henning Kamp
b4362367e0 Detect USR PnP x2 modem.
PR:		6496
Reviewed by:	phk
Submitted by:	Kurt D. Zeilenga <Kurt@Boolean.NET>
1998-05-04 10:35:13 +00:00
Bruce Evans
d86cac8647 Don't depend on "implicit int". 1998-05-01 18:30:02 +00:00
Bruce Evans
77849078bf Oops, the previous commit should have changed i386' to __i386__',
not `__i386'.
1998-05-01 16:40:21 +00:00
Julian Elischer
21a56c939e Submitted by: Doug Ambrisko <ambrisko@whistle.com>
make standard links for the first detected sound card.
1998-04-28 00:10:53 +00:00
Julian Elischer
1667f2b3e5 slice_device.c: permissions changes for SLICE devices
vn.c:		change time of SYSINIT scheduling.
wd.c		don't revert to fully closed state. ( may require more)
all in SLICE mode only.
1998-04-24 07:54:00 +00:00
Julian Elischer
1077fa97b3 When calling the open function, specify either FREAD and/or FWRITE
as leaving them both 0 has the same effect as not openning the device at all.
1998-04-23 22:09:55 +00:00
Eivind Eklund
57402d4df8 Add devfs support.
Submitted by:	somebody whose name escapes me :-(
1998-04-23 00:06:43 +00:00
Tor Egge
beede91e58 Mask the interrupt before setting the corresponding bit in ipending if
the interrupt is already active.
Don't use lock prefix for operations on ipending.
Always use lock prefix for operations on iactive.
1998-04-22 22:49:29 +00:00
Julian Elischer
afcdc872dc Bad144 support for the slice system (!)
Submitted by: luoqi@watermarkgroup.com (Luoqi Chen)

I'm amazed by this. Slice has only been checked in for 2 days..
1998-04-22 19:27:54 +00:00
Julian Elischer
26d3bf5f1b close() is no longer a SLICE method.
Close is simply an open with no-read and no-write once internal to SLICE
(it still exports a close to the rest of the kernel)
1998-04-22 10:25:27 +00:00
KATO Takenori
5e4832f65d PC-98 does not supports DMA automode lager than 65535 bytes. 1998-04-21 09:48:45 +00:00
KATO Takenori
bb9b85aaeb Supports PC-98 again. 1998-04-21 09:46:14 +00:00
Søren Schmidt
d264ed7a01 Enable DEVFS usage of the device (include opt_devfs.h> 1998-04-20 18:51:33 +00:00
Julian Elischer
3e425b968d Add changes and code to implement a functional DEVFS.
This code will be turned on with the TWO options
DEVFS and SLICE. (see LINT)
Two labels PRE_DEVFS_SLICE and POST_DEVFS_SLICE will deliniate these changes.

/dev will be automatically mounted by init (thanks phk)
on bootup. See /sys/dev/slice/slice.4 for more info.
All code should act the same without these options enabled.

Mike Smith, Poul Henning Kamp, Soeren, and a few dozen others

This code does not support the following:
bad144 handling.
Persistance. (My head is still hurting from the last time we discussed this)
ATAPI flopies are not handled by the SLICE code yet.

When this code is running, all major numbers are arbitrary and COULD
be dynamically assigned. (this is not done, for POLA only)
Minor numbers for disk slices ARE arbitray and dynamically assigned.
1998-04-19 23:32:49 +00:00
Bruce Evans
212b37ff18 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants).
1998-04-19 15:41:06 +00:00
Bruce Evans
1696756396 Support compiling with `gcc -pedantic' (don't use hard newlines in
(asm) string constants or hard long long constants).
1998-04-19 15:39:26 +00:00
Bruce Evans
721f74b7d3 Support compiling with `gcc-pedantic' (don't declare static arrays
with no size).
1998-04-19 15:36:12 +00:00
Peter Wemm
823833f19d Back out previous commit, obrien doesn't seem to be watching. The problem
is that the previous commit spammed a hacked 2.2-stable onto -current,
deleting the DMA support etc.  (I guess that's one way of minimizing diffs
between -current and -stable.. :-] )
1998-04-19 03:26:05 +00:00
David E. O'Brien
cab9e31601 MFC (reduce diff w/-CUR, with hopes of getting DMA support into -STABLE)
1.128   (FUNCTIONAL: better sleep handling)
1.131   (STYLE: labels w/o stmt)
1.132   (STYLE: remove unused #includes)
1.141   (FUNCTIONAL: devfs bug, 2nd controler not showing)
1.144   (STYLE: dont shadow other vars)
1.150   (FUNCTIONAL: fix search bug)
1998-04-18 13:25:49 +00:00
KATO Takenori
c243867df2 Support compiling with `gcc -ansi'. 1998-04-18 05:01:24 +00:00
Dag-Erling Smørgrav
dc73342347 Seventy-odd "its" / "it's" typos in comments fixed as per kern/6108. 1998-04-17 22:37:19 +00:00
Dag-Erling Smørgrav
cc88e287a6 Stop the screensaver before switching consoles. 1998-04-17 10:03:11 +00:00
Dag-Erling Smørgrav
604d46b6e5 Swapped "should we just return" and "should we stop the screensaver"
in scrn_timer() to avoid deadlock with graphical screensavers.
1998-04-16 09:41:55 +00:00
Bruce Evans
1d37f051c1 Finish supporting compiling with gcc -ansi'. Fix missing volatile's
in __asm() statements while I'm here.
1998-04-15 18:58:09 +00:00
Bruce Evans
c1087c1324 Support compiling with `gcc -ansi'. 1998-04-15 17:47:40 +00:00
Bruce Evans
7e07ce2225 Support compiling with gcc -ansi'. Fix missing volatile's in __asm()
statements while I'm here.
1998-04-15 17:26:17 +00:00
Poul-Henning Kamp
9c2fa4dbce In pre-devfs days, /dev/psm0 had always been a non-blocking
device. But with devfs, currently, /dev/psm0 is the blocking device
and /dev/npsm0 is the non-blocking one.

DEVFS must stay consistent with the older behaviour.

PR:		6260
Reviewed by:	phk
Submitted by:	Kapil Chowksey <kchowksey@hss.hns.com>
1998-04-15 17:06:52 +00:00
Mike Smith
a470e6686d Don't use INTR when only one device supports it.
Submitted by:	Satoh Junichi <junichi@astec.co.jp>
1998-04-13 17:45:56 +00:00
Poul-Henning Kamp
81aba7a19d Aic APM driver support for e.g. Toshiba T2400 notebook with internal
Adaptec SCSI (aic6360/aha152x) controller.

PR:		5382
Reviewed by:	phk
Submitted by:	Oliver Breuninger <ob@seicom.NET>
1998-04-12 12:11:31 +00:00
John Dyson
17d925335f Minor typo in the wd driver. The manifestation of this bug
is a tremendous perf decrease due to the disabling of advanced
features such as DMA, Ultra DMA, and 32bit mode.  This patch
might have been reported by someone else (I seem to remember
it.)
1998-04-11 20:09:39 +00:00
Søren Schmidt
eea22fdf01 Do not clobber "heads" by &= in wdcommand use only &.
Spotted by: bde
1998-04-10 08:00:24 +00:00
Søren Schmidt
44779c5a1c Try to use the "right" CHS translations of a LBA device.
Drives bigger than 8.4G is still in question until I get a drive
to test on...
1998-04-09 17:46:45 +00:00
Søren Schmidt
2a42fd0952 Add LBA mode support for large drives.
Use config flags 0x1000 to enable LBA mode. It should be enabled in
the BIOS too to avoid geometry confusion.

One catch though, I'm not sure all BIOS's uses the 64head/63secs
translation, all mine does but....
1998-04-08 20:04:39 +00:00
Søren Schmidt
40a2ce6ee5 Fix a minor bug (|| instead of |) 1998-04-08 20:00:03 +00:00
Peter Wemm
fa1ef19485 remove #ifdef declaration of npxproc, use globals.s and the extern always. 1998-04-06 15:50:29 +00:00
Poul-Henning Kamp
2eeb0e2ea0 Make read_random() take a (void *) argument instead of (char *) 1998-04-06 09:30:42 +00:00
Poul-Henning Kamp
9018b53439 Commit a much more functional version of this driver. 1998-04-05 19:26:08 +00:00
Tor Egge
c547ef5cd4 Remove some unneeded statements that enabled interrupts. 1998-04-05 01:04:48 +00:00
Kazutaka YOKOTA
a117d26a3d More fixes to deal with fonts:
- Set the correct value scp->font_size in init_scp().
- Set scp->font_size to FONT_NONE for VGA_MODEX.

Interim fix for a font problem:
- A kludge to display the correct font on some video cards.
  We should be able to load multiple fonts to the VGA plane #2 and switch
  between fonts by setting the font select register in the VGA sequencer.
  It appears that the current code isn't functioning as expected on
  some VGA cards (I have reports on Millenium and Mach64 cards).  This is
  either a bug in syscons or a hardware compatibility problem ;-<
  This kludge will always load only one font set at a time and always use
  the font page #0 on the plane #2.  It is an interim kludge until
  we find the exact cause and solution.

Small adjustment for mouse cursor handling:
- Turn off the mouse cursor early when changing video modes.

Video mode switch fixes:
- Stop the screen saver when changing video modes.
- Enclose the critical section with a pair of spltty()/splx().
- A kludge to prevent scrn_update() from accessing video memory in less-
  critical sections in video mode change; artificially turn on the
  UNKNOWN_MODE flag.

PR: bin/5899, bin/5907
Tested by: ache and a couple of users
OKed by: sos
1998-04-04 16:26:53 +00:00
Poul-Henning Kamp
00af9731c9 Time changes mark 2:
* Figure out UTC relative to boottime.  Four new functions provide
      time relative to boottime.

    * move "runtime" into struct proc.  This helps fix the calcru()
      problem in SMP.

    * kill mono_time.

    * add timespec{add|sub|cmp} macros to time.h.  (XXX: These may change!)

    * nanosleep, select & poll takes long sleeps one day at a time

Reviewed by:    bde
Tested by:      ache and others
1998-04-04 13:26:20 +00:00
Eivind Eklund
512f816a5d Shut up GCC. 1998-04-02 02:10:47 +00:00
Poul-Henning Kamp
227ee8a188 Eradicate the variable "time" from the kernel, using various measures.
"time" wasn't a atomic variable, so splfoo() protection were needed
around any access to it, unless you just wanted the seconds part.

Most uses of time.tv_sec now uses the new variable time_second instead.

gettime() changed to getmicrotime(0.

Remove a couple of unneeded splfoo() protections, the new getmicrotime()
is atomic, (until Bruce sets a breakpoint in it).

A couple of places needed random data, so use read_random() instead
of mucking about with time which isn't random.

Add a new nfs_curusec() function.

Mark a couple of bogosities involving the now disappeard time variable.

Update ffs_update() to avoid the weird "== &time" checks, by fixing the
one remaining call that passwd &time as args.

Change profiling in ncr.c to use ticks instead of time.  Resolution is
the same.

Add new function "tvtohz()" to avoid the bogus "splfoo(), add time, call
hzto() which subtracts time" sequences.

Reviewed by:	bde
1998-03-30 09:56:58 +00:00
Poul-Henning Kamp
f0e35d62a2 Don't access "time" directly. 1998-03-29 12:18:12 +00:00
Poul-Henning Kamp
6efcc7f11d Replace direct access to time with getmicrotime(). 1998-03-29 12:15:57 +00:00
Poul-Henning Kamp
934f5f3306 Export MD5Transform in md5.c and remove a private version in random_machdep.c
md5 is standard as a consequence of this.
1998-03-29 11:55:06 +00:00
Eivind Eklund
0fd9336b7e Don't use fast interrupts when initialized through PnP. if_ed does
not support fast interrupts.

Noticed by:	bde
1998-03-29 03:22:19 +00:00
Bruce Evans
3c1300a6b3 Removed unused #includes. 1998-03-28 13:25:01 +00:00
Bruce Evans
08637435f2 Moved some #includes from <sys/param.h> nearer to where they are actually
used.
1998-03-28 10:33:27 +00:00
Warner Losh
9b5728dbde Remove unused cheat static. 1998-03-25 22:40:06 +00:00
Jonathan Lemon
640c4313af Add the ability to make real-mode BIOS calls from the kernel. Currently,
everything is contained inside #ifdef VM86, so this option must be
present in the config file to use this functionality.

Thanks to Tor Egge, these changes should work on SMP machines.  However,
it may not be throughly SMP-safe.

Currently, the only BIOS calls made are memory-sizing routines at bootup,
these replace reading the RTC values.
1998-03-23 19:52:59 +00:00