Booting Imac G5

J. Mayer l_indien at
Mon Nov 22 21:31:44 EST 2004

On Mon, 2004-11-22 at 10:37, Benjamin Herrenschmidt wrote:
> On Mon, 2004-11-22 at 10:09 +0100, J. Mayer wrote:
> > > 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.
> Does it work if you replace your flush_* with an mb() ?

Just made a few tries:
- I made the driver more secure, taking the  
  lock before any cmd_buf access and 
  releasing it when answer have been 

I tried to do mb() at the start of do_cmd() and after the cmd_done call.
Then, when reading the RTC, I read all zeroes but the first byte which
is 0x81. The cmd byte isn't modified, when I should read the command ack
which is the complement of the requested command (even if I don't check
it, for now).
I tried to add a call to flush_dcache_phys_range, then I got the same
But using flush_inval_dcache_phys_range (yes the name is quite
strange....), with or without mb(), then it works.

> > 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
> > halt.
> Yah, it's a bit messy... it can also eat PMU commands it seems ...

I'm not sure it'll eat all PMU commands, but it sure can treat some...

> > 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...
> I'll have a closer look tomorrow, nice work tho !
> I'm hoping to get an iMac G5 at work anytime soon (it was supposed to
> get here a few weeks ago, but the order didn't go thru properly
> internally, so it had to be re-issued). I'll be able to help more.

All right !
But I think I reached my first goal: I got a usable and stable machine
with all basic features available.
This is a good start for the real deep needed work !

J. Mayer <l_indien at>
Never organized

More information about the Linuxppc64-dev mailing list