Commit Graph

11455 Commits

Author SHA1 Message Date
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
Bruce Evans
30166fabb6 Cast between longs and pointers via intptr_t. There shouldn't be
nearly so many casts here.  Casting an pointer that was an integer
back to an integer just to compare it with -1 is bad, and casting
it back just to compare it with NULL is just wrong.
1998-07-15 06:51:14 +00:00
Bruce Evans
d4d88b1e4d Cast between u_longs and object pointers via uintptr_t.
Access the entry address as a uintfptr_t, not as a long, and not
necessarily as what modload(8) passes (it takes a u_long from the
exec header and passes a u_int).
1998-07-15 06:39:12 +00:00
Bruce Evans
aae0aa4593 Cast between longs and pointers via intptr_t. The results of fuword()
should be checked before casting.  The results of suword() should be
checked.
1998-07-15 06:19:33 +00:00
Bruce Evans
1ede4662be Cast longs to intptr_t before casting them to pointers.
Fixed bitrot in pseudo-declaration of `struct fcntl_args'.  fcntl()
is now broken in some cases when ints are larger than longs.
1998-07-15 06:10:16 +00:00
Bruce Evans
c2da0fd903 Cast pointers to intptr_t instead of or before casting to long.
Fixed bitrot in K&R support (suword() now takes a long word).
Didn't fix corresponding bitrot in store.9 and fetch.9.

The correct types for the store and fetch families are problematic.
The `word' functions are unfortunately named and need to be split
to handle ints/longs/object pointers/function pointers.  Storing
argv[] as longs is quite broken when longs are longer than pointers,
but usually works because it clobbers variables that will soon be
reinitialized.
1998-07-15 05:21:48 +00:00
Bruce Evans
7cd99438f8 Cast u_longs to uintptr_t before casting them to pointers. Don't
attempt to even partially support systems with function pointers
larger than object pointers.
1998-07-15 05:00:26 +00:00
Bruce Evans
6a206dd96a Cast function pointers to uintfptr_t before casting them to u_long.
Hopefully caddr_t is large enough to hold function pointers.

Cast object pointers to uintptr_t before casting them to u_long.

Types are wronger than usual for the PT_READ_U case.  ptrace() can
only return ints, but longs are accessed.
1998-07-15 04:43:49 +00:00
Bruce Evans
15c7382561 Cast pointers to [u]intptr_t instead of to [unsigned] long. 1998-07-15 04:17:55 +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
Bruce Evans
a23d65bfc8 Cast pointers to uintptr_t/intptr_t instead of to u_long/long,
respectively.  Most of the longs should probably have been
u_longs, but this changes is just to prevent warnings about
casts between pointers and integers of different sizes, not
to fix poorly chosen types.
1998-07-15 02:32:35 +00:00
Søren Schmidt
aad7cac45a Add support for the AVer Media range of cards. 1998-07-14 21:19:58 +00:00
Mike Smith
bf707fd0b2 Add missing register name defines. 1998-07-14 17:13:23 +00:00
Bruce Evans
eb95adeff5 Print pointers using %p instead of attempting to print them by
casting them to long, etc.  Fixed some nearby printf bogons (sign
errors not warned about by gcc, and style bugs, but not truncation
of vm_ooffset_t's).
1998-07-14 12:26:15 +00:00
Bruce Evans
101eeb7f9f Print pointers using %p instead of attempting to print them by
casting them to long, etc.  Fixed some nearby printf bogons (sign
errors not warned about by gcc, and style bugs, but not truncation
of vm_ooffset_t's).

Use slightly less bogus casts for passing pointers to ddb command
functions.
1998-07-14 12:14:58 +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
b017a12bfd If object pointers need to be cast to [unsigned] integers, then cast
to [u]intptr_t instead of to [u_]long.

Don't cast pointers to integers just to do ordinary pointer arithmetic
on them, especially when the casts use gcc's feature of casting lvalues.
1998-07-14 11:34:22 +00:00
Bruce Evans
88472e74e8 Avoid some casts of pointers to integers (of possibly different sizes). 1998-07-14 11:19:32 +00:00
Amancio Hasty
596e9516c8 I checked in the wrong version yesterday . The correct version is 1.38
Amancio
1998-07-14 07:11:20 +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
Bill Paul
fb1305c426 Declare pointers to CSR register space to be volatile. This seems to
cure the problems I was having with interrupts not being acknowledged
on time. This fixes a problem I observed where starting two ping -f
processes at 10Mbps would cause an adapter check due to TX GO commands
being issued before TXEOC interrupts were being acked.

Also fix a small problem with tl_start(): the mechanism I was using
to queue new packets onto the TX chain was bogus.

Change adapter check handler so that it resets card state after
tl_softreset() is stored.

Moved all EEPROM-related macro definitions into if_tlreg.h.

Don't allow an autoneg session to start until after the TX queue has
been drained, and don't transmit anything until after the autoneg
session is complete.

Also add support for two more Compaq ThunderLAN-based cards, and three
cards from Olicom which also use the ThunderLAN chip. The only thing
different about the Olicom cards is that they store the station address
at a different location within the EEPROM.
1998-07-13 18:15:48 +00:00
Bruce Evans
5914e1ea80 Removed a bogus forward struct declaration.
Cleaned up ifdefs.
1998-07-13 12:20:07 +00:00
Bruce Evans
0c8d2590e3 Fixed some longs that should have been fixed-sized types. 1998-07-13 12:12:25 +00:00
Bruce Evans
9105bb4680 Fixed overflow and sign extension bugs in
`len = min(so->so_snd.sb_cc, win) - off;'.  min() has type u_int
and `off' has type int, so when min() is 0 and `off' is 1, the RHS
overflows to 0U - 1 = UINT_MAX.  `len' has type long, so when
sizeof(long) == sizeof(int), the LHS normally overflows to to the
correct value of -1, but when sizeof(long) > sizeof(int), the LHS
is UINT_MAX.

Fixed some u_long's that should have been fixed-sized types.
1998-07-13 11:53:59 +00:00
Bruce Evans
07a4df4fee Declare tcp_seq and tcp_cc as fixed-size types. Half fixed type
mismatches exposed by this (the prototype for tcp_respond() didn't
match the  function definition lexically, and still depends on a
gcc feature to match if ints have more than 32 bits).
1998-07-13 11:09:52 +00:00
Bruce Evans
99c819ef77 Declare id_mask as a fixed-size type. 1998-07-13 11:01:03 +00:00
Bruce Evans
e53040ef71 Declare n_short, n_long and n_time as fixed-sized types. Don't ifdef
n_long or n_short specially for alphas.
1998-07-13 10:54:24 +00:00
Bruce Evans
c086febef5 Don't attempt to optimize the space allocated for bpf headers if
sizeof(struct bpf_hdr) > 20.  20 is normal on 32-bit systems with
32-bit alignment, but we still assume that the last 2 bytes of the
struct are unnecessary padding on such systems.  On systems with
64-bit longs, struct timeval is bloated to 16 bytes, so bpf headers
certainly don't fit in 18 bytes.
1998-07-13 10:44:02 +00:00
Bruce Evans
9bffbcd4f5 Fixed printf format errors (only 1 left in GENERIC now). 1998-07-13 09:53:11 +00:00
KATO Takenori
6baa65474d Sync with sys/i386/isa/fd.c and wd.c revisions 1.117 and 1.172,
respectively.
1998-07-13 09:29:25 +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
9f14a215f4 Fixed printf format errors. 1998-07-13 07:05:55 +00:00
Bruce Evans
748993b899 Added macros __printflike() and __scanflike() to <sys/cdefs.h>.
Use them to `make gcc -Wformat' check formats for all printf-like
and scanf-like functions in /usr/src except for the err()/warn()
family.  err() isn't quite printf-like since its format arg can
legitimately be NULL.  syslog() isn't quite printf-like, but gcc
already accepts %m, even for plain printf() when it shouldn't.
1998-07-13 06:45:23 +00:00
Julian Elischer
eaaeb9f30c Fix braino in last commit.
Not even sure how I got this commit in as it didn't even compile.
1998-07-13 06:34:02 +00:00
Amancio Hasty
63ca8cabf9 Improved Hauppauge's tuner detection and bt878 support
Amancio
1998-07-13 02:16:34 +00:00
Stefan Eßer
e1b7cfe2bf Remove unused member reselet from struct tstamp. 1998-07-12 20:32:52 +00:00
Stefan Eßer
e275daef22 Fix size of time stamps (had been time_t before the variable "time" was
hidden). Now "ticks" are used, which are 4 byte, not 8 byte in size.
The size mismatch did not matter due to sufficient padding at the end
of the structure that holds time stamps (there is an unused member).

The fix suggested by Bruce Evans used "sizeof (ticks_t)", but I prefer
to use "sizeof ticks", and didn't seem to object in his last mail on
this topic.

Submitted by:	bde
1998-07-12 20:26:45 +00:00
Doug Rabson
722a066c80 Set the minimum malloc bucket to 5. In a DIAGNOSTIC kernel, the extra
data in struct freelist is larger than 16 bytes on the alpha.
1998-07-12 16:49:54 +00:00
Doug Rabson
8596f3994f Point at the correct disk location for alpha disklabels. 1998-07-12 16:48:08 +00:00
Doug Rabson
3a43ad8f22 Make sure the packet is aligned correctly for the alpha in if_simloop. 1998-07-12 16:46:52 +00:00
Doug Rabson
7a6c46b55a Initialise all the fields separately in vattr_null since on the alpha
they are not all the same width.
1998-07-12 16:45:39 +00:00
Doug Rabson
52c008e810 Overhaul the spl system so that it actually works properly. 1998-07-12 16:32:10 +00:00
Doug Rabson
8e8c234f4d Don't bother calling pmap_emulate_reference() from cpu_fork(). It isn't
needed and it panics a DIAGNOSTIC kernel.
1998-07-12 16:30:58 +00:00
Doug Rabson
bb8a6f725b Define option DEC_EB164 1998-07-12 16:28:09 +00:00
Doug Rabson
3a130d871a Add entry for prom console. 1998-07-12 16:27:34 +00:00
Doug Rabson
8777a8098d Add some bits and pieces for my test box. 1998-07-12 16:26:52 +00:00
Doug Rabson
d538e9fca6 Update to new interrupt api. 1998-07-12 16:23:19 +00:00
Doug Rabson
45c95fa1d6 Change interrupt api to be closer to intr_create/intr_connect. 1998-07-12 16:20:52 +00:00
Doug Rabson
d19af714d3 Implement CIA interrupts.
Obtained from: SRM console magic from NetBSD
1998-07-12 16:17:54 +00:00
Doug Rabson
b46e6c4115 Implement intr_create/intr_connect. 1998-07-12 16:16:22 +00:00
Doug Rabson
2895b128c7 Implement promcncheckc. 1998-07-12 16:15:06 +00:00
Doug Rabson
a85c203100 Add some debug code.
Always clear TLB in pmap_activate, even if activating curproc's pmap.
1998-07-12 16:13:54 +00:00
Doug Rabson
78e3c75746 Add a couple of sysctls and implement sendsig/sigreturn.
Obtained from: signal code from NetBSD
1998-07-12 16:10:52 +00:00
Doug Rabson
56abfaf4eb Add some generic interrupt dispatch code. 1998-07-12 16:09:30 +00:00
Doug Rabson
cefd88ce75 Add definition of p_switchtime. 1998-07-12 16:08:15 +00:00
Doug Rabson
3b7389bd33 Include opt_ddb.h. 1998-07-12 16:07:43 +00:00
Doug Rabson
323df54807 Hardwire the root disk of my test box for now. 1998-07-12 16:07:05 +00:00
KATO Takenori
0faba01ed8 Sync with sys/i386/conf/Makefile.i386 revision 1.117. 1998-07-12 14:30:54 +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
95de6ecfe8 Prepare to handle MAXUSERS as a normal option. 1998-07-12 01:48:14 +00:00
KATO Takenori
c435f1ef25 Sync with sys/i386/isa/wd.c revision 1.171. 1998-07-11 17:02:48 +00:00
KATO Takenori
13992e6dc1 Sync with sys/i386/isa/fd.c revision 1.116. 1998-07-11 17:02:07 +00:00
KATO Takenori
70e1187f6c Sync with sys/i386/isa/diskslice_machdep.c revision 1.28. 1998-07-11 17:01:25 +00:00
KATO Takenori
e1c32d9d2d Sync with sys/i386/i386/machdep.c revision 1.303. 1998-07-11 17:00:33 +00:00
Bruce Evans
bef7db2e66 Moved definition of fscale from param.c to kern_synch.c where it
should always have been (it has no user-servicable parts even at
compile time) and staticized it.
1998-07-11 13:06:41 +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
92c4c4eb52 Fixed printf format errors. 1998-07-11 12:07:52 +00:00
Bruce Evans
fc62ef1fb5 Fixed printf format errors. 1998-07-11 11:30:46 +00:00
Bruce Evans
767dfb80f8 Fixed printf format errors. 1998-07-11 11:10:46 +00:00
Bruce Evans
da2181925b Fixed printf format errors. 1998-07-11 10:51:01 +00:00
Bruce Evans
2f18a2801b Fixed printf format errors. 1998-07-11 10:45:45 +00:00
Bruce Evans
ed62fb52ec Fixed printf format errors. 1998-07-11 10:28:47 +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
Alexander Langer
c5b75d8223 Removed no longer valid comment about swb_block being int instead of
daddr_t.

PR:		7238
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-07-10 21:50:17 +00:00
Alexander Langer
427e99a0b8 Removed unnecessary test from if/else construct.
PR:		7233
Submitted by:	Stefan Eggers <seggers@semyam.dinoco.de>
1998-07-10 17:58:35 +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
1009171eb2 Oops, forgot to modify the pointer-int typedefs from the i386 version. 1998-07-10 02:34:50 +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
Julian Elischer
f763857cff Add code missed in the initial Soft updates integration.
Make the unallocated parts of a directry have a know state
in case we need it later.
1998-07-10 00:10:20 +00:00
Julian Elischer
4ec1acf055 Slight optimisation. Don't do the same calculation twice. 1998-07-09 02:00:02 +00:00
Julian Elischer
bcbd6c6fdd Don't update superblock if mounted readonly,
also fixes some problems with softupdates on root.
More cleanups are needed here..
Submitted by: Luoqi Chen <luoqi@watermarkgroup.com>
1998-07-08 23:52:27 +00:00
KATO Takenori
ff8cc45a43 Oops, I broke netboot.
Submitted by:	Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp>
1998-07-08 16:01:34 +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
e0c38587af Fixed (un)sign extension bugs in %+n format. -4 became
(long)(u_long)(u_int)-4 = 0x00000000fffffffc on machines with 32-bit
ints and 64-bit longs.

Restored %z format for printing signed hex.  %+x shouldn't have been
used since it is an error in userland.

Prepared to nuke %n format by cloning it to %r.  %n shouldn't have
been used because it means something completely different in
userland.  Now %+r is equivalent to ddb's original %r, and %r is
equivalent to ddb's original %n.

Ignore '+' flag in combination with unsigned formats %{o,p,u,x}.
1998-07-08 10:41:32 +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
KATO Takenori
e809645c27 Sync with sys/i386/isa/syscons.c revision 1.265. 1998-07-08 08:54:38 +00:00
KATO Takenori
5c59deba3c Sync with sys/i386/boot/netboot/Makefile revision 1.19. 1998-07-08 08:53:43 +00:00
David Greenman
0af8d3ec72 When not acting as a router (ipforwarding=0), silently discard source
routed packets that aren't destined for us, as required by RFC-1122.
PR: 7191
1998-07-08 08:49:51 +00:00
Bruce Evans
90163a9b33 Fixed db_printf format errors. 1998-07-08 06:43:57 +00:00
Sean Eric Fagan
c5edb423c6 Add support for run-time configuration of core file names. In a nutshell,
you can specify the corefile name by using:

	sysctl -w kern.corefile="format"

where format is a pathname (relative or absolute -- default is "%N.core"),
with "%N" (process name), "%P" (process ID), and "%U" (user ID) formats.

Reviewed by:	Mike Smith, with strong requests by Julian :)
1998-07-08 06:38:39 +00:00
Bruce Evans
b1bf7bc679 Fixed db_printf format errors (except for ones using broken extensions
(nonstandard %n and '+' with %x), and ones not found by -Wformat on
386's (some db_expr_t's are still printed as ints).

I decided not to change the arg type for %n from [unsigned] int to
register_t, since about half of the uses of %n are to print plain
ints and casting to [unsigned] long for %n is no harder than for %x.
1998-07-08 06:27:22 +00:00
Peter Wemm
e77902181c Merge changes from vendor branch. 1998-07-08 01:24:37 +00:00
Julian Elischer
6deaf84b1f Catch a few corner cases where FreeBSD differs enough from BSD 4.4 to
confuse Soft updates..
Should solve several "dangling deps" panics.
1998-07-08 01:04:33 +00:00
John Polstra
5f9f3cb473 Add definitions for PT_LOPROC and PT_HIPROC.
Submitted by:	Kapil Chowksey <kchowksey@hss.hns.com>
1998-07-07 23:32:57 +00:00
Bruce Evans
6aa42d9a4e Changed #if defined(i386)' to #ifdef __i386__'.
`#if defined(ONE_THING)' is a style bug, and i386 instead of __i386__
is a bug, since i386 is never defined when the kernel is compiled
by with the default flags (`gcc -ansi ...').  Here the bug disabled
the call to pmap_setvidram(), so ISA video memory was not mapped
WC on 686's.  The bug may have been masked by bugs in the committer's
version of gcc - `gcc -ansi' incorrectly defines i386 for gcc = the
version of egcs on the 2.2.6 cdrom.
1998-07-07 05:00:09 +00:00
Bruce Evans
c4ebf24f6e Don't depend on gcc's feature of casting lvalues. 1998-07-07 04:36:23 +00:00
Bruce Evans
a9a252909a Don't assume that longs are 32 bits in struct dos_partition. 1998-07-07 04:19:25 +00:00
Bruce Evans
96eb19e1a3 Quick fix for type mismatches which were fatal if longs aren't 32
bits.  We used a private, wrong, version of `struct dirent' to help
break getdirentries(), and we use a silly check that the size of this
struct is a power of 2 to help break mount() if getdirentries() would
not work.  This fix just changes the struct to match `struct dirent'
(except for the name length).
1998-07-07 04:08:44 +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
Bruce Evans
90665a1b48 Finished previous fix - don't forget to add one dummy options header
to CLEANFILES.

Fixed lots of style bugs.
1998-07-07 02:27:09 +00:00
Bruce Evans
8c1a5985d2 Added a `build-tools' target for internal tools. (linux_genassym may
not actually work for cross compiling, but that is another problem.)

Honor LDFLAGS for building internal tools.  (Tools should normally
be built static to avoid problems with picking up target shared
libraries.  bsd.kmod doesn't set -static yet, and has some problems
with `LDFLAGS=-static ...' in the environment.)
1998-07-07 02:04:20 +00:00
Bill Fenner
dece5b6a43 Introduce (fairly hacky) workaround for odd TCP behavior with application
writes of size (100,208]+N*MCLBYTES.

The bug:
 sosend() hands each mbuf off to the protocol output routine as soon as it
 has copied it, in the hopes of increasing parallelism (see
  http://www.kohala.com/~rstevens/vanj.88jul20.txt ). This works well for
 TCP as long as the first mbuf handed off is at least the MSS.  However,
 when doing small writes (between MHLEN and MINCLSIZE), the transaction is
 split into 2 small MBUF's and each is individually handed off to TCP.
 TCP assumes that the first small mbuf is the whole transaction, so sends
 a small packet.  When the second small mbuf arrives, Nagle prevents TCP
 from sending it so it must wait for a (potentially delayed) ACK.  This
 sends throughput down the toilet.

The workaround:
 Set the "atomic" flag when we're doing small writes.  The "atomic" flag
 has two meanings:
 1. Copy all of the data into a chain of mbufs before handing off to the
    protocol.
 2. Leave room for a datagram header in said mbuf chain.
 TCP wants the first but doesn't want the second.  However, the second
 simply results in some memory wastage (but is why the workaround is a
 hack and not a fix).

The real fix:
 The real fix for this problem is to introduce something like a "requested
 transfer size" variable in the socket->protocol interface.  sosend()
 would then accumulate an mbuf chain until it exceeded the "requested
 transfer size".  TCP could set it to the TCP MSS (note that the
 current interface causes strange TCP behaviors when the MSS > MCLBYTES;
 nobody notices because MCLBYTES > ethernet's MTU).
1998-07-06 19:27:14 +00:00
Justin T. Gibbs
2f333cd887 Attempt to load serial eeprom contents in both 93c46 and 93c56/66 mode before
giving up.

PR: 6966
1998-07-06 18:38:57 +00:00
Eivind Eklund
c8cedb4e27 "vender" -> "vendor"
Requested by:	Aage Røbekk <aagero@aage.priv.no>
1998-07-06 16:10:06 +00:00
Eivind Eklund
d860c4c0e9 Shorten line.
Prodded (long time ago) by:	bde
1998-07-06 16:07:43 +00:00
KATO Takenori
36a5980c70 Sync with sys/i386/isa/fd.c and wd.c revisions 1.115 and 1.170,
respectively.
1998-07-06 10:09:42 +00:00
Julian Elischer
3a1ae084e2 oops ended comment before the comment ended.. 1998-07-06 09:10:56 +00:00
Julian Elischer
efe39c6a1a Bring back some slight cleanups from 2.2 1998-07-06 09:06:58 +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
1f7e052c16 Don't expect the new code to be used without the right option file being
included.
1998-07-06 05:04:33 +00:00
Julian Elischer
d4295c3248 Fix braino in switching to TAILQ macro. 1998-07-06 05:00:53 +00:00
Julian Elischer
cdcc2613ac Forgot to register the IPFIREWALL_FORWARD option. 1998-07-06 04:55:22 +00:00
Julian Elischer
f9e354df42 Support for IPFW based transparent forwarding.
Any packet that can be matched by a ipfw rule can be redirected
transparently to another port or machine. Redirection to another port
mostly makes sense with tcp, where a session can be set up
between a proxy and an unsuspecting client. Redirection to another machine
requires that the other machine also be expecting to receive the forwarded
packets, as their headers will not have been modified.

/sbin/ipfw must be recompiled!!!

Reviewed by:	Peter Wemm <peter@freebsd.org>
Submitted by: Chrisy Luke <chrisy@flix.net>
1998-07-06 03:20:19 +00:00
Julian Elischer
6312920c20 DEVFS completely bypasses the cdevsw and bdevsw tables now.
Each devfs node has (and has had fro a while) a pointer directly to
the correct cdefsw entry so just use it instead of doing the lookup.

There are several other places in the kernel that still use the tables
however, so they can't go away yet..
1998-07-05 23:10:22 +00:00
Julian Elischer
596f8506ad fix braino from yesterdays' megacommit
Not sure of the result of it..
(may or may not effect anything) but it's fixed now.
(found by: comparing what cvsup sent back to me with what I tested..)
1998-07-05 20:33:18 +00:00
Doug Rabson
be90e52a12 Add support for kernel gdb. 1998-07-05 12:24:18 +00:00
Doug Rabson
638ccebd00 Use byte/word access in badaddr if relevant. 1998-07-05 12:22:56 +00:00
Doug Rabson
36ed9b0405 Support channel B as well as channel A. 1998-07-05 12:16:55 +00:00
Doug Rabson
e6d4206665 Add basic support for 2117x pci chipsets. Currently only pyxis (21174)
is supported.  Older chipsets will be easy to support later but right now,
I just want to boot my 164LX scratch machine :-).
1998-07-05 12:16:15 +00:00
Doug Rabson
e16d98b08c Add macros for byte/word sized load and store instructions. 1998-07-05 12:14:15 +00:00
Doug Rabson
ac49021837 Add declaration of the NetBSD/alpha bootinfo. 1998-07-05 12:13:18 +00:00
Doug Rabson
b3cfa43c24 First steps at supporting EB164 (AlphaPC 164, 164LX, 164SX). 1998-07-05 12:10:10 +00:00
Doug Rabson
5aade7d9d3 Define bio_imask to allow the ncr driver to compile. The idea of passing
mask address around when registering interrupts is wrong IMHO.  We should
use a priority level like IPL_BIO and the lower levels can then translate
it into a mask if they want.
1998-07-05 12:08:59 +00:00
Doug Rabson
43ab2043e9 Make the prom console work as a real device as well as a console. 1998-07-05 11:59:44 +00:00
Doug Rabson
86cabe47cb Make sure hold_count for level 2 maps is maintained properly.
Simplify pmap_mapdev (its still totally wrong for the alpha).
1998-07-05 11:58:35 +00:00
Doug Rabson
711458e3e9 Don't truncate the return value of mmap to sizeof(int). 1998-07-05 11:56:52 +00:00
Doug Rabson
6521fa6115 Minor tidying. 1998-07-05 10:14:32 +00:00
Doug Rabson
f3dadb8e75 Use u_int32_t in NQFHHASH instead of u_long. 1998-07-05 10:13:22 +00:00
Doug Rabson
46e5fdffb9 Remove the two single step breakpoints in the reverse order of setting to
ensure that single stepping a branch to the next instruction works.
1998-07-05 10:12:18 +00:00
Doug Rabson
398a2b53c4 Add symtab parameter to X_db_symbol_values. 1998-07-05 10:11:20 +00:00
Doug Rabson
1bfc653bbc Support 'g' format for printing 8 byte values. 1998-07-05 10:10:33 +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
Julian Elischer
fd5d1124e2 VOP_STRATEGY grows an (struct vnode *) argument
as the value in b_vp is often not really what you want.
(and needs to be frobbed). more cleanups will follow this.
Reviewed by: Bruce Evans <bde@freebsd.org>
1998-07-04 20:45:42 +00:00
Poul-Henning Kamp
52f8e5d672 Hmm, braino in last commit. 1998-07-04 19:29:15 +00:00
Poul-Henning Kamp
0edd53d22a Change the sign on a race-condition, so that instead of ending up several
tens of milliseconds out in the future we end up the right place with
a subweeniesecond error.
1998-07-04 19:12:21 +00:00
Steve Price
5089aede57 Remove '???' because it generates an annoying message about
a trigraph being encountered when included.

PR:		7123
Submitted by:	Greg Lehey <grog@lemis.com>
1998-07-04 19:00:47 +00:00
Semen Ustimenko
e3e1bee33a Fix some strange errors of shutting transmitter up when start
transmition after software reset with no link estabilished yet.
Fix TX DMA stop method (queue last packet to stop).

PR:		i386/6578
1998-07-04 08:02:46 +00:00
Julian Elischer
ad12aad64b Don't use a struct buf (malloc'd) without first initialising all the fields
to some known value!
(probable cause of soft updates exploding with vn devices)
1998-07-04 00:27:48 +00:00
Bruce Evans
99977261a1 Restored revs.1.89-1.90 which I somehow clobbered in rev.1.91. 1998-07-03 22:37:43 +00:00
Bruce Evans
3055187290 Sync timestamp changes for inodes of special files to disk as late
as possible (when the inode is reclaimed).  Temporarily only do
this if option UFS_LAZYMOD configured and softupdates aren't enabled.
UFS_LAZYMOD is intentionally left out of /sys/conf/options.

This is mainly to avoid almost useless disk i/o on battery powered
machines.  It's silly to write to disk (on the next sync or when the
inode becomes inactive) just because someone hit a key or something
wrote to the screen or /dev/null.

PR:		5577
Previous version reviewed by:	phk
1998-07-03 22:17:03 +00:00
Bruce Evans
33cc029eab Centralized in-core inode update. Update the in-core inode directly
in ufs_setattr() so that there is no need to pass timestamps to
UFS_UPDATE() (everything else just needs the current time).  Ignore
the passed-in timestamps in UFS_UPDATE() and always call ufs_itimes()
(was: itimes()) to do the update.  The timestamps are still passed
so that all the callers don't need to be changed yet.
1998-07-03 18:46:52 +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
Poul-Henning Kamp
3e5e083cb7 Update M_EXT support in m_copypacket().
PR:		7122
Reviewed by:	phk
Submitted by:	Castor Fu <castor@geocast.com>
Originally forgotten by:	julian
1998-07-03 08:36:48 +00:00
David Greenman
e25169f239 Reset MNT_ASYNC flag if needed if unmount() should fail.
Submitted by:	Paul Saab <paul@mu.org>
1998-07-03 03:47:24 +00:00
Poul-Henning Kamp
6ca4ca2476 When we transfer time from one timecounter to the next, use nanouptime(),
not nanotime();  Otherwise we end up in 2026...

Fix the arg to dummy_get_timecount()
1998-07-02 21:35:02 +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