Commit Graph

5106 Commits

Author SHA1 Message Date
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
Jordan K. Hubbard
6988c87741 A slap on the wrist to Dag-Erling, who plainly did not test this before
committing it.  There was a large syntax error at line 404 which could
not possibly have allowed compilation. :)
1998-07-19 11:12:14 +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
Dag-Erling Smørgrav
51c4f6fbb5 Allow dump devices with dkpart != SWAP_PART on devfs/slice
systems. This test should probably be removed altogether.

See CVS log entries for revisions 1.97 and 1.98.
1998-07-18 21:42: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
Joerg Wunsch
ccbe4f96fe Place a fat warning that floppy tapes should be configured as drive 2
only (normally).

PR:		kern/7176
1998-07-17 06:45:26 +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
0fc3927d33 %n in a comment was a poor abbreviation for Immediate-byte-signed,
especially now that %n format has almost gone away.
1998-07-15 11:27:11 +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
c3f62164d5 Don't cast pointers to longs in asms. Changed all remaining longs
to int32_t's and all unsigned longs to u_int32_t's.  Fixed the one
printf format broken by this.  The old math emulator now compiles
cleanly on i386's with 64-bit longs.  It may even work, provided
suword() doesn't actually write a long.
1998-07-15 09:01:18 +00:00
Bruce Evans
4b81ec76d1 Cast the value returned by strtoul() to a uintptr_t before casting
it to a pointer.  There's nothing better than strtoul() for reading
pointers from strings, but the range checking should be better.
1998-07-15 04:03:54 +00:00
Bruce Evans
fc93c1bd67 Cast virtual addresses that happen to be represented as u_longs to
uintptr_t before casting them to pointers.  Explicit u_longs should
never be used to represent virtual addresses... (vm_offset_t is
normally right).
1998-07-15 03:58:57 +00:00
Mike Smith
bf707fd0b2 Add missing register name defines. 1998-07-14 17:13:23 +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
37889b394a Changed to the C9x draft spelling of the (unsigned) integral type
suitable for holding object pointers (ptrint_t -> uintptr_t).
Added corresponding signed type (intptr_t).  Changed/added
corresponding non-C9x types for function pointers to match.  Don't
use nonstandard types to implement these types, and don't comment
on them in <machine/types.h>.
1998-07-14 05:09:48 +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
Bruce Evans
a872b9bdd0 Removed historical dependencies on `Makefile'. They had rotted to being
mostly for objects that have the fewest dependencies on `Makefile'
(since they were mostly for utilities and objects generated from *.s
and these don't depend on profiling flags).

Give an explicit rule for building vnode_if.o.  This fixes building
it without ${PROF}.

Use .ORDER instead of a stamp file to avoid building vnode_if.[ch]
concurrently.

Removed explicit dependencies that will be generated by `make' (.c.o)
or will be generated by mkdep.

Added missing dependencies of special objects on opt_global.h.

Use ${NORMAL_C} instead of special rules for special objects where
possible.

FIxed dependencies of vers.o.
1998-07-12 10:47:32 +00:00
Bruce Evans
784c3c3465 Removed all traces of PARAM in Makefile.i386. Incremented CONFIGVERS
to reflect the dependency of Makefile.i386 on nothing being put in
PARAM.

Config versioning is too closely coupled with the Makefile.i386.
1998-07-12 09:52:45 +00:00
Bruce Evans
a435d1e61b Fixed printf format errors.
Use offsetof() instead of null pointer hacks.
1998-07-11 12:17:07 +00:00
Bruce Evans
767dfb80f8 Fixed printf format errors. 1998-07-11 11:10:46 +00:00
Poul-Henning Kamp
3d1af38b35 Don't disable pmap_setdevram() which isn't called, but which could be,
but instead disable pmap_setvidram() which is called, but probably
shouldn't be.

PR:		7227, 7240
1998-07-11 08:29:38 +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
Bruce Evans
88bf59fcda Don't pretend to support ix86's with 16-bit ints by using longs just to
ensure 32-bit variables.  Doing so mainly bogotified some printf formats.

Fixed disorder in md_var.h.
1998-07-11 05:59:35 +00:00
Bruce Evans
00be8601cd Don't pretend to support ix86's with 16-bit ints by using longs
just to ensure 32-bit variables.  Doing so broke and/or pessimized
i386's with 64-bit longs (unnecessary use of 64-bit variables
caused remarkably few problems in C code, but the inline asm here
tended to fail because there are no 64-bit registers).  Since the
interfaces here are very machine-dependent and shouldn't be used
outside of the kernel, use a standard types of "known" width instead
of fixed-width types.

Changed all quad_t's to u_int64_t's.  quad_t isn't standard, and
using signed types for 64-bit registers was bogus (but made no
difference).
1998-07-11 04:58:25 +00:00
Julian Elischer
e06ccb171b Add ipforward option 1998-07-11 04:46:27 +00:00
Bruce Evans
9d508ad2d9 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.  Use fixed-size integral types instead of plain ints, shorts,
chars and pointers since the bootinfo struct layout is a binary
interface.  The boot blocks could reasonably be implemented using
16-bit code.
1998-07-11 04:02:49 +00:00
Jordan K. Hubbard
d14897d381 Quick and dirty support for Linux's mremap. Not used by anything
but quake2 AFAIK.

Submitted by:   Luoqi Chen <luoqi@watermarkgroup.com>
1998-07-10 22:30:08 +00:00
Bruce Evans
930a642372 Oops, fptrint_t still needs to be declared in <machine/profile.h> in the
!KERNEL case.  The kludge to get it declared in libc/gmon/mcount.c wasn't
sufficient because fptrint_t is used in <sys/gmon.h>.
1998-07-10 09:26:41 +00:00
Bruce Evans
2e480d34aa Added a kernel-only typedef (ptrint_t) giving an integral type that is
least unsuitable for holding an object pointer.  This should have been
used to fix warnings about casts between pointers and ints on alphas.

Moved corresponding existing general typedef (fptrint_t) for function
pointers from the i386 <machine/profile.h> to a kernel-only typedef
in <machine/types.h>.  Kludged libc/gmon/mcount.c so that it can
still see this typedef.
1998-07-10 02:27:16 +00:00
Bruce Evans
596dfc04ed Use not-so-new printf formats %r and/or %z instead of %n and/or %+x. 1998-07-08 10:53:58 +00:00
Bruce Evans
3da6ef3c3a Fixed bogus type of valuep in struct db_variable. It was `int *' and
became `long *' for alpha, but should always have been `db_expr_t *'.
Fixed variable types to match.
1998-07-08 09:11:43 +00:00
Bruce Evans
96cf6a722f Added a `build-tools' target for internal tools.
Honor LDFLAGS for building internal tools.
1998-07-07 02:43:26 +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
Bill Paul
ab48ff6913 Add workaround to allow the FreeBSD boot block to work on
Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
on having a short jump and nop as the first instructions in the
boot sector code. The prevailing theory is that the BIOS is doing
some sort of boot sector virus detection and refusing to run any
boot block that doesn't start with the same instruction sequence as
MS-DOG boot sector code. If this is the case, it would be nice if it
actually printed an error message to this effect instead of just
saying 'FAILED.'

This workaround has no effect on the boot sector code other than to
increase its size by three bytes.
1998-07-02 15:36:35 +00:00
Poul-Henning Kamp
8cb5266728 Add 3 sysctl variables for future use by ps)1_ 1998-06-30 21:25:58 +00:00
Poul-Henning Kamp
c557e6528b Add PSE36 to the bits we know by name. 1998-06-30 19:41:21 +00:00
Bruce Evans
673796a715 Nuked opt_defunct.h and kern_opt.c. config(8) now generates good enough
warnings about all unknown options.
1998-06-30 14:43:04 +00:00
Poul-Henning Kamp
9dccbd5bcb Sigh, we need this one now. 1998-06-30 11:20:19 +00:00