Booting Imac G5
l_indien at magic.fr
Mon Nov 22 20:09:14 EST 2004
On Mon, 2004-11-22 at 09:41, Benjamin Herrenschmidt wrote:
> > In fact, I spent quite a long time before I understood why I didn't get
> > valid SMU messages back....
> That's strange... I suspect the SMU must bypass normal cache coherency
> protocol in some way, but that is strange, since according to the base
> address of the SMU area, it's in the middle of K2, which is on a fully
> coherent bus.
Yes, the doorbell buffer and the doorbell GPIOs are located in the K2
and I had no problem using them.
> > As the SMU is a separate chip, I'm not so surprised that the northbridge
> > does not know that it may "corrupt" some memory. The SMU may act as a
> > fake CPU while doing this if it was located on the processor bus.
> It can't be on the processor bus. Which is why I'm surprised.
Yes, was a foolish idea....
> It seem to
> be on K2, which is on a coherent bus. You may just be missing memory
> barriers in fact. Can you show me your code ?
Sure, you'll find it attached.
> > If I understand things well, the CPU acts as an IIC slave for the SPU
> > (which seems to be a part of the SMU) then can receive commands from
> > this unit. But it seems that the CPU cannot talk directly to the SPU.
> Hrm... the CPU is definitely an i2c slave of the SPU, but the command
> processing goes through some MMIOs wirted to K2 no ?
It seems we don't access directly the SPU or it's not showed in the OF
tree. We send commands to the SMU which "translate" those commands. But
I didn't spent lot's of time on SPU parts, for now only RTC, reboot and
> > I implemented SMU communication the same way Apple does in the OF
> > driver: we talk through a doorbell buffer and a GPIO all located in the
> > MacIO space. The doorbell buffer only contains the physical address of
> > the buffer used to exchange data with the SMU.
> Right... well, it's possible that the SMU actually uses i2c accesses to
> read the memory buffer, in which case it will indeed bypass coherency
> protocols... scary !
Maybe. Take a look at my code, which is quite simple even if still not
clean. Maybe you'll find a mistake I didn't see...
J. Mayer <l_indien at magic.fr>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 12574 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20041122/cfa3a115/attachment.c
More information about the Linuxppc64-dev