Mike Barcroft [Mon, 9 Sep 2002 05:38:05 +0000 (05:38 +0000)]
Solve the <runetype.h> pollution problem by disabling inline
optimizations when a standard has been requested, except when the
inline optimizations are also specifically requested.
Back out last commit where I moved pcn(4) off of the modules floppy back
into the install kernel. Unfortunately pcn(4) also needs mii(4) so that
would also have to added to install kernel, which will bloat it up so that it
doesn't fit on the floppy any more. Turns out we grew a lnc(4) module since
I last looked. So handle it as a kld loadable module during install rather
than have it statically compiled into the kernel.
Warner Losh [Sun, 8 Sep 2002 22:18:06 +0000 (22:18 +0000)]
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.
John Polstra [Sun, 8 Sep 2002 19:12:02 +0000 (19:12 +0000)]
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
1) Remove all two-letters names and derivates, comes with Xfree* entries spam,
we don't use two-letters names already many years.
2) Make xterm-color just plain alias to xterm instead of unnecessary
reduplication of color capabilities already exist in xterm entry.
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.
Peter Wemm [Sat, 7 Sep 2002 22:31:44 +0000 (22:31 +0000)]
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.
Peter Wemm [Sat, 7 Sep 2002 22:15:47 +0000 (22:15 +0000)]
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.
Peter Wemm [Sat, 7 Sep 2002 22:11:45 +0000 (22:11 +0000)]
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.
Peter Wemm [Sat, 7 Sep 2002 22:07:11 +0000 (22:07 +0000)]
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.
Juli Mallett [Sat, 7 Sep 2002 19:12:53 +0000 (19:12 +0000)]
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.
Juli Mallett [Sat, 7 Sep 2002 18:56:18 +0000 (18:56 +0000)]
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.
Thomas Moestl [Sat, 7 Sep 2002 18:02:18 +0000 (18:02 +0000)]
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.
Juli Mallett [Sat, 7 Sep 2002 08:14:19 +0000 (08:14 +0000)]
Two arrays were born from the same seeds, both grew into complementary sets
of pointers to strings. These two arrays were fixed to the same size, but one
had an implicit zeroed trailer element, which was unused because the size was
used up by the ones before said zeroed trailer element. So the unused limb was
chopped off the over-sized-but-not-over-sized array, and everyone lived happily
ever after.
Peter Wemm [Sat, 7 Sep 2002 07:02:12 +0000 (07:02 +0000)]
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.
Chad David [Sat, 7 Sep 2002 06:07:55 +0000 (06:07 +0000)]
Note that siginit() does not cause every signal to be ignored only the
ones with a default property of SA_IGNORE, and that it acquires and
releases the processes lock.
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.