Commit Graph

2181 Commits

Author SHA1 Message Date
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