FYI: rudimentary loader for ppcbug-based systems
Peter Grehan
grehan at freebsd.org
Tue Oct 14 19:23:38 PDT 2003
Hi Rafal,
> What do you think is the right way of adding support in the kernel for another firmware
> but within the same architecture (powerpc in this case)? Should we just have a number of
> #ifdefs where appropriate, or maybe we should think about separating some bits and defining
> clean interfaces to common parts? Eventually I intend to let my work be merged with existing
> powerpc code in the tree and that's why I'd like to know what course to take. For now I'll
> just be using conditional compilation flags.
Clean interfaces would be the best. The ultimate is a single kernel that could
run on all combinations of processor and firmware, the true GENERIC, but I'm not
sure if that's possible.
Here's a quick summary of the OFW dependencies in powerpc/powerpc/* -
locore.S - the entry point assumes the OFW calling convention
clock.c - the time-of-day and CPU's timebase frequency are obtained from OFW
machdep.c - the shutdown/halt routines call into OFW.
nexus.c - heavily OFW dependent. Any other platform will require their own version
of this.
openpic.c - The OFW code could be split out of this to allow the OpenPIC code to
be used on other platforms
pmap.c - Not as bad as it looks. The setting up of the BAT array is specific to
the h/w layout of Macs. OFW is used to determine the memory layout, and
the PTE entries for OFW are not required on non-OFW systems.
later,
Peter.
More information about the freebsd-ppc
mailing list