Home | History | Annotate | Download | only in include
History log of /src/sys/arch/ofppc/include/autoconf.h
RevisionDateAuthorComments
 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.

RSS XML Feed