Commit Graph

16195 Commits

Author SHA1 Message Date
Mike Smith 98f8aa275b As described by the submitter:
I did some tcpdumping the other day and noticed that GETATTR calls
  were frequently followed by an ACCESS call to the same file. The
  attached patch changes nfs_getattr to fill the access cache as a side
  effect. This is accomplished by calling ACCESS rather than
  GETATTR. This implies a modest overhead of 4 bytes in the request and
  8 bytes in the response compared to doing a vanilla GETATTR.
...
  [The patch comprises two parts] The first
  is the "real" patch, the second counts misses and hits rather than
  fills and hits. The difference is subtle but important because both
  nfs_getattr and nfs_access now fill the cache. It also changes the
  default value of nfsaccess_cache_timeout to better match the attribute
  cache. IMHO, file timestamps change much more frequently than
  protection bits.

Submitted by:	Bjoern Groenvall <bg@sics.se>
Reviewed by:	dillon (partially)
1999-07-31 01:51:58 +00:00
Matthew N. Dodd 96a0f2956f Don't use at_shutdown() now that we have new_bus which lets us
specify a DEVICE_SHUTDOWN method instead.

Reviewed by: me, since nobody else seems to run this hardware in -CURRENT
1999-07-31 00:43:48 +00:00
Mike Smith 600d8382d9 Reenable the APMIO_BIOS ioctl and translate arguments into the new format
(which is more like the old than I thought).

Requested-by:	imp
1999-07-30 19:35:03 +00:00
Matthew N. Dodd 24116fdd0a Restore the pre-new_bus behavior of printing out the reserved resources
during device announcement. (irq, ioport, maddr)

Reviewed by: dfr, peter
1999-07-30 13:54:00 +00:00
Mark Newton 275d27d822 Previous commit also removed some 'const' qualifiers on args for
svr4_sys_sendto() which probably shouldn't have been 'const'.
1999-07-30 13:44:43 +00:00
Mark Newton c8f2ce34ac Previous commit also finished cleaning up some dev_t -> udev_t transformations
related to the commit for rev 1.3 of svr4_stat.c.
svr4_sysvec.c also received a copyright message (which is why it grew by
28 lines).
1999-07-30 13:42:56 +00:00
Mark Newton f46f4cccb8 Fix svr4_sys_poll(); SysV STREAMS produce return values from poll() which
BSD sockets don't.  Guess at a correct emulation for those values (it seems
to work for telnet, ftp and friends)
1999-07-30 13:12:26 +00:00
Mark Newton 1cd528f787 Initial checkin 1999-07-30 12:50:48 +00:00
Mark Newton 8f228dcab0 Add $Id$ tags.
Clean-up some unused (or to-be-used) variables in svr4_getcontext()
1999-07-30 12:47:17 +00:00
Mark Newton 60037843ce Clarify use of the 'streams' pseudo-device (i.e.: static or kld).
Trust me, this stuff will be in a real manpage before 4.0 ships :-)
1999-07-30 12:46:16 +00:00
Mark Newton 587297dc40 Add $Id$ tags 1999-07-30 12:45:21 +00:00
Mark Newton 4c6689598b Hmm - How did *that* get in there? 1999-07-30 12:44:49 +00:00
Mark Newton 6ef6864f94 Fix panic caused when *stat64() family of syscalls try to fill-in
their svr4_stat64 structures with old dev_t values instead of udev_t's.
Panic was caused when major() and minor() were called with args which
weren't pointers.  The panic was probably introduced in rev 1.51 of
kern_conf.c
1999-07-30 12:43:30 +00:00
Mark Newton 04f84b3402 Eliminate 'WARNING: "streams" is usurping "streams"'s cdevsw[]' messages
at boot
1999-07-30 12:39:49 +00:00
KATO Takenori 6ae1d5b1aa Sync with sys/i386/isa/clock.c revision up to 1.142. 1999-07-30 11:43:10 +00:00
KATO Takenori 1cefa3fd39 Sync with sys/i386/i386/machdep.c revision 1.357. 1999-07-30 11:42:05 +00:00
KATO Takenori a5d4842f09 Removed apm_setup.s. 1999-07-30 11:40:55 +00:00
Mike Smith 733e6274d7 Remove all vestiges of APMIO_BIOS
Submitted by:	N. Dudorov <nnd@mail.nsk.ru>
1999-07-30 08:24:23 +00:00
Bill Paul 44fe63e5e7 Close PR #12651: the hash calculation routine has changed in other
parts of the kernel but was not updated in nfs_readdirplusrpc().
1999-07-30 04:51:35 +00:00
Bill Paul f069164876 Fix two bugs in nfs_readdirplus(). The first is that in some cases,
vnodes are locked and never unlocked, which leads to processes starting
to wedge up after doing a mount -o nfsv3,tcp,rdirplus foo:/fs /fs; ls /fs.
The second is that sometimes cnp is accessed without having been
properly initialized: cnp->cn_nameptr points to an earlier name while
"len" contains the length of a current name of different size. This
leads to an attempt to dereference *(cn->cn_nameptr + len) which will
sometimes cause a page fault and a panic.

With these two fixes, client side readdirplus works correctly with
FreeBSD, IRIX 6.5.4 and Solaris 2.5.1 and 2.6 servers.

Submitted by: Matthew Dillon <dillon@backplane.com>
1999-07-30 04:02:04 +00:00
Stefan Eßer a243da2bc6 Fix install target (install loader.exe, not loader). 1999-07-29 22:22:38 +00:00
Bill Paul 9c9743b67b Correct the sanity test length calculation in nfsrv_readdirplus(): len is
being incremented by 4 bytes too few each time through the loop, which
allows more data into the mbuf chain that we really want. In the worst
case, when we're using 32K read/write sizes with a TCP client, this causes
readdirplus replies to sometimes exceed NFS_MAXPACKET which leads to a
panic. This problem cropped up for me using an IRIX 6.5.4 NFSv3 TCP client
with 32K read/write sizes, however supposedly it can be triggered by
WinNT NFS servers too. In theory, it can probably be triggered by any
NFS v3 implementation using TCP as long as it's using the maxiumum block
size.

Reviewed by: Matthew Dillon <dillon@backplane.com>
1999-07-29 21:42:57 +00:00
Andrew Gallatin 86af178671 Fix an unbelievably stupid typo that cases as500 & as600 machines booted
with a graphics head to panic on boot
1999-07-29 19:09:38 +00:00
Mike Smith 3cc31bc262 Formatting-only cleanup accidentally omitted from the patch merge in the
previous major update.  Bring new code into style alignment with the
existing code.  No functional changes.
1999-07-29 18:47:39 +00:00
Mitsuru IWASAKI d0c9cc72d2 No more apm_errno. It breaks the build with APM_DEBUG,
uses (sc->bios.r.eax >> 8) & 0xff instead.
1999-07-29 18:15:33 +00:00
Brian Feldman ab533dd005 lutimes() bug: FOLLOW should be NOFOLLOW for this one.
Submitted by:	Dan Nelson <dnelson@emsphone.com>
1999-07-29 17:02:56 +00:00
Andrew Gallatin 3a1b3a3fa7 On an AS 600 5/266 (and possibly others), accessing the configuration
space of PCI devices that don't exist cause PCI master & target aborts
rather than returning ~0 or giving a machine check.  Bring in some code
from NetBSD to handle this properly.

obtained from:	NetBSD
reviewed by:	dfr
1999-07-29 16:44:22 +00:00
Joerg Wunsch 25d01e9527 Revert rev 1.149. Bruce convinced me that the problem already disappeared
by the fix in rev 1.120, which i wasn't immediately aware of.
1999-07-29 11:27:33 +00:00
Peter Wemm 32610e173d GBIOSSTACK_SEL is undefined, but OTOH, BSSSEL apparently isn't used either. 1999-07-29 08:33:00 +00:00
Bruce Evans 992fd07673 Removed references to a nonexistent variable. This fixes building kernels
without -O.
1999-07-29 07:14:28 +00:00
Mike Smith 64ecbc4d0b Remove some duplicate definitions, as suggested by Alan Cox. 1999-07-29 07:10:35 +00:00
Mike Smith 27e901101c Fix for vmspace sharing as per Alan Cox. Thanks! 1999-07-29 06:48:26 +00:00
Mike Smith fc372ebd4d Nuke this, it's not used anymore. 1999-07-29 01:52:13 +00:00
Matthew N. Dodd f4e3b1e7dd Fix a typo.
Back out a few lines that I haven't dealt with properly yet.

Snickered at by: Mike Smith
1999-07-29 01:51:49 +00:00
Mike Smith 496027bf08 Major update to the kernel's BIOS-calling ability.
- Add support for calling 32-bit code in other segments
 - Add support for calling 16-bit protected mode code

Update APM to use this facility.

Submitted by:	jlemon
1999-07-29 01:49:19 +00:00
Brian Feldman 8799702cbc Remove XXX from the headers (broke the build, I'm betting.) 1999-07-29 01:20:47 +00:00
Matthew N. Dodd 15317dd875 Alter the behavior of sys/kern/subr_bus.c:device_print_child()
- device_print_child() either lets the BUS_PRINT_CHILD
	  method produce the entire device announcement message or
	  it prints "foo0: not found\n"

Alter sys/kern/subr_bus.c:bus_generic_print_child() to take on
the previous behavior of device_print_child() (printing the
"foo0: <FooDevice 1.1>" bit of the announce message.)

Provide bus_print_child_header() and bus_print_child_footer()
to actually print the output for bus_generic_print_child().
These functions should be used whenever possible (unless you can
just use bus_generic_print_child())

The BUS_PRINT_CHILD method now returns int instead of void.

Modify everything else that defines or uses a BUS_PRINT_CHILD
method to comply with the above changes.

	- Devices are 'on' a bus, not 'at' it.
	- If a custom BUS_PRINT_CHILD method does the same thing
	  as bus_generic_print_child(), use bus_generic_print_child()
	- Use device_get_nameunit() instead of both
	  device_get_name() and device_get_unit()
	- All BUS_PRINT_CHILD methods return the number of
	  characters output.

Reviewed by: dfr, peter
1999-07-29 01:03:04 +00:00
Brian Feldman 7558f6aad9 8 -> NBBy 1999-07-28 22:27:27 +00:00
Brian Feldman f8075bf9b3 Correct a really gross comment format. 1999-07-28 22:22:57 +00:00
Stefan Eßer 79f5bd8308 Activate "arc" (ARC / AlphaBIOS loader) on Alpha. 1999-07-28 20:32:44 +00:00
Nik Clayton 51e09cd72a Fix some typos.
PR:             docs/11955
Submitted by:   Christian Weisgerber <naddy@mips.rhein-neckar.de>
1999-07-28 20:30:59 +00:00
Stefan Eßer ed4e46bdce The ARC BIOS / AlphaBIOS specific primary boot loader. This code is the
result of a joined effort with parts contributed by Doug Rabson, Warner
Losh and Stefan Esser (hope I did not forget anybody). Part of the sources
is obtained from NetBSD with modifications.

This code is work in progress:

As of the time of the initial import, a loader.exe executable is built,
which can be loaded on an Alpha with NT only firmware, but no attempt is
made to switch to OSF PAL code as required to start an actual kernel.
1999-07-28 20:28:47 +00:00
Mike Smith e33bfde398 We're called too early to have any idea whether APM is going to be
active or not.  The only sane thing we can do here is assume that if
APM is supported it might be active at some point, and bail.

In reality, even this isn't good enough; regardless of whether we support
APM or not, the system may well futz with the CPU's clock speed and throw
the TSC off.  We need to stop using it for timekeeping except under
controlled circumstances.  Curse the lack of a dependable high-resolution
timer.
1999-07-28 20:22:30 +00:00
Mike Smith a9063682da Remove unused real-mode APM setup support. We've been using the vm86
mode initialiser for a while now, and it's looking happy.
1999-07-28 20:20:31 +00:00
Mike Smith 29c7e03718 Remove unused real-mode APM init functions. 1999-07-28 20:07:12 +00:00
Mike Smith 30f41f1f8d Remove some erroneous comments about how APM is initialised. 1999-07-28 19:37:32 +00:00
Mike Smith dce593b01e Remove some droppings left over from the removal of the APM hooks. 1999-07-28 19:34:16 +00:00
Alan Cox 3b5f11efe6 Clear error in nfsrv_create when we have a valid reply so that
that reply is actually transmitted.
Submitted by:	dillon
1999-07-28 08:20:49 +00:00
Doug Rabson aa595accc9 Add support for SYS_RES_DENSE and SYS_RES_BWX resource types. These are
equivalent to SYS_RES_MEMORY for x86 but for alpha, the rman_get_virtual()
address of the resource is initialised to point into either dense-mapped
or bwx-mapped space respectively, allowing direct memory pointers to be
used to device memory.

Reviewed by: Andrew Gallatin <gallatin@cs.duke.edu>
1999-07-28 07:57:48 +00:00
Bill Paul 74432d0d13 Add a module Makefile for the PNIC driver. 1999-07-28 02:21:56 +00:00
Bill Paul 90f300bfb1 Convert the PNIC driver to newbus. 1999-07-28 02:19:52 +00:00
Nick Hibma 2cc20f83b3 Every reqh in an aborted pipe is given status CANCELED and the callback is
called. It might be necessary to split that routine into two parts in
which calling the callback is not done at splusb().
1999-07-27 20:22:29 +00:00
Bill Paul 070f62142c Roar! Finish what I started last night: somehow only the header file change
got committed.
1999-07-27 13:54:15 +00:00
Matthew N. Dodd 0158b2dcc3 Case matters.
DEv_METHOD to DEV_METHOD.
1999-07-27 05:08:36 +00:00
Matthew N. Dodd 5a8cee9a60 Implement the BUS_PROBE_NOMATCH method for the PCI bus.
This function is called for each device for which no driver
was found.

Output is similar to the eisa_probe_nomatch() function but with the
added benefit of displaying the assigned IRQ (since PCI gives us
this information up front.)

Output is like so:

pci0: unknown card CPQ0508 (vendor=0x0e11, dev=0x0508) at 11.0 irq 9
pci0: unknown card DFZ0508 (vendor=0x10da, dev=0x0508) at 11.0 irq 9
pci0: unknown card DBL0508 (vendor=0x104c, dev=0x0508) at 11.0 irq 9
pci0: unknown card DDM0011 (vendor=0x108d, dev=0x0011) at 11.0 irq 9

I'm not happy with the 3 lines of macro cruft that got added but
I consider it a temporary annoyance as those bits will be moved to
some place where PCI, EISA and ISAPNP code will be able to use them.

(Not surprisingly, this message is longer than the code in question.)

Reviewed by: peter, dfr
1999-07-27 04:28:14 +00:00
Bill Paul af1c062105 On FreeBSD/i386, when you use the SYS_RES_MEMORY resource to allocate
a PCI memory mapped region, rman_get_bushandle() returns what happens
to be a kernel virtual address pointing to the base of the PCI shared
memory window. However this is not the behavior on all platforms:
the only thing you should do with the bushandle is pass it to the
bus_spare_read()/bus_space_write() routines. If you actually do want
the kernel virtual address of the base of the PCI memory window, you
need to use rman_get_virtual().

The problem is that at the moment, rman_get_virtual() returns a physical
address, which is bad. In order to get the kernel virtual address we
need, we have to play with it a little.

Presumeably this behavior will be changed, but in the meantime the
Tigon driver won't work. So for the moment, I'm adding a kludge to
make things happy on the alpha: the correct kernel virtual address
is calculated from the value returned by rman_get_virtual(). This
should be removed once rman_get_virtual() starts doing the right
thing.

This should make the Tigon actuall work on the alpha now.
1999-07-27 03:54:48 +00:00
KATO Takenori d13d34c3c5 Sync with sys/i386/isa/npx.c revision up to 1.75. 1999-07-26 12:22:41 +00:00
KATO Takenori 3311081bea Sync with sys/i386/isa/clock.c revision up to 1.140.
This commit may break 8MHz system clock mode.
1999-07-26 12:21:09 +00:00
KATO Takenori 5add1a23f3 Sync with sys/i386/i386/userconfig.c revision up to 1.150. 1999-07-26 12:14:59 +00:00
KATO Takenori 7da0fca153 Sync with sys/i386/i386/machdep.c revision 1.356. 1999-07-26 12:14:00 +00:00
KATO Takenori 9365d83b9c Sync with sys/i386/conf/files.i386 revision 1.254. 1999-07-26 12:12:58 +00:00
Brian Somers 3145c58d33 Don't complain if 0 bytes are written to the tun device, simply
do nothing.
1999-07-26 12:11:10 +00:00
KATO Takenori a42377eaa1 Sync with sys/i386/conf/GENERIC revision 1.178. 1999-07-26 12:10:33 +00:00
Poul-Henning Kamp 8343d904fd Pave the way for the fla driver. 1999-07-26 07:43:26 +00:00
Alan Cox 6745299365 Add sysctl and support code to allow directories to be VMIO'd. The default
setting for the sysctl is OFF, which is the historical operation.

Submitted by:	dillon
1999-07-26 06:25:53 +00:00
Martin Cracauer 784648c675 Various formatting fixes on my FPE trapcode commit.
Submitted by:	BDE
1999-07-26 05:47:31 +00:00
Nick Hibma 6d38342e16 Add comments, change variable names to make them consistent (r -> err,
timo_handle -> timeout_handle, p -> pipe, *pipe -> *rpipe, etc.)
1999-07-25 18:54:22 +00:00
Martin Cracauer a7674320e9 On FPU exceptions, pass a useful error code (one of the FPE_...
macros) to the signal handler, for old-style BSD signal handlers as
the second (int) argument, for SA_SIGINFO signal handlers as
siginfo_t->si_code. This is source-compatible with Solaris, except
that we have no <siginfo.h> (which isn't even mentioned in POSIX
1003.1b).

An rather complete example program is at
  http://www3.cons.org/cracauer/freebsd-signal.c
This will be added to the regression tests in src/.

This commit also adds code to disable the (hardware) FPU from
userconfig, so that you can use a software FP emulator on a machine
that has hardware floating point. See LINT.
1999-07-25 13:16:09 +00:00
Peter Wemm eda5a3370a Make this compile on the Alpha. I'm not 100% sure about this but I
think it's ok.  ti_bhandle is fetched from newbus on both the Alpha
and x86, the Alpha-only ti_vhandle is gone.
1999-07-25 06:46:19 +00:00
Bill Paul c9ce464cb7 Remember to clear the IFF_RUNNING and IFF_OACTIVE flags in sf_stop() and
sk_stop().
1999-07-25 05:16:05 +00:00
Bill Paul 691c152864 This commit adds device driver support for Adaptec Duralink PCI fast
ethernet controllers based on the AIC-6915 "Starfire" controller chip.
There are single port, dual port and quad port cards, plus one 100baseFX
card. All are 64-bit PCI devices, except one single port model.

The Starfire would be a very nice chip were it not for the fact that
receive buffers have to be longword aligned. This requires buffer
copying in order to achieve proper payload alignment on the alpha.
Payload alignment is enforced on both the alpha and x86 platforms.
The Starfire has several different DMA descriptor formats and transfer
mechanisms. This driver uses frame descriptors for transmission which
can address up to 14 packet fragments, and a single fragment descriptor
for receive. It also uses the producer/consumer model and completion
queues for both transmit and receive. The transmit ring has 128
descriptors and the receive ring has 256.

This driver supports both FreeBSD/i386 and FreeBSD/alpha, and uses newbus
so that it can be compiled as a loadable kernel module. Support for BPF
and hardware multicast filtering is included.
1999-07-25 04:32:50 +00:00
Bruce Evans a2a0b22c90 Don't set DE_ACCESS for unsuccessful reads.
Translated from: a similar fix in ufs_readwrite.c rev.1.61.

Don't forget to set DE_ACCESS for short reads.

Check for invalid (negative) offsets before checking for reads of
0 bytes, as in ufs, although checking for invalid offsets at all
is probably a bug.
1999-07-25 04:01:32 +00:00
Bruce Evans 2ac6e74655 Don't set IN_ACCESS for requests to read 0 bytes or for unsuccessful reads.
Translated from: similar fixes in ufs_readwrite.c rev.1.61.  Things
are simpler (but annoyingly different) here because there are no
vm optimisations.
1999-07-25 02:56:17 +00:00
Bruce Evans 3dfdfdb27f Fixed access timestamp bugs:
Set IN_ACCESS for successful reads of 0 bytes (except for requests to
read 0 bytes).  This was broken in rev.1.42.
PR:		misc/10148

Don't set IN_ACCESS for requests to read 0 bytes.

Don't set IN_ACCESS for unsuccessful reads.
1999-07-25 02:07:16 +00:00
Tatsumi Hosokawa 6afaf5d480 3C574TX 16bit FastEtherlink PC-card support.
Reviewed by:	HAMADA Naoki <nao@tom-yam.or.jp>
Submitted by:	Osamu MIHARA <mihara@prd.fc.nec.co.jp>
1999-07-25 01:20:37 +00:00
David Greenman 6704748cf6 Increased max kmem to 200MB. This should fix some out-of-kmem panics on
large systems.
1999-07-24 22:26:42 +00:00
Bill Paul 8b1b6ae5a6 Add mx and ax modules for the Macronix and ASIX drivers and update the
modules Makefile so they get built.
1999-07-24 20:55:05 +00:00
Bill Paul d2aaa9a7a6 Convert the ASIX and Macronix drivers to newbus. 1999-07-24 20:52:57 +00:00
Bruce Evans a1a10fdfc0 Oops, the previous commit only worked in the one case it was tested for. 1999-07-24 20:21:10 +00:00
Nicolas Souchu e23ebb9b30 Update intpm driver.
PR:             kern/12631
Submitted by:   Takanori Watanabe <takawata@shidahara1.planet.sci.kobe-u.ac.jp>
1999-07-24 19:13:54 +00:00
Robert Nordier fad2f0e686 Recognise NetBSD slices.
Submitted by : Lars Koeller <lkoeller@cc.fh-lippe.de>
PR           : 12772
1999-07-24 17:40:40 +00:00
Kazutaka YOKOTA 3d03248c70 - Correctly initialize cn_dev_t and cn_udev_t.
- Add D_TTY for alpha.

Reviewed by: bde, dfr
1999-07-24 09:41:06 +00:00
Kazutaka YOKOTA 828cb0403d Do not print resource values which are not set.
Reviewed by: dfr
1999-07-24 09:35:21 +00:00
Doug Rabson f1550d9d41 This makes the in kernel printf routines conform to the documented
behavior of their userland counterparts with respect to return values.

Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-07-24 09:34:12 +00:00
Alan Cox 03e3bc8e62 atomic.h:
Change "void *" to "volatile TYPE *", improving type safety
	and eliminating some warnings (e.g., mp_machdep.c rev 1.106).

cpufunc.h:
	Eliminate setbits.  As defined, it's not precisely correct;
	and it's redundant.  (Use atomic_set_int instead.)

ipl_funcs.c:
	Use atomic_set_int instead of setbits.

systm.h:
	Include atomic.h.

Reviewed by:	bde
1999-07-23 23:45:50 +00:00
John-Mark Gurney 37735ca6ea fix a problem w/ zero byte writes to the tunnel device. It would bypass
the loop and not set an error, so we would then try to access an invalid
mbuf...

PR:		12780
Submitted by:	bright@rush.net aka zb^3

a new record in length a pr was open... only about a half hour...
1999-07-23 20:08:27 +00:00
Bill Paul 571a80b261 Clean up the buffer allocation code a bit. Make sure to initialize certain
critical mbuf fields to sane values. Simplify the use of ETHER_ALIGN to
enforce payload alignment, and turn it on on the x86 as well as alpha
since it helps with NFS which wants the payload to be longword aligned
even though the hardware doesn't require it.

This fixes a problem with the ti driver causing an unaligned access trap
on the Alpha due to m_adj() sometimes not setting the alignment correctly
because of incomplete mbuf initialization.
1999-07-23 18:46:24 +00:00
Bill Paul 43a095a5fd Grrr. Return the rman_get_bustag()/rman_get_bushandle() lines to their
proper place in ti_attach(). I'm positive I typed them in there, but
they must have fallen victim to a drive-by cut & pasting.
1999-07-23 16:21:43 +00:00
Bill Paul 09590dc4c1 One last tweak before I turn in for the evening: the driver name in
the driver_t declaration should be "skc" not "sk". Technically, "skc"
is the parent PCI device (the SysKonnect GEnesis controller) and "sk0"
and "sk1" are the network interfaces that get attached to it.
1999-07-23 05:50:35 +00:00
Bill Paul 98edb3e178 Create module directories for the xl, ti, tl and sk drivers and add
them to the Makefile so that modules will be generated for /modules.
1999-07-23 05:48:01 +00:00
Bill Paul 39d837d4b5 Dangit. Somehow the pmap_kextract hack for alpha snuck back into these
files. Change them back to alpha_XXX_dmamap().

Pointed out by: Andrew Gallatin
1999-07-23 02:18:01 +00:00
Bill Paul 89ca84e6db Convert the Alteon Tigon gigabit ethernet driver to newbus. Also upgrade
to the latest firmware release from Alteon (12.3.12).
1999-07-23 02:10:11 +00:00
Bill Paul 5c9e5de3e3 Some more small newbus cleanups. Remember to free all resources in case
of failures in foo_attach(), simplify iospace/memspace things a little.
1999-07-23 02:06:57 +00:00
Julian Elischer 47d7025f9f Revert out part of the last patch that can be done better elsewhere.
The complexity added isn't worth it.
1999-07-22 21:08:02 +00:00
Bill Paul 7ad5b08ab3 Remove the definitions for the SiS 900 chip. This is not a RealTek
clone after all. I have the datasheets for this part; hopefully I can
write a proper driver soon.
1999-07-22 20:56:49 +00:00
Julian Elischer 7530f1312b fix braino..
accidentally replaced PAGE_MASK with PAGE_SIZE.
(PAGE_MASK is PAGE_SIZE - 1)
bug does not manifest itself on our hardware.....
1999-07-22 19:45:33 +00:00
Bill Paul a02be1be5b Well, it seems that loading a PCI driver module after the system has
been booted works too -- very neat. However I don't want the system to
stop for 5 seconds when the MII autoprobe is triggered in the xl and
tl drivers since that's lame. Instead, only use the hard delay when
we've been cold booted. If not, use the timeout mechanism instead.
(The SysKonnect driver doesn't use the same autonegotiation scheme, so
no change is required there.)
1999-07-22 18:10:20 +00:00
Bill Paul 7dea97485b Convert the ThunderLAN driver to newbus. Also add splimp() protection to
tl_stats_update().
1999-07-22 17:00:38 +00:00
Bill Paul 75156903c8 Fix a small mind-o: one instance of SYS_RES_IOPORT should have been
SYS_RES_MEMOTY in sk_detatch().
1999-07-22 14:58:54 +00:00
Mitsuru IWASAKI c0039f8e42 Add braces to make if-else statement clearer.
PR:		12663
Submitted by:	Adam Wight <adamw@holonet.net>
1999-07-22 14:45:22 +00:00
Greg Lehey aa30608b44 Modify device numbering method to work with latest -CURRENT. Briefly,
the device numbers are now minor number only, so that we can still
compare them after dev_t has turned into a blob.

Broken-by:	dev_t changes
Reported-by:	Vallo Kallaste <vallo@matti.ee>
		"Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
1999-07-22 08:40:37 +00:00
Alan Cox 3b21348301 Reduce the number of "magic constants" used for page coloring
by one: PQ_PRIME2 and PQ_PRIME3 are used to accomplish the same
thing at different places in the kernel.  Drop PQ_PRIME3.
1999-07-22 06:04:17 +00:00
Bill Paul e11a2e3d81 Convert the SysKonnect gigabit ethernet driver to newbus. 1999-07-22 04:04:12 +00:00
Bill Paul 137424578b Small tweak to newbus changes: return error status on failure correctly
in xl_attach() (not a problem if the attach never fails, but if it does
the function would still return 0, which is wrong).
1999-07-22 03:59:22 +00:00
Doug Rabson 9865bd5167 Make mountroot work again (change makedev to makebdev). 1999-07-21 21:11:28 +00:00
Alan Cox d4da2dbae6 Fix the following problem:
When creating new processes (or performing exec), the new page
directory is initialized too early.  The kernel might grow before
p_vmspace is initialized for the new process.  Since pmap_growkernel
doesn't yet know about the new page directory, it isn't updated, and
subsequent use causes a failure.

The fix is (1) to clear p_vmspace early, to stop pmap_growkernel
from stomping on memory, and (2) to defer part of the initialization
of new page directories until p_vmspace is initialized.

PR:		kern/12378
Submitted by:	tegge
Reviewed by:	dfr
1999-07-21 18:02:27 +00:00
Yoshihiro Takahashi cb711cfb32 Fixed missing changes from sys/pc98/pc98/pc98.c when new-bus was integrated.
- In isa_dmastart() and isa_dmadone(), cache flush.
  - Correct current word register address.

Submitted by (partial): Toshikazu Kaho <kaho@elam.kais.kyoto-u.ac.jp>
1999-07-21 13:30:56 +00:00
Poul-Henning Kamp 14b672a638 Remove the RCS "Log" and all the verbiage it has generated. 1999-07-21 12:51:36 +00:00
Joerg Wunsch 409aadb1c9 Hack to work around a NULL pointer dereferencation that can be triggered
by removing a floppy that as being operated on.

The spagghetti is hardly understandable at all anymore, so i can't
100 % ascertain this is really the Right Thing to do, maybe our new
floppy driver maintainer, Jesus Monroy Jr can do this. :-))
1999-07-21 12:19:44 +00:00
Peter Wemm 3bdaa8d82e Hopefully make the CMD640B workaround actually work. 1999-07-21 02:28:35 +00:00
Mike Smith 73332890ea Walk around the end of all the silly guessing of device types and unit
numbers that we have been doing in the past, and read /etc/fstab off the
proposed root filesystem to determine the actual device name and vfs
type for the root filesystem.  These are then exported to the kernel
via the environment variable vfs.root.mountfrom.
1999-07-21 00:08:54 +00:00
Julian Elischer c73089ddc4 Slight cleanups of the Cyrix 5530 UDMA code.
Also includes a workaround fro an apparent chip bug
where UDMA mode 2 can overpower the UDMA engine enough that it will
hog the PCI bus to the exclusion of the processor.
1999-07-20 22:43:53 +00:00
Brian Feldman 57d86fc695 Fix a REALLY embarrassing mistake. Don't look; I warned you. 1999-07-20 21:51:12 +00:00
Brian Feldman fb30b5bdaf Make a dev2budev() function, and use it. This refixes pstat (working, broken,
working, broken, working) and savecore (working, working, broken, working,
working).

Sorta Reviewed by:	phk
1999-07-20 21:29:13 +00:00
Bill Paul d1b67c3735 Convert the xl driver to newbus. It is now possible to make this driver
into a loadable module, and all of the platform dependencies are gone
(except for the alpha_XXX_dmamap() thing, which is another issue -- I
still don't know how to use the busdma stuff with a network driver).

Also increase the delay in xl_reset(); testing on a 486/66 with a 3c905C
shows that reading the EEPROM fails immediately after a reset. Waiting
a little longer after the reset completes seems to fix it.
1999-07-20 21:23:17 +00:00
Brian Feldman 240a86a432 dev2udev() returns a CDEV udev_t, but we use block io in savecore. Savecore
also gets the device by st_rdev, which is alright except for the fact that
the sysctl kern.dumpdev passed out a char device. This is a workaround.
Sorry for not committing the fix earlier, before people started having
problems.
1999-07-20 20:55:50 +00:00
Bill Paul 7694cd9368 Correct the alignment of some of the members in the wi_frame structure.
The structure is the right length, but some of the members (notably
wi_q_info) were off a bit. This causes the received signal strength
values to appear bogus.
1999-07-20 20:03:42 +00:00
Brian Feldman 3bf7ef5dc7 I missed a not. Also, remove invltlb(), since it's "unncessary [sic] because
wbinvd already flushes the the TLB."
1999-07-20 13:21:55 +00:00
Poul-Henning Kamp 698bfad7f2 Now a dev_t is a pointer to struct specinfo which is shared by all specdev
vnodes referencing this device.

Details:
        cdevsw->d_parms has been removed, the specinfo is available
        now (== dev_t) and the driver should modify it directly
        when applicable, and the only driver doing so, does so:
        vn.c.  I am not sure the logic in checking for "<" was right
        before, and it looks even less so now.

        An intial pool of 50 struct specinfo are depleted during
        early boot, after that malloc had better work.  It is
        likely that fewer than 50 would do.

        Hashing is done from udev_t to dev_t with a prime number
        remainder hash, experiments show no better hash available
        for decent cost (MD5 is only marginally better)  The prime
        number used should not be close to a power of two, we use
        83 for now.

        Add new checkalias2() to get around the loss of info from
        dev2udev() in bdevvp();

        The aliased vnodes are hung on a list straight of the dev_t,
        and speclisth[SPECSZ] is unused.  The sharing of struct
        specinfo means that the v_specnext moves into the vnode
        which grows by 4 bytes.

        Don't use a VBLK dev_t which doesn't make sense in MFS, now
        we hang a dummy cdevsw on B/Cmaj 253 so that things look sane.

	Storage overhead from all of this is O(50k).

        Bump __FreeBSD_version to 400009

The next step will add the stuff needed so device-drivers can start to
hang things from struct specinfo
1999-07-20 09:47:55 +00:00
Poul-Henning Kamp 82f1cd60df use vp->v_rdev;
OK'ed by:	grog
1999-07-20 07:29:54 +00:00
Poul-Henning Kamp d7bf417de7 add debug.sizeof.specinfo 1999-07-20 07:19:32 +00:00
Poul-Henning Kamp 4fcd91ddf1 Don't access the device with vp->v_specinfo->si_rdev, use vp->v_rdev. 1999-07-20 07:18:17 +00:00
Mike Smith d1a6c79537 Update of the i686 MTRR/memory range support.
- Support for setting memory range attributes on SMP systems using the
   new SMP rendezvous function
 - Don't print the confusing default memory type message.
 - Allow legal overlapping range types.
 - Turn interrupts back on after setting MTRRs in UP mode (whoops)
 - Don't waste time calling invltlb() after wbinvd(); it's not
   SMP-compatible (interrupts are off) and unncessary because
   wbinvd already flushes the TLB.

This code is now essentially feature-complete.
1999-07-20 06:58:51 +00:00
Mike Smith 91fe3dc1e1 Implement an all-CPU shootdown-style rendezvous facility. This allows
the caller to specify a function to be guarded between an entry and exit
barrier, as well as pre- and post-barrier functions.

The primary use for this function is synchronised update of per-cpu private
data.  The implementation is almost (but not quite) MI; with a better
mechanism for masking per-CPU interrupts it could probably be hoisted.

Reviewed by:	peter (partially)
1999-07-20 06:52:35 +00:00
Alan Cox 700a02558c An SMP-specific change: Eliminate an unnecessary lock acquire and release
in setdelayed.

Submitted by:	luoqi and bde
1999-07-20 06:09:53 +00:00
Alan Cox ca06c247ba Convert a "page not busy" warning to an assertion.
Submitted by:	dillon@backplane.com
1999-07-20 05:46:56 +00:00
Robert Nordier 50d57a133e Reintroduce LBA (cyl > 1023) support in the bootblocks, enabled by
means of a build option.
1999-07-20 01:19:23 +00:00
Peter Wemm 7e08426441 Fix a page size vs. KB mixup. The extra buffers allocated at a reduced
rate is meant to kick in at 64MB, not 256MB.

Reviewed by:	Matthew Dillon <dillon@backplane.com>
1999-07-19 23:36:30 +00:00
Robert Nordier ac176e5590 Activate kgzldr. 1999-07-19 20:16:34 +00:00
Robert Nordier b407f553fb Use M4FLAGS for m4. 1999-07-19 20:10:17 +00:00
Robert Nordier ba8860241d kgzldr is a kzipboot replacement for use with kgzip(8).
Development sponsored by Global Technology Associates, Inc.

Reviewed/tested by: abial
1999-07-19 18:07:44 +00:00
Tatsumi Hosokawa 18200ad993 Sync with GENERIC (place of xe0 driver) 1999-07-19 15:18:21 +00:00
Poul-Henning Kamp 3de280c443 [click] Now all dev_t's in the kernel have their char device major.
Only know casualy of this is swapinfo/pstat which should be fixes
the right way:  Store the actual pathname in the kernel like mount
does.  [Volounteers sought for this task]

The road map from here is roughly:  expand struct specinfo into struct
based dev_t.  Add dev_t registration facilities for device drivers and
start to use them.
1999-07-19 09:37:59 +00:00
Poul-Henning Kamp 6f13bfc261 Add sysctl tree debug.sizeof to tell us how big things are. First two
entries are struct proc and struct vnode.
1999-07-19 09:13:12 +00:00
Bruce Evans e9ecccf8cb Updated acquire_timer2()'s state machine to work when the i8254 is
being used for timecounting.  Fixed a race or two in it.  Undisabled
it.

PR:		10455
1999-07-18 18:32:42 +00:00
Bruce Evans ab64b6dc3c Don't let the machdep.tsc_freq sysctl proceed if the TSC is present
but broken, since tsc_timecounter is not initialised in that case,
and updating an uninitialised timecounter is fatal.

Fixed style bugs in the machdep.i8254_freq and machdep.tsc_freq
sysctls.

Reviewed by:	phk
1999-07-18 15:19:29 +00:00
Bruce Evans 6b6ef746e5 Added a sysctl "kern.timecounter.hardware" for selecting the hardware
used for timecounting.  The possible values are the names of the
physically present harware timecounters ("i8254" and "TSC" on i386's).

Fixed some nearby bitrot in comments in <sys/time.h>.

Reviewed by:	phk
1999-07-18 15:07:20 +00:00
Jonathan M. Bresler e9bd3a37e8 fix comment re: RST received in TIME_WAIT to match the code. 1999-07-18 14:42:48 +00:00
Poul-Henning Kamp 684adedee4 Use the vn_todev() function, rather than VOP_GETATTR 1999-07-18 14:31:01 +00:00
Poul-Henning Kamp 6ca5486476 Introduce the vn_todev(struct vnode*) function, which returns the dev_t
corresponding to a VBLK or VCHR node, or NODEV.
1999-07-18 14:30:37 +00:00
Peter Wemm 80e907a1df Reset SA_NOCLDWAIT on exec().
PR:		kern/12669
Submitted by:	Doug Ambrisko <ambrisko@whistle.com>
1999-07-18 13:40:11 +00:00
Kazutaka YOKOTA f1235db8bd - Clear relevant variables when the keyboard is not available.
- Do not touch the `tty' struct when it's not yet available.
- Initialize correct bits in `fonts_loaded'.
1999-07-18 06:16:53 +00:00
Kazutaka YOKOTA 29e59d7deb - Move the `return' statement the correct place so that the keyboard
won't be initialized if `atkbd?' is disabled.
1999-07-18 06:16:25 +00:00
John Polstra 3083856d5c Remove a duplicate comment. 1999-07-18 02:26:02 +00:00
John Polstra 7ac9503b86 Remove four no-op casts. 1999-07-18 01:35:26 +00:00
Poul-Henning Kamp f06a54f0a0 Centralize dumpdev handling. 1999-07-17 20:47:52 +00:00
Poul-Henning Kamp 68f7448fd7 Reverse the sense of a test, dev2udev() will be much cheaper than
udev2dev().
1999-07-17 20:29:10 +00:00
Poul-Henning Kamp 9806ce5b8e Add a field to struct swdevt to avoid a bogus udev2dev() call. 1999-07-17 19:59:55 +00:00
Poul-Henning Kamp 59c4226d5f Fix 2nd arg to udev2dev() call in ccd.c 1999-07-17 19:58:37 +00:00
Poul-Henning Kamp d21c632c4b Use 256 as magic in bmaj2cmaj[]. Treat BLK/CHR dev_t more correctly. 1999-07-17 19:57:25 +00:00
Poul-Henning Kamp c7119ea7dd Fix 2nd arg to udev2dev(). 1999-07-17 19:38:00 +00:00
Poul-Henning Kamp f008cfcc1a I have not one single time remembered the name of this function correctly
so obviously I gave it the wrong name.  s/umakedev/makeudev/g
1999-07-17 18:43:50 +00:00
Alan Cox 1ce1a8bf67 An SMP-specific change: eliminate another check on bsp_apic_ready.
(See rev 1.23.)
1999-07-17 18:34:32 +00:00
Poul-Henning Kamp 835646d6ef slight change in the way we hi-jack the wd drivers cdevsw. 1999-07-17 17:55:53 +00:00
Marcel Moolenaar 3cef63a1f6 Implementation of TCXONC.
Reviewed by: bde
1999-07-17 08:24:57 +00:00
Doug Rabson 0db16cc82d Handle R_ALPHA_NONE relocations in KLD. 1999-07-16 09:16:11 +00:00
Hidetoshi Shimokawa 9586f34bf3 * Restore register correctly.
* Add missing bits for profiling.
1999-07-16 06:45:52 +00:00
Alan Cox 9b21395a95 Remove vm_object::last_read. It is used by the old swap pager, but
not by the new one, i.e., vm/swap_pager.c rev 1.108.

Reviewed by:	dillon@backplane.com
1999-07-16 05:11:37 +00:00
Mike Smith 850013034a Add support for multiple PCI busses directly connected to the nexus.
This is only partially complete, but allows 450NX-based systems with
more than one PCI bus to be used again.

Submitted by:	dfr
1999-07-16 01:00:30 +00:00
Nick Hibma 1854719067 The boot countdown timer says it will boot in 1 seconds,
which is grammatically incorrect.

PR:		12628
Submitted-By:	R. Matthew Emerson <rme@nightfly.apk.net>
1999-07-15 20:40:52 +00:00
Bill Paul ab03d8e65f Make a few other cleanups while I'm in the area. Typo in comment, unused
structure members, etc. No functional changes.
1999-07-14 21:53:11 +00:00
Bill Paul b31b2566e0 Revert some changes I had made to try and cut down on the number of TX EOF
interrupts that were scheduled. Testing shows it didn't really do very much
and it makes the code a little more complicated (which is never a good thing).

Also fix the rambuffer offset initialization for the 512K/64K SRAM case
(512K total using 64K chips). It should be 0. The only case with a
non-standard rambuffer offset address is 1024K/64K according to the
SysKonnect manual. (My card has the 1024/64 configuration and I don't know
which card uses the 512/64 configuration, if any, so I'm not sure that
this was really a problem for anyone.)
1999-07-14 18:57:32 +00:00
Peter Wemm 341c61590c Oops, missed out one chunk of the last patch. (*blush*)
Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
1999-07-14 17:37:53 +00:00
Kazutaka YOKOTA de22efc974 The following patch will remove a hack introduced in
/sys/ddb/db_input.c rev 1.19 to recognize syscons's cursor keycodes.
It is unnecessary now that scgetc() in syscons returns the escape
sequence for the cursor keys rather than their raw, internal key
codes.
1999-07-14 10:53:41 +00:00
Kirk McKusick 4dc0c8f521 Create the macro DOINGASYNC to check whether the MNT_ASYNC flag has
been set for a mount point. Insert missing checks to ensure that all
write operations are done asynchronously when the MNT_ASYNC option
has been requested.

Submitted by:	Craig A Soules <soules+@andrew.cmu.edu>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>
1999-07-13 18:20:13 +00:00
Poul-Henning Kamp ea7583a110 dont allow open if no device was found. 1999-07-13 08:15:22 +00:00
David E. O'Brien a6c6cfcddf Move the xe0 driver back where it was. It was misleading where it was as it
does not take over the PCIC, it does require PCCARD support, and it doesn't
replace any existing driver.
1999-07-13 08:08:20 +00:00
Alan Cox 47b8bc92e8 Commit the correct patch, i.e., the one that actually corresponds
to the rev 1.2 log entry.
1999-07-13 06:35:25 +00:00
Alan Cox e58bb1c453 Changed the implementation of the primitives to guarantee atomicity
with respect to interrupts on UP systems.  (The upgrade from gcc 2.7.x
to egcs 1.1.2 produced at least one non-atomic code sequence in
swap_pager_getpages.)

In addition, the primitives are now SMP-safe, but only on SMPs.  (For
portability between SMPs and UPs, modules are compiled with the SMP-safe
versions.)

Submitted by:	dillon and myself
Reviewed by:	bde
1999-07-13 03:32:17 +00:00
Brian Feldman 24ad8fe519 Correct a mistake in so_cred changes. In practice, I don't think that it
would make a difference. However, my previous diff _did_ change the
behavior in some way (not necessarily break it), so I'm fixing it.

Found by:	bde
Submitted by:	bde
1999-07-12 18:58:23 +00:00
Roger Hardiman 4efbc31757 Bug fixes
Change number of VBI lines from 16 to 12 for NTSC formats.
 Juha.Nurmela@quicknet.inet.fi found/fixed bug in VBI_SLEEP.

New features
 MSP3430G DBX initialisation from Matt Brown <matt@dqc.org>
 STB Bt878 card identification.
 Hauppauge Model Number identification.
 Changes to probeCard() for better eeprom identification.
 Experimental TDA9850 initialisation code, from Linux bttv.

Cross Platform Changes
 The driver has been reorgainsed based ideas from Brad Parker's port to Linux
 to seperate OS Dependant and Independant sections.
 I have backends for FreeBSD 2.2.x/3.x and 4.x newbus, BSDI, OpenBSD and NetBSD.

This commit has FreeBSD 2.2.8/2.2-stable/3.x and FreeBSD 4.x newbus backends.

Some code submitted by: Juha.Nurmela@quicknet.inet.fi
                        Matt Brown <matt@dqc.org>
                        Brad Parker <brad@parker.boston.ma.us>

Some code obtained from:        Linux bttv driver
1999-07-12 15:51:50 +00:00
Kazutaka YOKOTA 01533d852e Improve Logitech MouseMan+ protocol support. 1999-07-12 15:16:14 +00:00
Kris Kennaway e7647e6c20 Correct a couple of spelling errors in comments. 1999-07-12 15:02:51 +00:00
Kazutaka YOKOTA 551e01b126 Implement a kludge for some wheeled mice for which infamous "psmintr:
out of sync..." messages is generated and the wheel movement is not
recognized.

The trick is found by Takashi Nishida.
1999-07-12 13:40:21 +00:00
Poul-Henning Kamp 2477292d68 remove a set_cpl which survived last change.
Noticed by:	mjacob
1999-07-12 07:22:08 +00:00
Poul-Henning Kamp e9f6117acc We may have three ways to generate the SPL functions, but one table
for specifying their actions is plenty.
1999-07-11 19:24:41 +00:00
Poul-Henning Kamp 68de329e34 Use the fsid from the superblock, unless it looks bogus or has already
been taken by some other filesystem.
1999-07-11 19:16:50 +00:00
Brian Feldman 490d50b60a Two new sysctls: net.inet.tcp.getcred and net.inet.udp.getcred. These take
a sockaddr_in[2] (local, then remote) and return a struct ucred. Example
code for these is at:
	http://www.FreeBSD.org/~green/inetd_ident.patch
	http://www.FreeBSD.org/~green/freebsd4.c (for pidentd)

Reviewed by:	bde
1999-07-11 18:32:46 +00:00
Alan Cox 32b76dfa8a Cleanup OBJ_ONEMAPPING management.
vm_map.c:
	Don't set OBJ_ONEMAPPING on arbitrary vm objects.  Only default
	and swap type vm objects should have it set.  vm_object_deallocate
	already handles these cases.

vm_object.c:
	If OBJ_ONEMAPPING isn't already clear in vm_object_shadow,
	we are in trouble.  Instead of clearing it, make it
	an assertion that it is already clear.
1999-07-11 18:30:32 +00:00
Bill Paul f531114507 Add wb0 to GENERIC now that it actually does work on alpha. (Forgot this
last night.)
1999-07-11 14:53:37 +00:00
Doug Rabson ca7036d8cb Add a hook for a bus to detect child devices which didn't find drivers.
This allows the bus to print an informative message about unknown devices.

Submitted by: Matthew N. Dodd <winter@jurai.net>
1999-07-11 13:42:37 +00:00
John-Mark Gurney 5acba6ec2a disable tag queing for the MICROP 4421-07 drive. It's an old 2gig drive.
convert MICROP to a static string
1999-07-11 06:10:47 +00:00
Bill Paul 3d13ca80ea Make the Winbond ethernet driver work on FreeBSD/alpha. Also added
bridging support while I was in the area.
1999-07-11 00:56:07 +00:00
Alan Cox a521cdcb0c An SMP-specific change: eliminate a check on bsp_apic_ready
that hasn't been necessary since i386/i386/simplelock.s
revision 1.9.

Submitted by:	dillon and tegge (simultaneously)
1999-07-10 21:57:52 +00:00
Peter Wemm 4ae8675cf7 Convert the if_fea (DEC FDDI) driver to newbus since it has been broken
for ages.  This is the EISA wrapper for sys/dev/pdq/*.  The pci bus driver
is in sys/pci/if_fpa.c.

Submitted by:	"Matthew N. Dodd" <winter@jurai.net>
1999-07-10 19:46:08 +00:00
Alan Cox b6041a4307 Change the data type used to represent page color in the vm_object
to be the same as that used in the vm_page.  (This change also
shrinks the vm_object.)
1999-07-10 18:29:18 +00:00
Alan Cox cae826d0de Remove unused function prototypes. 1999-07-10 18:16:08 +00:00
Mitsuru IWASAKI 50e0a471cc Add apmd support code. 1999-07-10 18:08:57 +00:00
Bruce Evans eec2e836e9 Go back to the old (icu.s rev.1.7 1993) way of keeping the AST-pending
bit separate from ipending, since this is simpler and/or necessary for
SMP and may even be better for UP.

Reviewed by:	alc, luoqi, tegge
1999-07-10 15:28:01 +00:00
Peter Wemm 8294196430 Fixes for a couple of problems in last commit:
1. Printing large quads in small bases overflowed the buffer if
   sizeof(u_quad_t) > sizeof(u_long).
2. The sharpflag checks had operator precedence bugs due to excessive
   parentheses in all the wrong places.
3. The explicit 0L was bogus in the quad_t comparison and useless in
   the long comparision.
4. There was some more bitrot in the comment about ksprintn().  Our
   ksprintn() handles bases up to 36 as well as down to 2.

Bruce has other complaints about using %q in kernel and would rather
we went towards using the C9X style %ll and/or %j.  (I agree for that
matter, as long as gcc/egcs know how to deal with that.)

Submitted by:	bde
1999-07-10 15:27:05 +00:00
Bruce Evans c618090a83 Fixed a longstanding scheduling bug. ASTs and softclock interrupts were
not masked during handling of shared PCI interrupts.  This resulted in
ASTs sometimes being discarded and softclock interrupts sometimes being
handled prematurely (sometimes = quite often on systems with shared PCI
interrupts, never on other systems).

Debugged by:	gibbs and other people at plutotech.com
PR:		6944, maybe 12381
1999-07-10 14:54:19 +00:00
Poul-Henning Kamp 23d762834b Fix a dev_t/udev_t issue with accounting. lastcomm now shows the
right tty again.

Submitted by:	"D. Rock" <rock@dead-end.net>
Reviewed by:	phk
1999-07-10 06:27:36 +00:00
Poul-Henning Kamp 46dcdb370e Allow jailed proccesses to open non-process vnodes like the root of the fs. 1999-07-09 21:31:44 +00:00
Peter Wemm bdbc8c265e Fix the previous warning a different way since the emul_path exposure was
intentional.  Avoid the warning by propagating the const filename through
to elf_load_file() instead.
1999-07-09 19:10:14 +00:00
Peter Wemm c6bb4a64b8 Minor tweak - don't cause a warning.
I don't know if it was intentional or not, but it would have printed out:
  /compat/linux/foo/bar.so: interpreter not found
If it was, then I've broken it.  De-constifying the 'interp' variable
or carrying the constness through to elf_load_file() are alternatives.
1999-07-09 18:05:03 +00:00
Peter Wemm ebce412ca2 Use %q rather than rolling a custom routine. 1999-07-09 17:56:59 +00:00
Peter Wemm 7d921a016d Implement the %q prefix for the integer types. Note that egcs on the
Alpha believes that %q is for long long, whereas our quad_t and int64_t
is only just a plain long.  long long on the alpha is the same size (64
bit) as a long.  It was requested, but I have not implemented yet, support
for C9X style %lld - it should be pretty easy though.
1999-07-09 17:54:39 +00:00
Matt Jacob 3866f8e633 Add in dbregs stubs that a committer for changes on the i386 ought to have done.
PR:		12579
1999-07-09 17:48:22 +00:00
Bill Paul 05919c5b73 if_sk.c: use pci_port_t instead of u_short
if_skreg.h: use alpha_XXX_dmamap() instead of pmap_kextract hackery on
alpha platform
1999-07-09 17:36:23 +00:00
Peter Wemm 29a751bf4e bufhashinit() is called with a caddr_t and is expected to return the
same in both the alpha and i386 ports.
1999-07-09 16:41:19 +00:00
KATO Takenori 6962200fc8 Removed device-dirver flags. 1999-07-09 13:19:35 +00:00
KATO Takenori a9e5f068cb Sync with sys/i386/i386/userconfig.c revision 1.148. 1999-07-09 12:52:09 +00:00
KATO Takenori 5027350f75 Sync with sys/i386/i386/machdep.c revision 1.355. 1999-07-09 12:51:11 +00:00
Bill Paul 3ebb090530 This commit adds driver support for the SysKonnect SK-984x series
gigabit ethernet adapters. This includes two single port cards
(single mode and multimode fiber) and two dual port cards (also single
mode and multimode fiber). SysKonnect is currently the only
vendor with a dual port gigabit ethernet NIC.

The ports on dual port adapters are treated as separate network
interfaces. Thus, if you have an SK-9844 dual port SX card, you
should have both sk0 and sk1 interfaces attached. Dual port cards
are implemented using two XMAC II chips connected to a single
SysKonnect GEnesis controller. Hence, dual port cards are really
one PCI device, as opposed to two separate PCI devices connected
through a PCI to PCI bridge. Note that SysKonnect's drivers use
the two ports for failover purposes rather that as two separate
interfaces, plus they don't support jumbo frames. This applies to
their Linux driver too. :)

Support is provided for hardware multicast filtering, BPF and
jumbo frames. The SysKonnect cards support TCP checksum offload
however this feature is not currently enabled (hopefully it will
be once we get checksum offload support).

There are still a few things that need to be implemeted, like
the ability to communicate with the on-board LM80 voltage/temperature
monitor, but I wanted to get the driver under CVS control and into
-current so people could bang on it.

A big thanks for SysKonnect for making all their programming info
for these cards (and for their FDDI and token ring cards) available
without NDA (see www.syskonnect.com).
1999-07-09 04:30:09 +00:00
Jonathan Lemon d6c4f01106 Support for i386 hardware breakpoints.
Submitted by:	Brian Dean <brdean@unx.sas.com>
1999-07-09 04:18:32 +00:00
Jonathan Lemon ab001a72be Implement support for hardware debug registers on the i386.
Submitted by:	Brian Dean <brdean@unx.sas.com>
1999-07-09 04:16:00 +00:00
Kirk McKusick 025037833c Condition in KASSERT was reversed. 1999-07-08 17:58:55 +00:00
Marcel Moolenaar 68875907c6 Implement VT_RELDISP ioctl
Submitted by: Kazutaka Yokota <yokota@FreeBSD.org>
1999-07-08 16:15:19 +00:00
KATO Takenori af1a669f9e Sync with sys/dev/syscons/syscons.c revision 1.313. 1999-07-08 12:53:38 +00:00
KATO Takenori 65d65bc193 Sync with sys/i386/i386/machdep.c revision up to 1.354. 1999-07-08 12:48:53 +00:00
KATO Takenori 159f868e26 Sync with sys/i386/conf/majors.i386 revision 1.79. 1999-07-08 12:07:14 +00:00
KATO Takenori 29390f09cb Sync with sys/i386/conf/Makefile.i386 revision 1.158. 1999-07-08 11:48:47 +00:00
Kirk McKusick ad8ac923fa These changes appear to give us benefits with both small (32MB) and
large (1G) memory machine configurations.  I was able to run 'dbench 32'
on a 32MB system without bring the machine to a grinding halt.

    * buffer cache hash table now dynamically allocated.  This will
      have no effect on memory consumption for smaller systems and
      will help scale the buffer cache for larger systems.

    * minor enhancement to pmap_clearbit().  I noticed that
      all the calls to it used constant arguments.  Making
      it an inline allows the constants to propogate to
      deeper inlines and should produce better code.

    * removal of inherent vfs_ioopt support through the emplacement
      of appropriate #ifdef's, with John's permission.  If we do not
      find a use for it by the end of the year we will remove it entirely.

    * removal of getnewbufloops* counters & sysctl's - no longer
      necessary for debugging, getnewbuf() is now optimal.

    * buffer hash table functions removed from sys/buf.h and localized
      to vfs_bio.c

    * VFS_BIO_NEED_DIRTYFLUSH flag and support code added
      ( bwillwrite() ), allowing processes to block when too many dirty
      buffers are present in the system.

    * removal of a softdep test in bdwrite() that is no longer necessary
      now that bdwrite() no longer attempts to flush dirty buffers.

    * slight optimization added to bqrelse() - there is no reason
      to test for available buffer space on B_DELWRI buffers.

    * addition of reverse-scanning code to vfs_bio_awrite().
      vfs_bio_awrite() will attempt to locate clusterable areas
      in both the forward and reverse direction relative to the
      offset of the buffer passed to it.  This will probably not
      make much of a difference now, but I believe we will start
      to rely on it heavily in the future if we decide to shift
      some of the burden of the clustering closer to the actual
      I/O initiation.

    * Removal of the newbufcnt and lastnewbuf counters that Kirk
      added.  They do not fix any race conditions that haven't already
      been fixed by the gbincore() test done after the only call
      to getnewbuf().  getnewbuf() is a static, so there is no chance
      of it being misused by other modules.  ( Unless Kirk can think
      of a specific thing that this code fixes.  I went through it
      very carefully and didn't see anything ).

    * removal of VOP_ISLOCKED() check in flushbufqueues().  I do not
      think this check is necessary, the buffer should flush properly
      whether the vnode is locked or not. ( yes? ).

    * removal of extra arguments passed to getnewbuf() that are not
      necessary.

    * missed cluster_wbuild() that had to be a cluster_wbuild_wb() in
      vfs_cluster.c

    * vn_write() now calls bwillwrite() *PRIOR* to locking the vnode,
      which should greatly aid flushing operations in heavy load
      situations - both the pageout and update daemons will be able
      to operate more efficiently.

    * removal of b_usecount.  We may add it back in later but for now
      it is useless.  Prior implementations of the buffer cache never
      had enough buffers for it to be useful, and current implementations
      which make more buffers available might not benefit relative to
      the amount of sophistication required to implement a b_usecount.
      Straight LRU should work just as well, especially when most things
      are VMIO backed.  I expect that (even though John will not like
      this assumption) directories will become VMIO backed some point soon.

Submitted by:	Matthew Dillon <dillon@backplane.com>
Reviewed by:	Kirk McKusick <mckusick@mckusick.com>
1999-07-08 06:06:00 +00:00
Bill Paul bedf427650 Grrr.... forgot one line from the previous fix. 1999-07-08 00:42:02 +00:00
Bill Paul 24e82101e0 Fix a potential race condition that can occur in xl_start(). If the NIC
clears out the transmit queue and zeroes the downlist pointer register,
but xl_txeof() isn't called before xl_start() tries to queue more packets,
xl_start() will think that the DMA is still in progress and not update
the downlist register again, thus causing packets to sit in the transmit
queue forever.

Patch provided by: Russell T Hunt <alaric@MIT.EDU>
1999-07-07 21:49:14 +00:00
Matt Jacob be74589b43 Fix my complete botch. I hope. Tested this time 1999-07-07 18:14:01 +00:00
Kazutaka YOKOTA c4c9400b69 - Fixed memory leak in sc_alloc_history_buffer().
- Correctly observe the variable `extra_history_size' when changing
  the size of history (scroll back) buffer.
- Added sc_free_history_buffer().

Pointed out by: des
1999-07-07 13:48:50 +00:00
Andrey A. Chernov 27899b333b add unused argument to udev2dev() to make kernel compiled 1999-07-07 09:12:44 +00:00
Ollivier Robert 7fe29b0aef Add $Id$
Approved by:	kirk
1999-07-07 07:51:04 +00:00
Mike Smith 0431da87a1 Reinstate the previous fix for the broken export of a dev_t in sw_dev, convert
back to a dev_t when the value is actually used.
1999-07-07 04:07:03 +00:00
Brian Feldman 4116f679c7 Back out previous commit. It was wrong, and caused panics. 1999-07-07 03:03:59 +00:00
Mike Smith d40e02b32d swdevt should contain a udev_t not a devt. This resulted in bogus
swap device name reporting.

Submitted by:	Bill Swingle <unfurl@freebsd.org>
1999-07-06 23:51:02 +00:00
Dag-Erling Smørgrav 6b5ca0d83e Rename bpfilter to bpf. 1999-07-06 19:23:32 +00:00
Peter Wemm be42d17373 Implement SA_SIGINFO support for the Alpha. This is obviously a little
bit preliminary.  It still returns an old-style code arg if SA_SIGINFO
is not set, but I'm not sure of the value of this since the traditional
bsd-style fourth argument (address) is missing.

Also, tidy up a bit of lint.
1999-07-06 17:48:16 +00:00
Nick Hibma f81f918507 Backout the previous change. Claimed to break compatibility with
NetBSD.

Requested-By: John Polstra
1999-07-06 17:35:48 +00:00
Peter Wemm 0d50adcacf Don't clobber the smb cdevsw entry that was installed by the driver
framework.
1999-07-06 13:42:43 +00:00
Peter Wemm 8bd48ca8d4 Quieten gcc paranoia. 1999-07-06 13:23:56 +00:00
Peter Wemm 0431584674 Typo: s/0ff0/0xff0/ 1999-07-06 12:42:26 +00:00
Marcel Moolenaar 4cf8b502c3 Trivial implementation of TIOCM{S|G}ET and TIOCMBI{S|C} ioctls. No need
to convert the arguments.
1999-07-06 11:41:48 +00:00
Martin Cracauer aff66c5455 Implement SA_SIGINFO for i386. Thanks to Bruce Evans for much more
than a review, this was a nice puzzle.

This is supposed to be binary and source compatible with older
applications that access the old FreeBSD-style three arguments to a
signal handler.

Except those applications that access hidden signal handler arguments
bejond the documented third one. If you have applications that do,
please let me know so that we take the opportunity to provide the
functionality they need in a documented manner.

Also except application that use 'struct sigframe' directly. You need
to recompile gdb and doscmd. `make world` is recommended.

Example program that demonstrates how SA_SIGINFO and old-style FreeBSD
handlers (with their three args) may be used in the same process is at
http://www3.cons.org/tmp/fbsd-siginfo.c

Programs that use the old FreeBSD-style three arguments are easy to
change to SA_SIGINFO (although they don't need to, since the old style
will still work):

  Old args to signal handler:
    void handler_sn(int sig, int code, struct sigcontext *scp)

  New args:
    void handler_si(int sig, siginfo_t *si, void *third)
  where:
    old:code == new:second->si_code
    old:scp == &(new:si->si_scp)     /* Passed by value! */

The latter is also pointed to by new:third, but accessing via
si->si_scp is preferred because it is type-save.

FreeBSD implementation notes:
- This is just the framework to make the interface POSIX compatible.
  For now, no additional functionality is provided. This is supposed
  to happen now, starting with floating point values.
- We don't use 'sigcontext_t.si_value' for now (POSIX meant it for
  realtime-related values).
- Documentation will be updated when new functionality is added and
  the exact arguments passed are determined. The comments in
  sys/signal.h are meant to be useful.

Reviewed by:	BDE
1999-07-06 07:13:48 +00:00
Martin Cracauer 8f437f4439 Rename struct members sa_siginfo. POSIX reserves identifiers starting
with sa_ when <signal.h> is included. They would conflict with the
upcoming SA_SIGINFO implementation.

Reviewed by:	BDE
1999-07-06 06:55:29 +00:00
Brian Feldman 2c2c424e91 Add Centaur/IDT WinChip support.
Why in the world do people put breaks at the end of a switch's default case?
1999-07-06 06:25:38 +00:00
Matt Jacob ecc94a93d5 add in (controlled by option) 2200 Expanded Lun F/W 1999-07-06 05:38:24 +00:00
Brian Feldman c92f8276cd I made some cleanups, rearranged things a bit, and made AMD Features default
printing on CPUs that have it.
If there are no objections, I'll MFC all recent changes (harmless, really)
to 3.2 and PAO.
1999-07-06 05:25:41 +00:00
Matt Jacob 473ac4479f suggestions from bde to clean up last checkin slighty 1999-07-06 01:40:03 +00:00
Matt Jacob 9ba8673786 add in a boot environment isp_disable flag 1999-07-06 01:24:20 +00:00
Matt Jacob 100f099ba4 Wow- too much breakage..wait until you compile it, buckwheat... 1999-07-05 22:04:08 +00:00
Matt Jacob 86cb5d6b95 Oops- got sense of ifdef wrong 1999-07-05 22:01:48 +00:00
Matt Jacob 3692397b0d add 2200 f/w; fix botched define 1999-07-05 20:42:08 +00:00
Matt Jacob 5542fe4b1a add ISP_DISABLE_2200_SUPPORT defines; Add reference to 2200 F/W 1999-07-05 20:24:46 +00:00
Bill Paul 7f971fc2ca Remove ti_refill_rx_rings() and associated stuff; replace dirty RX buffers
in ti_rxeof() instead. This doesn't really seem to provide much in the
way of a performance boost, and I'm pretty sure it can cause mbuf leakage
in some extreme cases.
1999-07-05 20:19:41 +00:00
Matt Jacob af17b3d682 add another ISP option 1999-07-05 20:19:34 +00:00
Marcel Moolenaar 19e520961c Let newuname return "Linux" as the OS name and not "FreeBSD". Also, return a
more sensible (for Linux applications) release number. Hardcoding a release
number has its drawbacks, but it will do for now.
1999-07-05 19:18:03 +00:00
Marcel Moolenaar 7a583b02b6 Also try to load the interpreter without prepending "emul_path". This allows
dynamicly linked binaries to run in a chroot'd environment with "emul_path"
as the new root. The new behavior of loading interpreters is identical to the
principle of overlaying.

PR: 10145
1999-07-05 18:38:29 +00:00
Larry Lile ed9a818dfc Update to latest version of PowerMACH Works from Olicom. 1999-07-05 17:47:50 +00:00
Stephen McKay 652fcae07c Reformat previous fix to remove an uglier than average goto.
Looked OK to:	dg
1999-07-05 12:50:54 +00:00
Bruce Evans 712020a15a Fixed English errors, spelling errors and formatting errors in rev.1.51
and rev.1.53.
1999-07-05 12:00:05 +00:00
Mike Smith 693a01d8a1 The IDA driver is 'ida', not 'id' 1999-07-05 09:09:09 +00:00
Mike Smith 134c934ce7 Move the initialisation/tuning of nmbclusters from param.c/machdep.c
into uipc_mbuf.c.  This reduces three sets of identical tunable code to
one set, and puts the initialisation with the mbuf code proper.

Make NMBUFs tunable as well.

Move the nmbclusters sysctl here as well.

Move the initialisation of maxsockets from param.c to uipc_socket2.c,
next to its corresponding sysctl.

Use the new tunable macros for the kern.vm.kmem.size tunable (this should have
been in a separate commit, whoops).
1999-07-05 08:52:54 +00:00
Mike Smith 35ec852af5 Use the new tunable macros for the net.inet.tcp.tcbhashsize tunable. 1999-07-05 08:46:55 +00:00