Commit Graph

15929 Commits

Author SHA1 Message Date
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