Commit Graph

28887 Commits

Author SHA1 Message Date
Poul-Henning Kamp
1b6c258916 Add modules for lpt, plip, ppbus, ppi and pps.
Submitted by:    j mckitrick <jcm@freebsd-uk.eu.org>
2001-11-03 08:20:44 +00:00
Peter Wemm
e0234e53c6 FreeBSD/tahoe is not likely for a while. 2001-11-03 08:19:21 +00:00
Peter Wemm
aaa3add4ea Add Id for 82801CA (ICH3?). The ich driver seems to work fine on the
laptop that had it.
2001-11-03 05:07:59 +00:00
Peter Wemm
d5f6245f80 Add ICH3 (82801CA/CAM) and 460GX 2001-11-03 05:03:00 +00:00
Peter Wemm
5370c3b634 Add a 'reset' command. This is useful for panics really early before
any symbols are loaded.  Especially for unattended machines.
2001-11-03 04:55:48 +00:00
Dag-Erling Smørgrav
afd28c4141 Declare struct uio so consumers don't have to #include <sys/uio.h> unless
they intend to call proc_rwmem().
2001-11-03 03:17:16 +00:00
Dag-Erling Smørgrav
41aa8697b5 Reduce the number of #include dependencies by declaring some of the structs
used in pseudofs.h as opaque structs.
2001-11-03 03:07:09 +00:00
Greg Lehey
c253329a84 allocrqg: Don't ever try to write to a NULL pointer.
Reported by:	Jeff Roberson <jeff@midstream.com>
2001-11-03 02:39:15 +00:00
David E. O'Brien
5daeec1454 Revert rev 1.3 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.
2001-11-03 01:35:07 +00:00
David E. O'Brien
09a4374e6d Revert rev 1.7 which moved us away from POSIX character classes.
The community feels our base AWK must handle them.
2001-11-03 01:33:12 +00:00
Matthew Dillon
5d339e3d47 Implement i386/i386/pmap.c 1.292 for alpha, ia64 (avoid free
page exhaustion / kernel panic for certain madvise() scenarios)
2001-11-03 01:08:55 +00:00
Dag-Erling Smørgrav
2899d60638 We have a _SIG_VALID() macro, so use it instead of duplicating the test all
over the place.  Also replace a printf() + panic() with a KASSERT().

Reviewed by:	jhb
2001-11-02 23:50:00 +00:00
Dag-Erling Smørgrav
40db1b9934 Add the as-yet-unused S_ALLSTOPS which I forgot in previous commit. 2001-11-02 23:15:13 +00:00
Warner Losh
7ff5025996 Arrgh. A clean pc98 build failed due to bogons on my part :-(.
Fix it by putting back the link of machine to sys/i386/include rather
than ../../include (aka sys/pc98/include).  I had a stale machine link
on my first test.

Not sure what the "right" fix is, but this unbreaks things.
2001-11-02 21:50:15 +00:00
Warner Losh
41c8eb3039 Factor the common parts of the Makefile.foo files. This introduces two
new files: kern.pre.mk, which contains most of the definitions, and
kern.post.mk, which contains most of the rules.

I've tested this on i386 and pc98.  I have had feedback on the sparc64
port, but no reports from anybody on alpha, ia64 or powerpc.  I
appologize in advance if I've broken you.

Reviewed by: jake, jhb, arch@
2001-11-02 21:34:20 +00:00
Warner Losh
cb2445bdb4 Better error messages for the cases where device_add_child fails. We
should also whine if the old pccardd is used, but that's a little
harder than it sounds.

This also has the effect of fixing a typo that was in the last
version I committed.
2001-11-02 21:26:07 +00:00
Robert Watson
fad8096565 o Remove (struct proc *p = td->td_proc) indirection in ipcperm(),
as suser_td(td) works as well as suser_xxx(NULL, p->p_ucred, 0);
  This simplifies upcoming changes to suser(), and causes this code
  to use the right credential (well, largely) once the td->td_ucred
  changes are complete.  There remains some redundancy and oddness
  in this code, which should be rethought after the next batch of
  suser and credential changes.
2001-11-02 21:20:05 +00:00
Warner Losh
bc5fc9140e Back out the -w, option strict and our($...). They don't work for me and
have broken the kernel build.
2001-11-02 21:14:17 +00:00
Robert Watson
cd778f0244 o Remove the local temporary variable "struct proc *p" from vfs_mount()
in vfs_syscalls.c.  Although it did save some indirection, many of
  those savings will be obscured with the impending commit of suser()
  changes, and the result is increased code complexity.  Also, once
  p->p_ucred and td->td_ucred are distinguished, this will make
  vfs_mount() use the correct thread credential, rather than the
  process credential.
2001-11-02 21:11:41 +00:00
Mike Silbersack
5e0deac346 Remove an extra " that crept into a string. 2001-11-02 21:11:36 +00:00
Poul-Henning Kamp
0bd1a2d087 Argh!
patch added the nmount at the bottom first time around.

Take 3!
2001-11-02 19:12:06 +00:00
Robert Watson
db42a33d81 o Introduce group subset test, which limits the ability of a process to
debug another process based on their respective {effective,additional,
  saved,real} gid's.  p1 is only permitted to debug p2 if its effective
  gids (egid + additional groups) are a strict superset of the gids of
  p2.  This implements properly the security test previously incorrectly
  implemented in kern_ktrace.c, and is consistent with the kernel
  security policy (although might be slightly confusing for those more
  familiar with the userland policy).
o Restructure p_candebug() logic so that various results are generated
  comparing uids, gids, credential changes, and then composed in a
  single check before testing for privilege.  These tests encapsulate
  the "BSD" inter-process debugging policy.  Other non-BSD checks remain
  seperate.  Additional comments are added.

Submitted by:   tmm, rwatson
Obtained from:  TrustedBSD Project
Reviewed by:    petef, tmm, rwatson
2001-11-02 18:44:50 +00:00
Poul-Henning Kamp
bad699770a Add empty shell for nmount syscall (take 2!) 2001-11-02 18:35:54 +00:00
Mike Barcroft
0ac2d551f2 o Add new header <sys/stdint.h>.
o Make <stdint.h> a symbolic link to <sys/stdint.h>.
o Move most of <sys/inttypes.h> into <sys/stdint.h>, as per C99.
o Remove <sys/inttypes.h>.
o Adjust includes in sys/types.h and boot/efi/include/ia64/efibind.h
  to reflect new location of integer types in <sys/stdint.h>.
o Remove previously symbolicly linked <inttypes.h>, instead create a
  new file.
o Add MD headers <machine/_inttypes.h> from NetBSD.
o Include <sys/stdint.h> in <inttypes.h>, as required by C99; and
  include <machine/_inttypes.h> in <inttypes.h>, to fill in the
  remaining requirements for <inttypes.h>.
o Add additional integer types in <machine/ansi.h> and
  <machine/limits.h> which are included via <sys/stdint.h>.

Partially obtain from:	NetBSD
Tested on:		alpha, i386
Discussed on:		freebsd-standards@bostonradio.org
Reviewed by:		bde, fenner, obrien, wollman
2001-11-02 18:05:43 +00:00
Poul-Henning Kamp
06d133c475 Add nmount() stub function and regenerate the syscall-glue which should
not need to check in generated files.
2001-11-02 17:59:23 +00:00
Poul-Henning Kamp
c60693dbd3 Reserve 378 for the new mount syscall Maxime Henrion <mux@qualys.com>
is working on.  (This is to get us more than 32 mountoptions).
2001-11-02 17:58:26 +00:00
Mike Barcroft
23ab7d0fa2 Rather than just change the arguments to suser() change the function to
suser_xxx() as well.

Pointy hat to:	rwatson
2001-11-02 17:42:03 +00:00
Warner Losh
89bbe0cd1e Don't hide the failure to allocate device behind boot verbose. It is
still telling us of real problems so should remain until it stops
doing that.

Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
2001-11-02 17:33:06 +00:00
Warner Losh
bcf8b176bb Print a warning when device_add_child returns NULL. This used to be
impossible at this point, but now it apparently is.  Grump.

Submitted by: OGAWA Takaya <t-ogawa@triaez.kaisei.org>
2001-11-02 17:31:01 +00:00
Jonathan Lemon
198475ebeb + Fix another possible vn_close race, in the same fashion as r1.95.
+ Check that the cached vnode type != VBAD before calling devsw(),
   this can happen if the vnode has been revoked.
2001-11-02 17:04:32 +00:00
Robert Watson
5fab7614f4 o Add a comment to p_candebug() noting that the P_INEXEC check should
really be moved elsewhere: p_candebug() encapsulates the security
  policy decision, whereas the P_INEXEC check has to do with "correctness"
  regarding race conditions, rather than security policy.

  Example: even if no security protections were enforced (the "uids are
  advisory" model), removing P_INEXEC could result in incorrect operation
  due to races on credential evaluation and modification during execve().

Obtained from:	TrustedBSD Project
2001-11-02 16:41:06 +00:00
Warner Losh
06a9ff8e81 The sound drivers live in sound/driver, not sound/drivers
submitted by: Alex Kapranoff <alex@kapran.bitmcnit.bryansk.su>
2001-11-02 16:40:06 +00:00
Robert Watson
bb51af2816 Merge from POSIX.1e Capabilities development tree:
o Reorder and synchronize #include's, including moving "opt_cap.h" to
  above system includes.
o Introduce #ifdef'd kern.security.capabilities sysctl tree, including
  kern.security.capabilities.enabled, which defaults to 0.

The rest of the file remains stubs for the time being.

Obtained from:	TrustedBSD Project
2001-11-02 15:22:32 +00:00
Robert Watson
bcc0dc3dc7 Merge from POSIX.1e Capabilities development tree:
o POSIX.1e capabilities authorize overriding of VEXEC for VDIR based
  on CAP_DAC_READ_SEARCH, but of !VDIR based on CAP_DAC_EXECUTE.  Add
  appropriate conditionals to vaccess() to take that into account.
o Synchronization cap_check_xxx() -> cap_check() change.

Obtained from:	TrustedBSD Project
2001-11-02 15:16:59 +00:00
Yoshihiro Takahashi
716d0f6c04 Fixed sioreg.h path. 2001-11-02 15:15:09 +00:00
Robert Watson
4df571b101 o Capabilities cap_check() interface revised to remove _xxx, so rename
in p_cansched().  Also, replace '0' with 'NULL' for the ucred * pointer.

Obtained from:	TrustedBSD Project
2001-11-02 15:08:08 +00:00
Robert Watson
a76789e7df o Since kern_acl.c uses #ifdef CAPABILITIES to control
capability-specific semantics, #include "opt_cap.h".

Obtained from:	TrustedBSD Project
2001-11-02 14:53:04 +00:00
Robert Watson
b752fef50e o Merge recent changes from the POSIX.1e capability tree:
- Introduce cap_check_td() to reflect suser_td()
    - Introduce non-portable cap_from_text2_np(), which converts a
      text-form capability to an internal form relative to an existing
      capability, and non-portable cap_to_text2_np(), which accepts
      a flag argument specifying more about the text output format.
    - Introduce CTT_* flags controlling the behavior of
      cap_to_text2_np().

Submitted by:		tmm
Obtained from:	TrustedBSD Project
2001-11-02 14:45:22 +00:00
Doug Rabson
60e11469dd Call ast() from exception_restore when we are restoring to user mode. 2001-11-02 10:24:44 +00:00
Doug Rabson
721d1e2149 Use static storage for the unwind state so that we can still get backtraces
when the VM system is hosed.
2001-11-02 10:04:22 +00:00
Poul-Henning Kamp
8dd72bc887 #ifdef KTRACE a variable to silence a warning.
Submitted by:	Maxime "mux" Henrion <mux@qualys.com>
2001-11-02 09:55:01 +00:00
Poul-Henning Kamp
a2d7281c5a Turn the symlinks around, instead of ad0s1 -> ad0s1c, make it ad0s1c -> ad0s1.
Requested by:	peter
2001-11-02 09:16:25 +00:00
Doug Rabson
27dfd0caa3 Remember to actually free the pv_entry in pmap_remove_entry(). 2001-11-02 08:56:58 +00:00
Jonathan Lemon
d9cdd9607f Emit a warning if the mbuf or mbuf cluster allocation failed.
Requested by: Mike Barcroft
2001-11-02 05:10:40 +00:00
Peter Wemm
18081136cc argh! cut/paste typo. :-(
(committed on a different machine to what I was testing it on)
2001-11-02 01:45:11 +00:00
Peter Wemm
97c97bb16b "Fix" a problem that got copied from alpha to ia64 and broke there.
When we truncate the msgbuf size because the last chunk is too small,
correctly terminate the phys_avail[] array - the VM system tests
the *end* for zero, not the start.  This leads the VM startup to
attempt to recreate a duplicate set of pages for all physical memory.

XXX the msgbuf handling is suspiciously different on i386 vs
alpha/ia64...
2001-11-02 00:41:00 +00:00
Mitsuru IWASAKI
3fa010222f Oops, deleted wrong BIF acquisition timeout invocation by mistake
in my previous commit.
acpi_cmbat_get_bif() from taskqueue calls acpi_cmbat_timeout() so it's
better for startup.
2001-11-01 22:20:41 +00:00
Robert Watson
6d8785434f o Update copyright dates.
o Add reference to TrustedBSD Project in license header.
o Update dated comments, including comment in extattr.h claiming that
  no file systems support extended attributes.
o Improve comment consistency.
2001-11-01 21:37:07 +00:00
Robert Watson
fc5d29ef7d o Move suser() calls in kern/ to using suser_xxx() with an explicit
credential selection, rather than reference via a thread or process
  pointer.  This is part of a gradual migration to suser() accepting
  a struct ucred instead of a struct proc, simplifying the reference
  and locking semantics of suser().

Obtained from:	TrustedBSD Project
2001-11-01 20:56:57 +00:00
Robert Watson
309b8fb98a o Permit osf1-emulated programs to modify uid/gid under jail by
switching suser() to suser_xxx() and adding PRISON_ROOT flag.
2001-11-01 20:16:03 +00:00
David E. O'Brien
2273086d55 Substitute "[:space:]" with the character constants it expands to.
This was a silent 'failure' when using Bell-Labs awk.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-01 19:14:16 +00:00
Luigi Rizzo
5c514284de Always compile in bridge hooks, or this code will not work (efficiently) with
the loadable bridge module.
2001-11-01 17:10:52 +00:00
Mitsuru IWASAKI
f9390180fe Some fix for the recent apm module changes.
- Now that apm loadable module can inform its existence to other kernel
   components  (e.g. i386/isa/clock.c:startrtclock()'s TCS hack).
 - Exchange priority of SI_SUB_CPU and SI_SUB_KLD for above purpose.
 - Add simple arbitration mechanism for APM vs. ACPI.  This prevents
   the kernel enables both of them.
 - Remove obsolete `#ifdef DEV_APM' related code.
 - Add abstracted interface for Powermanagement operations.  Public apm(4)
   functions, such as apm_suspend(), should be replaced new interfaces.
   Currently only power_pm_suspend (successor of apm_suspend) is implemented.

Reviewed by:	peter, arch@ and audit@
2001-11-01 16:34:07 +00:00
Josef Karthauser
0c5d0f0eff Tidy up the variable declarations and switch on warnings and strict.
Reviewed by:	diffing the generated files from before and after the change.
2001-11-01 12:46:08 +00:00
Luigi Rizzo
99e630c5c8 Remove an extra splimp() call.
Spotted-by: diff(1)
2001-11-01 08:30:38 +00:00
David E. O'Brien
2a200695e4 Add the TGA video driver. This is a great accomplishtment and will help
us a lot on older Alphas.
Andrew Gallatin, Thomas V. Crimi, and Peter Jeremy contributed to this
work along with the submitter.

Submitted by:	 Andrew M. Miklic <miklic@home.com>
2001-11-01 08:26:30 +00:00
David E. O'Brien
3a167df8c3 Bell-Labs AWK does not support POSIX "bracket expressions" (POSIXese for
"character classes", basically).  So change them to their character
representation.

Submitted by:	David Wolfskill <david@catwhisker.org>
2001-11-01 07:16:35 +00:00
Peter Wemm
e258f08ad8 Skip PG_UNMANAGED pages when we're shooting everything down to try and
reclaim pv_entries.  PG_UNMANAGED pages dont have pv_entries to reclaim.

Reported by:	David Xu <davidx@viasoft.com.cn>
2001-11-01 06:48:04 +00:00
Peter Wemm
ce4c60d38d Fix the ILLEGAL fdisk table that is there for supporting "dangerously
dedicated" mode.  This was specifying that there are 256 (illegal!)
heads on the disk.  If bioses store that in a byte, and it gets truncated
to 0, then that almost certainly causes the infamous divide-by-zero
nightmare.

This is also most likely the reason why the Thinkpad T20/A20 series
were locking up when FreeBSD was installed.  This is also the most likely
reason why a boot1 being present causes an IA64 box to lock up at boot.
(removing the "part4" stuff from boot1.s fixes the IA64 boxes and would
most likely have fixed the T20/A20 and some TP600E series thinkpads)
2001-11-01 06:19:32 +00:00
Andrey A. Chernov
f21d113aa0 Use devclass_find_free_unit() in ata_pci_add_child() because no more
implicit auto-scanning up present in device_add_child(). Functionally it is
fully equivalent to old code.
2001-11-01 05:21:49 +00:00
Andrey A. Chernov
3eadb99fd7 Add devclass_find_free_unit() prototype 2001-11-01 05:08:17 +00:00
Andrey A. Chernov
82849b4dfe Add new interface function
int	devclass_find_free_unit(devclass_t dc, int unit);
which return first free unit in given class starting from 'unit'.
2001-11-01 05:07:28 +00:00
Brian Somers
143281f43c Only overwrite ${DESTDIR}${KODIR}.old/${KERNEL_KO} if we haven't
booted from it when doing an installkernel.

Only change kern.bootfile from ${DESTDIR}${KODIR}/${KERNEL_KO}
to ${DESTDIR}${KODIR}.old/${KERNEL_KO}, and only when we're renaming
a booted ${DESTDIR}${KODIR}/${KERNEL_KO} kernel.
2001-11-01 02:17:49 +00:00
Matt Jacob
ff6164046e Remove previous revision. smp_started back in subr_smp where it belongs. 2001-10-31 23:54:27 +00:00
Matt Jacob
6b094090d4 Make the actual volatile int smp_started live *somewhere*. This is
a temporary fix so that we can compile kernels. I waited 30 minutes
for a response from the person who would likely know, but any longer
is too long to wait with breakage at ToT.
2001-10-31 20:43:48 +00:00
Marcel Moolenaar
1245202150 Don't remove the tentative declaration. It's the only one...
Pointy hat: marcel (self-sponsoring)
2001-10-31 20:43:38 +00:00
Robert Watson
0ef2717b32 Spell deivces as devices. 2001-10-31 20:15:18 +00:00
Doug Rabson
57d9a492bb Experiment with rewriting the syscall() wrapper using explicit bundling
and trying to reduce stalls from reading certain high latency registers.
This should be faster than the old syscall code. Its certainly a lot
smaller.
2001-10-31 20:02:28 +00:00
Jeroen Ruigrok van der Werven
2a01978a07 Fix obvious bug where return from probe was botched.
People with HP PCLAN+ NICs can now happily use the card again

PR:		21087
Submitted by:	M. B. Buchanan <buchanan@orbitworld.net>
2001-10-31 19:43:33 +00:00
Matt Jacob
f43f61207d Fix misspelling in comment. 2001-10-31 18:07:38 +00:00
Doug Rabson
a3afc63358 Add TF_AR_FPSR, the offset of ar.fpsr in a trapframe. 2001-10-31 18:06:38 +00:00
Doug Rabson
033e93a942 Print the bundle template name on the first slot of the bundle. 2001-10-31 11:52:29 +00:00
Marcel Moolenaar
8b3e7871bc Make smp_started volatile in sys/smp.h and remove the volatile
declaration in subr_smp.c. This solves a compile problem with
gcc 3.0.1 (ia64 cross-build).

Reviewed: jhb
2001-10-31 09:03:05 +00:00
Matthew Dillon
e302698320 Don't let pmap_object_init_pt() exhaust all available free pages
(allocating pv entries w/ zalloci) when called in a loop due to
an madvise().  It is possible to completely exhaust the free page list and
cause a system panic when an expected allocation fails.
2001-10-31 03:06:33 +00:00
Mike Smith
a91d0e1ccf Don't try to probe the PnP BIOS if ACPI is active. 2001-10-31 02:36:07 +00:00
Mike Smith
fad334b0b9 Update to reflect files added/removed with the 20011018 ACPI CA update. 2001-10-31 02:35:43 +00:00
Mike Smith
21479890f4 Merge local changes, add new files and remove obsoleted ones. 2001-10-31 02:34:45 +00:00
Mike Smith
cc668aa9a0 This commit was generated by cvs2svn to compensate for changes in r85756,
which included commits to RCS files with non-trunk default branches.
2001-10-31 02:32:29 +00:00
Mike Smith
0c794f3213 Import the Intel ACPI CA 20011018 snapshot 2001-10-31 02:32:29 +00:00
Mike Smith
8d78e0794c This commit was generated by cvs2svn to compensate for changes in r85754,
which included commits to RCS files with non-trunk default branches.
2001-10-31 02:32:28 +00:00
Mike Smith
831a948d29 Import the Intel ACPI CA 20011018 snapshot 2001-10-31 02:32:28 +00:00
Scott Long
ed4927f5e8 Put a Band-Aid over the asr driver so that it hopefully won't cause
panics until the author comes up with a real fix.
2001-10-30 21:13:39 +00:00
John Baldwin
bd4e567f41 Threads sit on condition variable wait queue's, not proceses (sic). 2001-10-30 20:43:45 +00:00
Bill Paul
3528d68f71 Fix a (long standing?) bug in ip_output(): if ip_insertoptions() is
called and ip_output() encounters an error and bails (i.e. host
unreachable), we will leak an mbuf. This is because the code calls
m_freem(m0) after jumping to the bad: label at the end of the function,
when it should be calling m_freem(m). (m0 is the original mbuf list
_without_ the options mbuf prepended.)

Obtained from:	NetBSD
2001-10-30 18:15:48 +00:00
Dag-Erling Smørgrav
bc183b3fe8 Make sure the netmask always has an address family. This fixes Linux
ifconfig, which expects the address returned by the SIOCGIFNETMASK ioctl
to have a valid sa_family.  Similar changes may be necessary for IPv6.

While we're here, get rid of an unnecessary temp variable.

MFC after:	2 weeks
2001-10-30 15:57:20 +00:00
Mitsuru IWASAKI
a296c021c2 Style(9) fix, mainly white spaces. 2001-10-30 15:51:52 +00:00
Warner Losh
d1cf40403a Restore the main BAR for the bridge on resume. Some machines don't save
this accross suspend/resume events and this was causing the dreaded false
positive hit on my "static bug" test.

Note: the PCI bus code should do this for us.
Note2: We don't do the same for I/O based pci devices since it is
more code and doesn't appear to be necessary.

Submitted by: Toshiyuki Kawashima-san <tos@fa2.so-net.ne.jp>
Obtained from: bsd-nomads:16012
2001-10-30 15:31:49 +00:00
Brian Feldman
bb9fe9dd9e Add the sysctl "kern.function_list", which currently exports all
function symbols in the kernel in a list of C strings, with an extra
nul-termination at the end.

This sysctl requires addition of a new linker operation.  Now,
linker_file_t's need to respond to "each_function_name" to export
their function symbols.

Note that the sysctl doesn't currently allow distinguishing multiple
symbols with the same name from different modules, but could quite
easily without a change to the linker operation.  This will be a nicety
to have when it can be used.

Obtained from:	NAI Labs CBOSS project
Funded by:	DARPA
2001-10-30 15:21:45 +00:00
Brian Feldman
08d68dda08 Also, machine/profile.h should be necessary for the function prototype
of kmupetext().
2001-10-30 15:10:16 +00:00
Brian Feldman
f99502a4d4 Use kmupetext() for ELF KLDs to allow for increased text segment size.
Obtained from:	NAI Labs CBOSS project
Funded by:	DARPA
2001-10-30 15:08:51 +00:00
Brian Feldman
4a44bd4b4a Add kmupetext(), a function that expands the range of memory covered
by the profiler on a running system.  This is not done sparsely, as
memory is cheaper than processor speed and each gprof mcount() and
mexitcount() operation is already very expensive.

Obtained from:	NAI Labs CBOSS project
Funded by:	DARPA
2001-10-30 15:04:57 +00:00
Jonathan Lemon
35609d458d When dropping a packet because there is no room in the queue (which itself
is somewhat bogus), update the statistics to indicate something was dropped.

PR: 13740
2001-10-30 14:58:27 +00:00
Warner Losh
cf17adf0a9 OLDCARD isn't supported on alpha or ia64, so don't pretend that it is by
including it.
2001-10-30 14:53:36 +00:00
Warner Losh
e282bb41f0 Don't try to use sio with NEWCARD 16 bit yet. It eats all pccards :-)
Reported by: Marcell Moolenaar
2001-10-30 14:49:29 +00:00
Mitsuru IWASAKI
9febbb4078 Some improvements of control method battery driver.
- Add a new MIB for battery info expire time in order to make it changeable.
   Battery info expire time can be specified by
   hw.acpi.battery.info_expire in sec.
 - Add own MALLOC type and fix some potential memory leakages.
 - Change some frequent printings to verbose printing.
 - Stop timeout during acpi_cmbat_get_bst() too.  This should reduce
   the races with BIF evaluation.
 - Remove acpi_cmbat_get_bif() invocation from acpi_cmbat_attach().
   This was redundant because this should be called from
   acpi_cmbat_timeout() now.
2001-10-30 14:24:26 +00:00
Doug Rabson
74ada43be9 Use -ffreestanding instead of -fno-builtin. That's the officially blessed
way of saying that its not linking with libc.

Submitted by: peter
2001-10-30 09:37:00 +00:00
Doug Rabson
dab3d5bca0 Adjust for building with gcc 3.0.1. 2001-10-30 09:09:13 +00:00
Julian Elischer
10d7ccab88 A node that allows ethernet type packets to be filtered to different
hooks depending on ethertype. Great for prototyping protocols.
connects to the lower and upper hooks of an ethernet type of node.

Obtained from: Monzoon Networks.
	Thanks to Andre Oppermann, May 2001.
2001-10-30 07:28:17 +00:00
Julian Elischer
48810023a3 Use the thread we have instead of finding another
that may be the wrong one.
2001-10-30 07:15:46 +00:00
Jake Burkholder
8be89d4719 Add code to copy the enironment and loader metadata into kernel space. 2001-10-30 06:37:36 +00:00
Jake Burkholder
a237ed036e Add definitions for network support, doesn't work yet.
Pass the right arguments to the kernel.
Replace magic numbers with symbolic constants.
Pass the real openfirmware entry point to OF_init.
2001-10-30 06:31:45 +00:00
Jake Burkholder
073e92a52c Use ENTRY() for defining functions in asm.
Remove asm functions to call the openfirmware and kernel entry points;
we can just call them directly.
Don't use the stack pointer for an intermediate result in setx.
Put the stack in the bss.
2001-10-30 06:27:34 +00:00
Jake Burkholder
eea923d7f8 Make the openfirmware entry point function pointer non-static so that it
can be passed to the kernel.
2001-10-30 06:23:32 +00:00
Warner Losh
823a5e8365 MFGeneric: ->1.327 Sync with GENERIC 2001-10-30 06:11:15 +00:00
Warner Losh
8f3a0dd489 Move device lnc to isa section, since it no longer uses the compat shims.
Add comment about lnc.
Remove probe order comment from isa_compat.c.  That appears to no longer
be the case.
2001-10-30 06:08:56 +00:00
Yoshihiro Takahashi
3f64e5a6c2 MFi386: sys/i386/i386/machdep.c revisions 1.481 and 1.482 2001-10-30 00:53:19 +00:00
John Baldwin
d01404c828 Fix a typo in comment and #ifdef fixes: GRAP_PRIO -> GRAB_PRIO so that
x86 SMP kernels actually boot again to single user mode.

Pointy hat to:	jhb
Noticed by:	jlemon
2001-10-30 00:19:42 +00:00
David Malone
12396bdca7 When scanning for control messages, don't process the data mbufs.
This could cause hangs if a unix domain socket was closed with data
still to be read from it.

Tested by:	Andrea Campi <andrea@webcom.it>
2001-10-29 20:04:03 +00:00
Mitsuru IWASAKI
2d64460768 Some small improvements of ACPI thermal driver.
- Give a guaranteed minimum cooling run time to avoid too frequent
   cooling system On/Off switching.  The minimum cooling run time can be
   specified by hw.acpi.thermal.min_runtime in sec.
 - Refine message printing (_AC-1 -> NONE).
 - Add verbose mode enable/disable capability by hw.acpi.verbose in bool.

Reviewed by:	acpi-jp@ folks
2001-10-29 18:09:43 +00:00
Bruce Evans
3f91265a4c Don't set CR0_NE in cpu_setregs() for the SMP case, since setting it
is npx.c's job and setting it here breaks the edit-time option of not
setting it in npx.c.  (It is not set in the right places for the SMP
case, but always setting it here is harmless because there isn't even
an edit-time option to not set it.)
2001-10-29 16:31:15 +00:00
Hajimu UMEMOTO
af109ffd14 System wide policy should be returned when no policy found in the SPD.
The packet was rejected in ipsec[46]_tunnel_validate().

Obtained from:	KAME
MFC after:	1 week
2001-10-29 16:29:41 +00:00
Josef Karthauser
06dae58b17 A few more style changes picked up whilst working on an MFC to -stable. 2001-10-29 15:09:07 +00:00
Josef Karthauser
f227535cd8 Fix some whitespace, and a comment that I missed in the last commit. 2001-10-29 14:08:51 +00:00
Doug Rabson
7a71eab18d Add unwind.c. 2001-10-29 12:04:51 +00:00
Doug Rabson
d57b94ba65 * Factor out common code for manipulating the RSE backing store.
* Implement a fairly simplistic parser for unwinding stack frames.
* Use unwind records for DDB's 'trace' command. Also add support for
  tracing past exceptions to the context which generated the exception.

The stack unwind code requires a toolchain based on binutils-2.11.2 or
later and gcc-3.0.1 or later.
2001-10-29 12:04:23 +00:00
Doug Rabson
c3338474b9 Make the various bits of SMP code conditional on SMP so that I can still
build non-SMP kernels.
2001-10-29 11:57:12 +00:00
Doug Rabson
a4addc62ce Put symbols at the start and end of the unwind section so that we can
find it at runtime.
2001-10-29 11:40:14 +00:00
Doug Rabson
c543113849 Various fixes to make stack traces using the unwind tables work properly. 2001-10-29 11:30:54 +00:00
Doug Rabson
15b209a6f5 Fix disassembly of 'add a=b,c,1' and make the disassembly of the various
break and nops consistent.
2001-10-29 11:26:10 +00:00
Peter Wemm
0050cf3e5d The size of the ELF hash table changed from 64 bits in the prototype
toolchains to 32 bits in 2.11.2.

Obtained from:	dfr
2001-10-29 10:20:19 +00:00
Munechika SUMIKAWA
dc7f237356 Fix fragmented packet handling.
Obtained from:	KAME
MFC after:	3 weeks
2001-10-29 07:55:57 +00:00
Marcel Moolenaar
256e103fcf o Send a test IPI from the BSP to itself at the same time APs
are woken up.
o  Make IPIs synchronuous by default. If we want asynchronuous
   IPIs, we may want to make the memory fence controllable.
2001-10-29 07:34:48 +00:00
Marcel Moolenaar
b1ef773d12 Add an IPI used for testing proper operation of delivering IPIs. 2001-10-29 07:30:37 +00:00
Mike Barcroft
95d839a1c7 Use a more sophisticated check that works better with older versions
of GCC when setting __func__ to NULL.  This also better supports GCC
when using C++.  Move the definition to a better location.

Submitted by:	bde
2001-10-29 07:29:03 +00:00
Marcel Moolenaar
b5f7b8be86 Make the clock vector 255 instead of 240. On Lion boxes, 240 is
the AP wake-up vector. We probably want a more dynamic approach
to assigning vectors in the future...
2001-10-29 05:17:36 +00:00
Marcel Moolenaar
cd85e2620d Small correction in the LOCAL_SAPIC structure. The Flags field
starts at offset 8; not 6. Hence the structure is 12 bytes and
not 10 bytes. Adjust the definition so that the ProcessorEnabled
flag is moved from bit 15 to bit 31 in the Flags field.

The definition now matches ACPI 2.0 Errata 1.5.
2001-10-29 04:59:35 +00:00
Josef Karthauser
25549c009a Clean up the style of this header file. 2001-10-29 04:41:28 +00:00
Matthew Dillon
e74e9032da log routine called w/ %ld and int argument, cast argument to long 2001-10-29 02:22:49 +00:00
Matthew Dillon
2326da5db5 fix int argument used in printf w/ %ld (cast to long) 2001-10-29 02:19:19 +00:00
Matthew Dillon
59ea846905 promote tv_sec in printf to make it type agnostic 2001-10-29 02:17:41 +00:00
Marcel Moolenaar
229778f87e o Do not parse the MADT as a side-effect in AcpiOsGetRootPointer,
do it as a side-effect of probing for MP hardware. This allows
   us to scan for local SAPICs early (especially before MBUF
   initialization).
o  Fix the Local SAPIC structure so that matches the Local SAPIC
   table entry. Now that the Local SAPIC info is the same as the
   Local APIC info, stop dumping the Local APIC entries.
o  For every Local SAPIC entry in the MADT that's not disabled,
   let the SMP code know about it. They represent actual CPUs.
o  Register the OS_BOOT_RENDEZ entry point and provide a (bogus)
   implementation for the entry point.
o  Provide a mapping for internal IPI numbers to ExtINT vectors.
o  In a MP system, announce the CPUs and start them by sending
   IPI_AP_WAKEUP to each of them. Not that it makes a difference
   at this time :-)
o  Miscellaneous style fixes and other adjustments.
2001-10-29 02:16:02 +00:00
Matthew Dillon
434d21ccbf Make ttyprintf() of tv_sec value type agnostic. 2001-10-29 01:23:28 +00:00
Matthew Dillon
f4481658ec cast dev_t to int in printf to fix warning. 2001-10-29 01:22:15 +00:00
Marcel Moolenaar
997313be99 Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-29 01:11:40 +00:00
Andrey A. Chernov
e9c044bd9e 1) In devclass_alloc_unit(), skip duplicated wired devices (i.e. with fixed
number) instead of allocating next free unit for them.  If someone needs
fixed place, he must specify it correctly. "Allocating next" is especially bad
because leads to double device detection and to "repeat make_dev panic" as
result.  This can happens if the same devices present somewhere on PCI bus,
hints and  ACPI.  Making them present in one place only not always
possible, "sc" f.e.  can't be removed from hints, it results to no console at
all.

2) In make_device(), detect when devclass_add_device() fails, free dev and
return. I.e. add missing error checking. This part needed to finish fix in 1),
but must be done this way in anycase, with old variant too.
2001-10-28 23:32:35 +00:00
Matthew Dillon
0e9fe2127c Adjust printfs to be time_t agnostic. 2001-10-28 22:53:45 +00:00
John Baldwin
5a994091e0 Revert the reindentation of struct task's definition from rev 1.4.
Requested by:	bde
2001-10-28 16:19:34 +00:00
John Baldwin
9869fa1db8 - More whitespace and comment cleanups.
- Remove unused sw1a label.  A breakpoint can be set in choosethread() for
  the same effect.

Reviewed by:	bde
Submitted by:	bde (partly)
2001-10-28 16:18:22 +00:00
Poul-Henning Kamp
4e13006747 Fix a problem in the disk related hack where device nodes for a physically
non-existent disk in a legacy /dev on a DEVFS system would panic the system
if stat(2)'ed.

Do not whine about anonymous device nodes not having a si_devsw, they're
not supposed to.
2001-10-28 09:39:28 +00:00
Michael Reifenberger
491dec936c Introduce [IPC|SHM]_[INFO|STAT] to shmctl to make
`/compat/linux/usr/bin/ipcs -m` happy.
2001-10-28 09:29:10 +00:00
Yoshihiro Takahashi
8816d1d500 fixed to support pc98 2001-10-28 04:39:02 +00:00
Yoshihiro Takahashi
f4d25d1d62 Remove duplicate apm entry for pc98 2001-10-28 04:34:24 +00:00
Yoshihiro Takahashi
32e2324497 Removed pmc_isa_identify function. It is not needed.
Submitted by:	takawata
2001-10-28 04:16:50 +00:00
Matthew Dillon
1fc36ee6d4 sc_lasttime and sc_starttime are time_t's, not long's. 2001-10-27 20:31:24 +00:00
Mike Barcroft
cb5f460523 Only provide function information in compile environments that support
the C99 variable __func__ and never for C++.  Provide a more meaningful
example in the assert(3) manual.

Reviewed by:	asmodai, bde
2001-10-27 20:11:10 +00:00
Matthew Dillon
4ffa210b94 syncdelay, filedelay, dirdelay, metadelay are ints, not time_t's,
and can also be made static.
2001-10-27 19:58:56 +00:00
Poul-Henning Kamp
4e4a76633b Nudge the axe a bit closer to cdevsw[]:
Make it a panic to repeat make_dev() or destroy_dev(), this check
   should maybe be neutered when -current goes -stable.

   Whine if devsw() is called on anon dev_t's in a devfs system.

   Make a hack to avoid our lazy-eval disk code triggering the above whine.

   Fix the multiple make_dev() in disk code by making ${disk}${unit}s${slice}
   an alias/symlink to ${disk}${unit}s${slice}c
2001-10-27 17:44:21 +00:00
Dag-Erling Smørgrav
a08d68de5b Eliminate the prefix parameter to linux_emul_find(), which was always
linux_emul_path anyway.  Linux_emul_find() has interesting bugs in its
prefix handling (which luckily are not currently exploitable); this
commit is preliminary to an attempt at cleaning it up.

Approved by:	marcel
2001-10-27 11:15:19 +00:00
Dag-Erling Smørgrav
9ca45e813c Add a P_INEXEC flag that indicates that the process has called execve() and
it has not yet returned.  Use this flag to deny debugging requests while
the process is execve()ing, and close once and for all any race conditions
that might occur between execve() and various debugging interfaces.

Reviewed by:	jhb, rwatson
2001-10-27 11:11:25 +00:00
Jake Burkholder
06c4f91f00 Implement elf_reloc. This makes klds work.
Obtained from:	netbsd
2001-10-27 07:09:40 +00:00
Jake Burkholder
e754f9c7ef Handle instruction access mmu miss faults in kernel mode. These can only
be generated by non-preloaded klds.
2001-10-27 07:06:15 +00:00
Robert Watson
3f755714ce o Modify copyright date format for improved consistency: use '-' for
year ranges, rather than a comma-delimited list of years.
2001-10-27 05:47:47 +00:00
Robert Watson
48be932ac0 o Update copyright dates.
Obtained from:	TrustedBSD Project
2001-10-27 05:46:43 +00:00
Robert Watson
fdba6d3a1e o Improve style(9) compliance following KSE modifications. In particular,
strip the space from '( struct thread *...', wrap long lines.
o Remove an unneeded comment on the topic of no lock being required as
  part of the NDINIT() in __acl_get_file(), as it's really not required
  there.

Obtained from:	TrustedBSD Project
2001-10-27 05:45:42 +00:00
Robert Watson
b6e0472987 o Althought this is not specified in POSIX.1e, the UFS ACL implementation
coerces the deletion of a default ACL on a directory when no default
  ACL EA is present to success.  Because the UFS EA implementation doesn't
  disinguish the EA failure modes "that EA name has not been
  administratively enabled" from "that EA name has no defined data",
  there's a potential conflict in error return values.  Normally, the
  lack of administratively configured EA support is coerced to
  EOPNOTSUPP to indicate that ACLs are not available; in this case,
  it is possible to get a successful return, even if ACLs are not
  available because EA support for them has not been enabled.

  Expand the comment in ufs_setacl() to identify this case.

Obtained from:	TrustedBSD Project
2001-10-27 05:39:17 +00:00
Robert Watson
ac8b3dd7dc o Clarify a comment about the locking condition of the vnode upon exit
from ufs_extattr_enable_with_open().
o Print auto-start notifications if (bootverbose).  This was previously
  commented out since it didn't know how to check for bootverbose.
o Drop in comments throughout indicating where ENOENT should be replaced
  with ENOATTR once that is available.

Obtained from:	TrustedBSD Project
2001-10-27 05:19:14 +00:00
Robert Watson
29543004bd o The comment about ordering the destruction of the lock and the removal of
the flag indicating that the structure was initialized didn't need
  an XXX, since it didn't need fixing.

Obtained from:	TrustedBSD Project
2001-10-27 05:05:39 +00:00
Robert Watson
9444746795 o Wrap a number of long lines of code, many of which were introduced
due to KSE-related (p) expansions.

Obtained from:	TrustedBSD Project
2001-10-27 05:03:05 +00:00
Robert Watson
ce5ddec25f Since namespace support was added to the UFS extended attribute
implementation to replace single-character namespace prefixes, '$' is no
longer an invalid attribute name, and the namespace is relevant to
validity determination.

o Remove '$' case from ufs_extattr_valid_attrname()
o Add attrnamespace argument to ufs_extattr_valid_attrname(), and
  fill out appropriately.

Currently no decisions are made based on the namespace argument, but
may be in the future.

Obtained from:	TrustedBSD Project
2001-10-27 04:58:28 +00:00
Luigi Rizzo
935fe01014 Enable round-robin arbitration between transmit and receive unit
in the 21143, instead of giving priority to the receive unit.
This gives a 10-15% performance improvement in the forwarding rate
under heavy load.

Reviewed-by: Bill Paul
2001-10-27 00:59:17 +00:00
Dag-Erling Smørgrav
a4c0058691 Support the "install.debug" and "reinstall.debug" targets for kernel modules.
Small tweaks to kldxref may be necessary to avoid the surprising (but harm-
less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if
it is present in the kernel directory.

Approved by:	a week of silence on -arch
MFC after:	2 weeks
2001-10-27 00:52:50 +00:00
Bill Fenner
4730796ca1 Force the length of the sockaddr to be correct for AF_INET and AF_INET6
in bind() and connect().  Linux doesn't care if the length of the
sockaddr matches its address family; FreeBSD does.  This fixes the
known issues with the resolver in linux_base-7.
2001-10-26 23:10:08 +00:00
Mike Smith
0b9272be42 Add 'ciss'. 2001-10-26 21:17:26 +00:00
Matthew Dillon
d23f5958bc Add mtx_lock_giant() and mtx_unlock_giant() wrappers for sysctl management
of Giant during the Giant unwinding phase, and start work on instrumenting
Giant for the file and proc mutexes.

These wrappers allow developers to turn on and off Giant around various
subsystems.  DEVELOPERS SHOULD NEVER TURN OFF GIANT AROUND A SUBSYSTEM JUST
BECAUSE THE SYSCTL EXISTS!  General developers should only considering
turning on Giant for a subsystem whos default is off (to help track down
bugs).  Only developers working on particular subsystems who know what
they are doing should consider turning off Giant.

These wrappers will greatly improve our ability to unwind Giant and test
the kernel on a (mostly) subsystem by subsystem basis.   They allow Giant
unwinding developers (GUDs) to emplace appropriate subsystem and structural
mutexes in the main tree and then request that the larger community test
the work by turning off Giant around the subsystem(s), without the larger
community having to mess around with patches.  These wrappers also allow
GUDs to boot into a (more likely to be) working system in the midst of
their unwinding work and to test that work under more controlled
circumstances.

There is a master sysctl, kern.giant.all, which defaults to 0 (off).  If
turned on it overrides *ALL* other kern.giant sysctls and forces Giant to
be turned on for all wrapped subsystems.  If turned off then Giant around
individual subsystems are controlled by various other kern.giant.XXX sysctls.

Code which overlaps multiple subsystems must have all related subsystem Giant
sysctls turned off in order to run without Giant.
2001-10-26 20:48:04 +00:00
Matthew Dillon
8d5c8e9f04 minor commenting based on syscall environment 2001-10-26 20:35:52 +00:00
Dag-Erling Smørgrav
1831900053 Add VOP_IOCTL support, and fix a bug that would cause a panic if a file or
symlink lacked a filler function.
2001-10-26 18:52:47 +00:00
John Baldwin
282873e2c0 - Change the taskqueue locking to protect the necessary parts of a task
while it is on a queue with the queue lock and remove the per-task locks.
- Remove TASK_DESTROY now that it is no longer needed.
- Go back to inlining TASK_INIT now that it is short again.

Inspired by:	dfr
2001-10-26 18:46:48 +00:00
Mitsuru IWASAKI
f86214b6b8 Add APM compatibility feature to ACPI.
This emulates APM device node interface APIs (mainly ioctl) and
provides APM services for the applications.  The goal is to support
most of APM applications without any changes.
Implemented ioctls in this commit are:
 - APMIO_SUSPEND (mapped ACPI S3 as default but changable by sysctl)
 - APMIO_STANDBY (mapped ACPI S1 as default but changable by sysctl)
 - APMIO_GETINFO and APMIO_GETINFO_OLD
 - APMIO_GETPWSTATUS

With above, many APM applications which get batteries, ac-line
info. and transition the system into suspend/standby mode (such as
wmapm, xbatt) should work with ACPI enabled kernel (if ACPI works well :-)

Reviewed by:	arch@, audit@ and some guys
2001-10-26 17:43:05 +00:00
Matthew Dillon
7a5a635273 Move recently added procedure which was incorrectly placed within an
#ifdef DDB block.
2001-10-26 16:27:54 +00:00
Matt Jacob
831039f850 Detach the prom console when platform.cons_init is called. This seems
to avoid most of the double character kernel goop we've been having by having
both a prom console && a normal console.

Was not able to test with graphics head. Hope this doesn't break anything.

Reviewed by:	silence on alpha
2001-10-26 16:13:47 +00:00
Poul-Henning Kamp
5f7806ab69 Make cdevsw[] static. 2001-10-26 15:31:22 +00:00
Poul-Henning Kamp
71ab1fa5df Reporting device drivers by traversing cdevsw[] is at best a hack
which may or may not return something which is partially right.

Disable the "devices" file until we find out what this is needed for,
and what exactly those apps need.

This will allow cdevsw to become static again.

Approved by:	DES
2001-10-26 15:30:44 +00:00
Ruslan Ermilov
0df659af99 Finish the asbestos suited move of $mach/conf/*.$mach to conf/*.$mach.
Fix some more typos.
2001-10-26 10:33:45 +00:00
John Baldwin
8e2e767b1f Add a per-thread ucred reference for syscalls and synchronous traps from
userland.  The per thread ucred reference is immutable and thus needs no
locks to be read.  However, until all the proc locking associated with
writes to p_ucred are completed, it is still not safe to use the per-thread
reference.

Tested on:	x86 (SMP), alpha, sparc64
2001-10-26 08:12:54 +00:00
John Baldwin
1de1c550b1 Add locking to taskqueues. There is one mutex per task, one mutex per
queue, and a mutex to protect the global list of taskqueues.  The only
visible change is that a TASK_DESTROY() macro has been added to mirror
the TASK_INIT() macro to destroy a task before it is free'd.

Submitted by:	Andrew Reiter <awr@watson.org>
2001-10-26 06:32:21 +00:00
John Baldwin
40c6d2be16 Use msleep() to avoid lost wakeup's instead of doing an ineffective
splhigh() before the mtx_unlock and tsleep().  The splhigh() was probably
correct in the original code using simplelocks but is not correct in
5.0-current.

Noticed by:	Andrew Reiter <awr@FreeBSD.org>
2001-10-26 06:09:01 +00:00
Matthew Dillon
245df27cee Implement kern.maxvnodes. adjusting kern.maxvnodes now actually has a
real effect.

Optimize vfs_msync().  Avoid having to continually drop and re-obtain
mutexes when scanning the vnode list.  Improves looping case by 500%.

Optimize ffs_sync().  Avoid having to continually drop and re-obtain
mutexes when scanning the vnode list.  This makes a couple of assumptions,
which I believe are ok, in regards to vnode stability when the mount list
mutex is held.  Improves looping case by 500%.

(more optimization work is needed on top of these fixes)

MFC after:	1 week
2001-10-26 00:08:05 +00:00
Matthew Dillon
f92dcd3e4a Add missing TAILQ_INSERT_TAIL's which somehow didn't get comitted with
the recent vnode cleanup.
2001-10-25 23:13:56 +00:00
Ian Dowse
71fc5e11c7 Default to not performing ufs_dirhash's extensive directory-block
sanity check after every directory modification. This check can be
re-enabled at any time by setting the sysctl "vfs.ufs.dirhash_docheck"
to 1.

This group of sanity tests was there to ensure that any UFS_DIRHASH
bugs could be caught by a panic before a potentially corrupted
directory block would be written to disk. It has served its main
purpose now, so disable it in the interest of performance.

MFC after:	1 week
2001-10-25 22:55:59 +00:00
Matthew Dillon
f02098e59c In cluster_rbuild(), 'size' had better match buf->b_bcount and buf->b_bufsize
or the cluster will not be properly merged.  Dup the code from
cluster_wbuild() and add some printf()s to see if bad cases are present.

MFC after:	2 weeks
2001-10-25 22:49:48 +00:00
John Baldwin
76e7a78292 Use TASK_INIT to initialize taskqueue task instead of violating the
abstraction.

Submitted by:	Andrew Reiter <arr@watson.org>
2001-10-25 19:56:02 +00:00
Jeroen Ruigrok van der Werven
9c59aa470c Remove wx driver, which got recently removed.
Submitted by:	revamped kernincludes.sh
2001-10-25 19:45:39 +00:00
Jeroen Ruigrok van der Werven
0297dba19f Unbreak NEWCARD by removing options NFS and replacing it with the
new NFSCLIENT and NFSSERVER options.

Submitted by:	revamped kernincludes.sh
2001-10-25 19:41:13 +00:00
Jonathan Lemon
208b417fd5 Aargh. I really shouldn't do late night commits. Remove a floating point
multiply, and replace it with a close equivalent.  1.488 =~ 1.5
2001-10-25 19:36:44 +00:00
Ian Dowse
4f6434bdde Now that nfsm_reply() does not usually set 'error' to 0, we need
to do it explicitly in nfsrv_noop so that the reply gets sent back
to the client. This fixes the generation of a selection of RPC
error replies (RPC_PROGMISMATCH, RPC_PROGUNAVAIL, RPC_PROCUNAVAIL
etc.) that are used by some clients to detect support for optional
protocols and features.

Reviewed by:	peter
Reported by:	Thomas Quinot <quinot@inf.enst.fr>
PR:		kern/31479
2001-10-25 19:07:56 +00:00
Luigi Rizzo
617b3dd758 Defs for three (unused so far) bits in PCI command/status register
were off by one bit.
2001-10-25 17:43:26 +00:00
John Baldwin
5a08b84f83 Fix an inverted test csae. Success of getenv() is determined by a return
value of !NUL rather than NUL.

Submitted by:	luigi
Pointy hat to:	jhb
2001-10-25 17:22:31 +00:00
John Baldwin
e0e3030796 Currently no code does a CROSSJUMP() to sw1a, so we don't need a
CROSSJUMPTARGET() for it.

Submitted by:	bde
2001-10-25 16:54:21 +00:00
John Baldwin
02c41f11e3 Use %ecx instead of %ebx for the scratch register while updating %dr7 since
%ecx isn't a call safe register and thus we don't have to save and restore
it.

Submitted by:	bde
2001-10-25 16:52:43 +00:00
John Baldwin
7df8a724c2 - Fix typo in comment from previous revision.
- Fix a bug in the LDT changes where the wrong argument was passed to
  set_user_ldt() from cpu_switch().  The bug was passing a pointer to the
  ldt, but set_user_ldt() takes a pointer to the process' mdproc structure.

Submitted by:	bde
2001-10-25 16:50:16 +00:00
John Baldwin
163fd6fb97 Whitespace, comment, and string fixes.
Submitted by:	bde (mostly)
2001-10-25 16:47:01 +00:00
Bruce Evans
42108a7706 Fixed misformatting of options line for COMPAQ_M610 and EICON_DIVA in
rev.1.974.

Fixed previous misformatting of options line for ACCEPT_FILTER_DATA,
ACCEPT_FILTER_HTTP, ACPI_DEBUG, COMPAT_SVR4, DEBUG_SVR4, ED_NO_MIIBUS,
IFS, PCFCLOCK_MAX_RETRIES, PCFCLOCK_VERBOSE, PECOFF_DEBUG, PECOFF_SUPPORT,
PPC_PROBE_CHIPSET, RANDOM_IP_ID, REGRESSION, SC_CUT_SEPCHARS,
SC_CUT_SPACES2TABS, SES_ENABLE_PASSTHROUGH, UFS_DIRHASH, UFS_EXTATTR
and UFS_EXTATTR_AUTOSTART.
2001-10-25 12:05:45 +00:00
Bruce Evans
c797ab47ab Fixed bugs in rev.1.973. Actually enable PCI_ENABLE_IO_MODES. It
defeats the point of LINT to comment out positive options.

Fixed style bugs in rev.1.973:
- disordering of PCI options list.
- missing space after "options".
- line longer than 80 characters.
- bogus quoting of "BIOS".
2001-10-25 11:46:54 +00:00
Hellmuth Michaelis
0103e55f3f add options line for Compaq Microcom 610 ISDN card. 2001-10-25 11:14:46 +00:00
Ruslan Ermilov
ff0c93cc0e Just use ${MACHINE}, it's already special-casing pc98. 2001-10-25 09:05:47 +00:00
Doug Rabson
4abfff1e2e Call ExitBootServices and disable interrupts before we start hacking
the VM registers. This ought to make things slightly more reliable here.
2001-10-25 08:53:39 +00:00
Doug Rabson
7d5af294dc Add the two sections used for PLT entries to the text and sdata sections
respectively. This makes IPLTLSB relocations work properly (these are
generated for weak symbols, particularly for _longjmp).
2001-10-25 08:50:14 +00:00
Jonathan Lemon
0751407193 Don't use the ip_timestamp structure to access timestamp options, as the
compiler may cause an unaligned access to be generated in some cases.

PR: 30982
2001-10-25 06:27:51 +00:00
Jonathan Lemon
ec691a10e6 If we are bridging, fall back to using any inet address in the system,
irrespective of receive interface, as a last resort.

Submitted by: ru
2001-10-25 06:14:21 +00:00
Jonathan Lemon
807b8338ba Relocate the KASSERT for a null recvif to a location where it will
actually do some good.

Pointed out by: ru
2001-10-25 05:56:30 +00:00
Jonathan Lemon
72a32a26aa Add support for loadable microcode which implements interrupt coalescing
and packet bundling.  Make the microcode settings controllable via sysctl
and loader tunables.

Submitted by: Marko Zec <zec@tel.fer.hr>
  (with some munging and dynamic sysctl support by me)

Also extend the workaround for Dynamic Standby mode to later '559 chips,
not just the ICH2 variants.
2001-10-25 05:32:01 +00:00
Jonathan Lemon
9a7a8c90d1 . Add structure elements for sysctl.
. Document default values for microcode
2001-10-25 05:27:25 +00:00
Jonathan Lemon
3ceb25205d . Add structure definition for microcode download.
Submitted by: Marko Zec <zec@tel.fer.hr>

  . Add some PCI chip revision entries.
  . Make size of txcb dependent on pointer size rather than arch #define
2001-10-25 05:25:58 +00:00
Jonathan Lemon
b4c45df0a7 Add Intel's loadable microcode to implement receive side bundling.
This is taken verbatim from the Intel's e100-1.6.22 release, with
the addition of their LICENSE file at the top.

Submitted by: Marko Zec <zec@tel.fer.hr>
2001-10-25 05:23:31 +00:00
Jonathan Lemon
18bfd58110 cnclose() can potentially race against itself. To avoid vn_close() races,
NULL-out cnd_vp before calling the latter, as it may block.

Submitted by: dillon
2001-10-25 04:51:37 +00:00
Jonathan Lemon
ae4da68827 Add PCI_ENABLE_IO_MODES option, for BIOSen that neglect this.
Submitted by: Andrew R. Reiter arr@watson.org
2001-10-25 04:44:50 +00:00
Robert Watson
f8bf16fc88 o Remove extern showallsockets, defunct as of the change to
kern.security.seeotheruids_permitted.  This was missed in the
  commit that made this change elsewhere.
2001-10-25 02:03:37 +00:00
Luigi Rizzo
c5ca4c7e6e Backout 1.61 -- both intrcnt and intrnames are already exported
via sysctl under "hw".
2001-10-25 01:32:24 +00:00
John Baldwin
24db04598b Split the per-process Local Descriptor Table out of the PCB and into
struct mdproc.

Submitted by:	Andrew R. Reiter <arr@watson.org>
Silence on:	-current
2001-10-25 00:53:43 +00:00
Jonathan Lemon
7ce26133ea Force FWRITE on when opening the console, so that the flags passed to
vn_close match those from vn_open.  This fixes the panic some people
were seeing about "vrele: missed vn_close".
2001-10-25 00:14:16 +00:00
Julian Elischer
5a2553fa1d re-undo rev 1.78 now that style(9) is sane in this regard,
(make struct {proc,thread,kse,ksgrp} readable again.)
2001-10-24 23:40:59 +00:00
John Baldwin
882bcf5879 Document the requirements and nature of the logical CPU IDs. It isn't
very strict and leaves much up to the platform so that it can define a
convenient mapping.

Requested by:	mjacob
2001-10-24 22:15:38 +00:00
John Baldwin
02185af5a9 Change the module name from 'snd_sonicvibes' to 'snd_vibes' as that is
the filename (thus the "old" module name) and the name used by
snd_driver.ko.
2001-10-24 21:44:07 +00:00
John Baldwin
579f17a038 Change module name from 'snd_als' to 'snd_als4000' to match name in
snd_driver.ko.
2001-10-24 21:42:06 +00:00
John Baldwin
0ff24d06f7 Change the module name from 'via' to 'snd_via82c686' to match the KLD
filename and in snd_driver.ko.
2001-10-24 21:38:08 +00:00
John Baldwin
ee1fbec1bf Change the module name from 'snd_cmipci' to 'snd_cmi' to match the
filename, module name in the loader, the dependency in snd_driver.ko, and
to be consistent with other sound drivers.
2001-10-24 21:35:31 +00:00
Doug Rabson
04c2a8f6be * Clear the TLB on boot.
* If a pte for a location given to pmap_enter_quick is valid, just give
  up - don't panic, even if the mapping is different.
2001-10-24 21:22:08 +00:00
Doug Rabson
45740e15b4 If we get an unhandled page fault in kernel mode, either panic (if
pcb_onfault is not set) or arrange to restart at the location in
pcb_onfault.

This ought to help the stability of a system under moderate load. It
certainly stops DDB from hanging the kernel when it tries to access a
non-present page.
2001-10-24 21:20:50 +00:00
Doug Rabson
88f5f7ac50 Try to get the self-relocator to work with IPLTLSB relocations. Doesn't
work right though - I can't figure out why.
2001-10-24 20:14:49 +00:00
Matt Jacob
888ef2d923 Unbreak alpha builds. 2001-10-24 18:45:35 +00:00
Matthew Dillon
a06fe5111e unwind v_writecount in fhopen() if we are unable to allocate the
descriptor.

MFC after:	3 days
2001-10-24 18:32:17 +00:00
Jonathan Lemon
553b79aa63 cn_tab no longer exists, use cnadd() to add a console device. Note that
this may result in duplicate console output in some cases.
2001-10-24 18:30:05 +00:00
Dag-Erling Smørgrav
27c97f7660 Don't enable write cacheing on devices that don't support tagged queuing
unless hw.ata.wc is set.

Approved by:	sos
MFC after:	1 week
2001-10-24 18:24:09 +00:00
Jonathan Lemon
b792b54c89 Remove call to cninit_finish(). 2001-10-24 17:42:01 +00:00
John Baldwin
c5ca5a55a1 - Clean up the comments slightly here to make them more readable.
- Set the type and trapframe number for the F00F workaround since type
  can be used later by sv_transtrap().  Debuggers might also want to look
  at the type in the trapframe.

Submitted by:	bde (mostly)
2001-10-24 17:38:40 +00:00
Hajimu UMEMOTO
a55dfa2ac1 Make apm a module.
We need further work to be able to specify an equivalence of `flags 0x20'.
Many PCs should work for now.  But, some PCs need `flags 0x20'.
2001-10-24 16:53:54 +00:00
Yoshihiro Takahashi
6cac891491 Added the pmc driver which supports power management controller of
old NEC PC-98NOTE.

Submitted by:	chi@bd.mbn.or.jp (Chiharu Shibata)
MFC after:	1 week
2001-10-24 14:46:40 +00:00
John Baldwin
781a35df6b Fix this to actually compile in the !INVARIANTS case.
Reported by:	Maxime Henrion <mux@qualys.com>
2001-10-24 14:18:33 +00:00
Robert Drehmel
9a024fc559 Use vm_offset_t instead of caddr_t to fix a warning and remove
two casts.
2001-10-24 14:15:28 +00:00
Hellmuth Michaelis
365bf7980c fix kvprintf panic in attach routine 2001-10-24 14:12:47 +00:00
Cameron Grant
16a33022e7 fix SNDCTL_DSP_GETISPACE behaviour 2001-10-24 12:40:54 +00:00
Cameron Grant
8309fd9aef improve recording behaviour 2001-10-24 12:33:21 +00:00
Marcel Moolenaar
3a6ec54e58 Remove call to cninit_finish. This is part of the multiple
low-level console support.
2001-10-24 08:06:55 +00:00
Marcel Moolenaar
39a4abbe0c Add parse functions for local APIC and I/O APIC entries.
Also, show when a local APIC or SAPIC is disabled.
2001-10-24 04:48:05 +00:00
Robert Watson
c1787d3b75 o Note an additional potential problem here: LOCKD_MSG directly exports
struct ucred to userland.  In 5.0-CURRENT, it is desirable to instead
  export struct xucred, as ucred contains mutexes, pointers, and other
  kernel evil.  I'll add it to my work queue.
2001-10-24 02:48:38 +00:00
Matthew Dillon
79deba82cd Fix ktrace enablement/disablement races that can result in a vnode
ref count panic.

Bug noticed by:	ps
Reviewed by:	ps
MFC after:	1 day
2001-10-24 01:05:39 +00:00
Matt Jacob
fc16d270b7 Tra-La, another QLogic f/w funny- this time with the 2300.
If we get a completion status of RQCS_QUEUE_FULL, it means
that the internal queues are full. Other QLogic boards set
the QFULL SCSI status. But *nooooooooooo*, not the 2300.

MFC after:	1 day
2001-10-23 23:05:20 +00:00
Nick Hibma
9965784733 Regen. 2001-10-23 22:44:36 +00:00
Nick Hibma
2b97142db8 Add Olympus C-700 2001-10-23 22:44:03 +00:00
John Baldwin
4e5e677bc0 Change the sx(9) assertion API to use a sx_assert() function similar to
mtx_assert(9) rather than several SX_ASSERT_* macros.
2001-10-23 22:39:11 +00:00
John Baldwin
e5e5b51f9f Allow hw.acpi.cpu.{economy,performance}_speed to be set from the loader
via tunables.
2001-10-23 22:37:36 +00:00
John Baldwin
d19fc02a22 Change TUNABLE_*_FETCH to have a return value of 0 if the variable was not
found or successfully converted and true otherwise.
2001-10-23 22:35:25 +00:00
John Baldwin
21cbf0cc8b - Change getenv_quad() to return an int instead of a quad_t since it
returns an success/failure code rather than the actual value.
- Add getenv_string() which copies a string from the environment to another
  string and returns true on success.
2001-10-23 22:34:36 +00:00
John Baldwin
a33cbf355e Set the code and signal for the F00F hack fault directly instead of
changing the code in the trapframe and looping back to the top of trap
again.

Tested by:	cjc
2001-10-23 22:29:16 +00:00
Peter Wemm
76792d87a8 Fix RAW dependency violation when compiled with gcc-3
Warning: Use of 'br.ret.sptk.many' violates RAW dependency 'PSR.tb' (data)
2001-10-23 22:23:22 +00:00
Jonathan Lemon
22dc069c24 Set RB_MULTIPLE (multiple console support) if the kernel is booted
with the -D flag.
2001-10-23 20:27:48 +00:00
Jonathan Lemon
c80bd6e378 Allow the RBX_DUAL flag to appear in bootinfo. 2001-10-23 20:27:05 +00:00
Jonathan Lemon
991f976036 Implement multiple low-level console support. 2001-10-23 20:25:50 +00:00
Jonathan Lemon
5e1cf72708 Add RB_MULTIPLE flag so the bootloader can turn on mulitiple console
support.  This flag value is identical to RBX_DUAL from boot2.
2001-10-23 20:22:04 +00:00
Jonathan Lemon
034cc6fe5a Add a siocnterm function for the CONS_DRIVER function vector. 2001-10-23 20:16:56 +00:00