Commit Graph

11512 Commits

Author SHA1 Message Date
bde
7fa6031415 Removed unused includes. Fixed disordering of includes. 1998-08-17 18:12:52 +00:00
bde
a8d8e4f36a Backed out previous commit. The seconds part of microtime() is
not the necessarily the same as the seconds part of getmicrotime()
yet, and anyway, we should have used `time_second' if we only wanted
a sloppy value for the seconds part.  There is no point in making
ibcs2's time(2) more efficient than FreeBSD's time(3).
1998-08-17 17:53:12 +00:00
bde
faebf197e2 Fixed nonsense overflow checking (checking that a long variable is less
than INT_MAX after it has possibly overflowed).

Removed an unused variable and its associated 2 style bugs.

Removed unused includes.
1998-08-17 17:28:10 +00:00
bde
5b84dcbd90 Oops, the previous commit was of a local version. 1998-08-17 16:58:02 +00:00
bde
d42d660cf9 FIxed typo (syntax error) in previous commit. 1998-08-17 16:46:33 +00:00
dfr
277f8e55a3 Don't use unaligned accesses when printing extended sense codes. 1998-08-17 09:24:31 +00:00
dfr
c4be7fbe0d Add macros for accessing device memory. 1998-08-17 08:57:05 +00:00
dfr
571e764758 Add Miata system type and pull in the LOCATE_PCS macro from NetBSD. 1998-08-17 08:26:12 +00:00
dfr
9892f6ef43 Add breakpoint() for BREAK_TO_DEBUGGER. 1998-08-17 08:21:31 +00:00
kato
752b7f7829 Sync with sys/i386/isa/lpt.c revision 1.70. 1998-08-17 08:21:09 +00:00
dfr
988c605cbc Update to work with the new elf headers. 1998-08-17 08:06:31 +00:00
dfr
e6912eb9df Update to use elf_generic.h. 1998-08-17 08:05:55 +00:00
dfr
c6e0f3c5a9 Disable some unnecessary debugging code. 1998-08-17 08:04:42 +00:00
jb
542d7ab6fb Remove support for NetBSD syscalls. 1998-08-17 03:46:10 +00:00
bde
08a3400100 Fixed printf format errors. 1998-08-17 01:05:25 +00:00
bde
e36ab6ee5e 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
bde
962153c89f 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
bde
62f78df80f 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
wpaul
e55024e4a5 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
des
62d97a08f1 Enable kernel dumps on SLICE systems. 1998-08-16 11:27:19 +00:00
jdp
dfd721300d Make ELF kernels build again. 1998-08-16 04:19:03 +00:00
jdp
d1ce81d497 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
bde
b48943eaac Fixed a style bug (a long line) in the previous commit. 1998-08-16 01:47:19 +00:00
bde
9e27b29fba 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
bde
e14b44bbf3 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
bde
0277aae350 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
bde
9fa8a2d794 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
bde
8814b380eb 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
bde
c96f169902 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
bde
a1f9eb2f92 Oops, the printf format error fixes confused curp->area with a pointer. 1998-08-15 22:42:20 +00:00
bde
5f7c8e3023 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
bde
ddbe8db9de 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
bde
d1358702bf 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
bde
a879550a11 Use offsetof() to avoid some casts from pointers to integers (of a
possibly different size).
1998-08-15 21:36:16 +00:00
kato
5ca303da6b - 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
fe956e0121 Sync with sys/i386/isa/syscons.c revision 1.274. 1998-08-15 09:04:03 +00:00
sos
d3334625c1 Only write a filemark on close when data has actually been written. 1998-08-14 15:54:57 +00:00
dfr
ac607ab8a6 Change cmd argument to dsioctl from int to u_long. 1998-08-14 08:04:39 +00:00
sos
2b2a0492a3 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
msmith
34dae5c76b 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
gibbs
c0198b7da7 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
bde
122a406545 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
bde
41c7b6c82e 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
dfr
80d9c672e1 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
dfr
cb85cf3e66 Protect all modifications to v_numoutput with splbio(). 1998-08-13 08:09:08 +00:00
dfr
a1b2079000 Protect all modifications to paging_in_progress with splvm(). 1998-08-13 08:05:13 +00:00
kato
f99964396a Sync with sys/i386/isa/sio.c revision 1.210. 1998-08-13 07:36:40 +00:00
brian
4a3d2c5945 Remove some #if 0'd and commented-out code.
Fix a COMPAT_43 type.
1998-08-12 23:44:22 +00:00
wpaul
08847958af 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
msmith
64b624ba3e "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
4c11bd9897 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
bde
92b68e1a4b 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
bde
1cc6f29454 Removed support for FreeBSD-1.x. 1998-08-12 18:32:42 +00:00
bde
7ba073c47b Fixed printf format errors.
Removed support for FreeBSD-1.x.
1998-08-12 18:16:38 +00:00
bde
46511a93b0 Removed unused includes. 1998-08-12 18:02:48 +00:00
bde
8f2e632f8e 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
bde
aa85f8375f Fixed printf format errors.
This file is disgusting.
1998-08-12 16:16:10 +00:00
dfr
83a1a3f541 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
bde
d7bdb145cf Removed a bogus ifdef that broke using SWI_* in LKMs.
Fixed a comment.
1998-08-11 19:21:17 +00:00
bde
e86a04ed70 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
bde
69681e7b69 Don't depend on "implicit int". 1998-08-11 17:22:42 +00:00
bde
d22b2d54d1 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
bde
51ac0ee7af Fixed printf format errors. 1998-08-11 16:06:10 +00:00
bde
577b83a70e 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
dfr
fd999b742a Add code from NetBSD to print CIA capabilities and try to detect Pyxis bugs. 1998-08-11 08:51:09 +00:00
dfr
3454605751 Sync with i386/isa/diskslice_machdep.c 1.31. 1998-08-11 07:17:36 +00:00
bde
7ee8c191d2 Fixed null setting of multiple wakeup prevention variable.
Fixed printf format errors.
1998-08-10 20:47:22 +00:00
bde
8116baf9ca 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
bde
d09c7eccb2 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
bde
fd093a92ab 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
024fab2785 Sync with sys/i386/isa/syscons.c revision 1.273. 1998-08-10 16:56:53 +00:00
kato
439d4f873f Sync with sys/i386/isa/diskslice_machdep.c revision 1.31. 1998-08-10 16:55:54 +00:00
kato
27e9e805e9 Sync with sys/i386/conf/majors.i386 revision 1.45. 1998-08-10 16:54:47 +00:00
kato
6735f4763b Sync with sys/i386/conf/options.i386 revision up to 1.84. 1998-08-10 16:54:09 +00:00
bde
5f83b9b480 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
phk
a5a666bcc2 Reserve majors for M-Systems DiskOnChip driver. This driver will be
available directly from M-systems.
1998-08-10 09:06:21 +00:00
yokota
a6000f043c - Added SC_BAD_FLICKER for syscons.
- Added the flag 0x40 (quiet bell) for syscons.
1998-08-10 08:40:27 +00:00
yokota
ec2542bd97 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
dfr
adbadeedc1 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
phk
456dc60f9a 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
sos
e7de6ad9e2 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
jkh
5328be2c72 MF22: Shut this thing up by default. 1998-08-09 02:22:34 +00:00
jkh
e06e9def27 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
sos
a5e1d6e09c 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
912ec94d68 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
da1fbd5e25 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
e0b43fcc69 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
9ba96f2266 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
dfr
27d404a37f Remove a stupid hack of mine which prevented PCI io memory access on the alpha. 1998-08-07 08:20:36 +00:00
dfr
2882dcd255 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
dfr
f43a7c1a9c Add some more useful macros.
Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
1998-08-07 08:17:39 +00:00
dfr
3f4718364a Update so that it should build a working kernel for the platforms supported
so far.
1998-08-07 08:16:31 +00:00
dfr
f0dc47baed Tweaks to console support.
Fixes for AS 600.
1998-08-07 08:15:16 +00:00
eivind
4ffa6467e9 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
dfr
a90f51195a 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
yokota
c6de79f7a5 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
dfr
811562429d Support files for ISA bus. 1998-08-06 08:49:09 +00:00
dfr
0864bef679 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
b0987fb412 Add Id keyword 1998-08-05 20:19:04 +00:00
bde
a5af6bd48f 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