Commit Graph

11611 Commits

Author SHA1 Message Date
Doug Rabson cd1ab665c8 Don't use unaligned accesses when printing extended sense codes. 1998-08-17 09:24:31 +00:00
Doug Rabson e31fa854a0 Add macros for accessing device memory. 1998-08-17 08:57:05 +00:00
Doug Rabson a5f96f457f Add Miata system type and pull in the LOCATE_PCS macro from NetBSD. 1998-08-17 08:26:12 +00:00
Doug Rabson ca13e4a93b Add breakpoint() for BREAK_TO_DEBUGGER. 1998-08-17 08:21:31 +00:00
KATO Takenori 30b8d76d79 Sync with sys/i386/isa/lpt.c revision 1.70. 1998-08-17 08:21:09 +00:00
Doug Rabson bcf270989f Update to work with the new elf headers. 1998-08-17 08:06:31 +00:00
Doug Rabson e00c264242 Update to use elf_generic.h. 1998-08-17 08:05:55 +00:00
Doug Rabson e99a8ba0c4 Disable some unnecessary debugging code. 1998-08-17 08:04:42 +00:00
John Birrell b4869285da Remove support for NetBSD syscalls. 1998-08-17 03:46:10 +00:00
Bruce Evans 162886e237 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
Bruce Evans 138d060a6e Fixed printf format errors. sppp_dotted_quad() was yet another private,
broken, version of inet_ntoa().  It should go away.
1998-08-17 00:29:34 +00:00
Bruce Evans 5afd0041c5 FIxed printf format errors. Most of them were exposed by our ntohl()
returning long.  There would be many more if int_32_t were not int.
1998-08-17 00:08:07 +00:00
Bruce Evans 72298f8fa6 Fixed printf format and spelling errors. Didn't fix related
description of DPT_SHUTDOWN_SLEEP in LINT.  Didn't add timestamps
so that the (combined?) sleep interval can be printed as intended
in the original printf.
1998-08-16 23:37:54 +00:00
Bill Paul e30938ce3a Import the (Fast) Etherlink XL driver. I'm reasonally confident in its
stability now. ALso modify /sys/conf/files, /sys/i386/conf/GENERIC
and /sys/i386/conf/LINT to add entries for the XL driver. Deactivate
support for the XL adapters in the vortex driver. LAstly, add a man
page.

(Also added an MLINKS entry for the ThunderLAN man page which I forgot
previously.)
1998-08-16 17:14:59 +00:00
Dag-Erling Smørgrav d08b9c139f Enable kernel dumps on SLICE systems. 1998-08-16 11:27:19 +00:00
John Polstra 317c91f4d4 Make ELF kernels build again. 1998-08-16 04:19:03 +00:00
John Polstra ca0154bc75 Revamp the ELF include files to better support architecture-independent
applications.  Here's how it works.

The kernel should include <machine/elf.h> to get the definitions
for the native architecture.  It can reference the various ELF
structures with generic names like Elf_Sym, Elf_Shdr, etc.  A define
__ELF_WORD_SIZE is also available with the value 32 or 64 as
appropriate for the native architecture.

Generic applications should include <elf.h>, which is just a wrapper
for <machine/elf.h>.

Applications such as object file dumpers that need to deal with
foreign ELF files can include <sys/elf32.h> and/or <sys/elf64.h>.
Both can be included from the same source file if desired.  The
structure names must be referenced using wordsize-specific names
like Elf32_Sym, Elf64_Shdr, etc.

I haven't change the alpha stuff, but I haven't broken it either.
1998-08-16 03:03:38 +00:00
Bruce Evans 6ebae469d0 Fixed a style bug (a long line) in the previous commit. 1998-08-16 01:47:19 +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 69ed480f48 pmap.c:
Cast pointers to (vm_offset_t) instead of to (u_long) (as before) or to
(uintptr_t)(void *) (as would be more correct).  Don't cast vm_offset_t's
to (u_long) just to do arithmetic on them.

mp_machdep.c:
Cast pointers to (uintptr_t) instead of to (u_long).  Don't forget
to cast pointers to (void *) first or to recover from integral
possible integral promotions, although this is too much work for
machine-dependent code.

vm code generally avoids warnings for pointer vs long size mismatches
by using vm_offset_t to represent pointers; pmap.c often uses plain
`unsigned int' instead of vm_offset_t and didn't use u_long elsewhere,
but this style was messed up by code apparently imported from mp_machdep.c.
1998-08-16 00:41:40 +00:00
Bruce Evans b55fb9dee6 Use an array of uintptr_t's instead of an array of u_longs to hold
address constants.  This fixes some warnings for conversions from
64-bit integers to 32-bit pointers on i386's with 64-bit longs.
vm86 still uses too many u_longs.
1998-08-16 00:05:05 +00:00
Bruce Evans 7cfd5f54cf Cast to `char *' instead of to u_long to help add byte offsets to
pointers.  Neither is portable, but "correct" casts to integral
types are much uglier - they lead to expressions like

        ptr = (struct struct_with_too_long_a_name *)(void *)(uintptr_t)
	    ((uintptr_t)(void *)ptr + offset);

Here the cast to the struct pointer is to match the surrounding
style of this file (and not depend on C's feature of properly
converting `void *' on assignment or cast), the `void *' casts are
because uintptr_t is only specified to work on `void *' pointers
(I missed this in about 100 lines of previous changes from [u]long
to [u]intptr_t), the outer cast to a uintptr_t is in case the
addition promoted the type, and the inner cast to a uintptr_t
corresponds to the one cast to an integer in the original code.

Don't depend on gcc's feature of casting lvalues.
1998-08-15 23:06:38 +00:00
Bruce Evans 160bd4c62f Oops, the printf format error fixes confused curp->area with a pointer. 1998-08-15 22:42:20 +00:00
Bruce Evans 24382fa41f Oops, the previous fix confused Linux's sigset_t with a pointer type.
It can be integral or a struct in POSIX, so it is difficult to print,
but it is actually declared as unsigned long.  Assume that it is
unsigned integral.
1998-08-15 22:29:43 +00:00
Bruce Evans f9d8181868 Fixed yet more ioctl breakage due to the type of the `cmd' arg changing
from int to u_long but not changing here.
1998-08-15 21:58:09 +00:00
Bruce Evans bd3513170b Made some disgusting ifdefs even more disgusting to enable the support
for `u_long cmd' ioctl args if __FreeBSD_version >= 300003.  Some ioctls
were broken on machines with 32-bit ints and 64-bit longs.
1998-08-15 21:51:53 +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
KATO Takenori b7ff9c6070 - change at2pc98() into global from static.
- Oops, I forgot to merge several lines from sys/i386/isa/syscons.c.
1998-08-15 09:08:26 +00:00
KATO Takenori f84bf06b3f Sync with sys/i386/isa/syscons.c revision 1.274. 1998-08-15 09:04:03 +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
Doug Rabson 113b296233 Change cmd argument to dsioctl from int to u_long. 1998-08-14 08:04:39 +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
Justin T. Gibbs 188fafbc3f Use "baseclass" instead of "class" for storing the contents of PCI register
0xB so that C++ programs can use the PCI conf interface.
1998-08-13 19:12:20 +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
Doug Rabson d890a393ca I managed to break sparse configuration accesses with my last commit.
Pointed out by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-13 08:11:27 +00:00
Doug Rabson 7032ad107e Protect all modifications to v_numoutput with splbio(). 1998-08-13 08:09:08 +00:00
Doug Rabson 196e9a52ec Protect all modifications to paging_in_progress with splvm(). 1998-08-13 08:05:13 +00:00
KATO Takenori c0e4cfbfe2 Sync with sys/i386/isa/sio.c revision 1.210. 1998-08-13 07:36:40 +00:00
Brian Somers 28c1826359 Remove some #if 0'd and commented-out code.
Fix a COMPAT_43 type.
1998-08-12 23:44:22 +00:00
Bill Paul c7323482f4 One-liner: add a call to the underlying device driver's SIOCDELMULTI
ioctl() routine at the end of if_delmulti() so that interfaces with
hardware multicast filtering can update their filters in a timely
manner.

If the interface doesn't support hardware multicast filtering, then
reception of multicast frames is done using 'promiscious mode' or
'capture all multicast frames' mode and software filtering in the
kernel. In this case, it doesn't matter if if_delmulti() ever does
an SCIODELMULTI on the interface or not: if MULTICAST support is
enabled, then we join the 'all hosts' group when the interface is
configured, and remain in it until the interface is brought down.
Without hardware filtering, joining one group means joining all
groups, so it makes no difference if we call the SIOCDELMULTI
routine.

If the interface does support hardware multicast filtering, then
by not reprogramming the hardware filter in if_delmulti(), we have
to wait until somebody calls if_setmulti(), during which time the
interface is receiving frames for multicast groups in which we are
no longer interested.
1998-08-12 22:51:59 +00:00
Mike Smith f01beb610a "The releaseing of the reference and lock is not temporary and belongs
where it is.  The reference and lock(s) are acquired just above the
 code in VREF() and relookup()."

Submitted by:	Michael Hancock <michaelh@cet.co.jp>
1998-08-12 21:42:54 +00:00
Julian Elischer 55d80b2df1 Handle the case of moving a directory onto the top of a sibling's
child of the same name.

Submitted by:	Kirk Mckusick with fixes from luoqi Chen
Obtained from:   Whistle test tree.
1998-08-12 20:46:47 +00:00
Bruce Evans 13950bd2ed Don't configure compatibility code for pre-Lite2 mount() calls by
default.  This code should go away soon.
1998-08-12 20:17:42 +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 78196aa2a6 Synced with dgb.c. Important changes from 1.29 (ioctl handling
was broken), 1.30 (COMPAT_43 option header was missing), 1.31 (DEVFS
option header was missing), 1.33 (garbage pointers were followed
in debugging code).  Cosmetic changes from 1.27, 1.32, 1.36, 1.37.

Of course, the DEVFS code didn't even compile.  Fixed.  Not tested.

Forgotten by: brian

This file should not exist.  It is the same as dgb.c except for lots of
renamed variables, about 250 lines removed, and only about 100 lines of
real differences.
1998-08-12 17:38:09 +00:00
Bruce Evans 296ea43c8c Fixed printf format errors.
This file is disgusting.
1998-08-12 16:16:10 +00:00
Doug Rabson a2c99e3e72 Modify the internal interfaces to the kernel linker to make it possible
for DDB to use its symbol tables.
1998-08-12 08:44:21 +00:00
Bruce Evans f94c697cd6 Removed a bogus ifdef that broke using SWI_* in LKMs.
Fixed a comment.
1998-08-11 19:21:17 +00:00
Bruce Evans e43b2ba087 Fixed printf format errors (ntohl() returns in_addr_t = u_int32_t != long
on some 64-bit systems).  print_ip() should use inet_ntoa() instead of
bloated inline code with 4 ntohl()s.
1998-08-11 19:08:42 +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 87917d807d Fixed printf format errors. 1998-08-11 16:06:10 +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
Doug Rabson a1eff3a036 Add code from NetBSD to print CIA capabilities and try to detect Pyxis bugs. 1998-08-11 08:51:09 +00:00
Doug Rabson c2d9f943e0 Sync with i386/isa/diskslice_machdep.c 1.31. 1998-08-11 07:17:36 +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 0c61bd3a7d Fixed restoring of cpl after trap handling. The wrong cpl (SWI_AST_MASK
instead of 0) was "restored" after handling a trap that occurred while
returning to user mode.  This bug was most noticeable for VM86 and is
still detected and fixed up (on return from the next exception) in doreti
if VM86 is configured.
1998-08-10 19:41:07 +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 1fb5b23952 Hide compiler warnings for casting from a long to a pointer of a
different size (on i386's with 64 bit longs).  Cosmetic.  Non-cosmetic
unportabilities were already hidden by using ntohl() to convert a
32-bit user DMA address to a long.
1998-08-10 17:06:28 +00:00
KATO Takenori fb050f435d Sync with sys/i386/isa/syscons.c revision 1.273. 1998-08-10 16:56:53 +00:00
KATO Takenori d64be4c2bd Sync with sys/i386/isa/diskslice_machdep.c revision 1.31. 1998-08-10 16:55:54 +00:00
KATO Takenori 5634e13ae6 Sync with sys/i386/conf/majors.i386 revision 1.45. 1998-08-10 16:54:47 +00:00
KATO Takenori 1e62449ada Sync with sys/i386/conf/options.i386 revision up to 1.84. 1998-08-10 16:54:09 +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
Poul-Henning Kamp 572bfce46d Reserve majors for M-Systems DiskOnChip driver. This driver will be
available directly from M-systems.
1998-08-10 09:06:21 +00:00
Kazutaka YOKOTA c0fad1a4cf - Added SC_BAD_FLICKER for syscons.
- Added the flag 0x40 (quiet bell) for syscons.
1998-08-10 08:40:27 +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
Doug Rabson 8a7b91802a Lots of changes, including:
* Support for AlphaStation 200, 250, 255, 400
* Untested support for UDB, Multia, AXPpci33 (Noname)
* Support for Personal Workstation 433a/433au, 500a/500au, 600a/600au (Miata)
* Some minor fixes and improvements to interrupt handling.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu> (AS200, Miata)
Obtained from: NetBSD (some code for AS200, Miata, Noname)
1998-08-10 07:53:59 +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
Søren Schmidt 1ae0c4bba2 Support the PAL version of the BT878 based Haupauge WinTV/PCI.
Submitted by: Matthias Scheler <tron@netbsd.org>
1998-08-10 06:39:33 +00:00
Jordan K. Hubbard 0eaf7cf01b MF22: Shut this thing up by default. 1998-08-09 02:22:34 +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
Søren Schmidt 4c6d55f0fb Updated Hauppauge detection code for Tuner ID 0x0a for newer NTSC
WinCastTV 404 with Bt878 chipset.  Tidied up PAL default in video_open()

Submitted by: Roger Hardiman <roger@cs.strath.ac.uk>
1998-08-08 07:15:16 +00:00
Peter Wemm e0301e5d4b Make ../Makefile.inc handling more consistant to prevent multiple includes
when certain .mk files include other .mk files.  This will remove the
need for multiple include protection in some other makefiles around the
tree (and helps some elf conditionals).
1998-08-08 07:02:08 +00:00
KATO Takenori 757571642a Fix garbage after quitting X server.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1998-08-07 18:04:24 +00:00
KATO Takenori cdc2343491 Sync with sys/i386/conf/files.i386 and majors.i386 revisions 1.200 and
1.44, respectively.
1998-08-07 11:52:19 +00:00
KATO Takenori 8ca7bcb78f Sync with sys/i386/isa/syscons.c and syscons.h revisions 1.272 and
1.39, respectively.
1998-08-07 11:51:06 +00:00
Doug Rabson 8b761c8004 Remove a stupid hack of mine which prevented PCI io memory access on the alpha. 1998-08-07 08:20:36 +00:00
Doug Rabson 6aa91d039a Add support for type1 pci configuration cycles for cia (not pyxis yet).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:18:44 +00:00
Doug Rabson 88db503390 Add some more useful macros.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:17:39 +00:00
Doug Rabson a8360ebd82 Update so that it should build a working kernel for the platforms supported
so far.
1998-08-07 08:16:31 +00:00
Doug Rabson 29a8d2fd7e Tweaks to console support.
Fixes for AS 600.
1998-08-07 08:15:16 +00:00
Eivind Eklund 7609bd2b9e Fix some things Simon had broken, basically making LINT compile again.
Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
Pointed out by:	bde
1998-08-06 20:57:33 +00:00
Doug Rabson 08b66b4483 Port syscons to the alpha. The driver itself has moved to sys/isa as it will
hopefully become a portable driver usable by all architectures.  The api
support files have had to be copied to sys/alpha/include since userland
programs expect to find them in <machine/*.h>.

All the revision history of the i386 syscons has been retained by a
repository copy.
1998-08-06 09:15:54 +00:00
Kazutaka YOKOTA 11afcc8f9f The daemon, snake and star savers should refuse to load if the current
video mode is the VESA mode, because they cannot work properly under the
VESA mode support as in the current form.
1998-08-06 09:14:26 +00:00
Doug Rabson 1a4290e7f0 Support files for ISA bus. 1998-08-06 08:49:09 +00:00
Doug Rabson d474eaaa5f Protect all modifications to paging_in_progress with splvm(). The i386
managed to avoid corruption of this variable by luck (the compiler used a
memory read-modify-write instruction which wasn't interruptable) but other
architectures cannot.

With this change, I am now able to 'make buildworld' on the alpha (sfx: the
crowd goes wild...)
1998-08-06 08:33:19 +00:00
Brian Somers 30b32223e1 Add Id keyword 1998-08-05 20:19:04 +00:00
Bruce Evans dbfc371858 Removed prototype for gone-away hzto().
Fixed disorder and missing K&R support in prototypes for interrupt
functions.
1998-08-05 18:18:06 +00:00
Bruce Evans 6360628342 Removed unused function hzto(). 1998-08-05 18:06:40 +00:00
Bruce Evans db176bbac6 Converted the last instance of hzto() to tvtohz(). 1998-08-05 16:59:20 +00:00
Bruce Evans 882fdeae66 Converted the second last instance of hzto() to tvtohz().
Fixed nearby bugs (in linux_alarm()):
- the itimer for the alarm was relative to the epoch instead of relative
  to the boot time.  This was harmless because the itimer's interval is 0.
- the seconds arg was not checked for validity before converting it to a
  possibly different value.
- printf format errors.

Improvements:
Don't use splclock().  splsoftclock() suffices.  Don't complicate things
by micro-optimizing interrupt latency.

Minor improvements:
Various micro-optimizations to exploit the specialness of the alarm itimer
and the value 0.
1998-08-05 16:44:30 +00:00
David Greenman 760c5490ee Move assignment of cur_rlp to after the acquisition of the list lock.
PR:	7496
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-08-05 14:06:04 +00:00
Doug Rabson f68b7c5bf8 Define ss_size in struct sigaltstack as size_t instead of int. 1998-08-05 09:04:36 +00:00
Eivind Eklund b755b88510 Update DPT driver from 1.4.3 to 1.4.5
Submitted by: Simon Shapiro <shimon@simon-shapiro.org>
1998-08-05 00:54:38 +00:00
Julian Elischer 84dd0fd0bb fix broken loopback code for ddp (again)
Submitted by: Stefan Bethke <stb@hanse.de>
1998-08-04 23:17:05 +00:00
Brian Somers c35bda9472 Add driver dgm - for the Digiboard PC/Xem
Submitted by:   "IBS / Andre Oppermann" <andre@pipeline.ch>
DEVFS additions: brian

dgm gets major number 101.
1998-08-04 21:44:09 +00:00
Brian Somers 33ca24de10 Add driver dgm - for the Digiboard PC/Xem
Submitted by:	"IBS / Andre Oppermann" <andre@pipeline.ch>
DEVFS additions: brian
1998-08-04 21:42:27 +00:00
Poul-Henning Kamp 205d5ed6ff remove nonsense code.
PR:		7482
Reviewed by:	phk
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-08-04 09:21:04 +00:00
David Greenman 3114fdb4c0 Implemented a more sophisticated mechanism for handling transmitter
interrupts which now defers them until the transmit queue if filled
up with completed buffers. This has two advantages: first, it reduces
the number of transmitter interrupts to just 1/120th of the rate
that they occured previously, and two, running down many buffers
at once has much improved cache effects.
1998-08-04 08:53:12 +00:00
Bill Paul 33e929e1c4 Fix this thing to work properly with multiple tlan adapters; increment
unit count correctly.

Problem reported by Larry Baird <lab@gta.com>.
1998-08-04 01:38:52 +00:00
Mike Smith 194b64e83d Correct an irritating documentation error.
(get_diskinfo is unnecessarily obfuscated)
1998-08-04 00:39:45 +00:00
Mike Smith e827c66461 Copy in the nfs_diskless structure if NFS_ROOT is defined. A previous
change to include nfs_root.h precluded NFS from being defined.
Submitted by:	Parag Patel <parag@cgt.com>
1998-08-03 21:31:32 +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
Doug Rabson a467a475ab Use explicitly sized types when digging through packet headers.
Reviewed by: Julian Elischer <julian@whistle.com>
1998-08-03 17:23:37 +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
KATO Takenori 127c346fec Sync with sys/i386/isa/syscons.h revision 1.38. 1998-08-03 10:50:57 +00:00
KATO Takenori b7138d3739 Sync with sys/i386/isa/syscons.c revision up to 1.271. 1998-08-03 10:50:27 +00:00
KATO Takenori 93e52f2dce Sync with sys/i386/i386/userconfig.c revision 1.106. 1998-08-03 10:49:18 +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
Bill Paul c3ed41584c Updates for the ThunderLAN driver:
- probe for PHYs by checking the BMSR (phy status) register instead
  of the vendor ID register.

- fix the autonegotiation routine so that it figures out the autonegotiated
  modes correctly.

- add tweaks to support the Olicom OC-2326 now that I've actually had
  a chance to test one

	o Olicom appears to encode the ethernet address in the EEPROM
	  in 16-bit chunks in network byte order. If we detect an
	  Olicom card (based on the PCI vendor ID), byte-swap the station
	  address accordingly.

	  XXX The Linux driver does not do this. I find this odd since
	  the README from the Linux driver indicates that patches to
	  support the Olicom cards came from somebody at Olicom; you'd
	  think if anyone would get that right, it'd be them. Regardless,
	  I accepted the word of the disgnoatic program that came bundled
	  with the card as gospel and fixed the attach routine to make
	  the station address match what it says.

	o The version of the 2326 card that I got for testing is a
	  strange beast: the card does not look like the picture on
	  the box in which it was packed. For one thing, the picture
	  shows what looks like an external NS 83840A PHY, but the
	  actual card doesn't have one. The card has a TNETE100APCM
	  chip, which appears to have not only the usual internal
	  tlan 10Mbps PHY at MII address 32, but also a 10/100 PHY
	  at MII address 0. Curiously, this PHY's vendor and device ID
	  registers always return 0x0000. I suspect that this is
	  a mutant version of the ThunderLAN chip with 100Mbps support.
	  This combination behaves a little strangely and required the
	  following changes:

		- The internal PHY has to be enabled in tl_softreset().
		- The internal PHY doesn't seem to come to life after
		  detecting the 100Mbps PHY unless it's reset twice.
		- If you want to use 100Mbps modes, you have to isolate
		  the internal PHY.
		- If you want to use 10Mbps modes, you have to un-isolate
		  the internal PHY.

	The latter two changes are handled at the end of tl_init(): if
	the PHY vendor ID is 0x0000 (which should not be possible if we
	have a real external PHY), then tl_init() forces the internal
	PHY's BMCR register to the proper values.
1998-08-03 01:33:12 +00:00
Gary Palmer b177082524 Add the ISP Qlogic SCSI card to the list of known devices. 1998-08-02 09:32:52 +00:00
David Greenman 35517ab7e8 Added 82555B support for media status. 1998-08-02 00:33:38 +00:00
David Greenman 3614387536 Reordered fxp_softc for optimal cacheline behavior. 1998-08-02 00:29:15 +00:00
David Greenman b63e51cae4 Killed unused variable/assignment. 1998-08-02 00:28:45 +00:00
KATO Takenori 7ea1329d05 Sync with sys/i386/boot/netboot/main.c revision 1.23. 1998-08-01 12:20:59 +00:00
Peter Wemm c5fa8d1a2c If we get an ENOBUFS from the network, it's normally transient network
interface congestion (eg: nfs over a ppp link, etc).  Don't log these
for UDP mounts, and don't cause syscalls to fail with EINTR.
This stops the 'nfs send error 55' warnings.

If the error is because the system is really hosed, this is the least
of your problems...
1998-08-01 09:04:02 +00:00
Peter Wemm 9de9737f47 Fix a compile error if IPFIREWALL_FORWARD active without IPDIVERT. 1998-08-01 08:44:33 +00:00
Doug Rabson e35d857d64 Cosmetic change to driver registration. 1998-07-31 09:20:35 +00:00
Doug Rabson bb54cacb41 Make it possible to have a driver registered with more than one parent bus. 1998-07-31 09:18:52 +00:00
Doug Rabson bb6e8960ac Only perform byte/word accesses in the correct EV56 memory space.
Sparse macros have moved to <machine/swiz.h>.
Fix sparse memory access so that it actually works as intended.
Tidy up sparse configuration access slightly.
1998-07-31 09:17:51 +00:00
Doug Rabson 1ba83e535e Add definitions of EV56 INT1/INT2/INT4/INT8 memory spaces. 1998-07-31 09:14:49 +00:00
Doug Rabson df317c7516 Merge with i386/isa/diskslice_machdep.c 1.30 1998-07-31 09:13:25 +00:00
Poul-Henning Kamp 948cb33b78 TFTP_ACK goes to port 69 (default tftp port) and tftpd says 'Timeout'.
It will be sent to source port of received packet.

PR:		7442
Reviewed by:	phk
Submitted by:	Sergey Shkonda <serg@bcs.zp.ua>
1998-07-31 09:03:15 +00:00
Poul-Henning Kamp b3816f9e60 In sys/scsi/st.c, st_close() does not check for errors from calling
st_write_filemarks().  This means that it is possible to write a file
on the tape for which all the writes and the close return without
errors, but the all bits did not make it onto the tape.

PR:		741
Reviewed by:	phk
Submitted by:	Andrew Heybey <ath@niksun.com>
1998-07-31 09:00:39 +00:00
Bruce Evans 89785a1654 Fixed printf format errors. 1998-07-30 17:40:45 +00:00
Bruce Evans 85badd7eba Fixed printf format errors. 1998-07-30 17:12:39 +00:00
Bruce Evans 483de21480 Use the slice interfaces for SCSI cdroms. This centralizes handling
of some disk ioctls and uniformizes bounds checking in the strategy
routine.  EOF handling got fixed as a side effect.  The changes
are similar to old changes for SCSI disks, except slices and labels
are not searched for on the disk and the in-core label has a few
more details (mostly just for backwards compatibility).  Bugs in
the in-core label had to be fixed to get dsopen() to accept it.
The slice interfaces had to support large sectors for all this to
work.
1998-07-30 17:05:10 +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
KATO Takenori 523bea959c Sync with sys/i386/isa/fd.c revision 1.120. 1998-07-30 09:01:12 +00:00
Doug Rabson 82153dc247 Change load address to 0xfffffc0000300000 to help support AS200. 1998-07-30 08:12:14 +00:00
Doug Rabson 25729629a2 Remove spurious printf. 1998-07-30 08:10:26 +00:00
Julian Elischer 49cc016a39 add anti-panic workaround from chris radek (cradek@in221.inetnebr.com)
Not sure why this is needed but but does stop crashes.
1998-07-30 03:22:52 +00:00
Alexander Langer f7aad78d24 Typo fix: teh --> (the|they) 1998-07-30 02:27:41 +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
Doug Rabson 8a8a13c8f0 Only access an int for READU/WRITEU since that is what ptrace is declared to
return.
1998-07-29 18:41:30 +00:00
Doug Rabson a9d81f7c5c Default to FreeBSD if no brand detected. This makes life easier when
bootstrapping from NetBSD/alpha.
1998-07-29 18:39:35 +00:00
Doug Rabson ab1fdd6291 Fix msgbuf so that it actually works properly. 1998-07-29 18:36:29 +00:00
Bruce Evans d974cf4dda Fixed printf format errors. 1998-07-29 17:38:14 +00:00
Bruce Evans e4e6ae1366 Fixed print format errors. 1998-07-29 16:43:00 +00:00
Bruce Evans e33e271f08 Fixed printf format errors.
Use offsetof() instead of null pointer hacks.  Use a home made offsetof()
because including <stddef.h> is not permitted in LKMs.
1998-07-29 15:50:41 +00:00
Bruce Evans e0e2794cd8 Honor NOSHARED for tools. All tools should be built static for
`make world' to avoid problems with picking up (new) target or (stale)
host shared libraries.

Don't honor -static in LDFLAGS for linking LKMs.  LDFLAGS is not
actually for ld, but we use it anyway, and must prevent -static being
misinterpreted as -s.

Don't hide any of the link steps.
1998-07-29 14:19:48 +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
Bruce Evans f9a9c96c25 Centralized and optimized handling of large sectors. Centralized
checking of transfer sizes and alignments.

Old version tested with 2K-sectors on od disks by: Shunsuke Akiyama
<akiyama@kme.mei.co.jp>.
1998-07-29 11:15:54 +00:00
Bruce Evans ea0823f2c9 Use the slice-relative blkno in all parts of the label write
protection checks.  Using the partition-relative blkno in some
parts broke the write protection for partitions at unusual
offsets (only for partitions at offset 1 on i386's).
1998-07-29 08:24:23 +00:00
Kenjiro Cho 4f53e3cc7a update ATM driver. (base version: midway.c 1.67 --> 1.68)
several new features are added:
	- support vc/vp shaping
	- support pvc shadow interface

code cleanup:
	- remove WMAYBE related code.  ENI WMAYBE DMA doen't work.
	- remove updating if_lastchange for every packet.
	- BPF related code is moved to midway.c as it should be.
	  (bpfwrite should work if atm_pseudohdr and LLC/SNAP are
	  prepended.)
	- BPF link type is changed to DLT_ATM_RFC1483.
	  BPF now understands only LLC/SNAP!! (because bpf can't
	  handle variable link header length.)
	  It is recommended to use LLC/SNAP instead of NULL
	  encapsulation for various reasons.  (BPF, IPv6,
	  interoperability, etc.)

the code has been used for months in ALTQ and KAME IPv6.

OKed by phk long time ago.
1998-07-29 05:35:16 +00:00
Joerg Wunsch 57308494ec Make the logging of abnormally exiting processes optional by a sysctl.
PR:		kern/1711
Submitted by:	Nick Sayer <nsayer@kfu.com>
1998-07-28 22:34:12 +00:00
Brian Somers 5c3c780ffa pseudo-device ssc requires su.c (pseudo-device su)
Submitted by: woods@zeus.leitch.com (Greg A. Woods)
PR: 7413
1998-07-28 22:06:16 +00:00
Bruce Evans 1733a6c1df Set bp->b_resid for failed transfers in dscheck(). This is the
best place to set it, and the wd and wfd strategy routines don't
set it (for failed transfers) because they expect dscheck() to
initialize everything necessary.  dscheck() has always set B_ERROR,
but this is not quite sufficient, because b_resid is used by physio()
to decide how much of a B_ERROR'ed i/o was done.
1998-07-28 19:39:09 +00:00
Bruce Evans ce4fb6afc1 Set the disk type to SCSI in the in-core label for the whole disk. 1998-07-28 18:59:49 +00:00
Bruce Evans aa6db4230d Used daddr_t's, not ints, to store disk block numbers. Updated printf
formats and args to match.  Fixed old printf format errors (all related;
most were hidden by calling printf indirectly).

This change somehow avoids compiler bugs for 64-bit longs on i386's,
although it increases the number of 64-bit calculations.
1998-07-28 18:25:51 +00:00
Bruce Evans e539380ea8 Set p->p_switchtime to switchtime instead of to the current time in
fork_trampoline() if switchtime is valid.  This fixes not accounting
for the time between the previous context switch and and the current
time (when the forked child starts up here) in most cases - the time
is now counted in the child's runtime.  I think it actually fixes
all cases, and switchtime is always valid here, since there must have
been a context switch just before the forked child starts up.  Some
code should be removed if this is correct.  The check that switchtime
is valid sometimes gives a false negative because the check isn't
correct until the after the first context switch after the system
has been up for >= 1 second.
1998-07-28 17:55:37 +00:00
Bruce Evans aa839b4b07 Micro-optimized and cleaned up the clearing of switchtime in idle().
Cleaned up the conditionals in the disgusting SMP ifdef in idle().
1998-07-28 17:35:09 +00:00
Bruce Evans ccbbd9271b Fixed two spl nesting bugs. They caused (at least) the entire pageout
daemon to run at splvm() forever after swap_pager_putpages() is called
from vm_pageout_scan().

Broken in: rev.1.189 (1998/02/23)
1998-07-28 15:30:01 +00:00
Jonathan Lemon 525187f914 u_int --> unsigned int, remove (now unneeded) <sys/types.h> 1998-07-28 15:22:51 +00:00
Doug Rabson 51f14853fd Record the new physical address of the pcb in pmap_swapin_proc.
Third attempt at pmap_remove().  This one actually works properly :-).
1998-07-28 09:34:50 +00:00
Poul-Henning Kamp 358cb8ddc1 I have a PD drive (Matsushita PD/CD Drive LF-1600).
The machine can not recognize this PD drive
as neither PD drive nor CD-ROM Drive.
So I can not use CD-ROMs and PDs from FreeBSD.

PR:		7423
Reviewed by:	phk
Submitted by:	Takura Koyama <takura@popweb.ne.jp>
1998-07-28 09:03:37 +00:00
Jonathan Lemon f88a03565a Add wrappers for i386_*_ioperm, i386_vm86 so userland code does
not have to call sysarch() directly.
Added man pages for above, as well as sysarch()
1998-07-28 03:33:27 +00:00
Jonathan Lemon ec9ed6196a Fix an off-by-one error when setting the iomap bits.
Change struct i386_*_iomap to use ints instead of shorts/chars.
  (pointed out by bde long ago, prodded into action by msmith)
1998-07-28 03:29:32 +00:00
Alexander Langer f35f7d0dfd Style fixes and a bug fix: don't remove the exit handler if unmount
fails.

Submitted by:	bde
1998-07-27 22:47:17 +00:00
Bruce Evans bc9e7c3b42 Fixed double counting of runtime after a process exits. The last
timeslice of the exiting process was counted for both the exiting
process and the next process to run if the next process runs
immediately.

Broken in:	mostly in kern_clock.c rev.1.70 (1998/05/28)
1998-07-27 19:16:21 +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
Jonathan Lemon f80a0a922c Re-arrange the page layout used by vm86_bioscall so that we can
potentially re-use the stack page.

Cosmetic cleanup of the code to de-obfuscate it and make it easier
to follow.  There should be no functional changes in this commit.
1998-07-27 16:45:05 +00:00
Bruce Evans 15b29aabe4 Made lazy syncing of timestamps for special files non-optional. 1998-07-27 15:37:00 +00:00
KATO Takenori a0f5e52d43 Sync with sys/i386/isa/diskslice_machdep.c revision 1.30. 1998-07-27 09:49:23 +00:00
Doug Rabson 3260ced375 Macros for accessing alpha sparse device ports and memory. 1998-07-27 09:40:35 +00:00
Doug Rabson 86dd710847 Support the disabled keyword for isa devices. 1998-07-27 09:38:26 +00:00
David Greenman 01ddfa33e6 Only call m_reclaim() if M_WAIT since calling it from an interrupt can
cause problems.
PR:	7403
1998-07-27 03:59:48 +00:00
Alexander Langer 3f47ee5c4d A better solution to the rm_at_exit problem: Register the exit function
during first mount.  Unregister the exit function at last unmount.

Concept by:	sef
Reviewed by:	sef
Implemented by:	alex
1998-07-27 01:07:01 +00:00
Doug Rabson 976a1a2b57 Fix a stupid bug preventing gdb from seeing the right value of 'v0'. 1998-07-26 18:47:47 +00:00
Doug Rabson 56e7ede1c4 Notify pmap when a page is freed on the alpha to allow it to clean up
its emulated modified/referenced bits.
1998-07-26 18:15:20 +00:00
Doug Rabson c99399cccd Fix a stupid bug in the new pmap_remove().
Arrange for soft modified/referenced flags to be cleared when a page is freed.
1998-07-26 18:13:28 +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
Alexander Langer ca2be56ff9 Override the default VFS LKM dispatch functions so that a module
unload function can be provided (this is necessary to unregister
the at_exit handler).
1998-07-25 15:52:44 +00:00
Alexander Langer 38bfd69bda Allow VFS LKMs to override the default module dispatch functions if
VFS_LKM_NO_DEFAULT_DISPATCH is defined.
1998-07-25 15:52:10 +00:00
Doug Rabson 4adac93d90 Make __weak_reference work on the alpha. 1998-07-25 14:37:37 +00:00
Matt Jacob d8bb36bb8a minphys means something different in FreeBSD than in NetBSD- not needed here and in the way 1998-07-25 04:48:25 +00:00
Doug Rabson 72c36e1413 Fix pmap_enter_quick() to stop it hanging when the level 2 pte exists
but isn't valid.

Reimplement pmap_remove() to be much more efficient at removing large
stretches of addresses.

As part of reimplementing pmap_remove() fix pmap_protect() so that it stands
a hope of working.
1998-07-24 09:43:27 +00:00
Julian Elischer 9294f850e8 Don't return an error if the magic number is not present.
Failing to probe is not an error, just a negative result.
1998-07-22 19:37:02 +00:00
David Greenman f3679e351a Improved pager input failure message. 1998-07-22 09:38:04 +00:00
Doug Rabson e8669bcd43 Add a call to a platform-specific irq remapping function for alpha platforms
which don't record the correct irqs in PCI config space.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:40:46 +00:00
Doug Rabson df9efa9a8b On the alpha, ports may be allocated above 64k.
Change the port address argument to pci_map_port to pci_port_t* which is
defined as u_int on the alpha, u_short on i386.  This is a stopgap with a
hopefully limited lifetime.

Discussed with: Stefan Esser <se@freebsd.org>
1998-07-22 08:39:08 +00:00
Doug Rabson 0bf030847d Add some very simple support for a compiled in (from config(8)) resource
database.
1998-07-22 08:35:52 +00:00
Doug Rabson b9ca15f807 Add ISA support.
Remove mcclock hack which was only needed because ISA wasn't done yet.
1998-07-22 08:34:19 +00:00
Doug Rabson ec0bebbce7 Add some convenience functions for accessing device memory.
Add a DDB command to allow access to inb/inw/inl from the debugger.
1998-07-22 08:33:30 +00:00
Doug Rabson 53db2ca0b6 Merge KN20AA support from Andrew Gallatin.
Add support for device memory access.
Add support for ISA irqs.
1998-07-22 08:32:17 +00:00
Doug Rabson 31de2a7751 Move the mcclock from root to isa. 1998-07-22 08:30:25 +00:00
Doug Rabson 905f48d3af Add a simple ISA bus. No support for memory mapped devices or DMA as yet. 1998-07-22 08:29:26 +00:00
Doug Rabson dd5f72e1fc Add sio support. 1998-07-22 08:28:24 +00:00
Doug Rabson 68f6efc27f Add platform functions for manipulating PCI irqs.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:27:56 +00:00
Doug Rabson 41fc8fe7b9 Add declaration of {aquire,release}_timer2(). 1998-07-22 08:26:23 +00:00
Doug Rabson bb4752537d Add macros and chipset support for accessing device i/o memory on the alpha. 1998-07-22 08:25:39 +00:00
Doug Rabson 515cfabc48 Add KN20AA support.
Add entries for syscons.
1998-07-22 08:24:39 +00:00
Doug Rabson 237064085b Tweaks to stop config(8) warnings and to avoid an unfinished experiment of
mine.

Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:23:26 +00:00
Doug Rabson eb7262ea39 Support header for sysbeep() implementation. 1998-07-22 08:21:36 +00:00
Doug Rabson e0fbfbb576 Make ptrace single steps over branches work as intended. 1998-07-22 08:20:57 +00:00
Doug Rabson cbda18ce6e Add support for sio's soft interrupts. 1998-07-22 08:20:15 +00:00
Doug Rabson e17e8bbe72 Support the DEC_KN20AA platform (AlphaStation 500 or 600).
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-22 08:19:39 +00:00
Doug Rabson bba326e18d Merge changes from Andrew Gallatin to support different CIA based platforms.
Add code to identify and attach either serial or VGA console as appropriate.
1998-07-22 08:18:34 +00:00
Doug Rabson b50b3bda1d Add code from i386 to support sysbeep(). Doesn't work quite right but it
makes a noise.
1998-07-22 08:16:34 +00:00
Doug Rabson e344c90c80 Change siocn{put,get}c to siogdb{put,get}c to allow a serial console on one
line with serial debugging on another line.
1998-07-22 08:15:34 +00:00
Poul-Henning Kamp db7ac2451b There is a comment in vm_param.h which doesn't belong to the
code still left in there.  The macros it describes disapeared some-
time since 4.4BSD lite.

PR:		7246
Reviewed by:	phk
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-07-22 06:21:55 +00:00
KATO Takenori 991b3bc3b3 Sync with sys/i386/i386/userconfig.c revision 1.105. 1998-07-21 12:07:49 +00:00
KATO Takenori fd3ae2d6b0 Sync with sys/i386/conf/files.i386 revision 1.199. 1998-07-21 12:07:02 +00:00
KATO Takenori 649db6f0df Sync with sys/i386/isa/diskslice_machdep.c revision 1.29. 1998-07-21 12:06:04 +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 7cb743ae28 Initialize more defaults for the in-core label for the whole disk.
Callers only need to initialize d_secperunit now, but should
initialize d_type (to reduce the IDE/SCSI confusion), d_typename
(put the disk model in it) and geometry info (if it isn't completely
ficticious).  Callers will soon need to initialize d_secsize.
1998-07-20 14:35:27 +00:00
Bruce Evans f21b93a0f7 Cleaned up rev.1.39 - the shadowing variable should have just gone away. 1998-07-20 13:51:11 +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
Doug Rabson 8a261b8f7f Make sure the link level sockaddr size is rounded up correctly on alpha. 1998-07-20 13:21:56 +00:00
Bruce Evans 1e550e3809 Backed out rev.1.43 (removed nonsense SLICE ifdef). SLICE is
normally only defined in opt_devfs.h, so testing it before including
anything is normally a no-op.  Undef'ing DEVFS before including
opt_devfs.h is similarly useless.  OTOH, DEVFS support for sliced
but not SLICEd (despite defined(SLICE)) devices is either harmless
(if there are no such devices, then nothing in this file is used)
or necessary (otherwise).  It even seems to work for sliced cd
devices.
1998-07-20 12:37:59 +00:00
Julian Elischer d73cede61f Start cleaning up the aynchronous probing code for SLICE handlers. 1998-07-20 04:12:40 +00:00
KATO Takenori b0e1d5716a Sync with sys/i386/isa/isa.c revision 1.113. 1998-07-19 15:04:26 +00:00
KATO Takenori 1e023fc3c6 Sync with sys/i386/isa/fd.c revision 1.119. 1998-07-19 15:03:49 +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
Alexander Langer a9a6d1042a Don't log ICMP type and subtype for non-zero offset packet fragments. 1998-07-18 23:27:15 +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
Bill Fenner 0c495036b4 Undo rev 1.41 until we get more details about why it makes some systems
fail.
1998-07-18 18:48:45 +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
Justin T. Gibbs 47402bab91 Correct SEEPROM checksum calculation when multiple checksum attemps are made.
Pointed out by:	"Jose M. Alcaide" <jose@we.lc.ehu.es>
1998-07-16 19:33:43 +00:00
Doug Rabson 3a4215418c Simplify access to PCI config registers. 1998-07-16 13:38:35 +00:00
KATO Takenori d577e090c0 Merge from sys/i386/isa/syscons.c (1.265->1.266). 1998-07-16 10:29:11 +00:00
KATO Takenori c76d1cd8e7 Sync with sys/i386/isa/fd.c revision 1.118. 1998-07-16 10:27:49 +00:00
KATO Takenori f474f59dc4 Sync with sys/i386/i386/userconfig.c revision 1.104. 1998-07-16 10:26:59 +00:00
KATO Takenori d4f1ed8581 Sync with sys/i386/isa/pcaudio.c revision 1.42. 1998-07-16 10:25:50 +00:00
Doug Rabson adf93ebc41 Point at the right place for alpha registers. 1998-07-15 20:18:00 +00:00
Doug Rabson a22401deb1 Make ptrace work. 1998-07-15 20:16:28 +00:00
Doug Rabson 6a5694427a Tweaks for cross-building from NetBSD/alpha.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-07-15 20:12:54 +00:00
Doug Rabson 718c0cbefb Add some debug code. 1998-07-15 20:07:33 +00:00
Doug Rabson a6481f0baf An mc146818a clock attached to an isa bus. 1998-07-15 19:21:31 +00:00
Doug Rabson 28c3132268 Linker script for alpha kernel. 1998-07-15 19:19:24 +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