Home | History | Annotate | only in /src/sys/arch/ofppc/include
History log of /src/sys/arch/ofppc/include
RevisionDateAuthorComments
 1.22 21-Dec-2015  christos Add mips fenv.h (From FreeBSD)
 1.21 23-Jul-2014  alnsn branches: 1.21.4;
Rename sljitarch.h to sljit_machdep.h.
 1.20 17-Nov-2013  alnsn branches: 1.20.2;
Enable sljit and bpfjit on powerpc.
 1.19 11-Dec-2005  christos branches: 1.19.112; 1.19.122; 1.19.128;
merge ktrace-lwp.
 1.18 20-Oct-2003  matt Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 1.17 18-Jan-2003  thorpej branches: 1.17.2;
Merge the nathanw_sa branch.
 1.16 26-Nov-2002  lukem Remove KDIR=, since SYS_INCLUDE=symlinks and KDIR are not supported any more.
 1.15 21-Sep-2002  chs don't install a couple headers that are of no use in userland.
 1.14 07-Aug-2002  briggs Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.13 24-Oct-2001  thorpej branches: 1.13.2; 1.13.10;
Need to install intr.h.
 1.12 03-May-2001  soren branches: 1.12.2; 1.12.6;
PPC machine type tags haven't been used for a while.
 1.11 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.10 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.9 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
Tidy Makefiles up a little.
 1.8 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.7 26-Jun-2000  kleink branches: 1.7.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.6 29-Apr-2000  thorpej Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 1.5 17-Mar-2000  tron Install "machineendian_machdep.h".
 1.4 23-Dec-1999  kleink C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 1.3 15-Jan-1999  bouyer branches: 1.3.8;
Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.2 04-Dec-1998  sakamoto Not used.
 1.1 12-Jun-1998  cgd Rework the way kernel include files are installed. In the new method,
as with user-land programs, include files are installed by each directory
in the tree that has includes to install. (This allows more flexibility
as to what gets installed, makes 'partial installs' easier, and gives us
more options as to which machines' includes get installed at any given
time.) The old SYS_INCLUDES={symlinks,copies} behaviours are _both_
still supported, though at least one bug in the 'symlinks' case is
fixed by this change. Include files can't be build before installation,
so directories that have includes as targets (e.g. dev/pci) have to move
those targets into a different Makefile.
 1.3.8.2 21-Apr-2001  bouyer Sync with HEAD
 1.3.8.1 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.7.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.12.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.12.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.12.2.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.12.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.10.1 31-Aug-2002  gehenna catch up with -current.
 1.13.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.13.2.4 18-Oct-2002  nathanw Catch up to -current.
 1.13.2.3 13-Aug-2002  nathanw Catch up to -current.
 1.13.2.2 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.13.2.1 24-Oct-2001  briggs file Makefile was added on branch nathanw_sa on 2001-11-05 19:46:14 +0000
 1.17.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.17.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.17.2.1 03-Aug-2004  skrll Sync with HEAD
 1.19.128.1 18-May-2014  rmind sync with head
 1.19.122.2 03-Dec-2017  jdolecek update from HEAD
 1.19.122.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.19.112.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.20.2.1 10-Aug-2014  tls Rebase.
 1.21.4.1 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.3 05-Jun-2011  matt Remove <machine/atomic.h>; use <sys/atomic.h> instead.
Add <powerpc/cpuset.h> (for mpc85xx pmap).
Add some initial MP code for mpc85xx
Rework ipi code to be common across all ppcs
Change PPC to keep curlwp in %r13 while in the kernel.
Move astpending from cpu_info to mdlwp
Improve cpu_need_resched to be more MP friendly.
 1.2 11-Dec-2005  christos branches: 1.2.100; 1.2.106; 1.2.110;
merge ktrace-lwp.
 1.1 20-Oct-2003  matt branches: 1.1.4;
Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 1.1.4.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.4.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.4.2 03-Aug-2004  skrll Sync with HEAD
 1.1.4.1 20-Oct-2003  skrll file atomic.h was added on branch ktrace-lwp on 2004-08-03 10:38:40 +0000
 1.2.110.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2.106.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.100.1 12-Jun-2011  rmind sync with head
 1.19 05-Mar-2024  thorpej Move the at-shutdown call to resettodr() from cpu_reboot() to kern_reboot().

It's a small step, but it's a step.
 1.18 27-Feb-2021  thorpej Un-do a bunch of misguided code sharing. It's not really shared if it's
full of platform-specific #ifdefs:
- ofwoea_batinit() is gone; just do what's needed early in macppc / ofppc
initppc() functions.
- Get a bunch of Mac-specific stuff out of ofwoea_initppc().
 1.17 07-Jul-2020  rin branches: 1.17.2;
It turned out that using some Open Firmware routines causes the system
freeze after calling OF_quiesce().

This is why setting color palette crash the system for some Power Mac G5
models, like PowerMac11,2.

Therefore, stop using color-palette and backlight callbacks for genfb(4)
in this case.

Also, postpone OF_quiesce() after rascons_init_rasops(), and initialize
color palette there if OF is going to be quiesced and color depth is 8.

Now, color palette for wscons is initialized correctly for PowerMac11,2.
 1.16 08-Jan-2019  mrg workaround a problem with the pegasos firmware interface:
attempting to use /dev/openfirm on this machine hangs hard.

this isn't a new problem, and i've been meaning to try to
figure it out for years, but it's become a problem since
the xf86-video-radeon driver gained code to look for the
macppc model using this interface.

this is why xorg-server 1.18 and 1.20 hang recently on the
pegasosII.


this change is fairly ugly but i couldn't think of a less
ugly method to avoid /dev/openfirm working just on this
one platform. introduce new __OPENFIRMIO_OPEN_CHECK_BROKEN
macro and associated __openfirmio_open_check_broken(), and
use them in the new openfirmopen() to fail opens.

include proplib.h in macppc and ofppc autoconf.h since they
use it.
 1.15 01-Jul-2011  dyoung branches: 1.15.52; 1.15.54;
#include <sys/bus.h> instead of <machine/bus.h>.
 1.14 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.13 08-Apr-2008  garbled branches: 1.13.36;
SMP support for ofppc. (finally) Much thanks to Matt Thomas for help in
figuring out all the crazy nuances of getting this working, and to
Michael Lorenz for testing/fixing my changes on macppc. Tested with a
quad-proc 7044-270.
Summary of changes:

Bumped CPU_MAXNUM to 16 on ofppc.
Added md_* routines to ofppc/cpu.c, to sync the timebase, and awaken the CPUs.
Fixed a bug in the test for a 64bit bridge cpu early in locore.S
Added code to set the interrupt priority for all CPUs with an openpic.
Change rtas to probe before cpus, to allow use of the rtas freeze/thaw
timebase code routines.
Fix CPU_INFO_FOREACH macro to iterate through detected cpus, not CPU_MAXNUM.
Change most uses of ci_cpuid to ci_index, to deal with CPUs that do not allow
writing to SPR_PIR. Don't write SPR_PIR unless the secondary cpu identifies
itself as 0.
Change the hatchstack/interrupt stack allocations to allocate a 8192byte
interrupt stack, and a 4096 byte hatch stack, align them to 16 bytes, and
allocate them no lower than 0x10000. Allocate them separately to prevent the
hatch stack corrupting the interrupt stack later on.
If the CPU is a 64bit cpu, copy SPR_ASR in cpu_hatch()
Set the idle stack to ci->ci_data.cpu_idlelwp->l_addr->u_pcb.pcb_sp.
Add OF_start_cpu(). Add a routine to ofwoea_initppc to spin up secondary
procs early, and place them into a spinloop waiting for the hatch routines
to be ready.
Modify the ipi routines to deal with openpics that reverse byte order on read
from an ipi register. (such as on the 7044)
Change the rtas setup to allocate the rtas physical base address above
the kernel, to avoid mucking up the hatch/interrupt stacks.
 1.12 11-Feb-2008  garbled branches: 1.12.6;
Use model_init to clean up how we decide the ranges for
PCI_NETBSD_CONFIGURE. Add some code to hopefully better handle the
firepower and powerstackII, based on the OFW dumps from those machines.
Untested on those machines, but doesn't break anything on pegasos/7044.
 1.11 17-Jan-2008  garbled Add support to ofppc for the IBM 7044-270 machine. This is a POWER3-II
based machine. Currently the kernel to run on this machine is
incompatible with the standard GENERIC kernel, so for now, we have a
separate GENERIC_B64. Eventually, I hope to combine the two.

Please note, this is a port of 32bit ofppc, not a powerpc64 port.

Thanks to Matt Thomas and Kevin Bowling for helping to make this port
possible.

Summary of changes:

Change ofwpci to use the ofmethod config for configuring the PCI bus,
rather than indirect configuration.
Move the wiring of the interrupt controllers from at the start of the
boot, into the configuration of the first PCI bus.
Rewrite the map_isa_ioregs() hack to work on a machine without BATs
Fix a ton of bugs in the genofw_find_pics routine, and in the map_space code.
Split the pic_openpic into openpic_common and pic_openpic.
Create a new pic_distopenpic driver, for the distributed openpic found on
some newer IBM machines.
Fix a bad panic in pmap_extract on 64bit bridge mode
 1.10 26-Nov-2007  garbled branches: 1.10.6;
Apply a set of patches from Frank Wille to make the genfb attachment work
better on ofppc. In doing so, we also move a few functions around in
macppc and the generic ofw powerpc stuff to allow better sharing of code.
Also, introduce a model_init function.

move ofb_cons.c from macppc/dev to powerpc/oea and rename it to rascons.
This gets rid of some naming confusion, and makes it OFW-MI rather than
macppc specific.
 1.9 13-Nov-2007  garbled Add code to detect and initialize the com port correctly, so that we have an
actual real console when booting.
 1.8 07-Nov-2007  garbled Convert ofppc to the shared ofw_autoconf.c
 1.7 25-Oct-2007  garbled branches: 1.7.2;
Add a bunch of fixes and minor rewrites to ofppc to bring it closer to
working properly. This is still a work in progress, and all work so far
has been based on the PegasosII machne.

1) Rewrite how the ISA memory and IO space maps are found. More work
will still need to be done in this area.
2) Add a new OFW method of pci configuration. So far I can only get this
to work on the primary PCI bus on the Pegasos. Unsure if this is a
pegasos bug or a code bug.
3) Add the rtas device to ofppc, and add an "rtas_reboot" function to
rtas to allow me to reboot the PegasosII. The rtas driver works, and is
a great start but needs to be changed slightly to allow easier access to
the functions from outside the driver.
4) Fix a number of bugs that existed in the shared PCI code for ofw that
probably weren't tickled by macppc.

There is much much more left to do here, this is all still a work in
progress, but this commit will allow other people to play around with the
code if they want to.
 1.6 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.5 18-Sep-2002  chs branches: 1.5.22; 1.5.64; 1.5.72; 1.5.82; 1.5.84; 1.5.86; 1.5.88;
implement device_register() for ofppc.
use ofcons_cnprobe().
 1.4 05-Jul-2002  matt Peform a rototill over the powerpc-based ports.

Move the trap/vector initialization for MPC6xx ports to mpc6xx_machdep.c
Also move softnet, install_extintr, mapiodev, kvtop. Add common BAT
initialization code.

Add user Altivec support.

Fix calls to OF_call_method in macppc/macppc/machdep.c.

Use ci_fpuproc in cpu_info instead of separate fpuproc.

Add separate syscall.c and defined __HAVE_SYSCALL_INTERN.
 1.3 22-Oct-2001  thorpej branches: 1.3.4; 1.3.12;
Begin the task of splitting up the ofppc port into common code
and platform-specific code, similar to how the Alpha port is
split up.
 1.2 22-Oct-2001  thorpej Fetch the platform name earlier, so we can determine what kind of
system we're running on earlier.
 1.1 26-Aug-2001  matt branches: 1.1.4;
Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.1.4.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.1.4.3 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 26-Aug-2001  thorpej file autoconf.h was added on branch kqueue on 2001-09-13 01:14:12 +0000
 1.3.12.1 16-Jul-2002  gehenna catch up with -current.
 1.3.4.3 18-Oct-2002  nathanw Catch up to -current.
 1.3.4.2 01-Aug-2002  nathanw Catch up to -current.
 1.3.4.1 22-Oct-2001  nathanw file autoconf.h was added on branch nathanw_sa on 2002-08-01 02:42:54 +0000
 1.5.88.3 18-Nov-2007  bouyer Sync with HEAD
 1.5.88.2 13-Nov-2007  bouyer Sync with HEAD
 1.5.88.1 25-Oct-2007  bouyer Sync with HEAD.
 1.5.86.1 18-Oct-2007  yamt sync with head.
 1.5.84.4 23-Mar-2008  matt sync with HEAD
 1.5.84.3 09-Jan-2008  matt sync with HEAD
 1.5.84.2 08-Nov-2007  matt sync with -HEAD
 1.5.84.1 06-Nov-2007  matt sync with HEAD
 1.5.82.5 27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.5.82.4 14-Nov-2007  joerg Sync with HEAD.
 1.5.82.3 11-Nov-2007  joerg Sync with HEAD.
 1.5.82.2 28-Oct-2007  joerg Sync with HEAD.
 1.5.82.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.72.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.5.64.2 03-Dec-2007  ad Sync with HEAD.
 1.5.64.1 23-Oct-2007  ad Sync with head.
 1.5.22.5 27-Feb-2008  yamt sync with head.
 1.5.22.4 21-Jan-2008  yamt sync with head
 1.5.22.3 07-Dec-2007  yamt sync with head
 1.5.22.2 15-Nov-2007  yamt sync with head.
 1.5.22.1 27-Oct-2007  yamt sync with head.
 1.7.2.3 18-Feb-2008  mjf Sync with HEAD.
 1.7.2.2 08-Dec-2007  mjf Sync with HEAD.
 1.7.2.1 19-Nov-2007  mjf Sync with HEAD.
 1.10.6.1 19-Jan-2008  bouyer Sync with HEAD
 1.12.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.13.36.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.15.54.1 10-Jun-2019  christos Sync with HEAD
 1.15.52.1 18-Jan-2019  pgoyette Synch with HEAD
 1.17.2.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 20-Oct-2003  matt Reorganize the way powerpc port install machine specific headers.
Use <powerpc/oea/bat.h> exclusively and remove <machine/bat.h> and
<powerpc/bat.h>. Remove unneeded <machine/cpufunc.h>. To insure
1:1 correspondence of <powerpc/FOO.h> to <machine/FOO.h> include
"../../powerpc/include/Makefile" in "arch/FOO/include/Makefile".
Incororpate <byte_swap.h> into <bswap.h> and then byte_swap.h
 1.1 28-May-1998  sakamoto branches: 1.1.48;
Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1.48.1 03-Aug-2004  skrll Sync with HEAD
 1.2 21-Aug-1999  simonb Include <sys/bswap.h> for function prototypes. i386, pc532 and vax
still include <machine/byte_swap.h> and define macros for some of
the bswap*() functions.
 1.1 15-Jan-1999  bouyer Move the bswap functions from libutil to libc (this bups the
minor of libc and the major of libutil). For little-endian architectures
merge the bnswap() assembly versions with nto* and hton* using symbols
aliasing. Use symbol renaming for the bswap function in this case to avoid
namespace pollution.
Declare bswap* in machine/bswap.h, not machine/endian.h. For little-endian
machines, common code for inline macros go in machine/byte_swap.h
Sync libkern with libc.
Adjust #include in kernel sources for machine/bswap.h.
 1.13 17-Jul-2011  dyoung Enable new-style <sys/bus.h> on several PowerPC ports supporting PCI
buses. Make non-inline implementations of bus_space(9) and bus_dma(9)
routines and move them to appropriate .c files.

This may leave amigappc in a bad state, sorry. Fortunately, it will be
easy to repair by imitating the bus.h -> bus_{defs,funcs}.h split in
some other PowerPC port.
 1.12 04-Nov-2007  garbled Reorder the includes in bus.h to be correct, and add the missing defines for
PHYS_TO_BUS_MEM and BUS_MEM_TO_PHYS. Noticed by Frank Wille.
 1.11 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.10 04-Mar-2007  christos branches: 1.10.2; 1.10.10; 1.10.18; 1.10.20; 1.10.22; 1.10.24;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.9 21-Feb-2007  mrg add a pair of new bus_dma(9) functions:
int _bus_dmatag_subregion(bus_dma_tag_t tag,
bus_addr_t min_addr,
bus_addr_t max_addr,
bus_dma_tag_t *newtag,
int flags)
void _bus_dmatag_destroy(bus_dma_tag_t tag)

that allow a (normally broken/limited) device to restrict the bus address
range it can talk to. this is used by bce(4) to limit DMA addresses to
1GB range, the maximum the chip can address.

all this is from Yorick Hardy <yhardy@uj.ac.za> with input from several
people on tech-kern.

XXX: bus_dma(9) needs an update still.
 1.8 11-Dec-2005  christos branches: 1.8.26;
merge ktrace-lwp.
 1.7 09-Mar-2005  matt branches: 1.7.4;
Add a dm_maxsegsz public member to bus_dmamap_t. This allows a user of the API
to select the maximum segment size for each bus_dmamap_load (up to the maxsegsz
supplied to bus_dmamap_create). dm_maxsegsz is reset to the value supplied to
bus_dmamap_create when the dmamap is unloaded.
 1.6 24-Oct-2003  matt branches: 1.6.8; 1.6.10;
Add _bus_dma_phys_to_bus_mem_generic and _bus_dma_bus_mem_to_phys_generic.
 1.5 23-Jun-2003  aymeric branches: 1.5.2;
s/PHYS_TO_PCI_MEM/PHYS_TO_BUS_MEM/
s/PCI_MEM_TO_PHYS/BUS_MEM_TO_PHYS/
to match generic PPC code

Noticed by Nicolas Ollinger
 1.4 15-Jun-2003  fvdl Handle 64bit DMA addresses on PCI for platforms that can (currently only
enabled on amd64). Add a dmat64 field to various PCI attach structures,
and pass it down where needed. Implement a simple new function called
pci_dma64_available(pa) to test if 64bit DMA addresses may be used.
This returns 1 iff _PCI_HAVE_DMA64 is defined in <machine/pci_machdep.h>,
and there is more than 4G of memory.
 1.3 28-Jan-2003  kent Introduce BUS_DMA_NOCACHE, and bus_dmamem_map() of i386 supports it.
 1.2 16-Sep-2002  chs fix printf format string.
 1.1 29-Oct-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Check in of work-in-progress of Firepower native device support.
We can find devices in PCI configuration space, but not much else.
 1.1.6.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.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 29-Oct-2001  thorpej file bus.h was added on branch kqueue on 2002-01-10 19:47:10 +0000
 1.1.4.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.4.1 29-Oct-2001  thorpej file bus.h was added on branch thorpej-mips-cache on 2001-11-12 21:17:23 +0000
 1.1.2.2 17-Sep-2002  nathanw Catch up to -current.
 1.1.2.1 29-Oct-2001  nathanw file bus.h was added on branch nathanw_sa on 2002-09-17 21:16:50 +0000
 1.5.2.4 01-Apr-2005  skrll Sync with HEAD.
 1.5.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.5.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.5.2.1 03-Aug-2004  skrll Sync with HEAD
 1.6.10.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.6.8.1 29-Apr-2005  kent sync with -current
 1.7.4.4 15-Nov-2007  yamt sync with head.
 1.7.4.3 27-Oct-2007  yamt sync with head.
 1.7.4.2 03-Sep-2007  yamt sync with head.
 1.7.4.1 26-Feb-2007  yamt sync with head.
 1.8.26.2 12-Mar-2007  rmind Sync with HEAD.
 1.8.26.1 27-Feb-2007  yamt - sync with head.
- move sched_changepri back to kern_synch.c as it doesn't know PPQ anymore.
 1.10.24.2 13-Nov-2007  bouyer Sync with HEAD
 1.10.24.1 25-Oct-2007  bouyer Sync with HEAD.
 1.10.22.1 18-Oct-2007  yamt sync with head.
 1.10.20.1 06-Nov-2007  matt sync with HEAD
 1.10.18.2 04-Nov-2007  jmcneill Sync with HEAD.
 1.10.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.10.10.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.10.2.3 03-Dec-2007  ad Sync with HEAD.
 1.10.2.2 03-Dec-2007  ad Sync with HEAD.
 1.10.2.1 23-Oct-2007  ad Sync with head.
 1.1 01-Jul-2011  dyoung Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1 01-Jul-2011  dyoung Per discussion at
<http://mail-index.netbsd.org/tech-kern/2010/04/02/msg007941.html>,
divide each machine's bus.h into bus_defs.h (constants & data types)
and bus_funcs.h (macro implementations of bus_space(9) routines and MD
prototypes).

Note that some bus_space(9) routines' implementation will move to .c
files from inline subroutines or macros in .h files.

I've only made the split for machine architectures where there is PCI.
All of the non-PCI-having architectures will require a similar split.

These #include files are not referenced by any (committed) Makefiles or
header files, yet. Changes to Makefiles, to <sys/bus.h>, and to some
more machine-dependent files will dribble in before I throw the switch.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.24 20-Jun-2011  matt Don't expose port-specific if _MODULE is defined.
Don't _MACHINE_CPU_H_, _<PORT>_CPU_H_
 1.23 08-Apr-2008  garbled branches: 1.23.36;
SMP support for ofppc. (finally) Much thanks to Matt Thomas for help in
figuring out all the crazy nuances of getting this working, and to
Michael Lorenz for testing/fixing my changes on macppc. Tested with a
quad-proc 7044-270.
Summary of changes:

Bumped CPU_MAXNUM to 16 on ofppc.
Added md_* routines to ofppc/cpu.c, to sync the timebase, and awaken the CPUs.
Fixed a bug in the test for a 64bit bridge cpu early in locore.S
Added code to set the interrupt priority for all CPUs with an openpic.
Change rtas to probe before cpus, to allow use of the rtas freeze/thaw
timebase code routines.
Fix CPU_INFO_FOREACH macro to iterate through detected cpus, not CPU_MAXNUM.
Change most uses of ci_cpuid to ci_index, to deal with CPUs that do not allow
writing to SPR_PIR. Don't write SPR_PIR unless the secondary cpu identifies
itself as 0.
Change the hatchstack/interrupt stack allocations to allocate a 8192byte
interrupt stack, and a 4096 byte hatch stack, align them to 16 bytes, and
allocate them no lower than 0x10000. Allocate them separately to prevent the
hatch stack corrupting the interrupt stack later on.
If the CPU is a 64bit cpu, copy SPR_ASR in cpu_hatch()
Set the idle stack to ci->ci_data.cpu_idlelwp->l_addr->u_pcb.pcb_sp.
Add OF_start_cpu(). Add a routine to ofwoea_initppc to spin up secondary
procs early, and place them into a spinloop waiting for the hatch routines
to be ready.
Modify the ipi routines to deal with openpics that reverse byte order on read
from an ipi register. (such as on the 7044)
Change the rtas setup to allocate the rtas physical base address above
the kernel, to avoid mucking up the hatch/interrupt stacks.
 1.22 07-Feb-2008  garbled branches: 1.22.6;
Add some simple code to print out what the OFW thinks the cache
configuration of the machine is. Amusingly, the OFW on the pegasos is
dead wrong.

Bump CPU_MAXNUM to 8, because, thats probably a reasonable number for now.
 1.21 17-Oct-2007  garbled branches: 1.21.2;
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 01-Sep-2007  pavel branches: 1.20.2; 1.20.4;
Put the declaration of cpu_softc and #include of sys/device.h inside
#ifdef _KERNEL to reduce the namespace pollution from proplib which
causes build failure in libexec/ld.elf_so.
 1.19 18-Sep-2002  chs branches: 1.19.22; 1.19.64; 1.19.72; 1.19.78; 1.19.82; 1.19.84;
implement device_register() for ofppc.
use ofcons_cnprobe().
 1.18 22-Oct-2001  thorpej branches: 1.18.4;
Begin the task of splitting up the ofppc port into common code
and platform-specific code, similar to how the Alpha port is
split up.
 1.17 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.16 30-May-2001  mrg branches: 1.16.2;
use _KERNEL_OPT
 1.15 13-Apr-2001  thorpej Remove the use of splimp() from the NetBSD kernel. splnet()
and only splnet() is allowed for the protection of data structures
used by network devices.
 1.14 12-Apr-2001  thorpej splimp -> splvm
 1.13 14-Jan-2001  thorpej branches: 1.13.2;
Make sure everybody has an splvm() and equate it with splimp() (splimp()
is the historical name for this interrupt level, and the historical name
is going to go away in the near future).
 1.12 14-Dec-2000  mycroft Partial syscall cleanup, as per other ports.
 1.11 16-Nov-2000  thorpej Need to provide CACHELINESIZE in _STANDALONE environments, too.
 1.10 25-Aug-2000  thorpej Make need_resched() take a "struct cpu_info *" argument. This
causes gives a primitive form of processor affinity. Its use in
roundrobin() still needs some work.
 1.9 22-Aug-2000  thorpej Add spllock(). See spl(9) for details.
 1.8 21-Aug-2000  thorpej Make sure we provide splsched() as described in spl(9).
 1.7 26-May-2000  thorpej First sweep at scheduler state cleanup. Collect MI scheduler
state into global and per-CPU scheduler state:

- Global state: sched_qs (run queues), sched_whichqs (bitmap
of non-empty run queues), sched_slpque (sleep queues).
NOTE: These may collectively move into a struct schedstate
at some point in the future.

- Per-CPU state, struct schedstate_percpu: spc_runtime
(time process on this CPU started running), spc_flags
(replaces struct proc's p_schedflags), and
spc_curpriority (usrpri of processes on this CPU).

- Every platform must now supply a struct cpu_info and
a curcpu() macro. Simplify existing cpu_info declarations
where appropriate.

- All references to per-CPU scheduler state now made through
curcpu(). NOTE: this will likely be adjusted in the future
after further changes to struct proc are made.

Tested on i386 and Alpha. Changes are mostly mechanical, but apologies
in advance if it doesn't compile on a particular platform.
 1.6 10-Aug-1999  thorpej branches: 1.6.2;
Define cpu_number() as discussed on tech-smp.
 1.5 05-Aug-1999  thorpej Change the semantics of splsoftclock() to be like other spl*() functions,
that is priority is rasied. Add a new spllowersoftclock() to provide the
atomic drop-to-softclock semantics that the old splsoftclock() provided,
and update calls accordingly.

This fixes a problem with using the "rnd" pseudo-device from within
interrupt context to extract random data (e.g. from within the softnet
interrupt) where doing so would incorrectly unblock interrupts (causing
all sorts of lossage).

XXX 4 platforms do not have priority-raising capability: newsmips, sparc,
XXX sparc64, and VAX. This platforms still have this bug until their
XXX spl*() functions are fixed.
 1.4 17-Apr-1999  ws Modify syncicache on PowerPC from an inline to a real function.
Support different cache line sizes with the same object code in userland.
While here, move the function to implementation name space.
 1.3 05-Nov-1997  thorpej branches: 1.3.10;
asm -> __asm__, volatile -> __volatile
 1.2 16-Apr-1997  thorpej branches: 1.2.8;
Definitions for machine_vec interface, from Wolfgang Solfrank.
 1.1 30-Sep-1996  ws PowerPC port
 1.2.8.1 05-Nov-1997  thorpej Update from trunk: asm -> __asm__, volatile -> __volatile
 1.3.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.6.2.5 21-Apr-2001  bouyer Sync with HEAD
 1.6.2.4 18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.6.2.3 05-Jan-2001  bouyer Sync with HEAD
 1.6.2.2 22-Nov-2000  bouyer Sync with HEAD.
 1.6.2.1 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.13.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.16.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.16.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.16.2.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.18.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.18.4.1 22-Oct-2001  nathanw file cpu.h was added on branch nathanw_sa on 2002-10-18 02:39:18 +0000
 1.19.84.2 23-Mar-2008  matt sync with HEAD
 1.19.84.1 06-Nov-2007  matt sync with HEAD
 1.19.82.2 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.19.82.1 03-Sep-2007  jmcneill Sync with HEAD.
 1.19.78.1 03-Sep-2007  skrll Sync with HEAD.
 1.19.72.2 03-Oct-2007  garbled Sync with HEAD
 1.19.72.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.19.64.2 23-Oct-2007  ad Sync with head.
 1.19.64.1 09-Oct-2007  ad Sync with head.
 1.19.22.3 11-Feb-2008  yamt sync with head.
 1.19.22.2 27-Oct-2007  yamt sync with head.
 1.19.22.1 03-Sep-2007  yamt sync with head.
 1.20.4.1 25-Oct-2007  bouyer Sync with HEAD.
 1.20.2.1 18-Oct-2007  yamt sync with head.
 1.21.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.22.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.23.36.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.1 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.2 26-Apr-2011  joerg Remove Darwin, MACH and Mach-O support.
 1.1 08-Dec-2002  manu branches: 1.1.2; 1.1.136; 1.1.142;
A working fork/vfork implementation. Darwin fork differs from our fork by
two ways:
- the child gets its pid as retval[0] (userland stub will turn it into a 0),
retval[1] is 1 and it is 0 in the parent.
- in the child, the fork syscall is successful, hence we must skip the next
instruction.
 1.1.142.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.136.1 31-May-2011  rmind sync with head
 1.1.2.2 11-Dec-2002  thorpej Sync with HEAD.
 1.1.2.1 08-Dec-2002  thorpej file darwin_machdep.h was added on branch nathanw_sa on 2002-12-11 06:11:32 +0000
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.11 02-Feb-2012  phx Fixed writing of MBR disklabel. It was written by disklabel(8) -r directly
into sector 0, corrupting the MBR. Moved to sector 1.
Removed MBR_LABELSECTOR, which is no longer needed.
 1.10 30-Aug-2011  bouyer branches: 1.10.2; 1.10.6;
Add getlabelusesmbr(), as proposed in
http://mail-index.netbsd.org/tech-userlevel/2011/08/25/msg005404.html
This is used by disk tools such as disklabel(8) to dynamically decide is
the undelyling platform uses a disklabel-in-mbr-partition or not
(instead of using a compile-time list of ports).
getlabelusesmbr() reads the sysctl kern.labelusesmbr, takes its value from the
machdep #define LABELUSESMBR.
For evbmips, make LABELUSESMBR 1 if the platform uses pmon
as bootloader, and 0 (the previous value) otherwise.
 1.9 31-Dec-2010  phx Support for reading disklabels from RDB partitions in the kernel.
The code will check for a raw disklabel first, then tries to find the
disklabel in an MBR partition and finally constructs it from RDB
partitions.
RDB is probably only needed for the Pegasos platform, so it can be
disabled in the config file (RDB_PART).
 1.8 23-Nov-2009  pooka branches: 1.8.4;
If cpu_disklabel includes struct dkbad, define __HAVE_DISKLABEL_DKBAD.
This allows use of subr_disk_mbr on all archs. Default to it for
the rump disk component. No functional change for regular kernels.
(The other option would've been to include dkbad in disklabels
everywhere, but arguably this approach has less possible side-effects,
especially given that wedges and related magic will take over the
world any second now).
 1.7 17-Oct-2007  garbled branches: 1.7.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.6 10-May-2003  thorpej branches: 1.6.18; 1.6.60; 1.6.68; 1.6.78; 1.6.80; 1.6.82; 1.6.84;
Remove redundant bounds_check_with_label() prototype.
 1.5 27-Jan-1999  thorpej Use <sys/disklabel_mbr.h>
 1.4 07-Jul-1998  thorpej Use fixed-size types.
 1.3 02-Mar-1998  drochner Change MBR partition type for NetBSD to 0xa9, like the i386 port.
Provide compatibility via COMPAT_386BSD_MBRPART.
 1.2 16-Apr-1997  thorpej Don't define two partition types for NetBSD - just use the standard 0xa5.
(Eww, DOS MBR)
 1.1 30-Sep-1996  ws PowerPC port
 1.6.84.1 25-Oct-2007  bouyer Sync with HEAD.
 1.6.82.1 18-Oct-2007  yamt sync with head.
 1.6.80.1 06-Nov-2007  matt sync with HEAD
 1.6.78.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.6.68.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.6.60.1 23-Oct-2007  ad Sync with head.
 1.6.18.1 27-Oct-2007  yamt sync with head.
 1.7.20.1 11-Mar-2010  yamt sync with head
 1.8.4.1 05-Mar-2011  rmind sync with head
 1.10.6.1 18-Feb-2012  mrg merge to -current.
 1.10.2.1 17-Apr-2012  yamt sync with head
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.2 17-Mar-2000  mycroft In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 1.1 28-May-1998  sakamoto branches: 1.1.14;
Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1.14.1 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 17-Mar-2000  mycroft branches: 1.1.6;
In the `MY THAT'S GROSS' department...
Eliminate the recursive include of machine/endian.h from sys/endian.h.
 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 17-Mar-2000  bouyer file endian_machdep.h was added on branch thorpej_scsipi on 2000-11-20 20:18:40 +0000
 1.1 20-Dec-2015  christos branches: 1.1.2; 1.1.18;
new powerpc fenv.h
 1.1.18.2 03-Dec-2017  jdolecek update from HEAD
 1.1.18.1 20-Dec-2015  jdolecek file fenv.h was added on branch tls-maxphys on 2017-12-03 11:36:34 +0000
 1.1.2.2 27-Dec-2015  skrll Sync with HEAD (as of 26th Dec)
 1.1.2.1 20-Dec-2015  skrll file fenv.h was added on branch nick-nhusb on 2015-12-27 12:09:40 +0000
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.4 07-Sep-2015  dholland Final bit of PR 41200: headers that declare ioctls should include sys/ioccom.h.
This covers most if not all of the MD headers.

XXX: a lot of the ioctl definitions in some of these files are cutpasted.
 1.3 08-Feb-2011  rmind branches: 1.3.14; 1.3.32;
Remove clause 3 (UCB advertising clause) from the University of Utah
copyright. Confirmed by Mike Hibler, mike at cs.utah.edu - thanks!
Also, merge UCB and Utah copyright texts back into one, as they
originally were.

Extra verification by snj@.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8; 1.2.48; 1.2.54; 1.2.56;
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 21-Jun-2007  garbled branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file grfioctl.h was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.2.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.2.56.1 17-Feb-2011  bouyer Sync with HEAD
 1.2.54.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2.48.1 05-Mar-2011  rmind sync with head
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file grfioctl.h was added on branch matt-armv6 on 2007-11-06 23:19:57 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file grfioctl.h was added on branch yamt-lazymbuf on 2007-10-27 11:27:26 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file grfioctl.h was added on branch vmlocking on 2007-10-23 20:35:58 +0000
 1.3.32.1 22-Sep-2015  skrll Sync with HEAD
 1.3.14.1 03-Dec-2017  jdolecek update from HEAD
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer constant macros.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 integer constant macros.
 1.1.12.1 14-Apr-2001  kleink file int_const.h was added on branch nathanw_sa on 2001-04-14 22:38:41 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_const.h was added on branch thorpej_scsipi on 2001-04-21 17:54:26 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 integer format conversion macros.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_fmtio.h was added on branch nathanw_sa on 2001-04-15 17:13:16 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_fmtio.h was added on branch thorpej_scsipi on 2001-04-21 17:54:26 +0000
 1.1 15-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 15-Apr-2001  kleink Add definitions of C99 specified-width integer type limits.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 15-Apr-2001  kleink file int_limits.h was added on branch nathanw_sa on 2001-04-15 15:29:11 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 15-Apr-2001  bouyer file int_limits.h was added on branch thorpej_scsipi on 2001-04-21 17:54:26 +0000
 1.1 14-Apr-2001  kleink branches: 1.1.2; 1.1.4; 1.1.12;
Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.2 14-Apr-2001  kleink Add definitions of C99 minimum-width and greatest-width integer types.
XXX Fastest minimum-width integer types haven't been decided upon yet.
 1.1.12.1 14-Apr-2001  kleink file int_mwgwtypes.h was added on branch nathanw_sa on 2001-04-14 12:20:00 +0000
 1.1.4.1 21-Jun-2001  nathanw Catch up to -current.
 1.1.2.2 21-Apr-2001  bouyer Sync with HEAD
 1.1.2.1 14-Apr-2001  bouyer file int_mwgwtypes.h was added on branch thorpej_scsipi on 2001-04-21 17:54:26 +0000
 1.1 26-Jun-2000  kleink branches: 1.1.2;
Add <machine/int_types.h>, which provides namespace-pure definitions
of exact-width integer types.
 1.1.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.1.2.1 26-Jun-2000  bouyer file int_types.h was added on branch thorpej_scsipi on 2000-11-20 20:18:41 +0000
 1.16 17-Jun-2011  matt intr.h must not include cpu due to deadly embrace with SOFTINT_COUNT.
Cleanup intr.h so MD definitions can overload common definitions.
Rototill pic/intr.c. Virtual IRQs can now be reclaimed. separate virq
from hwirq from picirq. Redo intr mask calculations.
tested on pmppc and macppc (MP).
 1.15 05-Jun-2011  matt Remove <machine/atomic.h>; use <sys/atomic.h> instead.
Add <powerpc/cpuset.h> (for mpc85xx pmap).
Add some initial MP code for mpc85xx
Rework ipi code to be common across all ppcs
Change PPC to keep curlwp in %r13 while in the kernel.
Move astpending from cpu_info to mdlwp
Improve cpu_need_resched to be more MP friendly.
 1.14 13-Nov-2010  uebayasi branches: 1.14.2; 1.14.6;
sys/device.h is not suitable for such low-level definitions.
 1.13 24-Apr-2010  kiyohara Support 64-bit imask for powerpc/pic.
 1.12 28-Apr-2008  martin branches: 1.12.20; 1.12.22;
Remove clause 3 and 4 from TNF licenses
 1.11 17-Oct-2007  garbled branches: 1.11.16; 1.11.18; 1.11.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.10 14-Jul-2007  ad branches: 1.10.8; 1.10.10; 1.10.12; 1.10.14;
Generic soft interrupts are mandatory.
 1.9 10-Mar-2007  jmmv branches: 1.9.2; 1.9.10;
Implement support for softintrs.
Reviewed, corrected and tested by aymeric@.
 1.8 16-Feb-2007  ad branches: 1.8.2;
Remove spllowersoftclock() and CLKF_BASEPRI(), and always dispatch callouts
via a soft interrupt. In the near future, softclock will be run from process
context.
 1.7 21-Dec-2006  yamt merge yamt-splraiseipl branch.

- finish implementing splraiseipl (and makeiplcookie).
http://mail-index.NetBSD.org/tech-kern/2006/07/01/0000.html
- complete workqueue(9) and fix its ipl problem, which is reported
to cause audio skipping.
- fix netbt (at least compilation problems) for some ports.
- fix PR/33218.
 1.6 23-Nov-2005  nonaka branches: 1.6.20; 1.6.22;
In decr_intr(), update lasttb only when clock interrupt is not masked.
(sync with macppc/macppc/clock.c: rev.1.11 -> 1.12)
 1.5 03-Sep-2003  matt branches: 1.5.16; 1.5.24;
Move CLKF_BASEPRI to machine specific <intr.h> file since it depends on
the encoding of the spl for the port.
 1.4 16-Jun-2003  thorpej branches: 1.4.2;
Rename IPL_IMP -> IPL_VM.
 1.3 18-Sep-2002  chs fix the ofppc interrupt code to work at all. the previous code was
confusing an IPL number with an IRQ mask. now we do like the x86 code.
 1.2 29-Oct-2001  thorpej branches: 1.2.2; 1.2.6;
Add/rework infrastructure that will allow us to support native
device drivers:
- Various native device entries in cdevsw/bdevsw.
- Rework the interrupt infrastructure to provide more flexibility to
the platform-dependent back-end. Rewrite the "ofwgen" simulated
interrupt routines to reflect the changes.
- Clear out the BAT registers and set the fixed battable entries before
calling the platform init routine. The platform init routine is allowed
to set entries in the battable.
- Don't call the platform cons_init routine until after translation is
enabled -- we might need translation to work in order to access bus
space.
 1.1 26-Aug-2001  matt branches: 1.1.4; 1.1.6;
Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.1.6.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.4.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.1.4.3 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.4.2 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.1.4.1 26-Aug-2001  thorpej file intr.h was added on branch kqueue on 2001-09-13 01:14:12 +0000
 1.2.6.1 17-Mar-2002  thorpej IPL_IMP -> IPL_VM
 1.2.2.2 18-Oct-2002  nathanw Catch up to -current.
 1.2.2.1 29-Oct-2001  nathanw file intr.h was added on branch nathanw_sa on 2002-10-18 02:39:18 +0000
 1.4.2.4 11-Dec-2005  christos Sync with head.
 1.4.2.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.4.2.2 18-Sep-2004  skrll Sync with HEAD.
 1.4.2.1 03-Aug-2004  skrll Sync with HEAD
 1.5.24.1 29-Nov-2005  yamt sync with head.
 1.5.16.5 27-Oct-2007  yamt sync with head.
 1.5.16.4 03-Sep-2007  yamt sync with head.
 1.5.16.3 26-Feb-2007  yamt sync with head.
 1.5.16.2 30-Dec-2006  yamt sync with head.
 1.5.16.1 21-Jun-2006  yamt sync with head.
 1.6.22.2 02-Dec-2006  yamt - revive setsoftnet and setsoftclock which were mistakenly removed
in the previous.
- move splraiseipl/makeiplcookie to a correct #ifdef section.
 1.6.22.1 02-Dec-2006  yamt implement splraiseipl/makeiplcookie for ofppc.
 1.6.20.1 12-Jan-2007  ad Sync with head.
 1.8.2.1 12-Mar-2007  rmind Sync with HEAD.
 1.9.10.2 03-Oct-2007  garbled Sync with HEAD
 1.9.10.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.9.2.2 23-Oct-2007  ad Sync with head.
 1.9.2.1 15-Jul-2007  ad Sync with head.
 1.10.14.1 25-Oct-2007  bouyer Sync with HEAD.
 1.10.12.1 18-Oct-2007  yamt sync with head.
 1.10.10.1 06-Nov-2007  matt sync with HEAD
 1.10.8.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.11.20.2 11-Aug-2010  yamt sync with head.
 1.11.20.1 16-May-2008  yamt sync with head.
 1.11.18.1 18-May-2008  yamt sync with head.
 1.11.16.1 02-Jun-2008  mjf Sync with HEAD.
 1.12.22.3 12-Jun-2011  rmind sync with head
 1.12.22.2 05-Mar-2011  rmind sync with head
 1.12.22.1 30-May-2010  rmind sync with head
 1.12.20.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.14.6.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.14.2.1 06-Jun-2011  jruoho Sync with HEAD.
 1.2 15-Jul-2018  maxv Retire ipkdb entirely. The option was removed from the config files
yesterday.

ok kamil christos
 1.1 28-May-1998  sakamoto branches: 1.1.60; 1.1.238;
Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1.238.1 10-Jun-2019  christos Sync with HEAD
 1.1.60.1 28-Jul-2018  pgoyette Sync with HEAD
 1.2 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.1 30-Sep-1996  ws branches: 1.1.64; 1.1.106; 1.1.114; 1.1.124; 1.1.126; 1.1.128; 1.1.130;
PowerPC port
 1.1.130.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.128.1 18-Oct-2007  yamt sync with head.
 1.1.126.1 06-Nov-2007  matt sync with HEAD
 1.1.124.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.114.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.1.106.1 23-Oct-2007  ad Sync with head.
 1.1.64.1 27-Oct-2007  yamt sync with head.
 1.9 12-Dec-2021  andvar s/Miscellanous/Miscellaneous/ in copypasta comments.
 1.8 18-Oct-2016  jdolecek add isa_intr_establish_xname() to MD isa headers so that it can be used
by MI drivers
 1.7 19-Aug-2009  dyoung branches: 1.7.22; 1.7.40; 1.7.44;
isa_detach_hook() needs two arguments, the first an isa_chipset_tag_t.
 1.6 19-Aug-2009  dyoung Define isa_detach_hook().
 1.5 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.4 17-Jan-2008  garbled branches: 1.4.6; 1.4.8; 1.4.10;
Add support to ofppc for the IBM 7044-270 machine. This is a POWER3-II
based machine. Currently the kernel to run on this machine is
incompatible with the standard GENERIC kernel, so for now, we have a
separate GENERIC_B64. Eventually, I hope to combine the two.

Please note, this is a port of 32bit ofppc, not a powerpc64 port.

Thanks to Matt Thomas and Kevin Bowling for helping to make this port
possible.

Summary of changes:

Change ofwpci to use the ofmethod config for configuring the PCI bus,
rather than indirect configuration.
Move the wiring of the interrupt controllers from at the start of the
boot, into the configuration of the first PCI bus.
Rewrite the map_isa_ioregs() hack to work on a machine without BATs
Fix a ton of bugs in the genofw_find_pics routine, and in the map_space code.
Split the pic_openpic into openpic_common and pic_openpic.
Create a new pic_distopenpic driver, for the distributed openpic found on
some newer IBM machines.
Fix a bad panic in pmap_extract on 64bit bridge mode
 1.3 05-Nov-2007  garbled branches: 1.3.2; 1.3.4; 1.3.10;
Lots of small changes for ofppc:

Remove the ofb driver. I'm not interested in trying to make this work.
It should be replaced with the genfb driver, which I have added,
commented out because that driver needs work before it will function on
ofppc. (it's too panic-happy, and ofppc needs a working autoconf.c)

Change the way we do isa_inb/outb. The new way is a slightly nastier
hack, but won't run afoul of the other isa drivers as much.

Fix ofw_consinit.c to remove the dependency on ofb.
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4;
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 21-Jun-2007  garbled branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file isa_machdep.h was initially added on branch ppcoea-renovation.
 1.1.10.2 13-Nov-2007  bouyer Sync with HEAD
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.2 06-Nov-2007  joerg Sync with HEAD.
 1.1.6.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.2.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.2.4.4 21-Jan-2008  yamt sync with head
 1.2.4.3 15-Nov-2007  yamt sync with head.
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file isa_machdep.h was added on branch yamt-lazymbuf on 2007-10-27 11:27:26 +0000
 1.2.2.3 03-Dec-2007  ad Sync with HEAD.
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file isa_machdep.h was added on branch vmlocking on 2007-10-23 20:35:58 +0000
 1.3.10.1 19-Jan-2008  bouyer Sync with HEAD
 1.3.4.3 23-Mar-2008  matt sync with HEAD
 1.3.4.2 06-Nov-2007  matt sync with HEAD
 1.3.4.1 05-Nov-2007  matt file isa_machdep.h was added on branch matt-armv6 on 2007-11-06 23:19:58 +0000
 1.3.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.4.10.2 19-Aug-2009  yamt sync with head.
 1.4.10.1 16-May-2008  yamt sync with head.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.7.44.1 04-Nov-2016  pgoyette Sync with HEAD
 1.7.40.1 05-Dec-2016  skrll Sync with HEAD
 1.7.22.1 03-Dec-2017  jdolecek update from HEAD
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.6 06-Aug-2014  joerg Consistently define WARN in a way that passes format string checks, i.e.
always uses the same number of arguments as given in the format string.
 1.5 28-Apr-2008  martin branches: 1.5.44; 1.5.60;
Remove clause 3 and 4 from TNF licenses
 1.4 09-Jan-2008  garbled branches: 1.4.6; 1.4.8; 1.4.10;
Changes to the ofppc ofwboot to make it boot on an IBM CHRP RS/6000.
Tested on a pegasos II and a 7044-270. Also, switch away from the hacked
up alloc.c we were using, and use the stock libsa one.
 1.3 25-Jan-2006  christos branches: 1.3.48; 1.3.54; 1.3.62;
free -> dealloc
unsigned -> size_t for alloc/dealloc
 1.2 31-Oct-2001  thorpej branches: 1.2.2; 1.2.4; 1.2.36; 1.2.48;
Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.1 23-Oct-2001  thorpej branches: 1.1.2;
Add machine-dependent defns for libsa's loadfile().
 1.1.2.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.2.48.1 01-Feb-2006  yamt sync with head.
 1.2.36.2 21-Jan-2008  yamt sync with head
 1.2.36.1 21-Jun-2006  yamt sync with head.
 1.2.4.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.2.4.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch kqueue on 2002-01-10 19:47:11 +0000
 1.2.2.2 31-Oct-2001  thorpej Split elf32 vs. elf64 handling in loadfile(), including support for
each separately and explicitly. BOOT_ELF is now BOOT_ELF32 and
BOOT_ELF64, and ELFSIZE should no longer be defined in loadfile_machdep.h.
 1.2.2.1 31-Oct-2001  thorpej file loadfile_machdep.h was added on branch nathanw_sa on 2001-10-31 17:20:49 +0000
 1.3.62.1 10-Jan-2008  bouyer Sync with HEAD
 1.3.54.1 18-Feb-2008  mjf Sync with HEAD.
 1.3.48.1 23-Mar-2008  matt sync with HEAD
 1.4.10.1 16-May-2008  yamt sync with head.
 1.4.8.1 18-May-2008  yamt sync with head.
 1.4.6.1 02-Jun-2008  mjf Sync with HEAD.
 1.5.60.1 10-Aug-2014  tls Rebase.
 1.5.44.1 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1 29-Apr-2000  thorpej branches: 1.1.6;
Require that each each MACHINE/MACHINE_ARCH supply a lock.h. This file
contains the values __SIMPLELOCK_LOCKED and __SIMPLELOCK_UNLOCKED, which
replace the old SIMPLELOCK_LOCKED and SIMPLELOCK_UNLOCKED. These files
are also required to supply inline functions __cpu_simple_lock(),
__cpu_simple_lock_try(), and __cpu_simple_unlock() if locking is to be
supported on that platform (i.e. if MULTIPROCESSOR is defined in the
_KERNEL case). Change these functions to take an int * (&alp->lock_data)
rather than the struct simplelock * itself.

These changes make it possible for userland to use the locking primitives
by including <machine/lock.h>.
 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-Apr-2000  bouyer file lock.h was added on branch thorpej_scsipi on 2000-11-20 20:18:41 +0000
 1.1 30-Nov-2024  christos branches: 1.1.4;
Create a new header lwp_private.h to contain _lwp_getprivate_fast,
_lwp_gettcb_fast, _lwp_settcb and remove them from mcontext.h, so that:
1. we don't need special hacks to hide them
2. we can include <lwp.h> where needed to get the necessary prototypes
without redefining them locally.
 1.1.4.2 02-Aug-2025  perseant Sync with HEAD
 1.1.4.1 30-Nov-2024  perseant file lwp_private.h was added on branch perseant-exfatfs on 2025-08-02 05:55:58 +0000
 1.2 18-May-2008  phx No longer used.
 1.1 28-May-1998  sakamoto branches: 1.1.150; 1.1.152; 1.1.154; 1.1.156;
Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1.156.2 23-Jun-2008  wrstuden Remove files removed on branch. Updating using patch has its
drawbacks. :-)
 1.1.156.1 23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.1.154.1 04-May-2009  yamt sync with head.
 1.1.152.1 04-Jun-2008  yamt sync with head
 1.1.150.1 02-Jun-2008  mjf Sync with HEAD.
 1.2 26-Apr-2011  joerg Remove Darwin, MACH and Mach-O support.
 1.1 30-Oct-2002  matt branches: 1.1.2; 1.1.136; 1.1.142;
Add missing file.
 1.1.142.1 06-Jun-2011  jruoho Sync with HEAD.
 1.1.136.1 31-May-2011  rmind sync with head
 1.1.2.2 11-Nov-2002  nathanw Catch up to -current
 1.1.2.1 30-Oct-2002  nathanw file macho_machdep.h was added on branch nathanw_sa on 2002-11-11 22:02:21 +0000
 1.1 23-Dec-1999  kleink branches: 1.1.6;
C99: Define a NAN macro in <math.h> which evaulates to a constant expression of
a single-precision quiet NaN; only to be defined on platforms that do support
this value.
 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 23-Dec-1999  bouyer file math.h was added on branch thorpej_scsipi on 2000-11-20 20:18:41 +0000
 1.2 18-Jan-2003  thorpej Merge the nathanw_sa branch.
 1.1 05-Nov-2001  briggs branches: 1.1.2;
file mcontext.h was initially added on branch nathanw_sa.
 1.1.2.1 05-Nov-2001  briggs Initial SA support for ppc. Test-booted on sandpoint, macppc, & walnut.
mcontext and cpu_getmcontext()/cpu_setmcontext() from Klaus Klein
<kleink@netbsd.org>.
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file mutex.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file mutex.h was added on branch yamt-lazymbuf on 2007-02-26 09:07:42 +0000
 1.1 28-Feb-2014  matt branches: 1.1.4; 1.1.6; 1.1.10;
Needed for COMPAT_NETBSD32
 1.1.10.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.10.1 28-Feb-2014  tls file netbsd32_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:17 +0000
 1.1.6.2 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.1.6.1 28-Feb-2014  yamt file netbsd32_machdep.h was added on branch yamt-pagecache on 2014-05-22 11:40:02 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 28-Feb-2014  rmind file netbsd32_machdep.h was added on branch rmind-smpnet on 2014-05-18 17:45:20 +0000
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8;
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 21-Jun-2007  garbled branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file openpicreg.h was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.2.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file openpicreg.h was added on branch matt-armv6 on 2007-11-06 23:19:59 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file openpicreg.h was added on branch yamt-lazymbuf on 2007-10-27 11:27:27 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file openpicreg.h was added on branch vmlocking on 2007-10-23 20:35:59 +0000
 1.13 28-Jul-2011  macallan userland needs to see PCI_MAGIC_IO_RANGE
 1.12 20-Jun-2011  matt Cleanup powerpc param.h. If compiling a MODULE, ignore port-specific stuff.
Only include <machine/cpu.h> in <powerpc/param.h> at the end.
 1.11 07-Mar-2008  phx branches: 1.11.36;
Define PCI_MAGIC_IO_RANGE for X11 server. The address chosen may change.
Approved by garbled.
 1.10 20-Oct-2001  billc branches: 1.10.4; 1.10.36; 1.10.98; 1.10.118; 1.10.122;
just set MACHINE and include powerpc/param.h - non-NEWPMAP ofppc kernels boot now.
 1.9 30-May-2001  mrg branches: 1.9.2;
use _KERNEL_OPT
 1.8 30-Jun-2000  itojun branches: 1.8.2;
raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.
 1.7 11-Feb-2000  thorpej branches: 1.7.4;
Update for the NKMEMPAGES changes.
 1.6 04-Dec-1999  ragge CL* discarding.
 1.5 01-Sep-1998  sakamoto branches: 1.5.12; 1.5.18;
Eliminate ovbcopy define.
 1.4 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.3 29-Apr-1998  thorpej Pull in opt_gateway.h as appropriate.
 1.2 24-Feb-1997  fvdl Define ALIGNED_POINTER
 1.1 30-Sep-1996  ws branches: 1.1.6;
PowerPC port
 1.1.6.1 12-Mar-1997  is Merge in changes from Trunk
 1.5.18.2 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.5.18.1 21-Dec-1999  wrstuden Initial commit of recent changes to make DEV_BSIZE go away.

Runs on i386, needs work on other arch's. Main kernel routines should be
fine, but a number of the stand programs need help.

cd, fd, ccd, wd, and sd have been updated. sd has been tested with non-512
byte block devices. vnd, raidframe, and lfs need work.

Non 2**n block support is automatic for LKM's and conditional for kernels
on "options NON_PO2_BLOCKS".
 1.5.12.1 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.7.4.1 23-Jul-2000  itojun pullup from main trunc (approved by releng-1-5)

raise MSIZE from 128 to 256.
- for sizeof(void *) == 8 arch, this is mandatory. MHLEN is too small
already (less than 80) and there are chances for unwanted packet loss due
to m_pullup restriction.
- for other cases, the change should avoid allocating clusters in most cases
(even when you have IPv4 IPsec tunnel, or IPv6 with moderate amount of
extension header)

portmasters: if your arch chokes with the change (high memory usage or
whatever), please backout the change for your arch.

1.1 -> 1.2 syssrc/sys/arch/amigappc/include/param.h
1.13 -> 1.14 syssrc/sys/arch/arc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/arm26/include/param.h
1.17 -> 1.18 syssrc/sys/arch/arm32/include/param.h
1.6 -> 1.7 syssrc/sys/arch/bebox/include/param.h
1.4 -> 1.5 syssrc/sys/arch/cobalt/include/param.h
1.4 -> 1.5 syssrc/sys/arch/evbsh3/include/param.h
1.2 -> 1.3 syssrc/sys/arch/hpcmips/include/param.h
1.40 -> 1.41 syssrc/sys/arch/i386/include/param.h
1.7 -> 1.8 syssrc/sys/arch/m68k/include/param.h
1.9 -> 1.10 syssrc/sys/arch/macppc/include/param.h
1.4 -> 1.5 syssrc/sys/arch/mmeye/include/param.h
1.6 -> 1.7 syssrc/sys/arch/newsmips/include/param.h
1.7 -> 1.8 syssrc/sys/arch/ofppc/include/param.h
1.23 -> 1.24 syssrc/sys/arch/pc532/include/param.h
1.32 -> 1.33 syssrc/sys/arch/pmax/include/param.h
1.7 -> 1.8 syssrc/sys/arch/powerpc/include/param.h
1.1 -> 1.2 syssrc/sys/arch/prep/include/param.h
1.1 -> 1.2 syssrc/sys/arch/sgimips/include/param.h
1.3 -> 1.4 syssrc/sys/arch/sh3/include/param.h
1.44 -> 1.45 syssrc/sys/arch/sparc/include/param.h
1.21 -> 1.22 syssrc/sys/arch/sparc64/include/param.h
1.43 -> 1.44 syssrc/sys/arch/vax/include/param.h
 1.8.2.1 21-Jun-2001  nathanw Catch up to -current.
 1.9.2.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.10.122.1 03-Apr-2008  mjf Sync with HEAD.
 1.10.118.1 24-Mar-2008  keiichi sync with head.
 1.10.98.1 23-Mar-2008  matt sync with HEAD
 1.10.36.1 17-Mar-2008  yamt sync with head.
 1.10.4.2 20-Oct-2001  billc just set MACHINE and include powerpc/param.h - non-NEWPMAP ofppc kernels boot now.
 1.10.4.1 20-Oct-2001  billc file param.h was added on branch nathanw_sa on 2001-10-20 08:27:13 +0000
 1.11.36.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.6 20-Dec-2007  phx VT8231 IDE workaround for native mode with "compatibility" interrupts 14/15.
This time done right by calling pciide_machdep_compat_intr_establish() to
get a MD interrupt handler.
Verified that it compiles for XEN again.
 1.5 17-Oct-2007  garbled branches: 1.5.4; 1.5.8;
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.4 11-Dec-2005  christos branches: 1.4.30; 1.4.38; 1.4.48; 1.4.50; 1.4.52; 1.4.54;
merge ktrace-lwp.
 1.3 29-Jul-2004  drochner branches: 1.3.12;
remove now unnecessary "pci_enumerate_bus" definitions
 1.2 15-May-2002  thorpej branches: 1.2.10;
Let machine-dependent code specify how to enumerate the bus.
Currently, everyone uses pci_enumerate_bus_generic().
 1.1 29-Oct-2001  thorpej branches: 1.1.2; 1.1.4; 1.1.6;
Check in of work-in-progress of Firepower native device support.
We can find devices in PCI configuration space, but not much else.
 1.1.6.3 23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 29-Oct-2001  thorpej file pci_machdep.h was added on branch kqueue on 2002-01-10 19:47:12 +0000
 1.1.4.2 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.1.4.1 29-Oct-2001  thorpej file pci_machdep.h was added on branch thorpej-mips-cache on 2001-11-12 21:17:23 +0000
 1.1.2.2 20-Jun-2002  nathanw Catch up to -current.
 1.1.2.1 29-Oct-2001  nathanw file pci_machdep.h was added on branch nathanw_sa on 2002-06-20 03:40:25 +0000
 1.2.10.3 21-Sep-2004  skrll Fix the sync with head I botched.
 1.2.10.2 18-Sep-2004  skrll Sync with HEAD.
 1.2.10.1 03-Aug-2004  skrll Sync with HEAD
 1.3.12.2 21-Jan-2008  yamt sync with head
 1.3.12.1 27-Oct-2007  yamt sync with head.
 1.4.54.1 25-Oct-2007  bouyer Sync with HEAD.
 1.4.52.1 18-Oct-2007  yamt sync with head.
 1.4.50.2 09-Jan-2008  matt sync with HEAD
 1.4.50.1 06-Nov-2007  matt sync with HEAD
 1.4.48.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.4.38.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.4.30.1 23-Oct-2007  ad Sync with head.
 1.5.8.1 02-Jan-2008  bouyer Sync with HEAD
 1.5.4.1 26-Dec-2007  ad Sync with head.
 1.3 17-Dec-2010  phx Set the GPIO to enable AGP configuration space access when attaching gtpci0
and do not reset it again. This keeps AGP devices visible after configure().
Improved the match-function to look for a Discovery controller on the PCI
bus.
 1.2 09-Jun-2010  kiyohara Support MV64361 on PegasosII by gt(4).
+ Support gtpci@gt instead of pegasospci more smartly.
+ Support Gigabit Ethernet by mvgbe@gt.
 1.1 04-Nov-2007  garbled branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10; 1.1.12; 1.1.30; 1.1.50; 1.1.52;
Apply patch from Frank Wille to make the pegasos2 pci scan work
properly. Modified slightly by me to add the pegasosreg.h file.

With this change, the pegasos correctly scans both primary and secondary
PCI busses.
 1.1.52.2 05-Mar-2011  rmind sync with head
 1.1.52.1 03-Jul-2010  rmind sync with head
 1.1.50.1 17-Aug-2010  uebayasi Sync with HEAD.
 1.1.30.1 11-Aug-2010  yamt sync with head.
 1.1.12.2 03-Dec-2007  ad Sync with HEAD.
 1.1.12.1 04-Nov-2007  ad file pegasosreg.h was added on branch vmlocking on 2007-12-03 19:03:49 +0000
 1.1.10.2 15-Nov-2007  yamt sync with head.
 1.1.10.1 04-Nov-2007  yamt file pegasosreg.h was added on branch yamt-lazymbuf on 2007-11-15 11:43:14 +0000
 1.1.8.2 13-Nov-2007  bouyer Sync with HEAD
 1.1.8.1 04-Nov-2007  bouyer file pegasosreg.h was added on branch bouyer-xenamd64 on 2007-11-13 15:58:59 +0000
 1.1.6.2 06-Nov-2007  matt sync with HEAD
 1.1.6.1 04-Nov-2007  matt file pegasosreg.h was added on branch matt-armv6 on 2007-11-06 23:19:59 +0000
 1.1.2.2 04-Nov-2007  jmcneill Sync with HEAD.
 1.1.2.1 04-Nov-2007  jmcneill file pegasosreg.h was added on branch jmcneill-pm on 2007-11-04 21:03:06 +0000
 1.2 17-Oct-2007  garbled branches: 1.2.2; 1.2.4; 1.2.8;
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 21-Jun-2007  garbled branches: 1.1.2; 1.1.6; 1.1.8; 1.1.10;
file pio.h was initially added on branch ppcoea-renovation.
 1.1.10.1 25-Oct-2007  bouyer Sync with HEAD.
 1.1.8.1 18-Oct-2007  yamt sync with head.
 1.1.6.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.2.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.2.8.2 06-Nov-2007  matt sync with HEAD
 1.2.8.1 17-Oct-2007  matt file pio.h was added on branch matt-armv6 on 2007-11-06 23:20:00 +0000
 1.2.4.2 27-Oct-2007  yamt sync with head.
 1.2.4.1 17-Oct-2007  yamt file pio.h was added on branch yamt-lazymbuf on 2007-10-27 11:27:27 +0000
 1.2.2.2 23-Oct-2007  ad Sync with head.
 1.2.2.1 17-Oct-2007  ad file pio.h was added on branch vmlocking on 2007-10-23 20:36:00 +0000
 1.3 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.2 18-Sep-2002  chs branches: 1.2.22; 1.2.64; 1.2.72; 1.2.82; 1.2.84; 1.2.86; 1.2.88;
fix the ofppc interrupt code to work at all. the previous code was
confusing an IPL number with an IRQ mask. now we do like the x86 code.
 1.1 22-Oct-2001  thorpej branches: 1.1.4; 1.1.6;
Begin the task of splitting up the ofppc port into common code
and platform-specific code, similar to how the Alpha port is
split up.
 1.1.6.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.1.6.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.1.6.1 22-Oct-2001  thorpej file platform.h was added on branch kqueue on 2002-01-10 19:47:12 +0000
 1.1.4.2 18-Oct-2002  nathanw Catch up to -current.
 1.1.4.1 22-Oct-2001  nathanw file platform.h was added on branch nathanw_sa on 2002-10-18 02:39:19 +0000
 1.2.88.1 25-Oct-2007  bouyer Sync with HEAD.
 1.2.86.1 18-Oct-2007  yamt sync with head.
 1.2.84.1 06-Nov-2007  matt sync with HEAD
 1.2.82.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.2.72.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.2.64.1 23-Oct-2007  ad Sync with head.
 1.2.22.1 27-Oct-2007  yamt sync with head.
 1.12 03-Feb-2003  matt Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.11 03-Feb-2003  matt More cleanup for OLDPMAP.
 1.10 09-Mar-2002  chs switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
 1.9 24-Oct-2001  billc branches: 1.9.2;
NEWPMAP fixes that I missed committing.
 1.8 04-May-1999  thorpej branches: 1.8.16; 1.8.18;
Toss contents, and just pull in <powerpc/pmap.h>.
 1.7 26-Aug-1998  sakamoto branches: 1.7.8;
vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t
 1.6 27-Jan-1998  sakamoto Import DDB from OpenBSD/powerpc.
 1.5 06-Jan-1998  thorpej Don't need __VM_PMAP_HACK anymore.
 1.4 03-Jan-1998  thorpej Now that all ports have pmap_activate(), and it has an identical interface,
prototype it in <vm/pmap.h>
 1.3 02-Jan-1998  thorpej Implement pmap_activate().
 1.2 16-May-1997  gwr Add #define __VM_PMAP_HACK as a temporary measure.
 1.1 30-Sep-1996  ws PowerPC port
 1.7.8.1 21-Jun-1999  thorpej Sync w/ -current.
 1.8.18.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.8.16.2 16-Mar-2002  jdolecek Catch up with -current.
 1.8.16.1 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.9.2.2 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.9.2.1 24-Oct-2001  nathanw file pmap.h was added on branch nathanw_sa on 2002-04-01 07:41:48 +0000
 1.2 12-Jul-2018  maxv Remove the kernel PMC code. Sent yesterday on tech-kern@.

This change:

* Removes "options PERFCTRS", the associated includes, and the associated
ifdefs. In doing so, it removes several XXXSMPs in the MI code, which is
good.

* Removes the PMC code of ARM XSCALE.

* Removes all the pmc.h files. They were all empty, except for ARM XSCALE.

* Reorders the x86 PMC code not to rely on the legacy pmc.h file. The
definitions are put in sysarch.h.

* Removes the kern/sys_pmc.c file, and along with it, the sys_pmc_control
and sys_pmc_get_info syscalls. They are marked as OBSOL in kern,
netbsd32 and rump.

* Removes the pmc_evid_t and pmc_ctr_t types.

* Removes all the associated man pages. The sets are marked as obsolete.
 1.1 07-Aug-2002  briggs branches: 1.1.2; 1.1.4; 1.1.6; 1.1.202; 1.1.204;
Implement pmc(9) -- An interface to hardware performance monitoring
counters. These counters do not exist on all CPUs, but where they
do exist, can be used for counting events such as dcache misses that
would otherwise be difficult or impossible to instrument by code
inspection or hardware simulation.

pmc(9) is meant to be a general interface. Initially, the Intel XScale
counters are the only ones supported.
 1.1.204.1 10-Jun-2019  christos Sync with HEAD
 1.1.202.1 28-Jul-2018  pgoyette Sync with HEAD
 1.1.6.2 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.1.6.1 07-Aug-2002  jdolecek file pmc.h was added on branch kqueue on 2002-09-06 08:38:34 +0000
 1.1.4.2 31-Aug-2002  gehenna catch up with -current.
 1.1.4.1 07-Aug-2002  gehenna file pmc.h was added on branch gehenna-devsw on 2002-08-31 13:45:33 +0000
 1.1.2.2 13-Aug-2002  nathanw Catch up to -current.
 1.1.2.1 07-Aug-2002  nathanw file pmc.h was added on branch nathanw_sa on 2002-08-13 02:18:38 +0000
 1.8 14-Mar-2009  dsl Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
 1.7 11-Dec-2005  christos branches: 1.7.78; 1.7.86; 1.7.92;
merge ktrace-lwp.
 1.6 23-Oct-2004  thorpej Centralize the declaration of booted_device and booted_partition.
 1.5 21-Sep-2002  chs branches: 1.5.6;
remove protos for non-existant functions.
 1.4 01-Jun-2000  matt branches: 1.4.6; 1.4.10;
Make booted_device global (and booted_parition for consitency).
Eliminate it from header files and other extern definitions.
 1.3 26-Aug-1998  sakamoto branches: 1.3.12; 1.3.20;
vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t
 1.2 31-Jan-1997  thorpej Declare booted_device and booted_partition as "extern".
 1.1 30-Sep-1996  ws branches: 1.1.2;
PowerPC port
 1.1.2.1 14-Jan-1997  thorpej Snapshot of work-in-progress, committed to private branch.

These changes implement machine-independent root device and file system
selection. Notable features:

- All ports behave in a consistent manner regarding root
device selection.
- No more "options GENERIC"; all kernels have the ability
to boot with RB_ASKNAME to select root device and file system
type.
- Root file system type can be wildcarded; a machine-independent
function will try all possible file systems for the selected
root device until one succeeds.
- If the root file system fails to mount, the operator will
be given the chance to select a new root device and file
system type, rather than having the machine simply panic.
- nfs_mountroot() no longer panics if any part of the NFS
mount process fails; it now returns an error, giving the
operator a chance to recover.
- New, more consistent, config(8) grammar. The constructs:

config netbsd swap generic
config netbsd root on nfs

have been replaced with:

config netbsd root on ? type ?
config netbsd root on ? type nfs

Additionally, the operator may select or wildcard root file
system type in the kernel configuration file:

config netbsd root on cd0a type cd9660

config(8) now requires that a "root" specification be
made. "root" may be wired down or wildcarded. "swap" and
"dump" specifications are optional, and follow previous
semantics.

- config(8) has a new "file-system" keyword, used to configure
file systems into the kernel. Eventually, this will be used
to generate the default vfssw[].

- "options NFSCLIENT" is obsolete, and is replaced by
"file-system NFS". "options NFSSERVER" still exists, since
NFS server support is independent of the NFS file system
client.

- sys/arch/<foo>/<foo>/swapgeneric.c is no longer used, and
will be removed; all information is now generated by config(8).

As of this commit, all ports except arm32 have been updated to use
the new setroot(). Only SPARC, i386, and Alpha ports have been
tested at this time. Port masters should test these changes on their
ports, and report any problems back to me.

More changes are on their way, including RB_ASKNAME support in
nfs_mountroot() (to prompt for server address and path) and, potentially,
the ability to select rarp/bootparam or bootp in nfs_mountroot().
 1.3.20.1 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.3.12.1 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.4.10.1 18-Oct-2002  nathanw Catch up to -current.
 1.4.6.1 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.5.6.1 02-Nov-2004  skrll Sync with HEAD.
 1.7.92.1 13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.7.86.1 28-Apr-2009  skrll Sync with HEAD.
 1.7.78.1 04-May-2009  yamt sync with head.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.3 18-Jan-2001  thorpej Use <powerpc/psl.h>
 1.2 16-Apr-1997  thorpej branches: 1.2.14;
Garbage collect stuff now hidden my machine_vec.
 1.1 30-Sep-1996  ws PowerPC port
 1.2.14.1 11-Feb-2001  bouyer Sync with HEAD.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.3 26-Aug-2001  matt branches: 1.3.6;
Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.2 05-Jan-1998  perry branches: 1.2.28;
RCSID Police.
 1.1 01-Oct-1996  ws Add some files that CVS missed somehow
These are empty for now, but are needed by MI code
 1.2.28.1 13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.3.6.2 26-Aug-2001  matt Make all powerpc ports use a common Makefile.powerpc (except walnut)
Enforce -Wmissing-prototypes -Wstrict-prototypes for all ppc ports.
Split out macppc cpu support and make common to mpc6xx ports. Make
other mpc6xx ports use it. Add evcnts for mpc6xx traps.
 1.3.6.1 26-Aug-2001  matt file ptrace.h was added on branch nathanw_sa on 2001-08-26 02:47:41 +0000
 1.3 04-May-1999  thorpej Pull in <powerpc/reg.h>.
 1.2 05-Jan-1998  perry branches: 1.2.10;
RCSID Police.
 1.1 01-Oct-1996  ws Add some files that CVS missed somehow
These are empty for now, but are needed by MI code
 1.2.10.1 21-Jun-1999  thorpej Sync w/ -current.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.2 05-Feb-2003  nakayama Replace machine/rnd.h with more appropriate name to share it
with cycle counter based microtime in kern/kern_microtime.c.
 1.1 11-Jun-2000  tsubai branches: 1.1.4; 1.1.6;
Add cpu_counter().
 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 11-Jun-2000  bouyer file rnd.h was added on branch thorpej_scsipi on 2000-11-20 20:18:42 +0000
 1.1.4.2 22-Jun-2000  minoura Sync w/ netbsd-1-5-base.
 1.1.4.1 11-Jun-2000  minoura file rnd.h was added on branch minoura-xpg4dl on 2000-06-22 17:02:07 +0000
 1.2 09-Feb-2007  ad branches: 1.2.4;
Merge newlock2 to head.
 1.1 22-Dec-2006  ad branches: 1.1.2;
file rwlock.h was initially added on branch newlock2.
 1.1.2.1 22-Dec-2006  ad Pull in CPU specific stubs.
 1.2.4.2 26-Feb-2007  yamt sync with head.
 1.2.4.1 09-Feb-2007  yamt file rwlock.h was added on branch yamt-lazymbuf on 2007-02-26 09:07:42 +0000
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 23-Jul-2014  alnsn branches: 1.1.2; 1.1.6;
Rename sljitarch.h to sljit_machdep.h.
 1.1.6.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.1.6.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-maxphys on 2014-08-20 00:03:17 +0000
 1.1.2.2 10-Aug-2014  tls Rebase.
 1.1.2.1 23-Jul-2014  tls file sljit_machdep.h was added on branch tls-earlyentropy on 2014-08-10 06:54:04 +0000
 1.2 23-Jul-2014  alnsn Rename sljitarch.h to sljit_machdep.h.
 1.1 17-Nov-2013  alnsn branches: 1.1.2; 1.1.4; 1.1.6;
Enable sljit and bpfjit on powerpc.
 1.1.6.2 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.1.6.1 17-Nov-2013  yamt file sljitarch.h was added on branch yamt-pagecache on 2014-05-22 11:40:02 +0000
 1.1.4.2 18-May-2014  rmind sync with head
 1.1.4.1 17-Nov-2013  rmind file sljitarch.h was added on branch rmind-smpnet on 2014-05-18 17:45:20 +0000
 1.1.2.1 10-Aug-2014  tls Rebase.
 1.5 02-Mar-2010  matt Add missing <powerpc/FOO/spr.h> to a few files missed on the first pass.
Don't export <machine/spr.h> to userland, only <powerpc/spr.h>
 1.4 11-Dec-2005  christos branches: 1.4.78; 1.4.92; 1.4.98;
merge ktrace-lwp.
 1.3 17-Feb-2005  briggs branches: 1.3.2;
Install spr.h
 1.2 02-Mar-2004  kleink branches: 1.2.2; 1.2.4;
Pull in SPRs via <powerpc/spr.h> in this single instance, and dispose of
<machine/spr.h> again.
 1.1 30-Dec-2003  manu Fix PowerPC ports build with KGDB.
 1.2.4.1 19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.2.2.1 29-Apr-2005  kent sync with -current
 1.3.2.2 17-Feb-2005  skrll Sync with HEAD.
 1.3.2.1 17-Feb-2005  skrll file spr.h was added on branch ktrace-lwp on 2005-02-17 07:10:37 +0000
 1.4.98.1 30-Apr-2010  uebayasi Sync with HEAD.
 1.4.92.1 24-Oct-2010  jym Sync with HEAD
 1.4.78.1 11-Mar-2010  yamt sync with head
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.13 23-Jan-2021  christos Document via __HAVE_BUS_SPACE_8 platforms that implement bus_space_*_8
 1.12 26-Jan-2017  christos branches: 1.12.26;
provide __HAVE_COMPAT_NETBSD32 and fix multiple include protection consistently.
 1.11 17-Jul-2011  dyoung branches: 1.11.12; 1.11.30; 1.11.34; 1.11.38;
Enable new-style <sys/bus.h> on several PowerPC ports supporting PCI
buses. Make non-inline implementations of bus_space(9) and bus_dma(9)
routines and move them to appropriate .c files.

This may leave amigappc in a bad state, sorry. Fortunately, it will be
easy to repair by imitating the bus.h -> bus_{defs,funcs}.h split in
some other PowerPC port.
 1.10 20-Jan-2008  joerg Now that __HAVE_TIMECOUNTER and __HAVE_GENERIC_TODR are invariants,
remove the conditionals and the code associated with the undef case.
 1.9 17-Oct-2007  garbled branches: 1.9.2; 1.9.8;
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 14-Jul-2007  ad branches: 1.8.8; 1.8.10; 1.8.12; 1.8.14;
Generic soft interrupts are mandatory.
 1.7 10-Mar-2007  jmmv branches: 1.7.2; 1.7.10;
Implement support for softintrs.
Reviewed, corrected and tested by aymeric@.
 1.6 13-Sep-2006  gdamore branches: 1.6.6;
Convert shark and ofppc to new common ofrtc and MI todr code. Tested
on shark. Ok christos@, martin@.
 1.5 22-Sep-2002  simonb branches: 1.5.22; 1.5.40; 1.5.52;
Use "#define\t" instead of "#define ".
 1.4 18-Sep-2002  chs implement device_register() for ofppc.
use ofcons_cnprobe().
 1.3 16-May-2000  thorpej branches: 1.3.8; 1.3.12;
Nuke dk_establish() from orbit except from those ports which still use
it to determine the boot device: mvme68k, pc532, macppc, ofppc. Those
platforms should be changed to use device_register(). In the mean time,
those ports defined __BROKEN_DK_ESTABLISH.
 1.2 02-Oct-1998  sakamoto branches: 1.2.12;
Oops, ofppc don't have wscons.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.2.12.1 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.3.12.1 18-Oct-2002  nathanw Catch up to -current.
 1.3.8.1 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.5.52.1 18-Nov-2006  ad Sync with head.
 1.5.40.1 14-Sep-2006  yamt sync with head.
 1.5.22.3 21-Jan-2008  yamt sync with head
 1.5.22.2 27-Oct-2007  yamt sync with head.
 1.5.22.1 30-Dec-2006  yamt sync with head.
 1.6.6.1 12-Mar-2007  rmind Sync with HEAD.
 1.7.10.2 03-Oct-2007  garbled Sync with HEAD
 1.7.10.1 21-Jun-2007  garbled Completely rewrite ofppc from scratch.

1) Change it to be like the other ppc ports, and directly interface with
hardware, rather than trying to be slick and access everything through
the OFW. Instead, we gather configuration information from OFW, and use
that to discover hardware.

2) Change it over to powerpc bus_space and bus_dma.

3) Timecounters, generic soft interrupts.

4) Make use of the shared code in powerpc. (pic code, oea, bat code, etc)

5) Probably other stuff.. almost nothing remains of the original port.

It is assumed that in it's present state this will not run on any
machines. However, it should be pretty close, and will just need some
massaging and care from someone with access to hardware to make it work.
The code is written to target a CHRP compatible machine, but there is no
reason it cannot be ported to other machines like the Pegasos or Efika.
I simply don't have the knowledge of those machines to structure the code
for them, but I have attempted to keep it generic enough that such work
could still be done.

If anyone with access to hardware would like to take this on, I will
gladly assist as much as possible.
 1.7.2.2 23-Oct-2007  ad Sync with head.
 1.7.2.1 15-Jul-2007  ad Sync with head.
 1.8.14.1 25-Oct-2007  bouyer Sync with HEAD.
 1.8.12.1 18-Oct-2007  yamt sync with head.
 1.8.10.2 23-Mar-2008  matt sync with HEAD
 1.8.10.1 06-Nov-2007  matt sync with HEAD
 1.8.8.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.8.1 23-Jan-2008  bouyer Sync with HEAD.
 1.9.2.1 18-Feb-2008  mjf Sync with HEAD.
 1.11.38.1 21-Apr-2017  bouyer Sync with HEAD
 1.11.34.1 20-Mar-2017  pgoyette Sync with HEAD
 1.11.30.1 05-Feb-2017  skrll Sync with HEAD
 1.11.12.1 03-Dec-2017  jdolecek update from HEAD
 1.12.26.1 03-Apr-2021  thorpej Sync with HEAD.
 1.2 04-Dec-1998  sakamoto Not used.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.2 17-Jul-2011  joerg Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
 1.1 28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.23 20-Jun-2011  matt Don't export USER_SR if _MODULE is defined.
Add a common <powerpc/vmparam.h> like we have for <powerpc/pmap.h>
 1.22 14-Nov-2007  garbled branches: 1.22.50;
Commit a fix for the _SR regions that are needed by ofppc. Because this
platform tends to just declare anything from 0x8 to 0xf as mem or io
regions willy-nilly, we need to avoid batmapping a few of those in order
to save space for USER_SR, KERNEL_SR and KERNEL2_SR. I picked values for
these three that are least-commonly used or used for non-vital things.
 1.21 03-Feb-2003  matt branches: 1.21.18; 1.21.60; 1.21.78; 1.21.80; 1.21.84; 1.21.86;
Rename PPC_MPC6XX to PPC_OEA (and any mpc6xx reference to oea).
 1.20 02-Feb-2003  matt Remove OLDPMAP support.
 1.19 10-Dec-2002  thorpej Use __LDPGSZ (which must be == USRTEXT) as the text address for a.out
executables, and eliminate the USRTEXT constant, which was only used
by the a.out exec code.
 1.18 07-Jul-2002  matt Use SR 11 as USER_SR. (12 is used as an I/O BAT).
 1.17 09-Mar-2002  chs branches: 1.17.6;
switch all mpc6xx powerpc ports to NEWPMAP by default.
the old pmap is still available with the OLDPMAP option.
 1.16 15-Nov-2001  soren MAXSLP is defined to be a machine-independent scheduling parameter,
so move it into sys/param.h.
 1.15 24-Oct-2001  billc branches: 1.15.2;
NEWPMAP fixes that I missed committing.
 1.14 05-Aug-2001  tsutsui branches: 1.14.4;
Define VM_MAX_KERNEL_BUF and PAGER_MAP_SIZE to save KVA space.
 1.13 01-May-2001  thorpej branches: 1.13.2;
Per discussion w/ chuck and chuck, restructure the md page stuff
to use a structure called "vm_page_md", and use __HAVE_VM_PAGE_MD
and __HAVE_PMAP_PHYSSEG.
 1.12 29-Apr-2001  thorpej Add a VM_MDPAGE_MEMBERS macro that defines pmap-specific data for
each vm_page structure. Add a VM_MDPAGE_INIT() macro to init this
data when pages are initialized by UVM. These macros are mandatory,
but ports may #define them to nothing if they are not needed/used.

This deprecates struct pmap_physseg. As a transitional measure,
allow a port to #define PMAP_PHYSSEG so that it can continue to
use it until its pmap is converted to use VM_MDPAGE_MEMBERS.

Use all this stuff to eliminate a lot of extra work in the Alpha
pmap module (it's smaller and faster now). Changes to other pmap
modules will follow.
 1.11 11-Feb-2000  thorpej branches: 1.11.6;
Update for the NKMEMPAGES changes.
 1.10 04-Dec-1999  ragge CL* discarding.
 1.9 16-Apr-1999  thorpej branches: 1.9.2; 1.9.8;
Now that we have direct-mapped pool pages, we can garbage-collect VM_MBUF_SIZE
and don't need to allocate mb_map.
 1.8 23-Mar-1999  thorpej branches: 1.8.4;
VM_MBUF_SIZE is in terms of MCLBYTES, not CLBYTES.
 1.7 16-Jan-1999  chuck MNN is no longer optional
 1.6 26-Aug-1998  sakamoto vm_offset_t -> {paddr_t,vaddr_t}, vm_size_t -> vsize_t
 1.5 05-Jun-1998  sakamoto Merge in MACHINE_NEW_NONCONTIG support and some fix from Tsubai-San.
UVM support.
 1.4 18-Feb-1998  mycroft Fix typo.
 1.3 12-Jun-1997  mrg bring mrg-vm-swap2 onto mainilne.
 1.2 16-Apr-1997  thorpej branches: 1.2.2;
Always define MACHINE_NONCONTIG.
 1.1 30-Sep-1996  ws branches: 1.1.4;
PowerPC port
 1.1.4.1 12-Feb-1997  mrg initial work for dynamic swap additions.
 1.2.2.1 04-May-1997  mrg re-merge mrg-vm-swap into -current, and call it mrg-vm-swap2.
 1.8.4.2 06-Aug-1999  chs take an initial guess at UBC parameters.
 1.8.4.1 21-Jun-1999  thorpej Sync w/ -current.
 1.9.8.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1 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.11.6.1 21-Jun-2001  nathanw Catch up to -current.
 1.13.2.4 06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.13.2.3 16-Mar-2002  jdolecek Catch up with -current.
 1.13.2.2 10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1 25-Aug-2001  thorpej Merge Aug 24 -current into the kqueue branch.
 1.14.4.1 12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.15.2.5 11-Dec-2002  thorpej Sync with HEAD.
 1.15.2.4 01-Aug-2002  nathanw Catch up to -current.
 1.15.2.3 01-Apr-2002  nathanw Catch up to -current.
(CVS: It's not just a program. It's an adventure!)
 1.15.2.2 08-Jan-2002  nathanw Catch up to -current.
 1.15.2.1 24-Oct-2001  nathanw file vmparam.h was added on branch nathanw_sa on 2002-01-08 00:27:00 +0000
 1.17.6.1 16-Jul-2002  gehenna catch up with -current.
 1.21.86.1 19-Nov-2007  mjf Sync with HEAD.
 1.21.84.1 18-Nov-2007  bouyer Sync with HEAD
 1.21.80.1 09-Jan-2008  matt sync with HEAD
 1.21.78.1 21-Nov-2007  joerg Sync with HEAD.
 1.21.60.2 03-Dec-2007  ad Sync with HEAD.
 1.21.60.1 03-Dec-2007  ad Sync with HEAD.
 1.21.18.1 15-Nov-2007  yamt sync with head.
 1.22.50.1 23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.2 11-Dec-2005  christos merge ktrace-lwp.
 1.1 08-May-2004  kleink branches: 1.1.2;
Factor out W{CHAR,INT}_{MAX,MIN} into their own header file.
 1.1.2.4 21-Sep-2004  skrll Fix the sync with head I botched.
 1.1.2.3 18-Sep-2004  skrll Sync with HEAD.
 1.1.2.2 03-Aug-2004  skrll Sync with HEAD
 1.1.2.1 08-May-2004  skrll file wchar_limits.h was added on branch ktrace-lwp on 2004-08-03 10:38:40 +0000

RSS XML Feed