Commit Graph

29386 Commits

Author SHA1 Message Date
Robert Watson
9147519a91 o Remove unnecessary inclusion of opt_global.h.
Submitted by:	bde
2001-12-06 21:55:41 +00:00
John Baldwin
aee9d2774f Add multiple inclusion protection. 2001-12-06 18:17:02 +00:00
Peter Wemm
a116e755dc Somebody moved joy.c from isa/ to dev/joy/ without updating conf/files.
Pointy-hat to: imp
2001-12-06 18:00:42 +00:00
David E. O'Brien
26a42e7c88 Compile all kernels with "-ffreestanding":
Assert that compilation takes place in a freestanding environment. This
	implies `-fno-builtin'. A freestanding environment is one in which the
	standard library may not exist, and program startup may not necessarily be
	at main. The most obvious example is an OS kernel. This is equivalent to
	`-fno-hosted'.
2001-12-06 17:53:32 +00:00
Prafulla Deuskar
8798701fd5 Fixed two problems:
1. Changed incorrect conditional in fxhw.c which would never
evaluate to true. Thanks to John Polstra for pointing that out.
2. Write to PCI config space by default, enabling memory access and
bus master enable.

Submitted by:Prafulla Deuskar
MFC after:3 days
2001-12-06 17:50:21 +00:00
Warner Losh
4e152a90ee The pccard/cardbus power interface should depend on having pccard or
cardbus in the kernel, not on all the bridges that implement it.
Note: this is NEWCARD only, so we don't want it for the 'card' case,
unlike card_if.m, which is both NEWCARD and OLDCARD.
2001-12-06 06:40:18 +00:00
Robert Watson
65bbadfbbc o Make kern.security.bsd.suser_enabled TUNABLE.
Requested by:	green
2001-12-05 18:49:20 +00:00
Ruslan Ermilov
47891de1a5 Fixed remotely exploitable DoS in arpresolve().
Easily exploitable by flood pinging the target
host over an interface with the IFF_NOARP flag
set (all you need to know is the target host's
MAC address).

MFC after:	0 days
2001-12-05 18:13:34 +00:00
Robert Watson
959f4950f5 o Whitespace sync to GENERIC 2001-12-05 18:08:23 +00:00
Guido van Rooij
9a0ad4c91a Fix initialisation of struct nat entry, to solve a panic that occurs
when reloading a nat table after reboot

Submitted by:	Arjan de Vet <devet@devet.org>
Reviewed by:	IP Filter mailing list
MFC after:	3 days
2001-12-05 10:46:24 +00:00
Guido van Rooij
3068bdba98 Fix resume for HP Omnibook 500's.
MFC after:	1 week
2001-12-05 10:36:32 +00:00
Guido van Rooij
7145906dd6 Add suspend/resume hooks to this driver; necessary to overcome
problems on HP Omnibook 500.

MFC after:	1 week
2001-12-05 10:34:07 +00:00
John Hay
16cba1662f Add VLAN support.
MFC after:	7 days
2001-12-05 09:34:28 +00:00
Warner Losh
c74f37cea7 Moved to dev/joy 2001-12-05 09:10:47 +00:00
Warner Losh
c067c1d163 Move joy from isa to dev/joy. 2001-12-05 09:10:20 +00:00
Warner Losh
7345fbcb38 Use new location for joy, plus list its new bus front ends. 2001-12-05 09:09:48 +00:00
Warner Losh
6aed731b38 Split joystick driver into ISA and PC Card front ends.
Similar code was submitted in PR 5559 by Takeshi OHASHI-san, but the
PC Card system has changed much since then, so this is a fresh
implementation.

PR:	i386/5559
Submitted by: Takeshi OHASHI
2001-12-05 09:08:23 +00:00
Warner Losh
3b289629db Implement prism2 detection from NetBSD. This mostly obsoletes the
prism2 flag in pccard.conf, but I'm leaving it place for the moment in
case the small sample of PrismII cards that I've tried is not
representative.

MFC After: 30 days
Obtained from: NetBSD
2001-12-05 08:57:36 +00:00
Hajimu UMEMOTO
8d6337d059 Newer SA is prefered for a out-bound packet than old one
when net.key.prefered_oldsa is set to zero.

Obtained from:	KAME
MFC after:	1 week
2001-12-05 05:40:49 +00:00
Kirk McKusick
dd58224e31 Update pathnames for creation of tags file. 2001-12-05 01:23:21 +00:00
Søren Schmidt
90e0a15606 Add entries to allow setting the CD type on cue sheets 2001-12-04 21:40:41 +00:00
Søren Schmidt
bc48b9d025 Allow setting the CD type on cue sheets 2001-12-04 21:39:34 +00:00
Ian Dowse
eec7ff8aa6 When VOP_SYMLINK fails, the value of *vpp is junk, so we must NULL
out nd.ni_vp to prevent the resource cleanup code at the end of
nfsrv_symlink from trying to vrele it. This fixes a "vrele: negative
ref cnt" panic that can occur when a symlink is attempted on an NFS
filesystem with no free space. Found locally, but the symptoms
correspond to those in the PR referenced below.

PR:		kern/26878
MFC after:	3 days
2001-12-04 16:53:42 +00:00
Warner Losh
d29f1aafa9 implement MFC links properly (and I think long links too). This make
the sprint wireless card try to attach.  Sadly, the pci code at the
bridge keeps this from happening.

Bug w/o PR: jhb :-)
2001-12-04 13:48:16 +00:00
Dag-Erling Smørgrav
cb36afb649 The entry for the 'set' command no longer has a list of variables.
PR:		32454
Submitted by:	Gary W. Swearingen <swear@blarg.net>
MFC after:	3 days
2001-12-04 12:01:00 +00:00
Dag-Erling Smørgrav
88905abc3e PROCFS requires PSEUDOFS. 2001-12-04 11:48:16 +00:00
Dag-Erling Smørgrav
4cdff317aa s/^options\t\t/options \t/ 2001-12-04 11:17:31 +00:00
Dag-Erling Smørgrav
3cdd7aa817 PROCFS requires PSEUDOFS. 2001-12-04 11:17:30 +00:00
Dag-Erling Smørgrav
40f0fe3883 PROCFS requires PSEUDOFS. I forgot that GENERIC didn't have PSEUDOFS yet. 2001-12-04 11:12:20 +00:00
Marcel Moolenaar
53b9d88fc4 When translating the interface name when "eth?" is given, do not
use the internal index number as the unit number to compare with.
The first ethernet interface in Linux is called "eth0", whereas
our internal index starts wth 1 and is not unique to ethernet
interfaces (lo0 has index 1 for example). Instead, use a function-
local index number that starts with 0 and is incremented only
for ethernet interfaces. This way the unit number will match the
n-th ethernet interface in the system, which is exactly what it
means in Linux.

Tested by: Glenn Johnson <gjohnson@srrc.ars.usda.gov>
MFC after: 3 days
2001-12-04 03:55:10 +00:00
Scott Long
8ea9ab6622 MFS: Use correct terminology for RAID 0/1 and 0/5. 2001-12-04 02:39:06 +00:00
Luigi Rizzo
40129585e3 Remove error messages on mbuf allocation failures, now
this is done more safely in kern/subr_mbuf.c

Two-days'-delay-thanks-to: @home shutting down service
2001-12-04 02:30:53 +00:00
Scott Long
1c4c22583c BAH! Missed another change to this file. 2001-12-04 02:26:57 +00:00
Scott Long
a1078af4df Bah, I missed this file on the last commit 2001-12-04 02:24:07 +00:00
Dag-Erling Smørgrav
4d2647f96a PROCFS requires PSEUDOFS now. 2001-12-04 01:35:59 +00:00
Dag-Erling Smørgrav
3a669c52a8 Pseudofsize procfs(5). 2001-12-04 01:35:06 +00:00
David E. O'Brien
3bff55e81b Back out rev 1.48. The problem is with a bogus __attribute__ in stdio.h. 2001-12-04 01:29:54 +00:00
Dag-Erling Smørgrav
0ed55f1f2a Reduce namespace pollution by removing argument names from prototypes. 2001-12-04 01:23:02 +00:00
John Baldwin
9b37da1390 Add a missing open paren to a macro that's been broken (and apparently
unused) since rev 1.1 so it is at least correct.

Submitted by:	Maxime Henrion <mux@qualys.com>
2001-12-04 00:35:28 +00:00
Scott Long
c3d15322a1 Use d_thread_t to reduce diffs between current and stable.
Spell ACQUIRE correctly.
2001-12-03 22:55:14 +00:00
Robert Watson
5d476e73ce o Update an instance of 'unprivileged_procdebug_permitted' missed
in the previous commit: the comment should also call it
  'unprivileged_proc_debug'.
2001-12-03 19:10:21 +00:00
Brooks Davis
437e48e931 Don't pass an interface pointer to VLAN_INPUT{,_TAG}. Get it from the
mbuf instead.

Suggested by:	fenner
2001-12-03 17:28:27 +00:00
Robert Watson
011376308f o Introduce pr_mtx into struct prison, providing protection for the
mutable contents of struct prison (hostname, securelevel, refcount,
  pr_linux, ...)
o Generally introduce mtx_lock()/mtx_unlock() calls throughout kern/
  so as to enforce these protections, in particular, in kern_mib.c
  protection sysctl access to the hostname and securelevel, as well as
  kern_prot.c access to the securelevel for access control purposes.
o Rewrite linux emulator abstractions for accessing per-jail linux
  mib entries (osname, osrelease, osversion) so that they don't return
  a pointer to the text in the struct linux_prison, rather, a copy
  to an array passed into the calls.  Likewise, update linprocfs to
  use these primitives.
o Update in_pcb.c to always use prison_getip() rather than directly
  accessing struct prison.

Reviewed by:	jhb
2001-12-03 16:12:27 +00:00
David Malone
ace25b89e1 Add missing declaration of ftime.
Submitted by:	Sergey Matveychuk <sem@ciam.ru>
Obtained from:	NetBSD
MFC after:	1 week
2001-12-03 15:07:54 +00:00
Daniel C. Sobral
b31463c915 Remove unused filed.
PR:		kern/32395
Submitted by:	Jonathan Mini <mini@haikugeek.com>
2001-12-03 12:07:05 +00:00
David E. O'Brien
f4b7af33ef Reapply rev 1.37 (hide the __attribute__ gcc keyword) into RELENG_4 even
though it was backed out.
With out this change the TenDRA compiler is not bootstrapable.
2001-12-03 11:29:01 +00:00
Murray Stokely
3bbde73c29 Fix typo.
PR:		32455
Submitted by:	"Gary W. Swearingen" <swear@blarg.net>
2001-12-03 06:00:24 +00:00
Brian Feldman
830681f547 Split out NAI Labs license and BSD license to prevent the accidental
violation of either.
2001-12-03 00:21:18 +00:00
Robert Watson
4f5a4612d3 o Uniformly copy uap arguments into local variables before grabbing
giant, and make whitespace more consistent around giant-frobbing.
2001-12-02 15:22:56 +00:00
Robert Watson
f605567c24 o Remove KSE race in setuid() in which oldcred was preserved before giant
was grabbed.  This was introduced in 1.101 when the giant pushdown
  for kern_prot.c was originally performed.
2001-12-02 15:15:29 +00:00
Robert Watson
eb725b4e6a o General style, formatting, etc, improvements:
- uid's -> uids
	- whitespace improvements, linewrap improvements
	- reorder copyright more appropriately
	- remove redundant MP SAFE comments, add one "NOT MPSAFE?"
	  for setgroups(), which seems to be the sole un-changed system
	  call in the file.
	- clean up securelevel_g?() functions, improve comments.

Largely submitted by:	bde
2001-12-02 15:07:10 +00:00
Alfred Perlstein
59aff5fcf3 make LOCKF_DEBUG kernel option work (sorta)
Submitted by: Maxim Konovalov <maxim@macomnet.ru>
PR: kern/32267
2001-12-02 12:47:25 +00:00
Søren Schmidt
f609857c68 ARG! committed the wrong patch!! I need more sleep :( 2001-12-02 12:19:16 +00:00
Søren Schmidt
71a6a4da18 Oops, lost a line in the previous commit. 2001-12-02 12:17:51 +00:00
Søren Schmidt
7c5a0723d7 Initial support for the newer SiS chipsets, based on docs we finally
got from SiS.

This should also close PR 32421 which has patches which seem
to set the timing registers wrongly according to SiS...
2001-12-02 10:48:52 +00:00
Boris Popov
2985f5726b Enable build of smbfs. It works now as before on both UP and MP machines. 2001-12-02 09:01:35 +00:00
Boris Popov
b1c996c40b Catch up with KSE changes.
Submitted by:	Max Khon <fjoe@iclub.nsu.ru>
2001-12-02 08:56:58 +00:00
Matthew Dillon
262c1c1a4e Fix a bug with transmitter restart after receiving a 0 window. The
receiver was not sending an immediate ack with delayed acks turned on
when the input buffer is drained, preventing the transmitter from
restarting immediately.

Propogate the TCP_NODELAY option to accept()ed sockets.  (Helps tbench and
is a good idea anyway).

Some cleanup.  Identify additonal issues in comments.

MFC after:	1 day
2001-12-02 08:49:29 +00:00
Boris Popov
fce6fbfa4d Pull netsmb requester from the pre-KSE world. This update mostly based
on the patches submitted by Max Khon <fjoe@iclub.nsu.ru>
2001-12-02 08:47:29 +00:00
Prafulla Deuskar
e6770f4c46 This is the first commit of the Intel gigabit driver for
PRO/1000 cards.

Submitted by:Prafulla Deuskar
Reviewed by: Paul Saab
MFC after:1 week
2001-12-02 07:37:17 +00:00
Mike Smith
bd21bbea4b Re-enable the ciss driver, now that it should be building again. 2001-12-02 06:19:15 +00:00
Mike Smith
d3e4392c83 Catch up with the proc -> d_thread_t change. 2001-12-02 06:17:16 +00:00
Scott Long
b3457b5173 Add functionality and fix bugs so the driver will work with soon-to-be
released management apps.

1.  Implement poll().  This will check for queued aif's so that a
    subsequent ioctl call to retrieve the next aif will not block.
2.  Don't catch signals when sleeping on a fib sent from userland.  This
    causes a race and panic due to the pthread context switcher waking
    up the tsleep at inopportune times.
3.  Fix some whitespace nits.

MFC after:	3 days
2001-12-02 03:47:33 +00:00
Ruslan Ermilov
04d59553b2 Allow for ip_output() to be called with a NULL route pointer.
This fixes a panic I introduced yesterday in ip_icmp.c,v 1.64.
2001-12-01 13:48:16 +00:00
Joseph Koshy
4d44f0b5a3 Add support for sysconf(_SC_NPROCESSORS_CONF) and sysconf(_SC_NPROCESSORS_ONLN).
This API is supported in SVR4.0MP, Solaris, Linux, AIX and Tru64 Unix.

PR:		bin/27489
Submitted by:	Arun Sharma <arun@sharma-home.net>
Reviewed by:	bde (prior version)
2001-12-01 12:07:42 +00:00
Mike Barcroft
de2656d0ed o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
  _POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
  __FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
  <arpa/inet.h>.

Reviewed by:		fenner
Partially submitted by:	bde
2001-12-01 03:43:01 +00:00
Luigi Rizzo
60363fb9f7 vm/vm_kern.c: rate limit (to once per second) diagnostic printf when
you run out of mbuf address space.

kern/subr_mbuf.c: print a warning message when mb_alloc fails, again
	rate-limited to at most once per second. This covers other
	cases of mbuf allocation failures. Probably it also overlaps the
	one handled in vm/vm_kern.c, so maybe the latter should go away.

This warning will let us gradually remove the printf that are scattered
across most network drivers to report mbuf allocation failures.
Those are potentially dangerous, in that they are not rate-limited and
can easily cause systems to panic.

Unless there is disagreement (which does not seem to be the case
judging from the discussion on -net so far), and because this is
sort of a safety bugfix, I plan to commit a similar change to STABLE
during the weekend (it affects kern/uipc_mbuf.c there).

Discussed-with: jlemon, silby and -net
2001-12-01 00:21:30 +00:00
Robert Watson
6f3933fa6f o Introduce kern.security.bsd.unprivileged_read_msgbuf, which allows
the administrator to restrict access to the kernel message buffer.
  It defaults to '1', which permits access, but if set to '0', requires
  that the process making the sysctl() have appropriate privilege.
o Note that for this to be effective, access to this data via system
  logs derived from /dev/klog must also be limited.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-30 21:40:52 +00:00
Matthew Dillon
d912c694ee The transmit burst limit for newreno completely breaks TCP's performance
if the receive side is using delayed acks.  Temporarily remove it.

MFC after:	0 days
2001-11-30 21:33:39 +00:00
Robert Watson
e409590d0e o Further sysctl name simplification, generally stripping 'permitted',
using '_'s more consistently.

Discussed with:	bde, jhb
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-30 21:33:16 +00:00
Robert Watson
48713bdc3c o Move current inhabitants of kern.security to kern.security.bsd, so
that new models can inhabit kern.security.<modelname>.
o While I'm there, shorten somewhat excessive variable names, and clean
  things up a little.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-30 20:58:31 +00:00
Mitsuru IWASAKI
931a10c9d2 Add a couple of minor changes.
- set sc->acpi_s4bios to 1 by default for hibernation until
   OS-initiated S4 transition is implemented.
 - change the behavior of acpi_sleep_state_sysctl() if new value is
   the same as old one, do nothing instead of EINVAL.
2001-11-30 16:06:00 +00:00
Robert Watson
24373ce6ed Use 'mkdir -p /.attribute/system' instead of breaking it into
two seperate mkdir targets.

Submitted by:	jedgar
2001-11-30 15:32:07 +00:00
Robert Watson
cff9580525 Use 'mkdir -p /.attribute/system' instead of breaking it into
two seperate mkdir targets.
2001-11-30 15:21:20 +00:00
Robert Watson
15f1c8d3d2 README.extattr incorrectly specified sample command lines for
UFS_EXTATTR_AUTOSTART.  Insert the missing 'initattr' arguments
to extattrctl.

Noticed by:	green
2001-11-30 15:15:27 +00:00
Brian Somers
0f02fdac67 During SIOCAIFADDR, if in_ifinit() fails and we've already added an
interface address, blow the address away again before returning the
error.

In in_ifinit(), if we get an error from rtinit() and we've also got
a destination address, return the error rather than masking EEXISTS.
Failing to create a host route when configuring an interface should
be treated as an error.
2001-11-30 14:00:55 +00:00
Peter Wemm
304dea369a cpuid bit 30 is 'IA64', for when you're running in i386 mode on an ia64
cpu.  (This is for either userland apps running in i386 mode on an ia64
OS, or when the cpu is in i386 legacy mode running an i386 OS).
2001-11-30 11:57:23 +00:00
Ruslan Ermilov
bd7142087b - Make ip_rtaddr() global, and use it to look up the correct source
address in icmp_reflect().
- Two new "struct icmpstat" members: icps_badaddr and icps_noroute.

PR:		kern/31575
Obtained from:	BSD/OS
MFC after:	1 week
2001-11-30 10:40:28 +00:00
Doug Rabson
6759374681 * Don't use critical_enter/critical_exit when accessing the VHPT - its
pointless and would be inadequate for SMP systems. We will rely on the
  VM system's locks to serialise this for now.
* Change pmap_remove() so that if the range being removed is larger than
  the number of pages mapped by the pmap, we iterate over the currently
  mapped pages instead of over the virtual address range. This should
  make a difference when removing large virtual address ranges from an
  address space.
2001-11-30 10:07:54 +00:00
Luigi Rizzo
aec846d484 Per jlemon request, reintroduce some printf() when an
mbuf allocation fails, and fix (i hope) a couple of style bugs.

I believe these printf() are extremely dangerous because now they can
occur on every incoming packet and are not rate limited. They were
meant to warn the sysadmin about lack of resources, but now they
can become a nice way to panic your system under load.

Other drivers (e.g. the fxp driver) have nothing like this.

There is a pending discussion on putting this kind of warnings
elsewhere, and I hope we can fix this soon.
2001-11-29 23:47:47 +00:00
Luigi Rizzo
01faf54bb0 For i386 architecture, remove an expensive m_devget() (and the
underlying unaligned bcopy) on incoming packets that are already
available (albeit unaligned) in a buffer.
The performance improvement varies, depending on CPU and memory
speed, but can be quite large especially on slow CPUs. I have seen
over 50% increase on forwarding speed on the sis driver for the
486/133 (embedded systems), which does exactly the same thing.

The behaviour is controlled by a sysctl variable, hw.dc_quick which
defaults to 1. Set it to 0 to restore the old behaviour.

After running a few experiments (in userland, though) I am convinced
that doing the m_devget() is detrimental to performance in almost
all cases.

Even if your CPU has degraded performance with misaligned data,
the bcopy() in the driver has the same overhead due to misaligment
as the one that you save in the uiomove(), plus you do one extra
copy and pollute the cache.

But more often than not, you do not even have to touch the payload,
e.g. when you are forwarding packets, and even in the often-cited
case of NFS, you often end up passing a pointer to the payload to
the disk controller.

In any case, you can play with the sysctl variable to toggle between
the two behaviours, and see if it makes a difference.

MFC-after: 3 days
2001-11-29 22:46:48 +00:00
Andrew Gallatin
a58b29a603 fix DIAGNOSTIC panic caused by proc/thread typo
tested by: Martijn Pronk <martijn@smartie.xs4all.nl>
2001-11-29 15:33:46 +00:00
Brian Feldman
30454e1977 Return a POSIX-compliant error for write(2) failure. 2001-11-28 23:02:33 +00:00
Robert Watson
1e4b531bb6 o Cache req->td->td_proc->p_ucred->cr_prison in pr to improve
readability.
o Conditionalize only the SYSCTL definitions for the regression
  tree, not the variables itself, decreasing the number of #ifdef
  REGRESSIONs scattered in kern_mib.c, and making the code more
  readable.

Sponsored by:	DARPA, NAI Labs
2001-11-28 21:22:05 +00:00
Archie Cobbs
19ff9e5f3e When a socket is not connected, allow the peer "struct sockaddr"
to be included in the meta information that is associated with
incoming and outgoing packets.

Reviewed by:	julian
MFC after:	1 week
2001-11-28 19:39:58 +00:00
John Baldwin
88736e1d37 Fix indentation after removing GEMDOS support. Whitespace changes only. 2001-11-28 18:29:16 +00:00
John Baldwin
5a7f3ebb94 Use suser_td() instead of explicitly checking cr_uid against 0.
PR:		kern/21809
Submitted by:	<mbendiks@eunet.no>
Reviewed by:	rwatson
2001-11-28 18:25:39 +00:00
John Baldwin
c6010b66a3 Whitespace fixes so thre 386 versoion of __uint8_swap_uint32 is easier to
read.
2001-11-28 17:10:57 +00:00
Warner Losh
ddecf579ce Remove ciss from the modules build until the build issues are resolved. 2001-11-28 17:08:51 +00:00
John Baldwin
d3990d589f Axe more unused GEMDOS code that was #ifdef atari.
PR:		kern/21809
Submitted by:	<mbendiks@eunet.no>
2001-11-28 16:56:42 +00:00
Brian Somers
6f99b44c60 Fix a typo in a comment 2001-11-28 16:15:52 +00:00
Luigi Rizzo
920dcd3fcb Remove the need for an expensive m_devget on the i386, which does not
have alignment problems.

On small boxes (e.g. the net4501 from Soekris, featuring a 486/133)
this provides huge performance benefits: the peak forwarding rate
with avg.sized packets goes up by 50-70% because of this change
alone. Faster CPUs might benefit less from this change, but in any
case the CPU has better things to do than waste time on useless
memory-to-memory copies.

Several drivers (for Tulip-like cards) might benefit from a similar
change.

Right now the new behaviour is controlled by a sysctl variable,
hw.sis_quick which defaults to 1 (on), you can set it to 0 to
reintroduce the old behaviour (and compare the results).  The
variable is only there to show how much you can gain with this
change, it will go away soon.

Also, slightly simplify the code to initialize the ring buffers,
and remove a couple of dangerous printf's which could trigger on
any packet in case of mbuf shortage.

MFC-after: 3 days
2001-11-28 16:10:37 +00:00
Daniel C. Sobral
605f755d8a Waits for a keypress before rebooting on panic.
PR:		kern/32351
Submitted by:	Jonathan Mini <mini@haikugeek.com>
MFC after:	1 week
2001-11-28 14:00:36 +00:00
Maxim Sobolev
97361ffaab Regen after addition of the Mustek 1200 CU Plus scanner.
Submitted by:	"Ilmar S. Habibulin" <ilmar@watson.org>
2001-11-28 12:38:15 +00:00
Maxim Sobolev
134290641e Add Mustek 1200 CU Plus scanner.
Submitted by:	"Ilmar S. Habibulin" <ilmar@watson.org>
2001-11-28 12:37:04 +00:00
Mitsuru IWASAKI
b9c780d64e Yet another synch with minor changes in the ACPI CA 20011120 snapshot.
We need to call AcpiEnterSleepStatePrep() before AcpiEnterSleepState().
2001-11-28 12:09:42 +00:00
Warner Losh
74d3832f6d Add Buffalo AirStation 11Mbps CF WLAN card.
Obtained from: NetBSD (ichiro)
2001-11-28 08:35:08 +00:00
Warner Losh
f471b125bb Sync to 1.24 2001-11-28 08:33:41 +00:00
Warner Losh
7a9b0e83d5 Merge from NetBSD:
1.147 (my changes to sync to FreeBSD's file)
	1.148 Buffalo AirStation CFtytpe WLAN Card (ichiro)
	1.149 IBM SCSI PCMCIA (yamt)
	1.150 <restore 1.148 lost in 1.149> (enami)
2001-11-28 08:33:12 +00:00
Mike Smith
76f2b644fd Synch with minor changes in the ACPI CA 20011120 snapshot. 2001-11-28 04:36:29 +00:00
Mike Smith
1b3eb6b30c Merge local changes.
Add a fix for a minor error in the PCI routing table creation handler
where the correct size for the buffer is not returned.
2001-11-28 04:34:52 +00:00
Mike Smith
89709a06f9 This commit was generated by cvs2svn to compensate for changes in r87031,
which included commits to RCS files with non-trunk default branches.
2001-11-28 04:29:40 +00:00
Mike Smith
de87ee3ada Vendor import of the Intel ACPI CA 20011120 snapshot. 2001-11-28 04:29:40 +00:00
John W. De Boskey
a5f75648d8 Return a more meaningful errno when the length of the interpreter
exceeds MAXSHELLCMDLEN to avoid secondary /bin/sh execution.

Update execve man page to reflect change.

Increase MAXSHELLCMDLEN to a slightly more meaningful value.

PR:		kern/32106
Submitted by:	b@etek.chalmers.se
Reviewed by:	bsd
MFC after:	2 weeks
2001-11-28 03:26:58 +00:00
Peter Wemm
023a0e6100 Dont print the sysctl node tree unless you're root.
Found by:	jkb (Yahoo OS troublemaker)
2001-11-28 03:11:16 +00:00
David E. O'Brien
00def12b2b Change to using my custom sparc64 binutils. 2001-11-28 02:35:02 +00:00
John Baldwin
76053f515b Clean up some of the gross macros whitespace wise before I fix the asm
constraints.
2001-11-28 01:42:16 +00:00
Mike Smith
3a31b7eb32 Add the 'ciss' driver, which supports the Compaq SmartRAID 5* family of
RAID controllers (5300, 532, 5i, etc.)

Thanks to Compaq and Yahoo! for support during the development of this
driver.

MFC after:	1 week
2001-11-27 23:08:37 +00:00
John Baldwin
64bf8541f0 Remove GEMDOS support from msdosfs. I don't think anyone is going to
port FreeBSD to Atari machines any time soon.
2001-11-27 21:00:15 +00:00
Robert Watson
6758206539 Document the "console" setting in loader.conf, suggesting vidconsole
or comconsole.
2001-11-27 20:37:40 +00:00
Dima Dorfman
3a33b1b3b7 ipfw_modevent(): Don't use an unnatural block to define a variable
(fcp) that's already defined in the outer block and isn't used
anywhere else.  This silences -Wunused.

Reviewed by:	md5(1)
2001-11-27 20:32:47 +00:00
Dima Dorfman
e8d41815df Remove debugging printfs that weren't conditional on any debugging
options in handling MOD_{UN,}LOAD (they weren't very useful, anyway).
2001-11-27 20:28:48 +00:00
Dima Dorfman
0d4bef5dd4 In icmp_reflect(): If the packet was not addressed to us and was
received on an interface without an IP address, try to find a
non-loopback AF_INET address to use.  If that fails, drop it.
Previously, we used the address at the top of the in_ifaddrhead list,
which didn't make much sense, and would cause a panic if there were no
AF_INET addresses configured on the system.

PR:		29337, 30524
Reviewed by:	ru, jlemon
Obtained from:	NetBSD
2001-11-27 19:58:09 +00:00
Dima Dorfman
19d2c78f34 Implement a "kill" DDB command which is an interface to psignal() that
respects locks.  Before SMPng, one was able to call psignal()
using the "call" command, but this is no longer possible because it
does not respect locks by itself.  This is very useful when one has
gotten their machine into a state where it is impossible to spawn
ps/kill or su to root.

In this case, respecting locks essentially means trying to aquire the
proc lock before calling psignal().  We can't block in the debugger,
so if trylock fails, the operation fails.  This also means that we
can't use pfind(), since that will attempt to lock the process for us.

Reviewed by:	jhb
2001-11-27 19:56:28 +00:00
Robert Watson
38e04732fc Add include of net/route.h, as structures moved around due to the
syncache rely on 'struct route' being defined.  This fixes the
LINT build some.
2001-11-27 17:36:39 +00:00
Luigi Rizzo
49a79b6661 Fix a bug in the driver -- under load, the receive unit could become
idle and the driver would not detect the event, requiring userland
to cycle the interface to bring it up again.
The fix consists in adding SIS_IMR_RX_IDLE to the interrupt mask and
add a command in sis_intr() to restart the receiver when this happens.

While at it, make the test of status bits more efficient.
2001-11-27 16:29:11 +00:00
Ruslan Ermilov
3e0cee70d7 Don't automatically unbind/deallocate memory when releasing.
This fixes the VT switching problem with the i810 X driver.

Explained by:	David Dawes <dawes@XFree86.Org>
Reviewed by:	dfr
2001-11-27 14:12:21 +00:00
Hajimu UMEMOTO
c79ae091de fixed the cast128 calculation with a short cipher key length.
the memory was overridden when the key length was less than 16 bytes.

Obtained from:	KAME
MFC after:	1 week
2001-11-27 14:11:47 +00:00
Dag-Erling Smørgrav
98c7e22c50 Add support for a last-close handler.
Revert the module version bumps; they're quite pointless as long as the
only pseudofs consumer is linprocfs, which is in the tree.
2001-11-27 13:26:27 +00:00
Seigo Tanimura
df89626872 Clear a new syncache entry first, followed by filling in values. This
fixes route breakage due to uncleared gabage on my box.
2001-11-27 11:55:28 +00:00
Ruslan Ermilov
8573e68110 When servicing an internal FTP server, punch ipfirewall(4) holes
for passive mode data connections (PASV/EPSV -> 227/229).  Well,
the actual punching happens a bit later, when the aliasing link
becomes fully specified.

Prodded by:	Danny Carroll <dannycarroll@hotmail.com>
MFC after:	1 week
2001-11-27 10:50:23 +00:00
Doug Rabson
473ec8790d Minor tweaks to the TLB handling code - avoid movl instructions and add
itc.x instructions to attempt to avoid the little flurry of TLB exceptions
for handling access, dirty etc.
2001-11-27 09:49:53 +00:00
Kenneth D. Merry
94a0557ad7 Fix mounting root from a ISO9660 filesystem on a SCSI CDROM.
The problem was that the ISO9660 code wasn't opening the device prior to
issuing ioctl calls.  In particular, the device must be open before
iso_get_ssector() is called in iso_mountroot().

If the device isn't opened first, the disk layer blows up due to an
uninitialized variable.

The solution was to open the device, call iso_get_ssector() and then close
it again.

The ATAPI CDROM driver doesn't have this problem because it doesn't use the
disk layer, and evidently doesn't mind if someone issues an ioctl without
first issuing an open call.

Thanks to phk for pointing me at the source of this problem.

Tested by:	dirk
MFC after:	1 week
2001-11-27 03:55:43 +00:00
Kenneth D. Merry
5cd818b1b7 Bring the probe inquiry code in line with the SCSI spec.
It is legal to have a device with device type 0x1f, that just means
that the device is of unknown type.  Instead, only check the peripheral
qualifier when deciding whether or not to reject a device based on its
inquiry information.

Tested by:	julian
MFC after:	3 weeks
2001-11-27 03:34:22 +00:00
John Baldwin
d2cb9f715f Replace 'p' with 'td' as appropriate. 2001-11-27 00:34:13 +00:00
John Baldwin
c5c6ef2c27 GC compat macros HASHINIT, VOP__LOCK, VOP__UNLOCK, VGET, and VN_LOCK. 2001-11-27 00:18:33 +00:00
John Baldwin
b2ba87cec3 Expand LOCKMGR() compat macro. 2001-11-27 00:08:04 +00:00
John Baldwin
cfaffc10b5 GC some KSE compatiblity macros that were somehow still here. 2001-11-26 23:52:35 +00:00
John Baldwin
8a918adb2b GC non-FreeBSD code that didn't work anyways. 2001-11-26 23:45:12 +00:00
Warner Losh
1cf5f5552b MFS: I was confused. This code wasn't in -current after all.
Merge in the irq 0 detection.  Add comment about why.

If we have irq 0, ignore it like we do irq 255.  Some BIOS writers aren't
careful like they should be.
2001-11-26 21:25:03 +00:00
Ian Dowse
468a40eceb Back out 1.88 (NO_SYNC_CACHE quirk for Infortrend IFT-3102). Since
this device properly reports that the sync cache command is
unsupported, the bug is that we still complain about it on the
console.

Noticed by:	gibbs
2001-11-26 16:54:37 +00:00
Yoshihiro Takahashi
de48920662 Split the sio driver for pc98 into bus front end and back end.
(merged from the files in sys/dev/sio)
2001-11-26 12:29:53 +00:00
Ruslan Ermilov
8ba0396688 Restore the ability to use IP_FW_ADD with setsockopt(2) that got
broken in revision 1.86.  This broke natd(8)'s -punch_fw option.

Reported by:	Daniel Rock <D.Rock@t-online.de>,
		setantae <setantae@submonkey.net>
2001-11-26 10:05:58 +00:00
Warner Losh
1c988e75f4 bde suggests that sio really wants to manage its own softc. This
allows us to move the sio softc data structure back into sio.c and
reduce the complexity of the non sio.c sio files.

Submitted by: bde

# I didn't fix the locking issues that bruce also submitted.
2001-11-26 07:39:51 +00:00
Warner Losh
969c260d72 Make the start memory address that we use configurable via a boot
loader parameter.  This allows us to more easily boot on big memory
configuration machines.  hw.pccbb.start_mem.  Reflect this in a sysctl
so we can read it from userland.

# Note: we need a TUNABLE_ULONG to do this right.  I'll add that to
# kernel.h soon.
2001-11-26 07:17:09 +00:00
Warner Losh
e8cb41d36f Only call pccard_function_disable when we have a configured config
entry.  Otherwise we panic on boot for cards that we can't allocate a
config entry for (my 3.3V wavelan card currently fails thusly).
2001-11-26 07:14:00 +00:00
Warner Losh
7eea743ef8 Experimental patch to try to properly clip the range of the memory
request to one that's supported by the bridge.  I'm not 100% sure this
is correct, but it makes it easier for the cardbus bridge to allocate
its memory.

Similar code is needed for the I/O range.  Also, I'm not sure if I
should be doing this based on memory or pmemory (but likely should do
it based on some flag that tells us to prefetch or not).

Talked about a long time ago with: msmith
2001-11-26 07:12:35 +00:00
Warner Losh
72905c7ec4 style(9) fixes:
o declare variables at the start of the function, not the start of
	  a block.
	o return (retval);
	o minor {} tweaks.
2001-11-26 05:42:45 +00:00
Robert Watson
058a555781 o Add #include <sys/systm.h> to fix a warning about printf() being
used without a prototype.
2001-11-26 04:06:47 +00:00
Robert Watson
17a4793a19 o Add 'kern.maxusers' to the list of commented out sample tunable
variables, since that can now be tuned at boot-time without a
  recompile.
2001-11-26 03:49:59 +00:00
Warner Losh
746509ce98 peter pointed out that I missed a hard coded location for the memory.
Also add a define for I/O stuff (for cardbus).
2001-11-26 02:11:22 +00:00
Warner Losh
f703f3eaee First part of patches to make sio grok 16-bit serial cards under
NEWCARD.  Other patches may be reqiured to sio to prevent a hang on
eject.  Also add commented out entries for sio_pccard.c in files.pc98
to match other architectures.

Submitted by: yamamoto shigeru-san
2001-11-26 00:39:33 +00:00
Warner Losh
b772be119c Make the address we kludily allocate in pccbb be a #define for easier
changing.  Also change it from 0x44000000 to 0x84000000 for large memory
machines.

# the PCI bus code should do this for us.  This is a bandaide, not a
# solution.
2001-11-26 00:33:04 +00:00
Maxim Sobolev
c1f25b2f6b Fix POLA - when selecting line into syscons' cut'n'paste buffer (double
click) do not include newline into the buffer. This is exacly how
things worked before my recent changes to the cut'n'paste code and
how they work in 4-STABLE.
2001-11-25 22:51:30 +00:00
Dima Dorfman
5744b3eac4 DEVFS has resurfaced. 2001-11-25 21:06:21 +00:00
Dima Dorfman
2ab80ed8cf Address two minor issues: implement the _PC_NAME_MAX and _PC_PATH_MAX
pathconf() variables for directories, and set st_size and st_blocks
(of struct stat) for directories as appropriate.  Note that st_size is
always set to DEV_BSIZE, since the size of the directories is not
currently kept.

Reviewed by:	phk, bde
2001-11-25 21:00:38 +00:00
Bosko Milekic
a705398be0 Context:
For an object type, we maintain a variable mb_mapfull. It is 0 by default
and is only raised to 1 in one place: when an mb_pop_cont() fails for
the first time, on the assumption that the reason for the failure is
due to the underlying map for the object (e.g. clust_map, mbuf_map) being
exhausted.

Problem and Changes:
Change how we define "mb_mapfull." It now means: "set to 1 when the first
mb_pop_cont() fails only in the kmem_malloc()-ing of the object, and
only if the call was with the M_TRYWAIT flag." This is a more conservative
definition and should avoid odd [but theoretically possible] situations
from occuring. i.e. we had set mb_mapfull to 1 thinking the map for the
object was actually exhausted when we _actually_ failed in malloc()ing
the space for the bucket structure managing the objects in the page
we're allocating.
2001-11-25 04:42:54 +00:00
Matthew Dillon
0dbd8b1b08 convert holdsock() to fget(). Add XXX reminder for future socket locking. 2001-11-24 18:28:22 +00:00
Mitsuru IWASAKI
a02ab1042e Add suspend/resume support.
MFC after:	1 week
2001-11-24 18:00:33 +00:00
Warner Losh
5c8fcbc866 Patch to allow the ed driver interrupt routine to terminate if the
card is ejected while we're in this routine.

yamamoto-san's original patch had a small race window for AX88190
chips, which I corrected by limiting the number of iterations we'd try
to reset the bits to be about 15ms rather than forever.  This seems to
work for me, but I don't have a large collections of cards based on
this chipset.

Submitted by:	YAMAMOTO Shigeru
2001-11-24 16:15:18 +00:00
Dima Dorfman
2c1a6f2178 Check the return value of tsleep() in snpread(). This may be
important, since our sleep is interruptable (PCATCH flag).

PR:		30985
Discovered by:	Vladimir Jakovenko <vovik@lucky.net>
Submitted by:	Valentin Nechayev <netch@segfault.kiev.ua>
2001-11-24 15:59:46 +00:00
Dima Dorfman
2c9fb90995 Return EBUSY if we try to attach to a tty that is already being
snooped on.  This causes all kinds of Bad Things(tm) to happen since
closing one session will clobber state that's needed for the other
one.  This could theoretically be supported if the code was careful,
but until somebody implements that, preventing this will stop people
from unknowingly shooting themselves in the foot.
2001-11-24 15:34:18 +00:00
Dima Dorfman
2f7a385114 Create a snpbasedev variable which holds a reference to the first snp
device cloned, and assign all further devices to depend on it.  This
allows us to call dev_depends() on it at module unload time to get rid
of /dev/snp* (in the devfs case, anyway).  For this to work, we must
not destroy the device at close time.  [Idea stolen from if_tun.]

The above has the following sideaffects: (a) The snp device used by
watch(8) will remain after watch(8) exits.  This is probably how it
should have been all along, and how it was before devfs came along.
(b) Module unload doesn't panic if there are any /dev/snp* devices
which haven't been used (and thus previously destroyed).  Thus, we can
reenable the unload functionality disabled in rev. 1.65.

PR:		32012
2001-11-24 15:10:53 +00:00
Dag-Erling Smørgrav
c798b36242 Revert incorrect KSEfication: realitexpire expects a struct proc *, not a
struct thread *.
2001-11-24 14:09:50 +00:00
Gerard Roudier
a517ead7c8 Submitted by:David E. O'Brien
MFC after:3 days
- Add memory barrier definition for sparc64.
  Patch sent by David E. O'Brien, approved by maintainer.
- Fix an endianization error of a bus physical address used from SCRIPTS
  that made the driver fail on big endian machines as sparc64.
2001-11-24 12:35:48 +00:00
Doug Rabson
c36e48514d Since we used '#ifdef __i386__', don't close with '#endif /* !__alpha__ */' 2001-11-24 10:11:14 +00:00
Luigi Rizzo
31083dbb03 Whitespace change - replace leading spaces with tabs. 2001-11-24 01:47:50 +00:00
David E. O'Brien
d970bcc9db Remove the use of _PATH_DEV in the example.
The kernel certainly doesn't use _PATH_DEV or even /dev/ to find the device.
It cannot, since "/" has not been mounted.  Maybe the only affect of using
/dev/ is that it gets put in the mounted-from name for "/", so that mount(8),
etc., display an absolute path before "/" has been remounted.  Many have
never bothered typing the full path, and code that constructs a path in
rootdevnames[] never bothered to construct a full path, so the example
shouldn't have it.

Submitted by:	bde
2001-11-24 01:34:12 +00:00
Ian Dowse
1a24ca7a4b The Olympus C-1 digital camera uses a non-standard BBB command-status
signature, but otherwise behaves just like a normal USB mass-storage
device. Add a new quirk to cover this case, and enable it for C-1
cameras. The quirk enables translation from the C-1 signature to
the normal CSWSIGNATURE value.

Reviewed by:	n_hibma
2001-11-23 17:35:35 +00:00
Ian Dowse
db54406364 Regen. 2001-11-23 16:36:28 +00:00
Ian Dowse
5cffab225e Add Olympus C-1. 2001-11-23 16:35:40 +00:00
Mitsuru IWASAKI
0c66d318dd Add suspend/resume code mostly merged from fxp driver. 2001-11-23 14:27:33 +00:00
Bruce Evans
419d3454b1 Fixed a buffer overrun. In my kernel configuration, tcp_syncache happens
to be followed by nfsnodehashtbl, so bzeroing callouts beyond the end of
tcp_syncache soon caused a null pointer panic when nfsnodehashtbl was
accessed.
2001-11-23 12:31:27 +00:00
Mike Barcroft
9364d826ac Add support for the `restrict' type qualifier, new in C99.
Reviewed by:	wollman
2001-11-23 06:55:41 +00:00
Mitsuru IWASAKI
6397624d9b Validate requested sleep state in acpi_SetSleepState() to avoid reentry
during wakeup procedure.
2001-11-23 05:57:03 +00:00
Luigi Rizzo
985fbf6b7b Expand the comment on the layout of softc, arpcom and ifnet structures,
and list the places where the assumption is used.
2001-11-22 23:59:56 +00:00
Orion Hodson
21f3068887 Fix typo introduced with last commit. 2001-11-22 23:38:26 +00:00
Mitsuru IWASAKI
dc2183bf5c Add disabling code via the debug.acpi.disable environment variable. 2001-11-22 17:43:15 +00:00
Guido van Rooij
40e294f796 When mkdir()-ing, the parent dir gets is linkcount increased.
Fix VN_KNOTE to reflect that.

Found by: tobez@freebsd.org
MFC after:	2 days
2001-11-22 15:33:12 +00:00
Jonathan Lemon
be2ac88c59 Introduce a syncache, which enables FreeBSD to withstand a SYN flood
DoS in an improved fashion over the existing code.

Reviewed by: silby  (in a previous iteration)
Sponsored by: DARPA, NAI Labs
2001-11-22 04:50:44 +00:00
Jonathan Lemon
9497337452 The DEC kn300 has special code for console handling hardcoded here, so add
a call to promcndetach() to explicitly turn off the prom console.

Tested by: Jeff Roberson
2001-11-22 02:41:34 +00:00
John Baldwin
1a301f73dc Bump the CD boot loader up to 1.1 so that the FICL upgrade a while back
will not fail thinking that the loader version is stale.  This lets us
use the Forth code on the CD now.
2001-11-21 23:16:26 +00:00
Max Khon
ea38b939e8 Add driver for Granch SBNI12-xx ISA and PCI network adapters.
MFC after:	1 week
2001-11-21 22:29:35 +00:00
Andrew R. Reiter
31689d25c8 - Utilize the great M_ZERO flag rather than allocating memory then do
a call to memset.
2001-11-21 20:29:08 +00:00
Jonathan Lemon
d00fd2011d Move initialization of snd_recover into tcp_sendseqinit(). 2001-11-21 18:45:51 +00:00
Ruslan Ermilov
a47adea237 Fix an off-by-bit error in the AGP_MODE_[GS]ET_RATE() macros.
PR:		32140
Submitted by:	Mark McCleary <mark.mccleary@windriver.com>
MFC after:	3 days
2001-11-21 08:40:23 +00:00
Peter Wemm
fef8392d99 Recognize the "fixed" geometry in boot1 so that DD disks are not
interpreted as real fdisk tables (and fail).
2001-11-21 08:31:45 +00:00
Orion Hodson
eb5b9d0b87 Correct extmode initialization.
MFC after:	3
2001-11-21 04:26:04 +00:00
Orion Hodson
647fbfebc5 Emit a warning if invalid mode passed to ac97_setextmode.
MFC after:	3 days
2001-11-21 04:08:10 +00:00
Orion Hodson
2065c8c619 Set extmode according to extcaps. Fixes codec sample rate failures
that causes noisy playback with rates other than 48k (reported by
Olexander Kunytsa).

MFC after:	3 days
2001-11-21 04:06:52 +00:00
David E. O'Brien
cabb03fc76 We only have slices on i386 and IA-64. 2001-11-20 23:48:00 +00:00
Pierre Beyssac
27a828fcb6 Convert BSD trap codes to i386.
Submitted by:	F. Gouget <fgouget@free.fr>
2001-11-20 09:39:31 +00:00
Warner Losh
67bac73ca9 Comment out some bogus entries. somehow they match everything, which
is bad.  I need to correct pccarddev, but I'm not sure how just at the
moment.  So I'm firewalling the damage.
2001-11-20 06:18:36 +00:00
Warner Losh
03bfaba97c Weed out those pccard entries that match everything. These are too
dangerous to allow :-)

This should fix the ed1: <PLANEX ... bug.
2001-11-20 06:15:24 +00:00
David Greenman
136b546adf Disabled tagged commands for Hitachi Jura-C series with J8A8 firmware.
PR:		23536
Submitted by:	amagai@nue.org
2001-11-19 23:23:28 +00:00
Brian Feldman
cd11f7bf9f Reference lomac in its new location. 2001-11-19 22:36:40 +00:00
Brian Feldman
64b6b70e17 This commit was generated by cvs2svn to compensate for changes in r86629,
which included commits to RCS files with non-trunk default branches.
2001-11-19 22:34:06 +00:00
Brian Feldman
3795613d1d Import LOMAC preliminary release 2.0.0 in src/sys/security. These files may
be modified and do not have to remain on the vendor branch.

http://opensource.nailabs.com/lomac/index.html

Sponsored by: DARPA, NAI Labs (CBOSS project)
2001-11-19 22:34:06 +00:00
Ian Dowse
c0bea86dc4 Back out revision 1.117; the correct solution is to upgrade the
firmware on the drive in question. The pattern also matched far
too many Hitachi drives.

Spotted by:	dg
2001-11-19 20:50:44 +00:00
Brian Feldman
6fba85a0cf The "lomac" module compiles fine on Alpha, too.
Tested by:	wilko
2001-11-19 20:25:55 +00:00
Munechika SUMIKAWA
9ef912e8ec Support MELCO LUA2-TX USB ethernet adaptor.
Actually this porting supports Pegasus II chip so I guess some other
devices supported by NetBSD also work.  But the devices list are not
included because I cannot confirm if they work.

Obtained from:	NetBSD
MFC after:	3 weeks
2001-11-19 18:47:49 +00:00
Munechika SUMIKAWA
c9fcd7dde0 Regen. 2001-11-19 18:41:35 +00:00
Munechika SUMIKAWA
b62f13198a Add Melco LUA2-TX5. 2001-11-19 18:40:17 +00:00
Brian Feldman
a066b1c1d5 Add module "lomac" to the modules Makefile, i386 section. If someone on
Alpha can verify that it compiles fine there, too, this should be moved
to the MI section (or that problem fixed); I've only had x86 hardware to
est with.

Sponsored by:	DARPA, NAI Labs (CBOSS project)
2001-11-19 18:15:12 +00:00
Brian Feldman
4c4771369c Depend on vnode_if.h. 2001-11-19 18:12:46 +00:00
Brian Feldman
21180f280b Use appropriaate include path for syscall_gate.h 2001-11-19 18:12:12 +00:00
David E. O'Brien
03820e7a36 Upper case the FreeBSD loader prompt.
On OFW based machines, it is just too confusing having the firmware and
OS loader giving the same prompt.  This is a nice compromise that 99% of the
users on non-OFW platforms will probably not even notice.
2001-11-19 17:30:26 +00:00
Ian Dowse
b0cb4883b1 Deal with a few issues that cropped up following the recent changes
to the code for translating socket and private ioctls:

- Only perform socket ioctl translation if the file descriptor is a
  socket.
- Treat socket ioctls on non-sockets specially, and for now assume
  that these are directed at a tap/vmnet device, so translate the
  ioctl numbers as appropriate (the way if_tap abuses some socket
  ioctls to pass non-ifreq data is utterly bogus, but this is how
  VMware on FreeBSD has always "worked"; I will deal with this
  later).
- Add (untested) support for translating SIOCSIFADDR.
- In all cases where we fail to translate an ioctl, return ENOIOCTL
  so that other handlers have a chance to do the translation.

This should fix the "/dev/vmnet1: Invalid argument" errors that
users of VMware were experiencing, though I have only verified this
on RELENG_4.

Submitted by:	des (mostly)
MFC after:	3 days
2001-11-19 15:43:50 +00:00
Maxim Sobolev
783c41d432 Make kevents on pipes work as described in the manpage - when the last
reader/writer disconnects, ensure that anybody who is waiting for the
kevent on the other end of the pipe gets EV_EOF.

MFC after:	2 weeks
2001-11-19 09:25:30 +00:00
Peter Wemm
d65d6e5e21 s/code/ucode/ (last minute typo) 2001-11-19 08:06:56 +00:00
Peter Wemm
bc11d59b2a Initial cut at calling the EFI-provided FPSWA (Floating Point Software
Assist) driver to handle the "messy" floating point cases which
cause traps to the kernel for handling.
2001-11-19 07:25:42 +00:00
Peter Wemm
24ffe931b9 Lookup the EFI_FPSWA driver and pass the interface pointer through to the
kernel before we call ExitBootServices().  I've typed the definitions
in efifpswa.h from the Intel FPSWA manual (urk).
2001-11-19 07:09:47 +00:00
Peter Wemm
1ccc5e6c4e Use some (now) spare space for passing through a pointer to the FPSWA
Interface provided by EFI (Floating Point SoftWare Assist).
2001-11-19 07:07:09 +00:00
Peter Wemm
de76c8189e Remove bootinfo.bi_kernel. It isn't used by the kernel. struct bootinfo
should go away on ia64, we should be loader metadata based since that is
the only way we can boot (loader, skiload).
2001-11-19 07:05:10 +00:00
Peter Wemm
a812f645bc Fix a dependency violation, same as in libefi/elf_freebsd.c a while back. 2001-11-19 06:59:53 +00:00
Peter Wemm
8e92224a8a This is used in C, not C++. functions with no args have func(void) in our
kernel.
2001-11-19 06:58:14 +00:00
Warner Losh
8529411cad Add NEWCARD support to awi.
Devices obtained from NetBSD (+ zoom air 4000, which I added).
2001-11-19 06:42:11 +00:00
Warner Losh
e6c33a39ba Create a module for awi. 2001-11-19 06:41:04 +00:00
Warner Losh
5bbac2b91d Update to 1.23 pccarddevs 2001-11-19 06:28:20 +00:00
Warner Losh
d2e623d7ef Add ZOOM as one of the bgous vendors 2001-11-19 06:27:33 +00:00
Warner Losh
3d3a4bbbe9 Add Linksys Instant Wireless Network PC Card from NetBSD 2001-11-19 05:34:55 +00:00
Warner Losh
eb321069c2 Update to 1.22 pccarddevs 2001-11-19 05:22:46 +00:00
Warner Losh
fec4038832 Nits to make it whitespace compatible with what I'm about to commit to NetBSD 2001-11-19 05:22:28 +00:00
Warner Losh
49fe5a5891 Update to 1.21 pccarddevs 2001-11-19 05:11:50 +00:00
Warner Losh
1f0d8efbc3 Merge NetBSD 1.146: Linksys Instant Wireless Network card.
Obtained From: NetBSD
2001-11-19 05:11:35 +00:00
Brian Feldman
b13c2e209e Add module compile framework for LOMAC.
Sponsored by:	DARPA, NAI Labs (CBOSS project)
2001-11-19 05:09:14 +00:00
Warner Losh
3ae1e1bed3 Update to 1.20 pccarddevs 2001-11-19 05:04:08 +00:00
Warner Losh
83f4f9209a Merge NetBSD 1.145: Xircom XE2000 2001-11-19 05:02:55 +00:00
Brian Feldman
5f57403b19 Fix a license and change $Id$s to $FreeBSD$s.
Obtained from:	DARPA, NAI Labs (CBOSS project)
2001-11-19 04:56:36 +00:00
Brian Feldman
ae3a37e4a0 Initial import of the LOMAC (Low-Watermark Mandatory Access Control)
module port to FreeBSD.

Obtained from:	NAI Labsx
2001-11-19 04:50:51 +00:00
Brian Feldman
5eca824ab0 This commit was generated by cvs2svn to compensate for changes in r86567,
which included commits to RCS files with non-trunk default branches.
2001-11-19 04:50:51 +00:00
Ian Dowse
39456c0351 Hitachi DK32 disks have problems with tagged queuing under load.
PR:		kern/23536
Submitted by:	Y.Amagai <amagai@nue.org>
MFC after:	1 week
2001-11-19 01:19:08 +00:00
Matthew Dillon
849948a7cd cast hashing index to (int)(intptr_t) for calculation.
mtx_init() with MTX_QUIET and MTX_NOWITNESS to avoid bogus warnings
2001-11-19 00:20:36 +00:00
Thomas Moestl
f8129f72da Add a structure defintion for the id prom contents.
Obtained from:	NetBSD
2001-11-18 20:50:11 +00:00
Thomas Moestl
398e05ab1c 1. Add ofw_pci.h with definitions for the OpenFirmware PCI bindings
2. Add OF_getprop_alloc(), a helper function that will malloc() a sufficient
   amount of memory and then retrieve a property value into it.

Approved by:	benno
Obtained from:	NetBSD (1)
2001-11-18 20:38:44 +00:00
Jake Burkholder
656ad29399 Standardize idempotentcy ifdefs. 2001-11-18 20:30:16 +00:00
Marcel Moolenaar
9d2ff92851 Implement DVD-ROM ioctls.
PR: 26955
Submitted by: Boris Nikolaus (email unknown)
2001-11-18 18:49:07 +00:00
Mitsuru IWASAKI
430f5c92b6 Yet another verbose printing cleanup. Remove debug_wakeup flag and
check common verbose flag instead.
2001-11-18 18:48:31 +00:00
Andrew R. Reiter
b489b4075c - Ensure that linker file id's are unique, rather than blindly
incrementing the value.

Reviewed by: dfr, peter
2001-11-18 18:19:35 +00:00
Mitsuru IWASAKI
6971b3c7d1 Cleanups of verbose printing. All the messages for the debugging is
disabled unless verbose flag is set.  Also fix some messages in terms
of English.
The critical messages and error messages in probe/attach routine are
unchanged by this commit.
2001-11-18 18:12:07 +00:00
Jake Burkholder
fcada3d4ed Add kernel headers needed to build libc. Some are bogus and/or just enough
to compile.

Mostly obtained from:	netbsd
2001-11-18 17:56:46 +00:00
Ian Dowse
56f7305f58 Add the PnP ID for a Rockwell 33.6k modem.
PR:		kern/23414
Submitted by:	Ryuichiro Imura <imura@af.airnet.ne.jp>
MFC after:	1 week
2001-11-18 16:39:09 +00:00
Marcel Moolenaar
33b3cce08c Implement missing SOUND_MIXER_WRITE_RECSRC ioctl.
PR: 22971
Tested by: dougb
2001-11-18 06:36:18 +00:00
Marcel Moolenaar
5c465126bf Pass maintainership over to emulation@FreeBSD.org. It has been fun,
but time and other interests is making it hard. Open the door for
new blood and fresh tactics now that the Linuxulator has had its
facelift.

Thanks to all who contributed during my tour of duty!
2001-11-18 05:45:27 +00:00
Jake Burkholder
c8d87e81dd Make jmpbuf the same size as ucontext_t so that it can be passed
to sigreturn.

Obtained from:	alpha
2001-11-18 04:04:35 +00:00
Jake Burkholder
86f466074c 1. Split fp.h into fp.h and fsr.h so that the latter can be included
in asm files.
2. Temporarily cause subnormal operands in floating point operations
   to be treated as zeros so that comlpetion of the operation does not
   need to be emulated.
3. Catch fp_exception_other and correctly skip over the unfinished
   instruction, but basically ignore them.  Emulating the instruction
   is not yet supported.
4. Zero td_retval[1] as well in syscall().

Submitted by:	tmm (2, 3)
2001-11-18 04:00:22 +00:00
Jake Burkholder
bf8f99b4b7 Avoid missing ticks and hardclock stopping.
Submitted by:	tmm
2001-11-18 03:47:30 +00:00
Jake Burkholder
a21a9d08d2 Catch up to new constants. (These commit messages should have a song.) 2001-11-18 03:45:13 +00:00
Andrew R. Reiter
0f6db47fb3 - M_ZERO already sets bif_dlist to zero; there is no need to
do it again.
2001-11-18 03:41:20 +00:00
Jake Burkholder
d5a7911f4a 1. Remove kdbframe. Bad idea.
2. Add a TF_DONE macro, which fiddles a trapframe to make the retry on
   return from traps act like a done (advance past the trapping
   instruction instead of re-executing).
3. Flush the windows before entering the debugger, since it is no
   longer done in the breakpoint trap vector.
4. Print a warning if trace <pid> is attempted, it is not yet implemented.
5. Print traps better and decode system calls in traces.

Submitted by:	rwatson (4)
2001-11-18 03:41:12 +00:00
Jake Burkholder
bc40966754 Implement SET. Set execption.s 1.12.
Submitted by:	tmm
2001-11-18 03:31:01 +00:00
Jake Burkholder
cb67f0018f 1. Convert the tstate saved in the pcb to a pstate and test for PSTATE_PEF
to determine if a process is using floating point. in order to avoid
   sign extending a 13 bit immediate.
2. We don't need to context switch cwp anymore, it is better to just
   fiddle the save tstate on return from traps.  See exception.s 1.10
   and 1.12.
3. Completely remove pcb_cwp.
4. Implement vmapbuf, vunmapbuf and vm_fault_quick.  Completely remove
   TODOs from vm_machdep.c (yay!).

Submitted by:	tmm (1, 3, 4)
Obtained from:	existing archs (4)
2001-11-18 03:28:28 +00:00
Jake Burkholder
f375b739ee Implement hw.machine and hw.model sysctls.
Submitted by:	tmm
2001-11-18 03:05:56 +00:00
Jake Burkholder
62d5557bb9 1. Remove bootinfo and just pass loader metadata to the kernel.
2. Remove mcontext.mc_sp, it is redundant.  Adjust spare space to make
   ucontext_t a nice size.
3. Raise pil in the debugger.

Submitted by:	tmm (3)
2001-11-18 03:02:53 +00:00
Jake Burkholder
4d5e57d87d 1. Implement ascopyto() and ascopyfrom() for copying to an alternate address
space from kernel space and from an alternate address space to kernel
   space.
2. Remove the unused and unprototyped physcopy() and physzero() and replace
   with the more versatile ascopy() and aszero(), inspired by the above.
   These can be used to copy and zero physical pages of memory without mapping
   them into kernel space first.
3. Use magic numbers for the offsets in the jmpbuf structure like other
   platforms.
4. Use SET.

Submitted by: 	tmm (1, 4)
2001-11-18 02:47:26 +00:00
Jake Burkholder
117037c4bd 1. Fix a bug where the offsets of the alignment and mmu fault recorvery code
in the window trap vectors were mixed up.  All this did is cause unnecesary
   traps and look wierd in traces.  Superfluous traps happen a lot in normal
   operation, so we are rather good at recovering from them.
2. Store the arguments for a ktr trace in the right place.
3. Use a generic trap vector for breakpoints.  It should not be special.
4. Save the frame pointer in the trap frame for kernel traps if DDB is compiled
   in, otherwsie we don't save the out registers for kernel traps and stack
   traces can't go through nested traps.
5. Apply the same fix to the return from kernel mode trap code as for user
   mode traps.  Ensure that the window we're returning to is the same one
   that we restore to by fiddling the cwp in the saved tstate.  This requires
   that we transfer the values loaded from the trap frame into alternate
   globals before restore-ing, but doing so is not very expensive and not
   worth worrying about.  Not changing the saved cwp can result in the register
   values magically changing on return from traps if we happen to have slept
   and the windows don't work out exactly the same.  Fix the trace just before
   the retry to account for different register usage.
6. Use a SET macro for loading address constants rather than a variation of
   set and setx.  set only works for 32 bit constants, while setx works for
   64 bit constants as well, but produces bloated code when unnecessary.
   Gas always generates the canonical 2 register, 6 instruction form, even
   when it could be optimized; set uses 1 register and 2 instructions.  At
   the moment we assume that the kernel binary is below 4GB so set is
   always sufficient, but the macro allows it to be configured.  Note that
   this has nothing to do with 32 vs. 64 bit address space, it only applies
   to addresses of symbols which are known at compile/link time.

Submitted by:	tmm (6)
2001-11-18 02:33:37 +00:00
Matthew Dillon
39c95b8377 Fix missing holdsock()->fgetsock()
Submitted by:	Hisashi Hiramoto <hiramoto@phys.chs.nihon-u.ac.jp>
2001-11-17 18:43:13 +00:00
Matt Jacob
3cf64d0fbb Be very generous with timeouts for synchronize cache. We may wait a very long
time in the cases where it really sends the drive out to lunch, but it also
allows us to catch very wierd edge cases of strange drives that might take
a very long time (emulated disk drives over a network, e.g.).
2001-11-17 18:26:00 +00:00
Ian Dowse
ff9fc44d6e The Infortrend IFT-3102 multihost U2 SCSI to U2 SCSI controller
doesn't support the synchronise cache command.

PR:		kern/21752
Submitted by:	Nick R. Colakovic <nickc@corp.firstindustrial.com>
MFC after:	1 week
2001-11-17 17:43:06 +00:00
Ian Dowse
d5abb1e452 Add quirk for Fujitsu M2513A MO drives. These drives hang at various
operations due to the synchronize cache command.

PR:		kern/21674
Submitted by:	W.Scholten <whs@xs4all.nl>
MFC after:	1 week
2001-11-17 14:46:22 +00:00