Commit Graph

29104 Commits

Author SHA1 Message Date
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
Yoshihiro Takahashi
608f31f640 MFi386: revisions from 1.26 to 1.30. 2001-11-17 13:58:04 +00:00
Yoshihiro Takahashi
b9c5c179c3 MFi386: revision 1.12 2001-11-17 13:57:32 +00:00
Yoshihiro Takahashi
84909fb9f2 MFi386: revision 1.326. 2001-11-17 13:48:31 +00:00
Yoshihiro Takahashi
e581e0b879 MFi386: revision 1.160 2001-11-17 13:44:33 +00:00
Yoshihiro Takahashi
b69802ca41 MFi386: revision 1.483 2001-11-17 13:16:51 +00:00
Matthew Dillon
b1e4abd246 Give struct socket structures a ref counting interface similar to
vnodes.  This will hopefully serve as a base from which we can
expand the MP code.  We currently do not attempt to obtain any
mutex or SX locks, but the door is open to add them when we nail
down exactly how that part of it is going to work.
2001-11-17 03:07:11 +00:00
Peter Wemm
720c992fe1 Fix the non-KSTACK_GUARD case.. It has been broken since the KSE
commit.  ptek was not been initialized.
2001-11-17 01:56:04 +00:00
Peter Wemm
6729cb8800 Start bringing i386/pmap.c into line with cleanups that were done to
alpha pmap.  In particular -
- pd_entry_t and pt_entry_t are now u_int32_t instead of a pointer.
  This is to enable cleaner PAE and x86-64 support down the track sor
  that we can change the pd_entry_t/pt_entry_t types to 64 bit entities.
- Terminate "unsigned *ptep, pte" with extreme prejudice and use the
  correct pt_entry_t/pd_entry_t types.
- Various other cosmetic changes to match cleanups elsewhere.
- This eliminates a boatload of casts.
- use VM_MAXUSER_ADDRESS in place of UPT_MIN_ADDRESS in a couple of places
  where we're testing user address space limits.  Assuming the page tables
  start directly after the end of user space is not a safe assumption.
There is still more to go.
2001-11-17 01:38:32 +00:00
Peter Wemm
50fa1aaaa7 Forward declare struct ifnet - this fixes a warning in tdfx_pci.c 2001-11-17 01:22:07 +00:00
Peter Wemm
1cf2b66500 Fix printf warnings (int/long)
#if 0 around unused ifname_bsd_to_linux() function
2001-11-17 01:20:02 +00:00
Peter Wemm
170a2c575c Fix warning in debug printf. This is a long on alpha, and int on i386,
but printed with %ld always.
2001-11-17 01:16:10 +00:00
Peter Wemm
bc5f905080 Missing KSE s/curproc/curthread/ 2001-11-17 01:09:53 +00:00
Ian Dowse
55a13f7dd0 Return EOPNOTSUPP for unknown module events.
PR:		kern/18473
Submitted by:	"Jeroen C. van Gelderen" <gelderen@systemics.com>
2001-11-17 00:46:08 +00:00
Peter Wemm
1b27b1ad08 Fix some warnings on 64 bit platforms. 2001-11-17 00:42:02 +00:00
Jonathan Lemon
4584bbf555 When laying out objects in a ZONE_INTERRUPT zone, allow them to cross
a page boundary, since we've already allocated all our contiguous kva
space up front.  This eliminates some memory wastage, and allows us to
actually reach the # of objects were specified in the zinit() call.

Reviewed by: peter, dillon
2001-11-17 00:40:48 +00:00
Peter Wemm
857ff6155b utime/stime.tv_sec are elapsed times, not relative to 1970. We can
safely print them as longs.  Even if ^T overflows after a process
has accumulated 68 years of user or system time, it is no big deal.
2001-11-17 00:26:57 +00:00
Peter Wemm
aa89942676 You cannot cast a time_t to quad_t and printf it with %lld. quad_t is
64 bits, not long long.
2001-11-16 23:53:48 +00:00
Ian Dowse
7b9716bad2 Fix a number of misspellings of "dependency" and "dependencies" in
comments and function names.

PR:		kern/8589
Submitted by:	Rajesh Vaidheeswarran <rv@fore.com>
2001-11-16 21:08:40 +00:00
Ian Dowse
c55c345375 Handle the IBCS2 FIONREAD ioctl. I have only tested that this
compiles, but the patch looks reasonable.

PR:		i386/5784
Submitted by:	Remy NONNENMACHER <remy@synx.com>
2001-11-16 20:32:32 +00:00
Poul-Henning Kamp
24d5c95471 Back out the previous fix to the leading zero problem, I hadn't
noticed it in there already.  That should teach me to check exit
code from cvsup.
2001-11-16 17:07:47 +00:00
Poul-Henning Kamp
10786074c5 Reject leading zeros in dev_stdclone().
PR:		32019
Submitted by:	fenner
2001-11-16 17:05:07 +00:00
Warner Losh
247e08d681 Regenerate with 1.19 of pccarddevs 2001-11-16 06:59:27 +00:00
Warner Losh
9022e7256a Merge in most (hopefully all) of the devices that OpenBSD has that
NetBSD/FreeBSD doesn't have listed.
2001-11-16 06:58:47 +00:00
Peter Wemm
0891c82c32 Cosmetic tweak to eliminate some diffs 2001-11-16 02:44:55 +00:00
Peter Wemm
ee0e75a4e0 Merge another missing part of i386/pmap.c rev 1.220. Dont blindly clear
the PG_BUSY flag without using the code that wakes up something else that
may be sleeping on it.
2001-11-16 02:41:31 +00:00
Peter Wemm
ab29f8765d Oops, I accidently merged a whitespace error from the original commit.
(whitespace at end of line in rev 1.264 pmap.c).  Fix them all.
2001-11-16 02:31:20 +00:00
Peter Wemm
303f52d500 Merge rev 1.264 from i386/pmap.c (tegge via alfred):
Protect against an infinite loop when prefaulting pages.  This can
happen when the vm system maps past the end of an object or tries
to map a zero length object, the pmap layer misses the fact that
offsets wrap into negative numbers and we get stuck.
2001-11-16 02:28:33 +00:00
Peter Wemm
88b5258822 Merge rev 1.202 from i386/pmap.c (back in 1998 by John Dyson):
Make flushing dirty pages work correctly on filesystems that
unexpectedly do not complete writes even with sync I/O requests.
This should help the behavior of mmaped files when using
softupdates (and perhaps in other circumstances also.)
2001-11-16 02:25:29 +00:00
Peter Wemm
79eb7b284f Merge rev 1.293 of i386/pmap.c - skip PG_UNMANAGED in pmap_collect() 2001-11-16 02:20:40 +00:00
Peter Wemm
8ad881324c Converge/fix some debug code (#if 0'ed on alpha, but whatever)
- use NPTEPG/NPDEPG instead of magic 1024 (important for PAE)
- use pt_entry_t instead of unsigned (important for PAE)
- use vm_offset_t instead of unsigned for va's (important for x86-64)
2001-11-16 02:17:18 +00:00
Peter Wemm
704be0159c Converge with i386/pmap.c - dont refer to curproc, use curthread. 2001-11-16 02:06:06 +00:00
Josef Karthauser
9ea6d9ef6a Switch warnings and strict back on again in a way that's compatible
with -stable as well as -current.

Reviewed by:	imp
2001-11-16 02:02:42 +00:00
Peter Wemm
4cd0f1ee99 Merge part of i386/pmap.c rev 1.220 that got missed in alpha/pmap.c
rev 1.10
2001-11-16 02:02:21 +00:00
Peter Wemm
024c3fd9d5 As part of a general cleanup and reconvergence of related pmap code,
start tidying up some loose ends.  The DEBUG_VA stuff has long since
passed its use-by date.  It wasn't used on ia64 but got cut/pasted there.
2001-11-16 01:56:34 +00:00
Peter Wemm
f281e9efbe Fix a leftover client comment, long line fix. 2001-11-15 23:49:02 +00:00
Bill Fenner
b519852a02 Do not allow leading zeros on device names in dev_stdclone().
PR:		kern/32019
Reviewed by:	phk
2001-11-15 23:27:46 +00:00
Maxim Sobolev
3f1a8e9371 Allow bit 21 of EFLAGS register (PSL_ID) be changed in the use-mode without
ill effects. This should fix problems threaded programs are having with
auto-detecting CPU type.

Reported by:	Joe Clarke <marcus@marcuscom.com>
Tested by:	Joe Clarke <marcus@marcuscom.com>
Reviewed by:	jhb
MFC after:	1 week
2001-11-15 23:01:29 +00:00
John Baldwin
21a7a9aeb6 Use MTX_QUIET for the lock operations during clock interrupts so their logs
don't drown out more useful log messages.
2001-11-15 19:54:48 +00:00
John Baldwin
f4076cc158 Add a couple of returns to making recovering from a failed witness_assert()
more sane in the RESTARTABLE_PANICS case.
2001-11-15 19:46:36 +00:00
Robert Watson
101823b1a1 'error' is now unused, since its only purpose was to catch the
results of suser_td().
2001-11-15 19:42:08 +00:00
Jeroen Ruigrok van der Werven
a9032e75b2 Document the atkbd flags of 0x03 and be explicit to mention this might
fit some dockingstation keyboard probing.

PR:		23681
Submitted by:	yokota [PR issued by:
				Claude Lefrancois <lmcclef@lmc.ericsson.se>]
2001-11-15 19:42:07 +00:00
Robert Watson
474f15b863 Temporarily disable unloading, as it appears to be broken (read: causes
panics)
2001-11-15 19:41:14 +00:00
Robert Watson
ca7779ceca o Rely on /dev/snp* permissions, rather than using suser() in snpopen()
to prevent inappropriate use of the snoop device.  This means that,
  with appropriate chmod'ing, arbitrary users may make use of the snoop
  device.
2001-11-15 19:28:49 +00:00
John Baldwin
ba48b69a13 Remove definition of witness and comment stating that this file implements
witness.  Witness moved off to subr_witness.c a while ago.
2001-11-15 19:08:55 +00:00
Makoto Matsushita
a58c1836ff Add card_if.h to SRCS.
src/sys/dev/an/if_an_pccard.c rev 1.10 change requires to include
"card_if.h" but Makefile doesn't know about this file.  Without this,
kernel build will fail at this driver.
2001-11-15 18:59:04 +00:00
Jeroen Ruigrok van der Werven
41425f4fac Remove clkrun_hack for ThinkPad 570.
PR:		28031
Submitted by:	Tan Koan-Sin <freedom@csie.nctu.edu.tw>
MFC after:	2 weeks
2001-11-15 18:51:08 +00:00
John Baldwin
07da19144f - Don't enable interrupts in trap() if we trapped while holding a spin
lock as this usually makes the problem worse.
- If we get a page fault while holding a spin lock, treat it as a fatal
  trap and don't even bother calling into the VM since calling into the
  VM will panic when trying to lock Giant before we can get a useful
  message anyways.
2001-11-15 17:29:36 +00:00
John Baldwin
2ffc1262b0 Axe NFS_NOSERVER since it doesn't do anything anymore. Remove NFSSERVER
from your config file instead.
2001-11-15 16:03:24 +00:00
Mitsuru IWASAKI
964679ce58 Fix re-enabling ACPI on wakeup from hibernation. The problem was that
acpi_Disable() cleared all GPE events.
Some old ACPI implementaions still need current re-enabling code.
2001-11-15 15:12:08 +00:00
Mitsuru IWASAKI
e0157e3edc Two minor changes.
- Change _ACx sysctl oid from ten of _AC[0-9] to one _ACx.
 - Better error printing on _TMP evaluation.

Reviewed by:    msmith
2001-11-15 12:00:48 +00:00
Mitsuru IWASAKI
b8670bed9b Remove "S4B" from sleep_state_names and add "NONE" instead.
Now you can say;
 # sysctl hw.acpi.lid_switch_state=NONE
instead of specifying unsupported _Sx object in the system.

Actually, S4B is going to disappear in ACPICA and we already have
hw.acpi.s4bios to distinguish BIOS hibernation or OS hibernation.
2001-11-15 11:59:25 +00:00
Warner Losh
45c2a3ca28 MF NetBSD's if_ne_pcmcia.c rev 1.82's list of devices 2001-11-15 08:15:44 +00:00
Warner Losh
bca07edc83 More devices. Obtained from NetBSD. 2001-11-15 07:57:38 +00:00
Warner Losh
9de4df498c Migrate to PCMCIA_CARD() macros 2001-11-15 07:52:49 +00:00
Warner Losh
d93f2e2458 Sync to 1.18 of pccarddevs 2001-11-15 07:50:38 +00:00
Warner Losh
720725c93b Add vendor for NDC. 2001-11-15 07:50:09 +00:00
Warner Losh
b9efeffff0 Minor style problem I introduced recently 2001-11-15 06:44:43 +00:00
Warner Losh
34e4437eb0 Hoist the Card/Card2 macros that I invented for the wi driver into
pccard layer and rename them PCMCIA_CARD and PCMCIA_CARD2 respectively
(note, this is being done with an eye towards NetBSD integreation so
it is easier to keep lists of cards between us and them in sync).

Use this in the an and wi drivers.
2001-11-15 06:37:13 +00:00
Warner Losh
3a102d6984 Add PC4500 and 350 for newer cards in this line.
Obtained from: NetBSD's an driver (and FreeBSD's /etc/defaults/pccard.conf)
2001-11-15 06:26:24 +00:00
Warner Losh
945668b079 newcard support for an, from pr 24854 2001-11-15 06:18:58 +00:00
Warner Losh
a0945bbc7f Add NEWCARD support for aironet stuff.
PR:		24854
Submitted by:	"Sam Habash" <the+xp@llama.com>
(with the mtx fix by Jonathan Chen)
2001-11-15 06:18:06 +00:00
Warner Losh
5e9d03c8be Fix comments about 'current' state of hardware/software 2001-11-15 06:17:05 +00:00
John Baldwin
99efe4f0f8 Remove ifnet.if_mpsafe for now. If this is needed, it won't be needed
until much later when the network stack locking is farther along.

Approved by:	jlemon
2001-11-14 18:36:37 +00:00
Robert Watson
69aaef0122 o Modify nfslockdans() to accept a thread reference instead of a proc
reference: with td->td_ucred, it will be desirable to authorize
  based on td->td_ucred, rather than p->p_ucred.
o Since the same variable 'p' was later used with pfind() on the target
  process for the wakeup, introduce a new local variable 'targetp'
  to use instead.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2001-11-14 18:20:45 +00:00
Ian Dowse
4202b366fc Oops, when trying the dirhash sequential-access optimisation,
compare the slot offset against the predicted offset, not a boolean
flag. This typo effectively disabled the sequential optimisation,
but was otherwise harmless.

Not surprisingly, fixing this improves performance in the sequential
access case. I am seeing a 7% speedup on one machine here; using
dirhash when sequentially looking up directory entries is now about
5% faster instead of 2% slower than the non-dirhash case.

Submitted by:	KOIE Hidetaka <koie@suri.co.jp>
MFC after:	1 week
2001-11-14 15:08:07 +00:00
Matthew Dillon
b064d43d8f remove holdfp()
Replace uses of holdfp() with fget*() or fgetvp*() calls as appropriate

introduce fget(), fget_read(), fget_write() - these functions will take
a thread and file descriptor and return a file pointer with its ref
count bumped.

introduce fgetvp(), fgetvp_read(), fgetvp_write() - these functions will
take a thread and file descriptor and return a vref()'d vnode.

*_read() requires that the file pointer be FREAD, *_write that it be
FWRITE.

This continues the cleanup of struct filedesc and struct file access
routines which, when are all through with it, will allow us to then
make the API calls MP safe and be able to move Giant down into the fo_*
functions.
2001-11-14 06:30:36 +00:00
John Baldwin
b9c1b06bd7 The interrupt nesting level is per-thread not per-CPU on FreeBSD. 2001-11-14 01:00:40 +00:00
Matthew Dillon
f286003909 Create a mutex pool API for short term leaf mutexes.
Replace the manual mutex pool in kern_lock.c (lockmgr locks) with the new API.
Replace the mutexes embedded in sxlocks with the new API.
2001-11-13 21:55:13 +00:00
Giorgos Keramidas
6ba3aeb390 Replace use of "0" constraints in inline asm with "+" constraints,
when an operand is used both for input and output.

Reviewed by:	jhb
2001-11-13 19:55:20 +00:00
John Baldwin
00f13cb353 As a followup to the previous fixes to inferior, revert some of the
changes in 1.80 that were needed for locking that are no longer needed now
that a lock is simply asserted.

Submitted by:	bde
2001-11-13 16:55:54 +00:00
Søren Schmidt
e29e633207 Add yet another VIA ATA100 southbridge. 2001-11-13 11:37:23 +00:00
Søren Schmidt
7afba84a9f Fix bogon, free() the right memory type. 2001-11-13 11:33:23 +00:00
Warner Losh
751a23649d Better error message when cardtype is not recognized 2001-11-13 06:46:19 +00:00
Paul Saab
817805d9c9 Fix a signed bug in the crashdump code for systems with > 2GB of ram.
Reviewed by:	peter
2001-11-13 01:08:54 +00:00
Mark Peek
e398651c46 Don't enable FP in the kernel. It is not needed when -msoft-float is used.
Reminded by:	benno
2001-11-13 00:44:21 +00:00
Giorgos Keramidas
a98556d61f Change constraints to use "+" in inline asm instead of mapping input
to output parameters with "0".

Reviewed by:	jhb
2001-11-12 21:58:27 +00:00
Giorgos Keramidas
7377f0d190 Remove EOL whitespace.
Reviewed by:	alfred
2001-11-12 20:51:40 +00:00
Giorgos Keramidas
074df01866 Make KASSERT's print the values that triggered a panic.
Reviewed by:	alfred
2001-11-12 20:50:06 +00:00
John Baldwin
5b29d6e906 Clean up breakage in inferior() I introduced in 1.92 of kern_proc.c:
- Restore inferior() to being iterative rather than recursive.
- Assert that the proctree_lock is held in inferior() and change the one
  caller to get a shared lock of it.  This also ensures that we hold the
  lock after performing the check so the check can't be made invalid out
  from under us after the check but before we act on it.

Requested by:	bde
2001-11-12 18:56:49 +00:00
John Baldwin
d900909439 Use newer constraints for atomic_cmpset().
Requested by:	bde
2001-11-12 18:53:45 +00:00
Mike Barcroft
dd05edcb0f Add the ability to distinguish between compile environments that
support `long long' and those that don't.

Reviewed by:	bde
2001-11-12 18:33:00 +00:00
John Baldwin
20a2016a81 Use newer constraints for inline assembly for an operand that is both an
input and an output by using the '+' modifier rather than listing the
operand in both the input and output sections.

Reviwed by:	bde
2001-11-12 16:57:33 +00:00