Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Changing ibm4xx device tree.



Simon Burge wrote:
> Most ports have a "mainbus" which is a pseudo bus for the root of the
> device tree.  For a handful of ports, this bus has a "real name".
> On the 4xx PowerPC parts, this is called the PLB.  It's the wrong
> abstraction to hang devices directly off the CPU core itself.

There are two points on my plan.
Point 1. What is a better root device?
Point 2. PLB is a Processor ***Local*** bus inside CPU.
         Plb should be attached after attaching cpu.
         This is a feature of *embedded* cpu

After attaching and configuring cpu, we can easily configure
some devices inside cpu.
We can do config_found with an argument included
plb_device_lists and opb_device_lists of this cpu after cpu_attach.

> I can perhaps see an argument for attaching the plb to a mainbus if
> there are SMP 4xx machines available in the future, but I think it's
> more likely that we'll get multi-core 4xx before that.  If you have a
> multi-core cpu, and the devices attaching to the cpu, which cpu would
> you have the devices attach cpu0 or cpu1?  It can't attach to both.

I have neither multi-core 4xx nor 4xx multiprocessor system.
If there are a 4xx multiprocessor system, what is root device?
Root device is plb0(Processor *Local* Bus) for cpu0?
Or is plb1 for cpu1?

For now, there is no such core or system.
It's sure that this argument may be nonsense.
About Point 1, your opinion is reasonable.

> There's also nothing really 405GP specific in opb.c.  There's a table in
> there that currently has only 405GP and 405GPr entries, but that's where
> entries for devices on other CPUs will also go.  If another CPU doesn't
> have a PCI host controller, then it doesn't get a "pchb" entry in the
> OPB device table and it doesn't show up.

About opb, sure. cpu model is detected by mfpvr().
We should use mfpvr() for implementing other devices (such as plb)?
Is it ugly to call mfpvr() many times?

> In short, I can't see that there's anything wrong with the current
> structure.  There's still a little bit of cleanup to be done, but
> nothing fundamentally wrong.

I also think that there is no wrong with the current.
But I think it seems to be ugly...
I think, we should go toward a beautiful and easy(simple) design.

-- 
Kind Regards,
--- shige
Shigeyuki Fukushima <shige@{FreeBSD,jp.FreeBSD,NetBSD}.org>




Home | Main Index | Thread Index | Old Index