freebsd-dev/sys
Thomas Moestl 1d80cb1b37 Add the new sparc64 OFW PCI framework, conditional on options OFW_NEWPCI
for now. It introduces a OFW PCI bus driver and a generic OFW PCI-PCI
bridge driver. By utilizing these, the PCI handling is much more elegant
now.

The advantages of the new approach are:
- Device enumeration should hopefully be more like on Solaris now,
  so unit numbers should match what's printed on the box more
  closely.
- Real interrupt routing is implemented now, so cardbus bridges
  etc. have at least a chance to work.
- The quirk tables are gone and have been replaced by (hopefully
  sufficient) heuristics.
- Much cleaner code.

There was also a report that previously bogus interrupt assignments
are fixed now, which can be attributed to the new heuristics.

A pitfall, and the reason why this is not the default yet, is that
it changes device enumeration, as mentioned above, which can make
it necessary to change the system configuration if more than one
unit of a device type is present (on a system with two hme cars,
for example, it is possible that hme0 becomes hme1 and vice versa
after enabling the option). Systems with multiple disk controllers
may need to be booted into single user (and require manual specification
of the root file system on boot) to adjust the fstab.
Nevertheless, I would like to encourage users to use this option,
so that it can be made the default soon.

In detail, the changes are:
- Introduce an OFW PCI bus driver; it inherits most methods from the
  generic PCI bus driver, but uses the firmware for enumeration,
  performs additional initialization for devices and firmware-specific
  interrupt routing. It also implements an OFW-specific method to allow
  child devices to get their firmware nodes.
- Introduce an OFW PCI-PCI bridge driver; again, it inherits most
  of the generic PCI-PCI bridge driver; it has it's own method for
  interrupt routing, as well as some sparc64-specific methods (one to
  get the node again, and one to adjust the bridge bus range, since
  we need to reenumerate all PCI buses).
- Convert the apb driver to the new way of handling things.
- Provide a common framework for OFW bridge drivers, used be the two
  drivers above.
- Provide a small common framework for interrupt routing (for all
  bridge types).
- Convert the psycho driver to the new framework; this gets rid of a
  bunch of old kludges in pci_read_config(), and the whole
  preinitialization  (ofw_pci_init()).
- Convert the ISA MD part and the EBus driver to the new way
  interrupts and nodes are handled.
- Introduce types for firmware interrupt properties.
- Rename the old sparcbus_if to ofw_pci_if by repo copy (it is only
  required for PCI), and move it to a more correct location (new
  support methodsx were also added, and an old one was deprecated).
- Fix a bunch of minor bugs, perform some cleanups.

In some cases, I introduced some minor code duplication to keep the
new code clean, in hopes that the old code will be unifdef'ed soon.

Reviewed in part by:	imp
Tested by:	jake, Marius Strobl <marius@alchemy.franken.de>,
		Sergey Mokryshev <mokr@mokr.net>,
		Chris Jackman <cjackNOSPAM@klatsch.org>
Info on u30 firmware provided by:	kris
2003-07-01 14:52:47 +00:00
..
alpha - Export pmap_enter_quick() to the MI VM. This will permit the 2003-06-29 21:20:04 +00:00
amd64 - Export pmap_enter_quick() to the MI VM. This will permit the 2003-06-29 21:20:04 +00:00
arm sys/sys/limits.h: 2003-05-19 20:29:07 +00:00
boot Add the beastie_disable variable which allows to turn the beastie 2003-07-01 01:03:32 +00:00
cam Merge common XPT_CALC_GEOMETRY functions into a single convenience function. 2003-06-14 22:17:41 +00:00
coda Remove in toto coda_strategy which incorrectly implemented vop_panic(); 2003-06-15 18:45:15 +00:00
compat Don't map LINUX_POSIX_VDISABLE to _POSIX_VDISABLE and vice versa for 2003-06-28 19:32:07 +00:00
conf Add the new sparc64 OFW PCI framework, conditional on options OFW_NEWPCI 2003-07-01 14:52:47 +00:00
contrib This commit was generated by cvs2svn to compensate for changes in r116801, 2003-06-25 06:06:52 +00:00
crypto Use __FBSDID(). 2003-06-10 21:44:29 +00:00
ddb Rename P_THREADED to P_SA. P_SA means a process is using scheduler 2003-06-15 00:31:24 +00:00
dev Add PnP PS/2 id for Dell Latitude X200. 2003-07-01 14:41:16 +00:00
fs XXX Copy workaround from UFS: open device for write access even if 2003-06-29 03:05:59 +00:00
geom Sleep on "-" in our normal state to simplify debugging. 2003-06-18 10:33:09 +00:00
gnu Add the same KASSERT to all VOP_STRATEGY and VOP_SPECSTRATEGY implementations 2003-06-15 18:53:00 +00:00
i4b Use __FBSDID(). 2003-06-11 00:01:05 +00:00
i386 - Export pmap_enter_quick() to the MI VM. This will permit the 2003-06-29 21:20:04 +00:00
ia64 - Export pmap_enter_quick() to the MI VM. This will permit the 2003-06-29 21:20:04 +00:00
isa Add PnP PS/2 id for Dell Latitude X200. 2003-07-01 14:41:16 +00:00
isofs/cd9660 change dev_t to struct cdev * to match ufs. This fixes fstat for cd9660 2003-06-24 22:11:20 +00:00
kern Fix typo. 2003-06-30 10:04:04 +00:00
libkern Use __FBSDID(). 2003-06-11 05:37:42 +00:00
modules nitpicking 2003-06-30 05:25:36 +00:00
net remove old 802.11 support; replaced by new code in sys/net80211 2003-06-28 06:09:39 +00:00
net80211 insure ic_bss always has a "valid" channel; avoids problems where users could 2003-06-29 20:13:38 +00:00
netatalk - Use if_broadcastaddr from struct ifnet rather than relying on 2003-03-21 17:53:16 +00:00
netatm Use __FBSDID(). 2003-06-11 07:22:30 +00:00
netgraph Fix a comment 2003-06-25 20:58:35 +00:00
netinet Remove a stale comment, fix indentation. 2003-06-28 14:23:22 +00:00
netinet6 Do not attempt to access to inp_socket fields if the socket is in the TIME_WAIT 2003-06-17 00:31:30 +00:00
netipsec consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
netipx Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netkey Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netnatm Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netncp Use __FBSDID(). 2003-06-11 05:37:42 +00:00
netsmb Add a f_vnode field to struct file. 2003-06-22 08:41:43 +00:00
nfs Back out M_* changes, per decision of the TRB. 2003-02-19 05:47:46 +00:00
nfsclient Lock the vm object when freeing a page. 2003-06-17 05:17:00 +00:00
nfsserver Fix a bug in nfsrv_read() that caused the replies to certain NFSv3 2003-06-24 19:04:26 +00:00
opencrypto consolidate callback optimization check in one location by adding a flag 2003-06-30 05:09:32 +00:00
pc98 MFi386: revision 1.566. 2003-06-28 12:35:46 +00:00
pccard OLDCARD is OBSOLETE_IN_6. Tag it as such. 2003-06-12 04:46:43 +00:00
pci In order to set the MAC address on RealTek NICs, you must flip WRITECFG 2003-06-29 17:33:33 +00:00
posix4 Use __FBSDID(). 2003-06-11 06:34:30 +00:00
powerpc - Export pmap_enter_quick() to the MI VM. This will permit the 2003-06-29 21:20:04 +00:00
rpc
security Redesign the externalization APIs from the MAC Framework to 2003-06-23 01:26:34 +00:00
sparc64 Add the new sparc64 OFW PCI framework, conditional on options OFW_NEWPCI 2003-07-01 14:52:47 +00:00
sys Bump __FreeBSD_version because the semantics of sigtimedwait and 2003-06-29 15:51:38 +00:00
tools Don't check the state of the vnode interlock if the specification says 2003-06-22 21:20:06 +00:00
ufs Lock the vm object when freeing pages. 2003-06-15 21:50:38 +00:00
vm Modify vm_page_alloc() and vm_page_select_cache() to allow the page that 2003-07-01 07:33:41 +00:00
Makefile Revert exclusion for amd64 that stopped boot/ being built. 2003-06-26 03:52:48 +00:00