freebsd kernel with SKQ
Go to file
Marcel Moolenaar 6d2d7b8c0d Fix the interrupt code, broken 7 months ago. The interrupt framework
already supported nested PICs, but was limited to having a nested
AT-PIC only. With G5 support the need for nested OpenPIC controllers
needed to be added. This was done the wrong way and broke the MPC8555
eval system in the process.

OFW, as well as FDT, describe the interrupt routing in terms of a
controller and an interrupt pin on it. This needs to be mapped to a
flat and global resource: the IRQ. The IRQ is the same as the PCI
intline and as such needs to be representable in 8 bits. Secondly,
ISA support pretty much dictates that IRQ 0-15 should be reserved
for ISA interrupts, because of the internal workins of south bridges.
Both were broken.

This change reverts revision 209298 for a big part and re-implements
it simpler. In particular:
o   The id() method of the PIC I/F is removed again. It's not needed.
o   The openpic_attach() function has been changed to take the OFW
    or FDT phandle of the controller as a second argument. All bus
    attachments that previously used openpic_attach() as the attach
    method of the device I/F now implement as bus-specific method
    and pass the phandle_t to the renamed openpic_attach().
o   Change powerpc_register_pic() to take a few more arguments. In
    particular:
    -   Pass the number of IPIs specificly. The number of IRQs carved
	out for a PIC is the sum of the number of int. pins and IPIs.
    -   Pass a flag indicating whether the PIC is an AT-PIC or not.
	This tells the interrupt framework whether to assign IRQ 0-15
	or some other range.
o   Until we implement proper multi-pass bus enumeration, we have to
    handle the case where we need to map from PIC+pin to IRQ *before*
    the PIC gets registered. This is done in a similar way as before,
    but rather than carving out 256 IRQs per PIC, we carve out 128
    IRQs (124 pins + 4 IPIs). This is supposed to handle the G5 case,
    but should really be fixed properly using multiple passes.
o   Have the interrupt framework set root_pic in most cases and not
    put that burden in PIC drivers (for the most part).
o   Remove powerpc_ign_lookup() and replace it with powerpc_get_irq().
    Remove IGN_SHIFT, INTR_INTLINE and INTR_IGN.

Related to the above, fix the Freescale PCI controller driver, broken
by the FDT code. Besides not attaching properly, bus numbers were
assigned improperly and enumeration was broken in general. This
prevented the AT PIC from being discovered and interrupt routing to
work properly. Consequently, the ata(4) controller stopped functioning.

Fix the driver, and FDT PCI support, enough to get the MPC8555CDS
going again. The FDT PCI code needs a whole lot more work.

No breakages are expected, but lackiong G5 hardware, it's possible
that there are unpleasant side-effects. At least MPC85xx support is
back to where it was 7 months ago -- it's amazing how badly support
can be broken in just 7 months...

Sponsored by: Juniper Networks
2011-01-29 20:58:38 +00:00
bin sh: Clean up some old comments: 2011-01-25 20:56:18 +00:00
cddl Re-commit the zfs sysctl(9) type-safety changes. 2011-01-13 18:20:19 +00:00
contrib Update groff manpage and symbols with what has been submitted upstream. 2011-01-19 20:16:38 +00:00
crypto Merge OpenSSL 0.9.8q into head. 2010-12-03 22:59:54 +00:00
etc Change hast user home directory to /var/empty. 2011-01-28 22:29:38 +00:00
games factor(6): Check return values of BN_* functions. 2010-12-20 19:07:56 +00:00
gnu Rewrite the ARCH check another way for backward compatibility. 2011-01-29 10:32:00 +00:00
include Add missing __dead2 to __assert(). 2011-01-09 21:39:46 +00:00
kerberos5 Fix a typo. 2010-01-09 18:53:03 +00:00
lib Fix n32 compile. 2011-01-27 14:16:12 +00:00
libexec Eliminate the use of symlook_needed function in favor of DAGS. 2011-01-28 23:44:57 +00:00
release Fix making a release. The old libdialog was renamed to libodialog. 2011-01-14 10:56:44 +00:00
rescue Break out the rules which generate crunchgen'ed binaries into a separate 2010-11-13 03:11:27 +00:00
sbin Drop privileges in worker processes. 2011-01-28 22:35:46 +00:00
secure Regenerate manual pages for OpenSSL 0.9.8q. 2010-12-03 23:07:45 +00:00
share ixgb(4) does not support altq(4) yet. 2011-01-27 20:08:14 +00:00
sys Fix the interrupt code, broken 7 months ago. The interrupt framework 2011-01-29 20:58:38 +00:00
tools Keep this in sync with the ar5212 power rate table size. 2011-01-29 04:34:30 +00:00
usr.bin Fix typo in example getopt(1) script: $i vs $1 [1] 2011-01-26 18:43:15 +00:00
usr.sbin - Remove double semicolon. 2011-01-28 08:00:57 +00:00
COPYRIGHT Happy New Year 2011. 2010-12-31 18:07:16 +00:00
LOCKS Update LOCKS syntax. 2008-06-05 19:47:58 +00:00
MAINTAINERS Add a comment to MAINTAINERS indicating that sbin/routed is in fact 2010-04-10 12:29:09 +00:00
Makefile Back out r217734. [1] 2011-01-25 08:13:31 +00:00
Makefile.inc1 Retire TARGET_ABI. 2011-01-07 20:26:33 +00:00
Makefile.mips Retire TARGET_ABI. 2011-01-07 20:26:33 +00:00
ObsoleteFiles.inc Update dialog to version 20100428. This changes the license under which 2011-01-12 14:55:02 +00:00
README Import OpenSSL 0.9.8q. 2010-12-02 22:36:51 +00:00
UPDATING Fix wrapping of 20110103 entry. 2011-01-12 19:28:52 +00:00

This is the top level of the FreeBSD source directory.  This file
was last revised on:
$FreeBSD$

For copyright information, please see the file COPYRIGHT in this
directory (additional copyright information also exists for some
sources in this tree - please see the specific source directories for
more information).

The Makefile in this directory supports a number of targets for
building components (or all) of the FreeBSD source tree, the most
commonly used one being ``world'', which rebuilds and installs
everything in the FreeBSD system from the source tree except the
kernel, the kernel-modules and the contents of /etc.  The ``world''
target should only be used in cases where the source tree has not
changed from the currently running version.  See:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/makeworld.html
for more information, including setting make(1) variables.

The ``buildkernel'' and ``installkernel'' targets build and install
the kernel and the modules (see below).  Please see the top of
the Makefile in this directory for more information on the
standard build targets and compile-time flags.

Building a kernel is a somewhat more involved process, documentation
for which can be found at:
   http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/kernelconfig.html
And in the config(8) man page.
Note: If you want to build and install the kernel with the
``buildkernel'' and ``installkernel'' targets, you might need to build
world before.  More information is available in the handbook.

The sample kernel configuration files reside in the sys/<arch>/conf
sub-directory (assuming that you've installed the kernel sources), the
file named GENERIC being the one used to build your initial installation
kernel.  The file NOTES contains entries and documentation for all possible
devices, not just those commonly used.  It is the successor of the ancient
LINT file, but in contrast to LINT, it is not buildable as a kernel but a
pure reference and documentation file.


Source Roadmap:
---------------
bin		System/user commands.

cddl		Various commands and libraries under the Common Development
		and Distribution License.

contrib		Packages contributed by 3rd parties.

crypto		Cryptography stuff (see crypto/README).

etc		Template files for /etc.

games		Amusements.

gnu		Various commands and libraries under the GNU Public License.
		Please see gnu/COPYING* for more information.

include		System include files.

kerberos5	Kerberos5 (Heimdal) package.

lib		System libraries.

libexec		System daemons.

release		Release building Makefile & associated tools.

rescue		Build system for statically linked /rescue utilities.

sbin		System commands.

secure		Cryptographic libraries and commands.

share		Shared resources.

sys		Kernel sources.

tools		Utilities for regression testing and miscellaneous tasks.

usr.bin		User commands.

usr.sbin	System administration commands.


For information on synchronizing your source tree with one or more of
the FreeBSD Project's development branches, please see:

  http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/synching.html