John Baldwin [Fri, 6 Sep 2002 22:19:39 +0000 (22:19 +0000)]
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.
John Baldwin [Fri, 6 Sep 2002 22:15:44 +0000 (22:15 +0000)]
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.
Peter Wemm [Fri, 6 Sep 2002 19:59:29 +0000 (19:59 +0000)]
Bandaid for mount_nfs segfaulting with the more obscure mount options
in /etc/fstab. This isn't a real fix though and I'm still not sure
why it started failing. mount(8) breaks up the nfs args into seperate
repeated '-o option=value' arguments. But, the altflags variable that
we use to track things is incrementally built up each time we see the
next option and shows us the cumulative set of flags, not just the
flag that we are currently looking at. As a result, the strstr hack
for looking up flags in a giant -o opt=val,opt=val, etc string was failing
and causing a segfault. I do not know what changed recently that caused
this to suddenly break, but the code has been rather bogus for some time.
Matt Jacob [Fri, 6 Sep 2002 18:20:59 +0000 (18:20 +0000)]
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...)
Make it clear that the ":C" variable modifier expects an extended
regular expression instead of an obsolete regular expression.
Also, cross-reference re_format(7) instead of regex(3).
John Baldwin [Fri, 6 Sep 2002 17:08:07 +0000 (17:08 +0000)]
- 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.
John Baldwin [Fri, 6 Sep 2002 17:02:01 +0000 (17:02 +0000)]
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.
John Baldwin [Fri, 6 Sep 2002 17:01:06 +0000 (17:01 +0000)]
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.
Gordon Tetlow [Fri, 6 Sep 2002 16:15:29 +0000 (16:15 +0000)]
Add a support for a ${OSTYPE} which is set once in /etc/rc.subr. Also convert
all instances of `${CMD_OSTYPE}` to just using ${OSTYPE}. This saves us a
shell invocation on anything that is OS-dependent. I seriously doubt that we
will be spontaneously changing OS types during bootup.
John Baldwin [Fri, 6 Sep 2002 16:10:12 +0000 (16:10 +0000)]
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.
John Baldwin [Fri, 6 Sep 2002 16:08:08 +0000 (16:08 +0000)]
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.
Robert Drehmel [Fri, 6 Sep 2002 10:53:57 +0000 (10:53 +0000)]
Expand a contraction in the text of style(9) for consistency.
Do not touch contractions in comments of code examples because
their usage seems to be justified by space contraints.
Peter Wemm [Fri, 6 Sep 2002 07:27:41 +0000 (07:27 +0000)]
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.
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.
Mike Barcroft [Fri, 6 Sep 2002 04:22:54 +0000 (04:22 +0000)]
o Fix namespace scope issues in <ctype.h> by using the relatively new
visibility primitives.
o Implement _tolower() and _toupper() POSIX.1-2001 (XSI) macros in
<ctype.h>.
o Reduce pollution in <runetype.h> by removing typedefs and using
implementation namespaced types.
o Add a typedef in <rune.h> to compensate for <runetype.h> losing its
typedefs.
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.
Bruce Evans [Thu, 5 Sep 2002 19:48:52 +0000 (19:48 +0000)]
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>.
John Baldwin [Thu, 5 Sep 2002 17:07:07 +0000 (17:07 +0000)]
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.
David Malone [Thu, 5 Sep 2002 17:06:51 +0000 (17:06 +0000)]
Warns cleanups for netstat:
1) Include arpa/inet.h for ntohs.
2) Constness fixes.
3) Fix shadowing except for "sin" which shouldn't be in scope.
4) Remove register keyword.
5) Add missing initialsers to user defined structs.
5) Make prototype of netname6 globally visable.
6) Use right macros for printing syncache stats (even though entrie isn't
a word).
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.
Bruce Evans [Thu, 5 Sep 2002 13:08:22 +0000 (13:08 +0000)]
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>.
Bruce Evans [Thu, 5 Sep 2002 12:58:57 +0000 (12:58 +0000)]
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>.
David Malone [Thu, 5 Sep 2002 09:11:20 +0000 (09:11 +0000)]
The changes mentioned below were accidently committed as part of
my previous commit, so the commit message is incorrect for them.
The actual changes were:
elfcore.c 1.11:
Use a uintmax_t 'cos we con't know if php->p_filesz will be a
Elf32_Size or an Elf64_Size and we don't know how these relate to
size_t. Change some ints to size_t and ssize_ts.
gcore.c 1.28:
Include <arpa/inet.h> for ntohl, which is used in N_BADMAG.
Use a uid_t for a uid.
Bruce Evans [Thu, 5 Sep 2002 08:03:02 +0000 (08:03 +0000)]
Pad after "char *n_name;" in the !_AOUT_INCLUDE_ case so that struct nlist
has some chance of having the same layout in all cases on machines with
sizeof(char *) != sizeof(long).
Bruce Evans [Thu, 5 Sep 2002 07:54:03 +0000 (07:54 +0000)]
Forward declare struct vnode so that <sys/vnode.h> or some other header
that happens to forward declare struct vnode isn't a prerequisite (most
places get it from <sys/imgact.h>).