Home | History | Annotate | Download | only in conf
History log of /src/sys/arch/ofppc/conf/files.ofppc
RevisionDateAuthorComments
 1.49  21-Sep-2025  thorpej Give each PowerPC OFW platform its own device_register(), which calls
into the common ofw_device_register(). ofppc's is a simple wrapper.

macppc's, on the other hand, takes care of looking up environmental
sensor descriptive information in the OFW device tree and adds those
properties directly to the sensor device property dictionaries. This
single implementation will replace the duplicated code that's scattered
across multiple macppc i2c controller drivers.
 1.48  12-May-2021  thorpej - Define a device call for PCI bus instances to fetch a direct child's
device handle given the device's device/function #s (extracted from
a pcitag_t). Use it to associate the handle with the child device
at config_found() time.
- Implement this device call for ACPI and OpenFirmware.
- Enable the OpenFirmware variant for evbarm FDT, macppc, ofppc, sparc64.
- Obsolete acpi_device_register(); it is no longer needed.
- Obsolete setting the OpenFirmware handle in PCI devices in the
sparc64 device_register(); it is no longer needed.
 1.47  18-Dec-2017  skrll branches: 1.47.20; 1.47.22;
Generalise FDT and OFW
 1.46  04-Aug-2011  phx Do not overwrite ukbd.h with NO_UKBD_DEVICE.
 1.45  22-Jun-2011  matt Add support pci_intr_setattr.
Export non-inline version of pci api for modules (_MODULE is defined).
Fix definition of pc_conf_hook and pc_conf_interrupt.
Switch to using inlines instead of macros.
Switch ibm4xx to use <powerpc/pci_machdep.h>
 1.44  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.43  09-Jun-2010  kiyohara Indent.
 1.42  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.41  14-Mar-2010  kiyohara branches: 1.41.2;
Add fdc@isa.
tested on PegasosII.
 1.40  08-Apr-2008  garbled branches: 1.40.4; 1.40.24;
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.39  20-Feb-2008  drochner branches: 1.39.6;
Since files.wscons et al. are included by ~all ports anyway, include
them in the mi "files" file, and remove include statements from md files.
These shouldn't pull in additional kernel code when not in use, so it
shouldn't do any harm except a risk of namespace collisions which
should be easy to fix.
 1.38  15-Feb-2008  tsutsui Remove obsolete platform support options.
 1.37  24-Dec-2007  phx Make USB, IEEE1394 and viaaudio attach to the Pegasos2.
USB works fine. IEEE1394 is untested. Audio doesn't work (playing white noise).
Need to set IO/MEM-enable for IEEE1394 and audio, as the firmware (Smart
Firmware 1.2) doesn't do it.
Patch approved by Tim Rightnour.
 1.36  10-Dec-2007  garbled Switch ofppc to the unified powerpc majors file. This should make single
user mode work.
 1.35  03-Dec-2007  ad branches: 1.35.2; 1.35.4; 1.35.6;
Interrupt handling changes, in discussion since February:

- Reduce available SPL levels for hardware devices to none, vm, sched, high.
- Acquire kernel_lock only for interrupts at IPL_VM.
- Implement threaded soft interrupts.
 1.34  26-Nov-2007  garbled 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.33  07-Nov-2007  garbled Convert ofppc to the shared ofw_autoconf.c
 1.32  06-Nov-2007  garbled Add a bunch of devices to GENERIC. Fix interrupts on the PegasosII with
a nasty little hack. Getting closer to a working system.
 1.31  05-Nov-2007  garbled branches: 1.31.2;
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.30  04-Nov-2007  garbled Get rid of the ofppc use of the ofbus completely, for the last time.

Write a complete OF boot console into ofw_consinit.c and rewire a bunch
of the ifdef logic in that file to use it when appropriate on both macppc
and ofppc. Get rid of the attempt to wire up the serial console early,
as that is extremely difficult on ofppc. Yank all the console code out
of ofppc/machdep.c. (This is a boot console only, not a full blown
console like ofcons.c)

Delete all the ofbus references out of the config files, and pull in
dev/ofw/openfirmio.c and dev/ofw/ofw_subr.c directly rather than pulling
in files.ofw. It might be worth going back and adding a files.ofw-nobus
to that directory to allow pulling in the openfirmware driver without
pulling in the whole ofbus mess.

Change rtas driver to connect directly to mainbus, like the PCI bus nodes do.
 1.29  25-Oct-2007  garbled 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.28  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.27  21-May-2007  tsutsui branches: 1.27.8; 1.27.10; 1.27.12; 1.27.14;
- include "dev/pci/files.pci" rather than pulling only dev/pci/pcibusprint.c
- also include "dev/wsfb/files.wsfb" which is required by files.pci
 1.26  10-Mar-2007  jmmv branches: 1.26.2; 1.26.4; 1.26.10;
Implement support for softintrs.
Reviewed, corrected and tested by aymeric@.
 1.25  14-Jan-2007  aymeric branches: 1.25.2;
Basic support for RTAS (CHRP's Run-Time Abstraction Services).
Tested on the Efika; now it knows what time it is.
rtas can attach to mainbus. Not added to any kernel config file yet.
 1.24  11-Dec-2005  christos branches: 1.24.20;
merge ktrace-lwp.
 1.23  28-Nov-2004  jmc branches: 1.23.12;
Reduce pci pullin's to just pcibusprint.c. This doesn't attach pci in a way
config will include any of the generic pci code and all the current code
needs is pcibusprint for now. XXX this really needs more careful looking over
but does allow ofppc to build clean again.
 1.22  05-Mar-2003  matt branches: 1.22.2;
Remove port-specific procfs_machdep.c (since they are all identical and
a better one resides in powerpc/powerpc/).
 1.21  30-Oct-2002  manu Moved binary compatibility options from arch directory to cpu directory
 1.20  06-Sep-2002  gehenna Merge the gehenna-devsw branch into the trunk.

This merge changes the device switch tables from static array to
dynamically generated by config(8).

- All device switches is defined as a constant structure in device drivers.

- The new grammer ``device-major'' is introduced to ``files''.

device-major <prefix> char <num> [block <num>] [<rules>]

- All device major numbers must be listed up in port dependent majors.<arch>
by using this grammer.

- Added the new naming convention.
The name of the device switch must be <prefix>_[bc]devsw for auto-generation
of device switch tables.

- The backward compatibility of loading block/character device
switch by LKM framework is broken. This is necessary to convert
from block/character device major to device name in runtime and vice versa.

- The restriction to assign device major by LKM is completely removed.
We don't need to reserve LKM entries for dynamic loading of device switch.

- In compile time, device major numbers list is packed into the kernel and
the LKM framework will refer it to assign device major number dynamically.
 1.19  16-Apr-2002  thorpej branches: 1.19.2;
* Move the mii_bitbang attribute into dev/mii/files.mii
* Pull in dev/mii/files.mii from conf/files, rather than playing
the magic "files include order" dance in N machine-dependent
configuration definitions.
 1.18  28-Nov-2001  lukem - convert usage of "defopt" to "defflag" where the relevant option does
not support a value (e.g., it's to be used as "options FOO" instead of
"options FOO=xxx"). options that take a value were converted to
defparam recently.
- minor whitespace & formatting cleanups
 1.17  29-Oct-2001  thorpej branches: 1.17.2;
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.16  22-Oct-2001  thorpej branches: 1.16.2;
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.15  22-Oct-2001  thorpej Various things that make OFW-driver kernels work on my Firepower LX MP
again:
- Special-case the attachment of CPUs, and logically attach them to
"mainbus", attaching them before any other devices. Otherwise,
CPUs would be found very late in the game on my Firepower.
- Sanity check the timebase-frequency property, printing a warning if
it's not the same on each CPU.
- Pass the correct CPU ID to cpu_attach_subr().
- Fetch the platform name from the OFW root node. We can key off this
later when we implement support for native drivers in the ofppc port.
- Use a table of "special" toplevel OFW nodes ... we skip these nodes
during the device configuration phase. This generally includes the
"options", "packages", etc. nodes. Inspired by sparc & sparc64 ports.
 1.14  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.13  18-Jun-2001  christos branches: 1.13.2;
Add an e_trapsignal member to struct emul, so that emulated processes can
send the appropriate signal depending on the trap type.
 1.12  19-Jan-2001  manu branches: 1.12.2;
Added previously created files for powerpc Linux compatibility to the kernel
config system
 1.11  17-Jan-2001  fvdl Add machdep file for procfs. Currently only used for linux-style
/proc/cpuinfo (only active when procfs is mounted with -o linux).
For ports other than the i386 this currently produces an empty
string.
 1.10  14-Mar-2000  oster Add the RAIDframe device major to the machine-dependent config files
so that the right entries get added to dev_name2blk[]. Needed for / on RAID.
(Whoops! I missed checking these in when adding the RAID_AUTOCONFIG stuff.)
 1.9  29-May-1998  sakamoto branches: 1.9.14;
Revert OpenFirmware files to powerpc directory.
OpenFirmware files are used by ofppc/macppc.
 1.8  28-May-1998  sakamoto Rename NetBSD/powerpc to NetBSD/ofppc.
New sys/arch/powerpc with PowerPC-generic stuff.
 1.7  24-Feb-1998  mycroft Catch up with changes in dev/ofw. Add mainbus.
 1.6  23-Feb-1998  mycroft Slight rearrangement.
 1.5  27-Jan-1998  sakamoto Import DDB from OpenBSD/powerpc.
 1.4  05-Jan-1998  perry RCSID Police.
 1.3  16-Apr-1997  thorpej - Pull in new ofwmagic.S and soft_spl.c files
- firepowerbugs -> firmworksbugs
 1.2  16-Oct-1996  ws Rename recently checked in KGDB to IPKDB to resolve conflicts with older KGDB
 1.1  30-Sep-1996  ws PowerPC port
 1.9.14.3  11-Feb-2001  bouyer Sync with HEAD.
 1.9.14.2  18-Jan-2001  bouyer Sync with head (for UBC+NFS fixes, mostly).
 1.9.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.12.2.1  21-Jun-2001  nathanw Catch up to -current.
 1.13.2.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.13.2.3  23-Jun-2002  jdolecek catch up with -current on kqueue branch
 1.13.2.2  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.13.2.1  13-Sep-2001  thorpej Update the kqueue branch to HEAD.
 1.16.2.1  12-Nov-2001  thorpej Sync the thorpej-mips-cache branch with -current.
 1.17.2.5  11-Nov-2002  nathanw Catch up to -current
 1.17.2.4  17-Sep-2002  nathanw Catch up to -current.
 1.17.2.3  20-Jun-2002  nathanw Catch up to -current.
 1.17.2.2  08-Jan-2002  nathanw Catch up to -current.
 1.17.2.1  29-Oct-2001  nathanw file files.ofppc was added on branch nathanw_sa on 2002-01-08 00:27:00 +0000
 1.19.2.2  17-May-2002  gehenna Remove old block majors list.
 1.19.2.1  16-May-2002  gehenna Include the list of block/character major numbers.
 1.22.2.1  29-Nov-2004  skrll Sync with HEAD.
 1.23.12.7  27-Feb-2008  yamt sync with head.
 1.23.12.6  21-Jan-2008  yamt sync with head
 1.23.12.5  07-Dec-2007  yamt sync with head
 1.23.12.4  15-Nov-2007  yamt sync with head.
 1.23.12.3  27-Oct-2007  yamt sync with head.
 1.23.12.2  03-Sep-2007  yamt sync with head.
 1.23.12.1  26-Feb-2007  yamt sync with head.
 1.24.20.1  01-Feb-2007  ad Sync with head.
 1.25.2.1  12-Mar-2007  rmind Sync with HEAD.
 1.26.10.3  17-Oct-2007  garbled Via a patch from jkunz, put back the ofbus and ofcons code for now, until
we write a better way to handle the console.
 1.26.10.2  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.26.10.1  22-May-2007  matt Update to HEAD.
 1.26.4.1  11-Jul-2007  mjf Sync with head.
 1.26.2.4  03-Dec-2007  ad Sync with HEAD.
 1.26.2.3  03-Dec-2007  ad Sync with HEAD.
 1.26.2.2  23-Oct-2007  ad Sync with head.
 1.26.2.1  27-May-2007  ad Sync with head.
 1.27.14.2  13-Nov-2007  bouyer Sync with HEAD
 1.27.14.1  25-Oct-2007  bouyer Sync with HEAD.
 1.27.12.1  18-Oct-2007  yamt sync with head.
 1.27.10.4  23-Mar-2008  matt sync with HEAD
 1.27.10.3  09-Jan-2008  matt sync with HEAD
 1.27.10.2  08-Nov-2007  matt sync with -HEAD
 1.27.10.1  06-Nov-2007  matt sync with HEAD
 1.27.8.8  09-Dec-2007  jmcneill Sync with HEAD.
 1.27.8.7  27-Nov-2007  joerg Sync with HEAD. amd64 Xen support needs testing.
 1.27.8.6  11-Nov-2007  joerg Sync with HEAD.
 1.27.8.5  06-Nov-2007  joerg Sync with HEAD.
 1.27.8.4  06-Nov-2007  joerg Sync with HEAD.
 1.27.8.3  04-Nov-2007  jmcneill Sync with HEAD.
 1.27.8.2  28-Oct-2007  joerg Sync with HEAD.
 1.27.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.31.2.4  18-Feb-2008  mjf Sync with HEAD.
 1.31.2.3  27-Dec-2007  mjf Sync with HEAD.
 1.31.2.2  08-Dec-2007  mjf Sync with HEAD.
 1.31.2.1  19-Nov-2007  mjf Sync with HEAD.
 1.35.6.2  02-Jan-2008  bouyer Sync with HEAD
 1.35.6.1  13-Dec-2007  bouyer Sync with HEAD
 1.35.4.1  11-Dec-2007  yamt sync with head.
 1.35.2.1  26-Dec-2007  ad Sync with head.
 1.39.6.1  02-Jun-2008  mjf Sync with HEAD.
 1.40.24.2  17-Aug-2010  uebayasi Sync with HEAD.
 1.40.24.1  30-Apr-2010  uebayasi Sync with HEAD.
 1.40.4.1  11-Aug-2010  yamt sync with head.
 1.41.2.2  05-Mar-2011  rmind sync with head
 1.41.2.1  03-Jul-2010  rmind sync with head
 1.47.22.1  31-May-2021  cjep sync with head
 1.47.20.1  13-May-2021  thorpej Sync with HEAD.

RSS XML Feed