Commit Graph

34773 Commits

Author SHA1 Message Date
imp
04ac07203d Add ARGOSY SP320
cis submitted by: phk
2002-09-10 06:29:09 +00:00
sam
cf6a97db2b move some printfs under bootverbose
Reviewed by:	phk
2002-09-10 05:06:48 +00:00
arr
d229380ad8 - Spell "these" properly. 2002-09-10 03:58:44 +00:00
jhb
8c0aa78c1b Make sure a $PIR table header has a valid length before accepting the table
as valid.

Submitted by:	Michal Mertl <mime@traveller.cz>
2002-09-09 18:24:35 +00:00
ticso
ca81a71128 add missing \n to printf
Approved by:	gallatin (mentor)
2002-09-09 17:39:48 +00:00
rwatson
990d7cf43e Add security.mac.mmap_revocation, a flag indicating whether we
should revoke access to memory maps on a process label change.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-09-09 17:12:24 +00:00
rwatson
bb15291772 Minor code sync to MAC tree: push Giant locking up from
mac_cred_mmapped_drop_perms() to the caller.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, NAI Labs
2002-09-09 17:10:16 +00:00
robert
21c03c95c8 - Fix iBCS2 emulation of COFF files that have multiple libraries
in their library (STYP_LIB) section.
 - Attempt to make the code which calculates the next entry and
   string offsets look clearer.

PR:		kern/42580
Tested by:	Olaf Klein <ok@adimus.de> (on 4.7-PRERELEASE)
2002-09-09 15:51:10 +00:00
sobomax
b749867dfc Since from now on encap_input() also catches IPPROTO_MOBILE and IPPROTO_GRE
packets in addition to IPPROTO_IPV4 and IPPROTO_IPV6, explicitly specify
IPPROTO_IPV4 or IPPROTO_IPV6 instead of -1 when calling encap_attach().

MFC after:	28 days
		(along with other if_gre changes)
2002-09-09 09:36:47 +00:00
tanimura
f10108092a - Do not swap out a process if it is in creation. The process may have no
address space yet.

- Check whether a process is a system process prior to dereferencing
  its p_vmspace.  Aio assumes that only the curthread switches the address
  space of a system process.
2002-09-09 09:05:06 +00:00
phk
617ed89792 #include "opt_bla.h" goes first says Bruce. 2002-09-09 08:44:52 +00:00
sobomax
36cca340bc Add `device gre'.
Reminded by:    bde
MFC after:      28 days
		(along with other if_gre stuff)
2002-09-09 08:31:04 +00:00
sobomax
dcd9715348 Prevent namespace pollution in use-land by putting everything used only in
kernel (softc and such) under #ifdef _KERNEL.

Submitted by:   bde
2002-09-09 08:25:00 +00:00
imp
b7883862c2 Remove duplicate entry. Since we call things cbb in the source, pccbb
is obsolete.
2002-09-09 05:35:46 +00:00
kuriyama
a61c477270 Use "options " rather than "options<tab>". 2002-09-09 02:40:59 +00:00
imp
2ea68b67d4 Change the order that we look for free memory windows from 0 -> MAX-1
to MAX-1 -> 0.  This should allow for less potential for conflict
between pccardd/pccardc and drivers.  As far as I can tell no drivers
try to use window 4, so this should be a no-op for them.
2002-09-08 22:18:06 +00:00
jdp
48dd538511 Add support for the BCM5703x chips. I do not have one of these
cards to test; however the submitter reports that this patch works
with the on-board interface on the IBM x235 server.

Submitted by:	Jung-uk Kim <jkim@niksun.com>
MFC after:	1 month
2002-09-08 19:12:02 +00:00
phk
8eb0cb6eaa Fix style(9) bugs.
Brucified by:	bde
2002-09-08 15:16:49 +00:00
phk
e5c7442a0c Fix a logic bug in the struct dev_t allocation code.
Spotted by:	Neelkanth Natu <neelnatu@yahoo.com>
2002-09-08 15:15:12 +00:00
phk
6030f30112 Deal with a new exteded MBR paritition type
Submitted by:	Michal Mertl <mime@traveller.cz>
2002-09-08 15:13:33 +00:00
phk
549c71a099 Now that we have a cached mount credential in struct mount, use it istead
of a private cached copy.
2002-09-08 15:11:18 +00:00
jake
c964ec41e1 Make this driver work a whole lot better.
- Get the initial mode from the prom settings and don't clobber the mode
  on open.
- Copy output into an internal ring buffer instead of accessing the tty
  outq directly in the interrupt handler.  This fixes a problem where
  garbage would show up in the output stream.
- Reset the console port completely and reprogram all the parameters
  before enabling it.  This fixes seemingly random hangs on startup
  when using a fast interrupt handler.
- Add minimal locking in place of spls.
- Remove dead code and minor cleanups.
2002-09-08 04:45:16 +00:00
peter
f6e5e92086 opt_kstack_pages.h is not needed anymore. It would have been a Bad Thing
if it had been different to the running kernel.
2002-09-08 02:59:38 +00:00
peter
025489aa19 Note that 'device gzip' *requires* COMPAT_AOUT. Maybe this "device"
should be renamed to COMPAT_GZIPAOUT or something like that.
2002-09-08 02:33:42 +00:00
peter
70e41e98b1 Do not blow up when we walk off the end of the brands list.
Found by:	kris, jake
2002-09-08 02:17:44 +00:00
peter
21b23e4fe8 Tidy up some loose ends that bde pointed out. caddr_t bad, ok?
Move fill_kinfo_proc to before we copy the results instead of after
the copy and too late.

There is still more to do here.
2002-09-07 22:31:44 +00:00
peter
640af1c480 Remove bogus fill_kinfo_proc() before ptrace_set_pc(). There was no need
for this.

Submitted by:	bde
2002-09-07 22:18:19 +00:00
peter
267650898e The true value of how the kernel was configured for KSTACK_PAGES was not
available at module compile time.  Do not #include the bogus
opt_kstack_pages.h at this point and instead refer to the variables that
are also exported via sysctl.
2002-09-07 22:15:47 +00:00
peter
93d34a10ac Make UAREA_PAGES and KSTACK_PAGES visible to userland via sysctl, like
PS_STRINGS and USRSTACK is.  This is necessary in order to decode a.out
core dumps.  kern_proc.c was already referring to both of these values
but was missing the #include "opt_kstack_pages.h".  Make the sysctl
variables visible so that certain kld modules can see how their parent
kernel was configured.
2002-09-07 22:11:45 +00:00
peter
a054ba3c90 Move the KSTACK_PAGES option from MD to MI. Although not all platforms
support this, we do have MI code that references it and is otherwise
unaware of an override.  The alternative is to put knowledge in these
MI files about which platforms have the opt_kstack_pages.h option file.
It is more likely that other platforms will gain the ability to tune the
kstack size.
2002-09-07 22:07:11 +00:00
jmallett
8fa852ab6c Fill out two fields (si_pid, si_uid) in the siginfo structure handed back
to userland in the signal handler that were not being iflled out before, but
should and can be.

This part of sendsig could be slightly refactored to use an MI interface, or
ideally, *sendsig*() would have an API change to accept a siginfo_t, which
would be filled out by an MI function in the level above sendsig, and said MI
function would make a small call into MD code to fill out the MD parts (some
of which may be bogus, such as the si_addr stuff in some places).  This would
eventually make it possible for parts of the kernel sending signals to set up
a siginfo with meaningful information.

Reviewed by:	mux
MFC after:	2 weeks
2002-09-07 19:12:53 +00:00
jmallett
f77e5caa9d Diff reduction in comments for filling the siginfo structure - refer to
filling in the POSIX parts, when doing the same thing in every port of
FreeBSD.
2002-09-07 18:56:18 +00:00
jmallett
90e7e7c74e Match the more modern ports and comment the filling of POSIX parts of siginfo
with 'Fill in POSIX parts'.  (Diff reduction.)
2002-09-07 18:55:15 +00:00
tmm
2ba469fe35 Unbreak the modules build:
- add dependencies on opt_cpu.h and opt_kstack_pages.h to the linux module
  Makefile in the i386 case. The latter is needed by an i386-only file, the
  former by the i386 implementation of linux_sysvec.c (opt_cpu.h is used for
  architecture-dependent options, so I added it only for i386, although this
  file is also generated for the alpha).
- add a dependency on opt_kstack_pages.h to the pecoff module Makefile.
2002-09-07 18:02:18 +00:00
mjacob
c5bf10c2fd The size argument to snprintf does not have to be backed off by one
to account for a NULL byte.

Submitted by:	Jacques A. Vidrine <nectar@celabo.org>
2002-09-07 16:12:52 +00:00
bde
67674880e5 Include <machine/pcb.h> instead of depending on namespace pollution in
<sys/user.h>.
2002-09-07 14:32:22 +00:00
julian
e26b912512 fix braino..
was clearing part of wrong thread structure..
2002-09-07 12:58:44 +00:00
sobomax
43881a9c90 Remove #include <netinet/ip.h>.
Submitted by:	bde
2002-09-07 12:22:17 +00:00
dfr
bc2c580ebb Add __BEGIN_DECLS/__END_DECLS so that c++ code can use makecontext() etc. 2002-09-07 10:20:26 +00:00
peter
52b123c1cb Fix a missing line in a cut/paste error. 2002-09-07 07:13:08 +00:00
peter
fa099d1548 Automatically enable CPU_ENABLE_SSE (detect and enable SSE instructions)
if compiling with I686_CPU as a target.  CPU_DISABLE_SSE will prevent
this from happening and will guarantee the code is not compiled in.

I am still not happy with this, but gcc is now generating code that uses
these instructions if you set CPUTYPE to p3/p4 or athlon-4/mp/xp or higher.
2002-09-07 07:02:12 +00:00
peter
8e47265dc5 Supposedly linux has added a 6th syscall arg register (%ebp). I am not
100% sure if this is enough, but it will not harm anything.
2002-09-07 04:59:49 +00:00
peter
7ab2008d6a Add options COMPAT_AOUT to detect future bitrot. 2002-09-07 01:49:52 +00:00
julian
d191c82c92 fix misplaced schedlock
Submitted by:	davidxu@freebsd.org
2002-09-07 01:48:53 +00:00
peter
ec9cab8da4 Add COMPAT_AOUT option so that config will not yell when you try and
compile it statically.
2002-09-07 01:43:58 +00:00
peter
0226701a8a Add the aout module subdir for the i386. 2002-09-07 01:31:38 +00:00
peter
037a035b18 Add an a.out exec module. 2002-09-07 01:31:21 +00:00
peter
b4b1ef332e Make imgact_aout.c optional. It is i386 specific. 2002-09-07 01:30:36 +00:00
peter
ba1db69f48 Give this a self contained a.out coredump routine.
XXX freebsd-aout coredumps for a linux-aout binary is a bit pointless.
2002-09-07 01:29:21 +00:00
peter
e3b1e6d8fa Zap the implementations of the i386-aout specific cpu_coredump function.
Most of the non-i386 platforms had rather broken implementations anyway.
2002-09-07 01:26:34 +00:00
peter
9688aed888 Collect the a.out coredump code into the calling functions.
XXX why does pecoff dump in a.out format?
2002-09-07 01:23:51 +00:00
jhb
68e5e76ced Add a subclass of the PCI-PCI bridge driver that uses the PCIBIOS to
route interrupts if the child bus is described in the PCIBIOS interrupt
routing table.  For child busses that are in the routing table, they do
not necessarily use a 'swizzle' on their pins on the parent bus to route
interrupts for child devices.  If the child bus is an embedded device then
the pins on the child devices can be (and usually are) directly connected
either to a PIC or to a Interrupt Router.  This fixes PCIBIOS interrupt
routing across PCI-PCI bridges for embedded devices.
2002-09-06 22:19:39 +00:00
jhb
891a98175a Add a function pci_probe_route_table() that returns true if our PCI BIOS
supports interrupt routing and if the specified PCI bus is present in the
routing table.
2002-09-06 22:15:44 +00:00
jhb
6e666d91a9 Export pcib_attach() as a "protected" for use in subclasses of the PCI-PCI
bridge driver.
2002-09-06 22:14:00 +00:00
sobomax
40bf2edf8b Include <netinet/ip.h> to unbreak kdump. I don't know why does kdump
includes if_gre.h at all, but it does, without including ip.h before
that.

Poked by:	peter
Pointy hat to:	kdump(1)
2002-09-06 21:58:57 +00:00
brooks
1da1f5abfe Don't include "bpf.h" when compiling on FreeBSD. We always compile in
bpf support these days.
2002-09-06 20:07:50 +00:00
jhb
c10ceae56a Dump the $PIR table if booting verbose. 2002-09-06 19:25:25 +00:00
mjacob
5f9cb58d07 Remove STRNCAT (==>strncat) usage. Apparently I never read the man
page correctly and it wasn't doing what I thought it was.

Noticed by: Brooks Davis <brooks@one-eyed-alien.net>
2002-09-06 18:32:16 +00:00
mjacob
6ee39adbaa Tsk. Now that we're not using our own locks, we have to remember
to grab Giant in isp_kthread so that msleep is *happy* that there's
no lock being passed to it (as tsleep turns out to be...)
2002-09-06 18:20:59 +00:00
sobomax
afb7f17e96 Reduce namespace pollution by staticizing everything, which doesn't need to
be visible from outside of the module.
2002-09-06 18:16:03 +00:00
sobomax
335a6bfe1d Connect if_gre module to the build. 2002-09-06 17:18:53 +00:00
sobomax
5e6e3c2936 Add if_gre module glue. 2002-09-06 17:17:33 +00:00
sobomax
8379521a54 Add a new gre(4) driver, which could be used to create GRE (RFC1701)
and MOBILE (RFC2004) IP tunnels.

Obrained from:  NetBSD
2002-09-06 17:12:50 +00:00
jhb
49487ffa2c - Add a pci_cfgintr_valid() function to see if a given IRQ is a valid
IRQ for an entry in a PCIBIOS interrupt routing ($PIR) table.
- Change pci_cfgintr() to except the current IRQ of a device as a fourth
  argument and to use that IRQ for the device if it is valid.
- If an intpin entry in a $PIR entry has a link of 0, it means that that
  intpin isn't connected to anything that can trigger an interrupt.  Thus,
  test the link against 0 to find invalid entries in the table instead of
  implicitly relying on the irqs field to be zero.  In the machines I have
  looked at, intpin entries with a link of 0 often have the bits for all
  possible interrupts for PCI devices set.
2002-09-06 17:08:07 +00:00
sobomax
7b3d4c8729 Add more ethernet types and move AppleTalk types into proper location.
Obtained from:  NetBSD (syssrc/sys/net/ethertypes.h, rev.1.13)
2002-09-06 17:02:29 +00:00
jhb
5ccfdeb4e4 If we are using APIC_IO tell ACPI so it can route interrupts properly.
This still doesn't work quite right because of other APIC_IO hacks in
the i386 PCI code.
2002-09-06 17:02:01 +00:00
jhb
9b8609f2b4 Attach ACPI children a bit later in attach(), specifically after performing
any machine dependent initialization.  This allows the MD code to set the
interrupt routing model so that PCI interrupts are routed correctly when
using an APIC or SAPIC for example.
2002-09-06 17:01:06 +00:00
sobomax
1208a633c0 Make these less broken. 2002-09-06 16:58:13 +00:00
iwasaki
7b8af44588 Add support for Corega FEther CB-TXD (CardBus 100M/10M). 2002-09-06 16:38:06 +00:00
jhb
3796a7b1aa Add support for printing out the contents of a PCI BIOS $PIR interrupt
routing table on the console.  Eventually it will be printed during
verbose boots.
2002-09-06 16:10:12 +00:00
jhb
09635017d5 Prefer the physical bus number of the PCI bus as the unit of the pciX
device created.
2002-09-06 16:09:07 +00:00
jhb
004940f13e Add a helper routine acpi_SetIntrModel() to call the _PIC method to set
the interrupt model in use so that ACPI can properly route interrupts for
machines using APIC's or SAPIC's.
2002-09-06 16:08:08 +00:00
rwatson
241e77818a Minor spelling tweak: assume "his" is actually "This". 2002-09-06 13:22:44 +00:00
phk
42ca888ae8 Remove "magicspace". It looks good on paper, it doesn't work in practice.
Sponsored by: DARPA & NAI Labs.
2002-09-06 08:50:28 +00:00
phk
8e45a811c4 Don't respect the O_EXCL flag, we don't get it back on close so we cannot
correctly track it.

Spotted by:	peter
Sponsored by:	DARPA & NAI Labs.
2002-09-06 07:57:29 +00:00
peter
907be9c6f2 Bump the -mev56 to -mev6. Otherwise, when you compile with gcc using
ev6 or pca56 etc this downgrades the cpu specification passed to gas.
As a result, gas will fail when gcc generates media instructions (in
uipc_usrreq.c).  This only affects what gas will accept, not what gcc
generates or what our *.s file contain.
2002-09-06 07:27:41 +00:00
julian
4446570abf Use UMA as a complex object allocator.
The process allocator now caches and hands out complete process structures
*including substructures* .

i.e. it get's the process structure with the first thread (and soon KSE)
already allocated and attached, all in one hit.

For the average non threaded program (non KSE that is) the allocated thread and its stack remain attached to the process, even when the process is
unused and in the process cache. This saves having to allocate and attach it
later, effectively bringing us (hopefully) close to the efficiency
of pre-KSE systems where these were a single structure.

Reviewed by:	davidxu@freebsd.org, peter@freebsd.org
2002-09-06 07:00:37 +00:00
peter
9680f220d4 Use sys/libkern.h not /usr/include/string.h 2002-09-06 06:04:36 +00:00
peter
2bed7a35af nfsnode.h was moved to ../nfsclient ages ago. I forgot to remove it here. 2002-09-06 05:47:33 +00:00
davidxu
e3c3155c8c Remove extra ';' 2002-09-06 00:18:52 +00:00
phk
87f5667c5a Implement the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.
Use extattr_check_cred() to check access to EAs.

This is still a WIP.

Sponsored by:   DARPA & NAI Labs.
2002-09-05 20:59:42 +00:00
phk
aa2987768b Introduce the VOP_OPENEXTATTR() and VOP_CLOSEEXTATTR() methods.
Together these two implement a simple transcation style grouping for
modifications of extended attributes on a vnode.

VOP_CLOSEEXTATTR() takes a boolean "commit" argument, which determines
if the aggregate changes are attempted written or not.  A commit will
fail if any of the VOP_SETEXTATTR() calls since the VOP_OPENEXTATTR()
have failed to meet their objective or if the flush to disk fails.

The default operations for these two VOP's is to return EOPNOTSUPP.

This API may still be subject to change.

Sponsored by:   DARPA & NAI Labs
2002-09-05 20:56:14 +00:00
phk
3303b3f624 Fix an inherited style bug: compare with NOCRED instead of NULL.
Sponsored by:	DARPA & NAI Labs.
2002-09-05 20:46:19 +00:00
phk
db06a743d8 Use canonical extattr_check_cred() instead of private implementation of the
same policy.

Sponsored by:	DARPA & NAI Labs.
2002-09-05 20:39:36 +00:00
phk
55be95d161 Introduce new extattr_check_cred() function which implements the canonical
crential washing for extended attributes.

Sponsored by:	DARPA & NAI Labs.
2002-09-05 20:38:57 +00:00
phk
80704cd6a8 Fix credentials check: do not leak ENOATTR until we know if they're
supposed to know.

Sponsored by:	DARPA & NAI Labs.
2002-09-05 20:28:24 +00:00
bde
58f67268df Fixed namespace pollution in uma changes:
- use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
  a prerequisite.
- don't include <sys/uma.h>.
Namespace pollution makes "opaque" types like uma_zone_t perfectly
non-opaque.  Such types should never be used (see style(9)).

Fixed subsequently grwon dependencies of this header on its own pollution:
- include <sys/_mutex.h> and its prerequisite <sys/_lock.h> instead of
  depending on namespace pollution 2 layers deep in <sys/uma.h>.
2002-09-05 19:48:52 +00:00
rwatson
315e4703e1 Re-insert TUNABLE() export of MAC Biba and MAC MLS module 'enabled'
sysctls.  Apparently lost during some or another merge.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-09-05 18:52:52 +00:00
jhb
1a872debf3 Make the printf messages when routing interrupts more consistent in the
various PCI bridge drivers.
2002-09-05 17:08:35 +00:00
jhb
55985c4b6c Test PCIbios.ventry against 0 to see if we found a PCIbios entry point,
not the 'entry' member.  The entry point is formed from both a base and
a relative entry point.  'entry' is that relative offset.  It is perfectly
valid to have an entry point with a relative offset of 0.  PCIbios.ventry
is the virtual address of the entry point that takes both 'base' and
'entry' into account, thus it is the proper variable to test to see if we
have an entry point or not.
2002-09-05 17:07:07 +00:00
jhb
bd265f5118 Move some variables to the BSS instead of explicitly zero'ing them. This
also makes all of the PCIbios variable be zero'd, not just the entry field.
2002-09-05 17:05:15 +00:00
obrien
af62f5e527 Statically compile pcn(4) into the install kernel vs. using as module.
lnc(4) will attach to AMD PCnet/FAST NICs if pcn(4) does not attach.
I.e. pcn(4) gets first chance.  There is a problem however in that pcn(4)
was moved out of the install kernel so that the module would be used.
This however causes bad installs if one has an AMD PCnet/FAST NIC.
2002-09-05 15:45:01 +00:00
sobomax
9265bc02cc Make recursion prevention variable per-instance and remove XXX comment
about thread-unsafety.

MFC after:	2 weeks
2002-09-05 15:35:38 +00:00
bde
3ce35c4922 Include <sys/mutex.h> and its prerequisite <sys/lock.h> instead of depending
on namespace pollution 4 layers deep in <netinet/in_pcb.h>.

Removed unused includes.  Sorted includes.
2002-09-05 15:33:30 +00:00
bde
c1c3f72703 Use `struct uma_zone *' instead of uma_zone_t, so that <sys/uma.h> isn't
a prerequisite.
2002-09-05 14:04:34 +00:00
bde
63ed167625 Include <sys/systm.h> for the definition of offsetof() instead of depending
on the definition being misplaced in <sys/types.h>.  The definition probably
belongs in <sys/stddef.h>.
2002-09-05 13:08:22 +00:00
bde
2f40aad6b9 Include <sys/systm.h> for the definition of offsetof() instead of depending
on the definition being misplaced in <sys/types.h>.  The definition probably
belongs in <sys/stddef.h>.
2002-09-05 12:58:57 +00:00
bde
b307c79502 Do not cast from a pointer to an integer of a possibly different size.
This fixes a warning on i386's with 64-bit longs.
2002-09-05 12:30:54 +00:00
iwasaki
9a172ee34e Add debug.rman_debug sysctl MIB and loader tunable instead of broken
RMAN_DEBUG option.
This would be useful for debugging resource manager code.
2002-09-05 11:45:02 +00:00
phk
d5001c9818 Fix a format buglet.
Spotted by:	iedowse
2002-09-05 11:42:03 +00:00