Home | History | Annotate | only in /src/sys/arch/prep/pci
History log of /src/sys/arch/prep/pci
RevisionDateAuthorComments
 1.24 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.23 24-Apr-2021  thorpej branches: 1.23.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.22 21-Nov-2020  thorpej branches: 1.22.2;
malloc(9) -> kmem(9)
 1.21 10-Nov-2019  chs branches: 1.21.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.20 01-Jul-2011  dyoung branches: 1.20.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.19 18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.18 17-Dec-2008  cegger branches: 1.18.12;
kill MALLOC and FREE macros.
 1.17 28-Apr-2008  martin branches: 1.17.8;
Remove clause 3 and 4 from TNF licenses
 1.16 17-Oct-2007  garbled branches: 1.16.16; 1.16.18; 1.16.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.15 04-Mar-2007  christos branches: 1.15.2; 1.15.10; 1.15.18; 1.15.20; 1.15.22; 1.15.24;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.14 09-May-2006  garbled branches: 1.14.14;
More KNF. That should be the rest of the .c files.
 1.13 12-Apr-2006  jmmv Add an extra cookie to the ioctl and mmap wsdisplay accessops that points
to the screen on which they are being called. The driver cannot guess
this by itself but it is needed to implement, at least, the getwschar and
putwschar functions in the correct place. There are no functional changes
yet.

Tested on i386 (vga, vga_raster, machfb, vesafb), macppc and sparc64.
Suggested and reviewed by macallan@.
 1.12 11-Dec-2005  christos branches: 1.12.4; 1.12.6; 1.12.8; 1.12.10; 1.12.12;
merge ktrace-lwp.
 1.11 23-Apr-2004  itojun branches: 1.11.12;
pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.10 13-Nov-2003  chs eliminate uvm_useracc() in favor of checking the return value of
copyin() or copyout().

uvm_useracc() tells us whether the mapping permissions allow access to
the desired part of an address space, and many callers assume that
this is the same as knowing whether an attempt to access that part of
the address space will succeed. however, access to user space can
fail for reasons other than insufficient permission, most notably that
paging in any non-resident data can fail due to i/o errors. most of
the callers of uvm_useracc() make the above incorrect assumption. the
rest are all misguided optimizations, which optimize for the case
where an operation will fail. we'd rather optimize for operations
succeeding, in which case we should just attempt the access and handle
failures due to insufficient permissions the same way we handle i/o
errors. since there appear to be no good uses of uvm_useracc(), we'll
just remove it.
 1.9 15-Jul-2003  lukem __KERNEL_RCSID()
 1.8 02-Oct-2002  thorpej branches: 1.8.6;
Add trailing ; to CFATTACH_DECL.
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 04-Jul-2002  junyoung alloc_attr -> allocattr

Approved by Matthias Drochner.
 1.4 17-Mar-2002  atatat branches: 1.4.4;
Convert ioctl code to use EPASSTHROUGH instead of -1 or ENOTTY for
indicating an unhandled "command". ERESTART is -1, which can lead to
confusion. ERESTART has been moved to -3 and EPASSTHROUGH has been
placed at -4. No ioctl code should now return -1 anywhere. The
ioctl() system call is now properly restartable.
 1.3 24-Feb-2002  kleink In order to support both indirect PCI configuration space access as well
as direct-mapped PCI configuration space access (such as implemented on
the IBM 27-82650 PCI Host Bridge), switch to a function vector based
PCI configuration space access implementation. The appropriate PCI
chipset tag is provided by platform-specific code.
 1.2 02-Dec-2000  matt branches: 1.2.2; 1.2.6; 1.2.10;
Cleanup/fixup gten support. Add TNF copyright (opps). This now outputs
text correctly. There is no colormap support (e.g. the mechanisms are in
place but does yet talk to the hardware).
 1.1 01-Dec-2000  matt Add support for the IBM ThinkPad 820 G10 display (which is a WD90C24A behind
a funky PCI-VLBUS bridge).
 1.2.10.4 18-Oct-2002  nathanw Catch up to -current.
 1.2.10.3 01-Aug-2002  nathanw Catch up to -current.
 1.2.10.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.2.10.1 28-Feb-2002  nathanw Catch up to -current.
 1.2.6.4 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.2.6.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.2.6.2 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.2.6.1 16-Mar-2002  jdolecek Catch up with -current.
 1.2.2.2 08-Dec-2000  bouyer Sync with HEAD.
 1.2.2.1 02-Dec-2000  bouyer file gten.c was added on branch thorpej_scsipi on 2000-12-08 09:30:21 +0000
 1.4.4.1 16-Jul-2002  gehenna catch up with -current.
 1.8.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.8.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.8.6.1 03-Aug-2004  skrll Sync with HEAD
 1.11.12.3 27-Oct-2007  yamt sync with head.
 1.11.12.2 03-Sep-2007  yamt sync with head.
 1.11.12.1 21-Jun-2006  yamt sync with head.
 1.12.12.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.12.10.2 11-May-2006  elad sync with head
 1.12.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.12.8.1 24-May-2006  yamt sync with head.
 1.12.6.2 01-Jun-2006  kardel Sync with head.
 1.12.6.1 22-Apr-2006  simonb Sync with head.
 1.12.4.1 09-Sep-2006  rpaulo sync with head
 1.14.14.1 12-Mar-2007  rmind Sync with HEAD.
 1.15.24.1 25-Oct-2007  bouyer Sync with HEAD.
 1.15.22.1 18-Oct-2007  yamt sync with head.
 1.15.20.1 06-Nov-2007  matt sync with HEAD
 1.15.18.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.15.10.1 10-May-2007  garbled convert printf's to aprint_*.
 1.15.2.1 23-Oct-2007  ad Sync with head.
 1.16.20.2 04-May-2009  yamt sync with head.
 1.16.20.1 16-May-2008  yamt sync with head.
 1.16.18.1 18-May-2008  yamt sync with head.
 1.16.16.2 17-Jan-2009  mjf Sync with HEAD.
 1.16.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.17.8.1 19-Jan-2009  skrll Sync with HEAD.
 1.18.12.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.20.54.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.22.2.1 21-Mar-2021  thorpej Give config_found() the same variadic arguments treatment as
config_search(). This commit only adds the CFARG_EOL sentinel
to the existing config_found() calls. Conversion of config_found_sm_loc()
and config_found_ia() call sites will be in subsequent commits.
 1.23.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.9 19-Oct-2025  thorpej Use {,e}isabus_attach().
 1.8 07-Aug-2021  thorpej Merge thorpej-cfargs2.
 1.7 24-Apr-2021  thorpej branches: 1.7.8;
Merge thorpej-cfargs branch:

Simplify and make extensible the config_search() / config_found() /
config_attach() interfaces: rather than having different variants for
which arguments you want pass along, just have a single call that
takes a variadic list of tag-value arguments.

Adjust all call sites:
- Simplify wherever possible; don't pass along arguments that aren't
actually needed.
- Don't be explicit about what interface attribute is attaching if
the device only has one. (More simplification.)
- Add a config_probe() function to be used in indirect configuiration
situations, making is visibly easier to see when indirect config is
in play, and allowing for future change in semantics. (As of now,
this is just a wrapper around config_match(), but that is an
implementation detail.)

Remove unnecessary or redundant interface attributes where they're not
needed.

There are currently 5 "cfargs" defined:
- CFARG_SUBMATCH (submatch function for direct config)
- CFARG_SEARCH (search function for indirect config)
- CFARG_IATTR (interface attribte)
- CFARG_LOCATORS (locators array)
- CFARG_DEVHANDLE (devhandle_t - wraps OFW, ACPI, etc. handles)

...and a sentinel value CFARG_EOL.

Add some extra sanity checking to ensure that interface attributes
aren't ambiguous.

Use CFARG_DEVHANDLE in MI FDT, OFW, and ACPI code, and macppc and shark
ports to associate those device handles with device_t instance. This
will trickle trough to more places over time (need back-end for pre-OFW
Sun OBP; any others?).
 1.6 01-Jul-2011  dyoung branches: 1.6.68;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.5 18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.4 06-Jun-2011  matt More device_t, cfdata, CFATTACH_DECL_NEW cleanup.
 1.3 28-Apr-2008  martin branches: 1.3.22; 1.3.32;
Remove clause 3 and 4 from TNF licenses
 1.2 17-Oct-2007  garbled branches: 1.2.16; 1.2.18; 1.2.20;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.1 23-Feb-2006  garbled branches: 1.1.2; 1.1.10; 1.1.16; 1.1.22; 1.1.32; 1.1.40; 1.1.50; 1.1.52; 1.1.54; 1.1.56;
Commit support for the IBM Model 7024 E20 and E30. (E30 not tested).

Changes:
Added a pci-EISA bridge device and associated glue to the prep port.
Adapted from i386.
Change pci_intr_fixup_*() to pass the pin argument on all platforms.
Make PCI_NETBSD_CONFIGURE leave the MPIC alone. We map it separately.

7024 kernel was also succ. tested on an IBM 7043, so no regression there.
 1.1.56.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.54.1 18-Oct-2007  yamt sync with head.
 1.1.52.1 06-Nov-2007  matt sync with HEAD
 1.1.50.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.1.40.2 10-May-2007  garbled convert printf's to aprint_*.
 1.1.40.1 01-May-2007  garbled Rename the prep isa io and mem bus space tags to genppc_* to promote
sharing of isa functionality.
 1.1.32.1 23-Oct-2007  ad Sync with head.
 1.1.22.2 09-Sep-2006  rpaulo sync with head
 1.1.22.1 23-Feb-2006  rpaulo file pceb.c was added on branch rpaulo-netinet-merge-pcb on 2006-09-09 02:42:43 +0000
 1.1.16.3 27-Oct-2007  yamt sync with head.
 1.1.16.2 21-Jun-2006  yamt sync with head.
 1.1.16.1 23-Feb-2006  yamt file pceb.c was added on branch yamt-lazymbuf on 2006-06-21 14:55:19 +0000
 1.1.10.2 22-Apr-2006  simonb Sync with head.
 1.1.10.1 23-Feb-2006  simonb file pceb.c was added on branch simonb-timecounters on 2006-04-22 11:37:54 +0000
 1.1.2.2 01-Mar-2006  yamt sync with head.
 1.1.2.1 23-Feb-2006  yamt file pceb.c was added on branch yamt-uio_vmspace on 2006-03-01 09:28:02 +0000
 1.2.20.1 16-May-2008  yamt sync with head.
 1.2.18.1 18-May-2008  yamt sync with head.
 1.2.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.3.32.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.3.22.1 12-Jun-2011  rmind sync with head
 1.6.68.1 02-Apr-2021  thorpej config_found_ia() -> config_found() w/ CFARG_IATTR.
 1.7.8.1 04-Aug-2021  thorpej Adapt to CFARGS().
 1.10 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.9 17-Mar-2006  garbled branches: 1.9.18; 1.9.26; 1.9.36; 1.9.38; 1.9.40; 1.9.42;
ANSIfy more code in prep.
 1.8 11-Dec-2005  christos branches: 1.8.4; 1.8.6; 1.8.8; 1.8.10; 1.8.12;
merge ktrace-lwp.
 1.7 23-Apr-2004  itojun branches: 1.7.12;
pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.6 15-Jul-2003  lukem __KERNEL_RCSID()
 1.5 02-Oct-2002  thorpej branches: 1.5.6;
Add trailing ; to CFATTACH_DECL.
 1.4 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.3 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.2 12-Dec-2001  kleink The MPC105 does not implement the IBM reference implementation's
Equipment Present Register (I/O port 0x080c), so perform L2 cache
detection here.
 1.1 29-Feb-2000  nonaka branches: 1.1.6; 1.1.10; 1.1.14;
Initial import prep port.
 1.1.14.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.14.1 08-Jan-2002  nathanw Catch up to -current.
 1.1.10.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.1.10.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Feb-2000  bouyer file pchb.c was added on branch thorpej_scsipi on 2000-11-20 20:23:04 +0000
 1.5.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.6.1 03-Aug-2004  skrll Sync with HEAD
 1.7.12.2 27-Oct-2007  yamt sync with head.
 1.7.12.1 21-Jun-2006  yamt sync with head.
 1.8.12.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.8.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.8.8.1 01-Apr-2006  yamt sync with head.
 1.8.6.1 22-Apr-2006  simonb Sync with head.
 1.8.4.1 09-Sep-2006  rpaulo sync with head
 1.9.42.1 25-Oct-2007  bouyer Sync with HEAD.
 1.9.40.1 18-Oct-2007  yamt sync with head.
 1.9.38.1 06-Nov-2007  matt sync with HEAD
 1.9.36.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.9.26.1 01-May-2007  garbled Convert prep to use the new generic powerpc PCI stuff. There are
probably a few more things that can be made generic here. Tested on
7248-100.
 1.9.18.1 23-Oct-2007  ad Sync with head.
 1.44 21-Nov-2020  thorpej malloc(9) -> kmem(9)
 1.43 10-Nov-2019  chs branches: 1.43.8;
in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAIT
and remove code to handle failures that can no longer happen.
 1.42 19-Oct-2016  nonaka branches: 1.42.16;
Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.
 1.41 18-Oct-2014  snj branches: 1.41.2; 1.41.4;
src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
 1.40 03-Apr-2014  mrg GCC 4.8 build fixes from John D. Baker
 1.39 26-Mar-2014  christos kill sprintf
 1.38 13-Oct-2011  matt branches: 1.38.2; 1.38.12; 1.38.16;
Init MSI hooks.
 1.37 01-Jul-2011  dyoung #include <sys/bus.h> instead of <machine/bus.h>.
 1.36 30-Jun-2011  matt Modify mapiodev to take a third argument indicating whether the space
should be prefetchable (true) or not (false).
 1.35 22-Jun-2011  matt Add support pci_intr_setattr.
Export non-inline version of pci api for modules (_MODULE is defined).
Fix definition of pc_conf_hook and pc_conf_interrupt.
Switch to using inlines instead of macros.
Switch ibm4xx to use <powerpc/pci_machdep.h>
 1.34 04-Apr-2011  dyoung Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match
predicate passed to pciide_compat_intr_establish() should ever modify
their pci_attach_args argument, so make their pci_attach_args arguments
const and deal with the fallout throughout the kernel.

For the most part, these changes add a 'const' where there was no
'const' before, however, some drivers and MD code used to modify
pci_attach_args. Now those drivers either copy their pci_attach_args
and modify the copy, or refrain from modifying pci_attach_args:

Xen: according to Manuel Bouyer, writing to pci_attach_args in
pci_intr_map() was a leftover from Xen 2. Probably a bug. I
stopped writing it. I have not tested this change.

siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args.
Probably a bug. I use a temporary variable. I have not tested this
change.

slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args.
Probably a bug. Use a local pci_attach_args. I have not tested
this change.

viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the
caller's pci_attach_args. Probably a bug. Make a local copy of the
caller's pci_attach_args and modify the copy. I have not tested
this change.

While I'm here, make pci_mapreg_submap() static.

With these changes in place, I have tested the compilation of these
kernels:

alpha GENERIC
amd64 GENERIC XEN3_DOM0
arc GENERIC
atari HADES MILAN-PCIIDE
bebox GENERIC
cats GENERIC
cobalt GENERIC
evbarm-eb NSLU2
evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX
HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200
KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR
TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425
evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3
evbmips64-el XLSATX
evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266
OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT
hp700 GENERIC
i386 ALL XEN3_DOM0 XEN3_DOMU
ibmnws GENERIC
macppc GENERIC
mvmeppc GENERIC
netwinder GENERIC
ofppc GENERIC
prep GENERIC
sandpoint GENERIC
sgimips GENERIC32_IP2x
sparc GENERIC_SUN4U KRUPS
sparc64 GENERIC

As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels
with or without my patches in place:

### evbmips-el GDIUM

nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop

### evbarm-el MPCSA_GENERIC
src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc'

### ia64 GENERIC

/tmp/genassym.28085/assym.c: In function 'f111':
/tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb'
/tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type

### sgimips GENERIC32_IP3x

crmfb.o: In function `crmfb_attach':
crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid'
crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid'
crmfb.c:(.text+0x234c): undefined reference to `edid_parse'
crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse'
crmfb.c:(.text+0x2354): undefined reference to `edid_print'
crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
 1.33 13-Dec-2010  matt branches: 1.33.2;
Change definition of pc_bus_maxdevs to get a void * instead a pci_chipset_tag_t
to match its use in pci_bus_maxdevs. This makes it the same as pci_conf_read
and pci_conf_write.
Change all struct device * to device_t.
[Obviously nothing ever used the first argument to pc_bus_maxdevs since it
could have never worked because it wasn't being passed a pci_chipset_tag_t.]
 1.32 17-Oct-2007  garbled branches: 1.32.42; 1.32.46;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.31 22-Mar-2007  garbled branches: 1.31.4; 1.31.12; 1.31.14; 1.31.16; 1.31.18;
When we have a non-PReP pci bridge, we need to perform a single swizzle
on the pin, to get us the right pin on the underlying PReP bridge to wire
the interrupt to. Tested with a 4-port fxp card on a 7043-140. Thanks
to simon for helping me get the math right.
 1.30 21-Mar-2007  garbled Add a second check to the prep-pci-intrmap test, to make sure the dictionary
actually contains entries. It is apparently possible to get a non-null,
but empty dictionary back. This seems to happen if you inject a ppb-card
on pci0 when you also have a prep pci1 at a later device function. With
this, my fxp card works in any slot on my 7043-140.
 1.29 20-Mar-2007  garbled The motorola RAVEN is both a pchb and an MPIC. Block out the pci
configuration of it's mem area to keep the PIC available.
 1.28 06-Sep-2006  garbled branches: 1.28.6; 1.28.8; 1.28.12; 1.28.14; 1.28.16;
Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff. This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only. The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
 1.27 09-Jun-2006  garbled branches: 1.27.4;
Completely rework how we look up PCI interrupts on prep:

1) Rather than build an array of the pci->intr mappings, build a proplib
tree.
2) add a SIMPLEQ of device properties to the pci_chipset_tag to hold the
proplib trees of each bus.
3) Move the interrupt routing code from pci_conf_interrupt to pci_map_intr()
4) Deal properly with non-native PCI bridge chips that are not recognized
by the prep firmware, and therefore are not noted in the residual data.

The major win of this restructure is #4. Hopefully I haven't broken
anything. Tested on a 7248-100, 7043-140 and 7024-E20.
 1.26 25-May-2006  garbled Implement partial support for the RS6K PCI Bridge found on 7025-F40
models. This code was made possible by assistance from Cory Bajus.

Add code that asks the PCI bridge what it's config base address is, and
use that when wiring up an indirect bridge type.
Move prep's user segment register to 10, because the 7025's PCI config
address is at 11, where the user segment used to be.
Add a battable entry for 0xbf800000 for machines with RS6K bridges.

There is still probably work left to be done before a 7025-F40 is fully
supported.
 1.25 25-Apr-2006  snj branches: 1.25.2;
s/allready/already/
 1.24 09-Mar-2006  garbled branches: 1.24.2;
Prep super-commit:

1) create new pnpbus psuedo bus. This is a bus layer that reads the PNP
tree from the residual data and allows attachment of devices with the
information given therein. Based loosely on i386/pnpbios.

2) Delete obio bus, as with the pnp bus we no longer need it.

3) Create a number of functions that gather the information needed to set
up the machine from the residual data, rather than hardcoding it in.

4) Create a quirk table for machines that are bizzare enough that the
residual information is not sufficient. (such as the 6015)

5) Using the data gathering routines and the quirk table, delete struct
platform completely from the architecture. Prep is now almost completely
dynamic in figuring out the machine it is running on and setting things
up properly.

6) Add a wdc_pnpbus driver which attaches the wdc controller found on
some 7248's and the 6015. This replaces the now-defunct wdc_obio.

7) delete all the mot_* and ibm_* files, and replace them with a single
ibm_machdep.c which only contains the quirk functions for the 6015 and
the 6050.

8) Modify GENERIC to work with all this stuff.
 1.23 23-Feb-2006  garbled branches: 1.23.2; 1.23.4;
Commit support for the IBM Model 7024 E20 and E30. (E30 not tested).

Changes:
Added a pci-EISA bridge device and associated glue to the prep port.
Adapted from i386.
Change pci_intr_fixup_*() to pass the pin argument on all platforms.
Make PCI_NETBSD_CONFIGURE leave the MPIC alone. We map it separately.

7024 kernel was also succ. tested on an IBM 7043, so no regression there.
 1.22 10-Feb-2006  gdamore PCI_NETBSD_CONFIGURE should allocate (but not map) address space expansion
ROMS by default. Full discussion at
http://mail-index.netbsd.org/tech-kern/2005/12/16/0023.html
Closes PR kern/32467
Reviewed by briggs@
 1.21 11-Dec-2005  christos branches: 1.21.2; 1.21.4; 1.21.6;
merge ktrace-lwp.
 1.20 28-Jun-2005  skrll branches: 1.20.2;
RCSId police.
 1.19 13-Jan-2005  kleink Pass the interrupt swizzle down to the platforms' fixup functions.
N.B. Only using it on the ulmb60xa for now.
 1.18 15-Jul-2003  lukem __KERNEL_RCSID()
 1.17 27-Sep-2002  provos branches: 1.17.6;
remove trailing \n in panic(). approved perry.
 1.16 25-Feb-2002  kleink Declare the id argument to pci_conf_hook(9) as pcireg_t, which is more
appropriate.
 1.15 24-Feb-2002  kleink In order to support both indirect PCI configuration space access as well
as direct-mapped PCI configuration space access (such as implemented on
the IBM 27-82650 PCI Host Bridge), switch to a function vector based
PCI configuration space access implementation. The appropriate PCI
chipset tag is provided by platform-specific code.
 1.14 29-Oct-2001  thorpej branches: 1.14.2;
pci_conf_interrupt() takes bus/dev/pin, not bus/dev/func.
 1.13 20-Jun-2001  nonaka branches: 1.13.2; 1.13.6;
Seprate model depended code. (based on arc 'struct platform')

files.prep:
- add new files entry.

pci_machdep.c:
- use dev/pci/pciconf.c instead of mine for pci io/mem addr/intr fixup.

cpu.c:
- separate code

machdep.c:
- call ident_platform()

mainbus.c:
- call pci_configure_bus(), if defined PCI_NETBSD_CONFIGURE

ibm_machdep.c:
- for IBM PReP generic

ibm_6050.c:
- for IBM Personal Power Series 830/850

ibm_7248.c:
- for IBM RS6000/43P deppendency
 1.12 19-Jun-2001  nonaka Back out last changes.
 1.11 17-Jun-2001  nonaka identified prep model.
 1.10 15-Jun-2001  nonaka Use new common bus.h framework.
 1.9 15-May-2001  lukem delint: don't try & return something from void pci_intr_disestablish()
 1.8 28-Dec-2000  sommerfeld branches: 1.8.2;
Change pci_intr_map to get interrupt source information from a "struct
pci_attach_args *" instead of from four separate parameters which in
all cases were extracted from the same "struct pci_attach_args".

This both simplifies the driver api, and allows for alternate PCI
interrupt mapping schemes, such as one using the tables described in
the Intel Multiprocessor Spec which describe interrupt wirings for
devices behind pci-pci bridges based on the device's location rather
the bridge's location.

Tested on alpha and i386; welcome to 1.5Q
 1.7 27-Nov-2000  matt Rework bus_space to conform the PReP I/O & MEM limits. Add a few debugging
printfs concerning interrupts.
 1.6 29-Jun-2000  mrg branches: 1.6.2;
remove include of <vm/vm.h>. <vm/vm.h> -> <uvm/uvm_extern.h>
 1.5 26-Jun-2000  mrg remove/move more mach vm header files:

<vm/pglist.h> -> <uvm/uvm_pglist.h>
<vm/vm_inherit.h> -> <uvm/uvm_inherit.h>
<vm/vm_kern.h> -> into <uvm/uvm_extern.h>
<vm/vm_object.h> -> nothing
<vm/vm_pager.h> -> into <uvm/uvm_pager.h>

also includes a bunch of <vm/vm_page.h> include removals (due to redudancy
with <vm/vm.h>), and a scattering of other similar headers.
 1.4 21-Jun-2000  nonaka - rewrite enable io/mem space code.
(rewriten by Tim Rightnour <garbled@netbsd.org>, thanks!)
- more fixup pci base address.
 1.3 04-Jun-2000  cgd branches: 1.3.2;
Implement the more flexiable `evcnt' interface as discussed (briefly) on
tech-kern and now documented in evcnt(9).
 1.2 25-Mar-2000  nonaka branches: 1.2.2;
more fixup pci base address
 1.1 29-Feb-2000  nonaka Initial import prep port.
 1.2.2.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.2.1 26-Jun-2000  nonaka pull up rev 1.4

- rewrite enable io/mem space code.
(rewriten by Tim Rightnour <garbled@netbsd.org>, thanks!)
- more fixup pci base address.
 1.6.2.4 05-Jan-2001  bouyer Sync with HEAD
 1.6.2.3 08-Dec-2000  bouyer Sync with HEAD.
 1.6.2.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.6.2.1 29-Jun-2000  bouyer file pci_machdep.c was added on branch thorpej_scsipi on 2000-11-20 20:23:04 +0000
 1.8.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.13.2.3 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.13.2.2 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.14.2.3 18-Oct-2002  nathanw Catch up to -current.
 1.14.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.14.2.1 29-Oct-2001  nathanw file pci_machdep.c was added on branch nathanw_sa on 2002-02-28 04:11:30 +0000
 1.17.6.5 10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.17.6.4 17-Jan-2005  skrll Sync with HEAD.
 1.17.6.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.6.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.6.1 03-Aug-2004  skrll Sync with HEAD
 1.20.2.4 27-Oct-2007  yamt sync with head.
 1.20.2.3 03-Sep-2007  yamt sync with head.
 1.20.2.2 30-Dec-2006  yamt sync with head.
 1.20.2.1 21-Jun-2006  yamt sync with head.
 1.21.6.2 01-Jun-2006  kardel Sync with head.
 1.21.6.1 22-Apr-2006  simonb Sync with head.
 1.21.4.1 09-Sep-2006  rpaulo sync with head
 1.21.2.2 01-Mar-2006  yamt sync with head.
 1.21.2.1 18-Feb-2006  yamt sync with head.
 1.23.4.2 11-May-2006  elad sync with head
 1.23.4.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.23.2.4 14-Sep-2006  yamt sync with head.
 1.23.2.3 26-Jun-2006  yamt sync with head.
 1.23.2.2 24-May-2006  yamt sync with head.
 1.23.2.1 13-Mar-2006  yamt sync with head.
 1.24.2.1 24-May-2006  tron Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
 1.25.2.1 19-Jun-2006  chap Sync with head.
 1.27.4.1 08-Sep-2006  rpaulo Pull up following revision(s) (requested by garbled in ticket #128):
sys/arch/prep/pci/pci_machdep.c: revision 1.28
sys/arch/prep/pci/prep_pciconf_indirect.c: revision 1.8
Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff. This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only. The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
 1.28.16.1 29-Mar-2007  reinoud Pullup to -current
 1.28.14.1 11-Jul-2007  mjf Sync with head.
 1.28.12.2 23-Oct-2007  ad Sync with head.
 1.28.12.1 10-Apr-2007  ad Sync with head.
 1.28.8.1 24-Mar-2007  yamt sync with head.
 1.28.6.3 31-Mar-2007  bouyer Pull up following revision(s) (requested by garbled in ticket #538):
sys/arch/prep/pci/pci_machdep.c: revision 1.31
When we have a non-PReP pci bridge, we need to perform a single swizzle
on the pin, to get us the right pin on the underlying PReP bridge to wire
the interrupt to. Tested with a 4-port fxp card on a 7043-140. Thanks
to simon for helping me get the math right.
 1.28.6.2 31-Mar-2007  bouyer Pull up following revision(s) (requested by garbled in ticket #529):
sys/arch/prep/pci/pci_machdep.c: revision 1.30
Add a second check to the prep-pci-intrmap test, to make sure the dictionary
actually contains entries. It is apparently possible to get a non-null,
but empty dictionary back. This seems to happen if you inject a ppb-card
on pci0 when you also have a prep pci1 at a later device function. With
this, my fxp card works in any slot on my 7043-140.
 1.28.6.1 31-Mar-2007  bouyer Pull up following revision(s) (requested by garbled in ticket #528):
sys/arch/prep/pci/pci_machdep.c: revision 1.29
sys/arch/prep/pnpbus/wdc_pnpbus.c: revision 1.6
Special case the MTX604 and other RAVEN based machines to not attach
wdc@pnpbus.
The motorola RAVEN is both a pchb and an MPIC. Block out the pci
configuration of it's mem area to keep the PIC available.
 1.31.18.1 25-Oct-2007  bouyer Sync with HEAD.
 1.31.16.1 18-Oct-2007  yamt sync with head.
 1.31.14.1 06-Nov-2007  matt sync with HEAD
 1.31.12.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.31.4.4 10-May-2007  garbled convert printf's to aprint_*.
 1.31.4.3 09-May-2007  garbled Convert pmppc to generic pci. Also fix the prototype for
pci_conf_interrupt while I'm here.
 1.31.4.2 01-May-2007  garbled change prep_pct to genppc_pct to share better
 1.31.4.1 01-May-2007  garbled Convert prep to use the new generic powerpc PCI stuff. There are
probably a few more things that can be made generic here. Tested on
7248-100.
 1.32.46.1 07-Jan-2011  matt Change bus_maxdevs to be passed pc->pc_conf_v instead pc (e.g. like the
rest of the conf calls).
 1.32.42.2 21-Apr-2011  rmind sync with head
 1.32.42.1 05-Mar-2011  rmind sync with head
 1.33.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.38.16.1 18-May-2014  rmind sync with head
 1.38.12.2 03-Dec-2017  jdolecek update from HEAD
 1.38.12.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.38.2.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.41.4.1 04-Nov-2016  pgoyette Sync with HEAD
 1.41.2.1 05-Dec-2016  skrll Sync with HEAD
 1.42.16.1 13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.43.8.1 14-Dec-2020  thorpej Sync w/ HEAD.
 1.21 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.20 26-Apr-2007  garbled branches: 1.20.2; 1.20.10; 1.20.12; 1.20.14; 1.20.16;
Rather than use the residual data to guess that we have a raven pchb,
note the raven pchb in device_register, and then look that up when
attaching the pcib.
 1.19 26-Apr-2007  garbled Add special code to properly detect a W83C553 pcib sitting on a RAVEN
based machine. When we do, we have to frob a few special bits on the
pcib to finish the setup that the prom didn't bother completing for us.
With this change, NetBSD finally runs on the MTX604 board.. Many thanks
to John Baker for providing remote access to the machine, and rebooting
it repeatedly for me.
 1.18 01-Sep-2006  garbled branches: 1.18.6; 1.18.8; 1.18.12; 1.18.14;
Fix a horrible bug in how we initialize the 8259 interrupt controller.
The bug displayed itself by locking up console output on a 7043-140
following a powercycle. This may also have been the cause of bogus
interrupts on motorola class machines.
 1.17 21-Jun-2006  garbled branches: 1.17.2;
Attach the pnpbus prior to attaching the pci bus on the prep. This
should allow us to probe for both pnp-attached devices and isa-attached
devices while preferring the pnpbus attachment point.
 1.16 17-Mar-2006  garbled branches: 1.16.4;
ANSIfy more code in prep.
 1.15 09-Mar-2006  garbled branches: 1.15.2;
Prep super-commit:

1) create new pnpbus psuedo bus. This is a bus layer that reads the PNP
tree from the residual data and allows attachment of devices with the
information given therein. Based loosely on i386/pnpbios.

2) Delete obio bus, as with the pnp bus we no longer need it.

3) Create a number of functions that gather the information needed to set
up the machine from the residual data, rather than hardcoding it in.

4) Create a quirk table for machines that are bizzare enough that the
residual information is not sufficient. (such as the 6015)

5) Using the data gathering routines and the quirk table, delete struct
platform completely from the architecture. Prep is now almost completely
dynamic in figuring out the machine it is running on and setting things
up properly.

6) Add a wdc_pnpbus driver which attaches the wdc controller found on
some 7248's and the 6015. This replaces the now-defunct wdc_obio.

7) delete all the mot_* and ibm_* files, and replace them with a single
ibm_machdep.c which only contains the quirk functions for the 6015 and
the 6050.

8) Modify GENERIC to work with all this stuff.
 1.14 11-Dec-2005  christos branches: 1.14.4; 1.14.6; 1.14.8; 1.14.10;
merge ktrace-lwp.
 1.13 30-Aug-2004  drochner branches: 1.13.12;
Phase out the use of a string as first "attach args" member to control
which bustype should be attached with a specific call to config_found()
(from a "mainbus" or a bus bridge).
Do it for isa/eisa/mca and pci/agp for now. These buses all attach to
an mi interface attribute "isabus", "eisabus" etc., and the autoconf
framework now allows to specify an interface attribute on config_found()
and config_search(), which limits the search of matching config data
to these which attach to that specific attribute.
So we basically have to call config_found_ia(..., "foobus", ...) where
such a bus is attached.
As a consequence, where a "mainbus" or alike also attaches other
devices (eg CPUs) which do not attach to a specific attribute yet,
we need at least pass an attribute name (different from "foobus") so
that the foo bus is not found at these places. This made some minor
changes necessary which are not obviously related to the mentioned buses.
 1.12 23-Apr-2004  itojun pass string length (= boundary info) to pci_devinfo so that we do not run over
the end of memory region
 1.11 15-Jul-2003  lukem __KERNEL_RCSID()
 1.10 16-Jan-2003  matt branches: 1.10.2;
Add platform support for the IBM PPS Model 6040 (E) (aka ThinkPad 820).
 1.9 01-Jan-2003  thorpej Use aprint_normal() for cfprint routines.
 1.8 02-Oct-2002  thorpej Add trailing ; to CFATTACH_DECL.
 1.7 01-Oct-2002  thorpej Use CFATTACH_DECL().
 1.6 27-Sep-2002  thorpej Declare all cfattach structures const.
 1.5 22-Jul-2001  wiz branches: 1.5.6;
bcopy -> memcpy, bzero -> memset
 1.4 15-Jun-2001  nonaka branches: 1.4.2;
Use new common bus.h framework.
 1.3 22-Dec-2000  tsutsui branches: 1.3.2;
Add missing printf args.
 1.2 27-Nov-2000  matt Rework bus_space to conform the PReP I/O & MEM limits. Add a few debugging
printfs concerning interrupts.
 1.1 29-Feb-2000  nonaka branches: 1.1.6;
Initial import prep port.
 1.1.6.4 05-Jan-2001  bouyer Sync with HEAD
 1.1.6.3 08-Dec-2000  bouyer Sync with HEAD.
 1.1.6.2 20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.1.6.1 29-Feb-2000  bouyer file pcib.c was added on branch thorpej_scsipi on 2000-11-20 20:23:04 +0000
 1.3.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.4.2.2 10-Oct-2002  jdolecek sync kqueue with -current; this includes merge of gehenna-devsw branch,
merge of i386 MP branch, and part of autoconf rototil work
 1.4.2.1 03-Aug-2001  lukem update to -current
 1.5.6.4 17-Jan-2003  thorpej Sync with HEAD.
 1.5.6.3 03-Jan-2003  thorpej Sync with HEAD.
 1.5.6.2 18-Oct-2002  nathanw Catch up to -current.
 1.5.6.1 22-Jul-2001  nathanw file pcib.c was added on branch nathanw_sa on 2002-10-18 02:39:35 +0000
 1.10.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.10.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.10.2.2 03-Sep-2004  skrll Sync with HEAD
 1.10.2.1 03-Aug-2004  skrll Sync with HEAD
 1.13.12.4 27-Oct-2007  yamt sync with head.
 1.13.12.3 03-Sep-2007  yamt sync with head.
 1.13.12.2 30-Dec-2006  yamt sync with head.
 1.13.12.1 21-Jun-2006  yamt sync with head.
 1.14.10.1 19-Apr-2006  elad sync with head - hopefully this will work
 1.14.8.4 03-Sep-2006  yamt sync with head.
 1.14.8.3 26-Jun-2006  yamt sync with head.
 1.14.8.2 01-Apr-2006  yamt sync with head.
 1.14.8.1 13-Mar-2006  yamt sync with head.
 1.14.6.1 22-Apr-2006  simonb Sync with head.
 1.14.4.1 09-Sep-2006  rpaulo sync with head
 1.15.2.1 28-Mar-2006  tron Merge 2006-03-28 NetBSD-current into the "peter-altq" branch.
 1.16.4.1 13-Jul-2006  gdamore Merge from HEAD.
 1.17.2.1 02-Sep-2006  riz Pull up following revision(s) (requested by garbled in ticket #93):
sys/arch/prep/pci/pcib.c: revision 1.18
sys/arch/prep/prep/mainbus.c: revision 1.25
Fix a horrible bug in how we initialize the 8259 interrupt controller.
The bug displayed itself by locking up console output on a 7043-140
following a powercycle. This may also have been the cause of bogus
interrupts on motorola class machines.
 1.18.14.1 11-Jul-2007  mjf Sync with head.
 1.18.12.2 23-Oct-2007  ad Sync with head.
 1.18.12.1 27-May-2007  ad Sync with head.
 1.18.8.1 07-May-2007  yamt sync with head.
 1.18.6.1 28-Apr-2007  bouyer Pull up following revision(s) (requested by garbled in ticket #591):
sys/arch/prep/pci/pcib.c: revision 1.19
Add special code to properly detect a W83C553 pcib sitting on a RAVEN
based machine. When we do, we have to frob a few special bits on the
pcib to finish the setup that the prom didn't bother completing for us.
With this change, NetBSD finally runs on the MTX604 board.. Many thanks
to John Baker for providing remote access to the machine, and rebooting
it repeatedly for me.
 1.20.16.1 25-Oct-2007  bouyer Sync with HEAD.
 1.20.14.1 18-Oct-2007  yamt sync with head.
 1.20.12.1 06-Nov-2007  matt sync with HEAD
 1.20.10.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.20.2.6 02-May-2007  garbled prep now uses the shared copies of isadma_machdep.c and pcib.c
 1.20.2.5 02-May-2007  garbled Commonize some more of this code to prepare for sharing
 1.20.2.4 01-May-2007  garbled Rename the prep isa io and mem bus space tags to genppc_* to promote
sharing of isa functionality.
 1.20.2.3 01-May-2007  garbled Change some isa things around in the prep port to promote sharing of isa
 1.20.2.2 01-May-2007  garbled change prep_pct to genppc_pct to share better
 1.20.2.1 01-May-2007  garbled Convert prep to use the new generic powerpc PCI stuff. There are
probably a few more things that can be made generic here. Tested on
7248-100.
 1.10 19-Oct-2016  nonaka Added MSI/MSI-X and interrupt_distribute(9) support for powerpc.
 1.9 02-Oct-2015  msaitoh branches: 1.9.2;
PCI Extended Configuration stuff written by nonaka@:
- Add PCI Extended Configuration Space support into x86.
- Check register offset of pci_conf_read() in MD part. It returns (pcireg_t)-1
if it isn't accessible.
- Decode Extended Capability in PCI Extended Configuration Space.
Currently the following extended capabilities are decoded:
- Advanced Error Reporting
- Virtual Channel
- Device Serial Number
- Power Budgeting
- Root Complex Link Declaration
- Root Complex Event Collector Association
- Access Control Services
- Alternative Routing-ID Interpretation
- Address Translation Services
- Single Root IO Virtualization
- Page Request
- TPH Requester
- Latency Tolerance Reporting
- Secondary PCI Express
- Process Address Space ID
- LN Requester
- L1 PM Substates
The following extended capabilities are not decoded yet:
- Root Complex Internal Link Control
- Multi-Function Virtual Channel
- RCRB Header
- Vendor Unique
- Configuration Access Correction
- Multiple Root IO Virtualization
- Multicast
- Resizable BAR
- Dynamic Power Allocation
- Protocol Multiplexing
- Downstream Port Containment
- Precision Time Management
- M-PCIe
- Function Reading Status Queueing
- Readiness Time Reporting
- Designated Vendor-Specific
 1.8 01-Jul-2011  dyoung branches: 1.8.12; 1.8.30;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.7 18-Jun-2011  matt struct device * -> device_t
struct cfdata * -> cfdata_t
use device accessors, use device_private.
some softc/device_t splits (macppc needs a bunch more)
aprint*_dev used considerably more
 1.6 17-Oct-2007  garbled branches: 1.6.52;
Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.5 09-Jun-2006  garbled branches: 1.5.16; 1.5.24; 1.5.34; 1.5.36; 1.5.38; 1.5.40;
Completely rework how we look up PCI interrupts on prep:

1) Rather than build an array of the pci->intr mappings, build a proplib
tree.
2) add a SIMPLEQ of device properties to the pci_chipset_tag to hold the
proplib trees of each bus.
3) Move the interrupt routing code from pci_conf_interrupt to pci_map_intr()
4) Deal properly with non-native PCI bridge chips that are not recognized
by the prep firmware, and therefore are not noted in the residual data.

The major win of this restructure is #4. Hopefully I haven't broken
anything. Tested on a 7248-100, 7043-140 and 7024-E20.
 1.4 11-Dec-2005  christos branches: 1.4.4; 1.4.8; 1.4.14;
merge ktrace-lwp.
 1.3 15-Jul-2003  lukem branches: 1.3.16;
__KERNEL_RCSID()
 1.2 18-Mar-2003  matt branches: 1.2.2;
Switch/adapt to new bus space infrastructure.
 1.1 24-Feb-2002  kleink branches: 1.1.2; 1.1.8;
In order to support both indirect PCI configuration space access as well
as direct-mapped PCI configuration space access (such as implemented on
the IBM 27-82650 PCI Host Bridge), switch to a function vector based
PCI configuration space access implementation. The appropriate PCI
chipset tag is provided by platform-specific code.
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file prep_pciconf_direct.c was added on branch kqueue on 2002-03-16 15:59:23 +0000
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file prep_pciconf_direct.c was added on branch nathanw_sa on 2002-02-28 04:11:30 +0000
 1.2.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.2.1 03-Aug-2004  skrll Sync with HEAD
 1.3.16.2 27-Oct-2007  yamt sync with head.
 1.3.16.1 21-Jun-2006  yamt sync with head.
 1.4.14.1 19-Jun-2006  chap Sync with head.
 1.4.8.1 26-Jun-2006  yamt sync with head.
 1.4.4.1 09-Sep-2006  rpaulo sync with head
 1.5.40.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.38.1 18-Oct-2007  yamt sync with head.
 1.5.36.1 06-Nov-2007  matt sync with HEAD
 1.5.34.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.5.24.2 10-May-2007  garbled convert printf's to aprint_*.
 1.5.24.1 01-May-2007  garbled Convert prep to use the new generic powerpc PCI stuff. There are
probably a few more things that can be made generic here. Tested on
7248-100.
 1.5.16.1 23-Oct-2007  ad Sync with head.
 1.6.52.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.8.30.2 05-Dec-2016  skrll Sync with HEAD
 1.8.30.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.8.12.1 03-Dec-2017  jdolecek update from HEAD
 1.9.2.1 04-Nov-2016  pgoyette Sync with HEAD
 1.9 17-Oct-2007  garbled Merge the ppcoea-renovation branch to HEAD.

This branch was a major cleanup and rototill of many of the various OEA
cpu based PPC ports that focused on sharing as much code as possible
between the various ports to eliminate near-identical copies of files in
every tree. Additionally there is a new PIC system that unifies the
interface to interrupt code for all different OEA ppc arches. The work
for this branch was done by a variety of people, too long to list here.

TODO:
bebox still needs work to complete the transition to -renovation.
ofppc still needs a bunch of work, which I will be looking at.
ev64260 still needs to be renovated
amigappc was not attempted.

NOTES:
pmppc was removed as an arch, and moved to a evbppc target.
 1.8 06-Sep-2006  garbled branches: 1.8.12; 1.8.20; 1.8.30; 1.8.32; 1.8.34; 1.8.36;
Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff. This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only. The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
 1.7 09-Jun-2006  garbled branches: 1.7.4;
Completely rework how we look up PCI interrupts on prep:

1) Rather than build an array of the pci->intr mappings, build a proplib
tree.
2) add a SIMPLEQ of device properties to the pci_chipset_tag to hold the
proplib trees of each bus.
3) Move the interrupt routing code from pci_conf_interrupt to pci_map_intr()
4) Deal properly with non-native PCI bridge chips that are not recognized
by the prep firmware, and therefore are not noted in the residual data.

The major win of this restructure is #4. Hopefully I haven't broken
anything. Tested on a 7248-100, 7043-140 and 7024-E20.
 1.6 25-May-2006  garbled Implement partial support for the RS6K PCI Bridge found on 7025-F40
models. This code was made possible by assistance from Cory Bajus.

Add code that asks the PCI bridge what it's config base address is, and
use that when wiring up an indirect bridge type.
Move prep's user segment register to 10, because the 7025's PCI config
address is at 11, where the user segment used to be.
Add a battable entry for 0xbf800000 for machines with RS6K bridges.

There is still probably work left to be done before a 7025-F40 is fully
supported.
 1.5 11-Dec-2005  christos branches: 1.5.4; 1.5.6; 1.5.8; 1.5.14;
merge ktrace-lwp.
 1.4 15-Jul-2003  lukem branches: 1.4.16;
__KERNEL_RCSID()
 1.3 05-Apr-2003  tsutsui branches: 1.3.2;
Include <machine/pio.h> for in32rb() and out32rb().
 1.2 30-May-2002  nonaka Support IBM RS/6000 43P 7043-140.
 1.1 24-Feb-2002  kleink branches: 1.1.2; 1.1.8; 1.1.12;
In order to support both indirect PCI configuration space access as well
as direct-mapped PCI configuration space access (such as implemented on
the IBM 27-82650 PCI Host Bridge), switch to a function vector based
PCI configuration space access implementation. The appropriate PCI
chipset tag is provided by platform-specific code.
 1.1.12.1 15-Jul-2002  gehenna catch up with -current.
 1.1.8.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.8.2 16-Mar-2002  jdolecek Catch up with -current.
 1.1.8.1 24-Feb-2002  jdolecek file prep_pciconf_indirect.c was added on branch kqueue on 2002-03-16 15:59:23 +0000
 1.1.2.3 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.2 28-Feb-2002  nathanw Catch up to -current.
 1.1.2.1 24-Feb-2002  nathanw file prep_pciconf_indirect.c was added on branch nathanw_sa on 2002-02-28 04:11:30 +0000
 1.3.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1 03-Aug-2004  skrll Sync with HEAD
 1.4.16.3 27-Oct-2007  yamt sync with head.
 1.4.16.2 30-Dec-2006  yamt sync with head.
 1.4.16.1 21-Jun-2006  yamt sync with head.
 1.5.14.1 19-Jun-2006  chap Sync with head.
 1.5.8.2 14-Sep-2006  yamt sync with head.
 1.5.8.1 26-Jun-2006  yamt sync with head.
 1.5.6.1 01-Jun-2006  kardel Sync with head.
 1.5.4.1 09-Sep-2006  rpaulo sync with head
 1.7.4.1 08-Sep-2006  rpaulo Pull up following revision(s) (requested by garbled in ticket #128):
sys/arch/prep/pci/pci_machdep.c: revision 1.28
sys/arch/prep/pci/prep_pciconf_indirect.c: revision 1.8
Add preliminary support for the 7025-F40. The MPIC must not be wired up
by the initial PCI_NETBSD_CONFIGURE, nor should it be manually wired by
the indirect stuff. This is all taken care of by the prep_init() function.
7025-F40 support supports the primary pci bus only. The second PCI bus
on the machine is still unsupported, but the machine runs and can access
everything except for the two slots the other bus covers.
 1.8.36.1 25-Oct-2007  bouyer Sync with HEAD.
 1.8.34.1 18-Oct-2007  yamt sync with head.
 1.8.32.1 06-Nov-2007  matt sync with HEAD
 1.8.30.1 26-Oct-2007  joerg Sync with HEAD.

Follow the merge of pmap.c on i386 and amd64 and move
pmap_init_tmp_pgtbl into arch/x86/x86/pmap.c. Modify the ACPI wakeup
code to restore CR4 before jumping back into kernel space as the large
page option might cover that.
 1.8.20.1 01-May-2007  garbled Convert prep to use the new generic powerpc PCI stuff. There are
probably a few more things that can be made generic here. Tested on
7248-100.
 1.8.12.1 23-Oct-2007  ad Sync with head.

RSS XML Feed