Subject: Re: handling of firmware calls (Efika boots)
To: Aymeric Vincent <vincent@labri.fr>
From: Matt Sealey <matt@genesi-usa.com>
List: port-ofppc
Date: 01/11/2007 21:30:31
> My problem now is that the way the kernel interacts with the open
> firmware driver for the ethernet chip makes it extremely slow, and it
> eventually hangs after loading /sbin/init (waited for it a whole night).
While getting it to boot up from the firmware is a noble goal it's probably
not the best idea. A native ethernet driver would be much better (the
interface to OF means it can only be polled, and who knows when to poll,
and the overhead of calling the CIF means you may lose data even when you
ARE polling. NFS over TCP rather than UDP fixes a lot, but it can't solve
a performance problem like the CIF calling convention..)
>> Would it make sense to create a powerpc/52xx directory, as with ibm4xx?
>> There is no 5200-support at the moment, AFAICS.
>
> I'm not sure yet what is best, choosing the right name would need some
> culture of the forthcoming naming of chips from freescale... (I saw
> Matt's comment) I didn't look at the doc deeply enough to know if the
> way the registers are mapped make them very similar to pre-existing
> (non SoC) chips.
I would say it just needs to be in the powerpc directory. Perhaps simply
an "e300" directory if it needs to go somewhere (this implies that it is an
SoC 603e, and not the discrete ones in the Mac) but I am under the
impression that the vast majority of drivers will go in other parts of the
tree (dev/net or dev/ide or something) and the actual platform support
may well be.. dma, interrupt controller and stealing the CPU-specific code
like MMU setup quirks from the already existing code (after all NetBSD
already more than supports the 603e)
The 440 series from IBM, and the e200 and e500 cores from Freecale, are
strange little embedded beasts and may need far more changes, but here,
not so much.
> In the same vein, would anyone have a strong view on where to put RTAS
> support? It depends on open firmware only for bootstrapping so maybe
> it's not a good idea to put it under dev/ofw/rtas/?
RTAS support should be barely a file; when the OF device tree parser
finds devices it will find the RTAS node, and initialize it. Maybe that's
one file. Then some helper functions so you can call rtas tokens by
function name, rather than long-windedly repeating what you could do
in a wrapper, like the rest of the OFW stuff. There isn't much more to
it, but it is important to use the PCI bus space accessors, and dreadfully
important for the RTC (you won't be able to otherwise, Efika does not
use the MPC5200B RTC, and we don't plan on giving people low-level access
to the microcontroller that we do use), and to use the calls for shutting
down the system and so on.
--
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations