Port-macppc archive

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

Re: [PATCH] Incorrect segment 0 initialization for PMAC G5



On 04/02/13 12:33, Phileas Fogg wrote:
Hi Michael,

we need to extend/rework the OpenPIC interface because
currently the implementation assumes the little-endian
architecture which is not true on PowerMAC G5 11,2.

And if we want to reuse some parts of the current OpenPIC
implementation then we need to extend it and support
the big-endian architecture too.

I thought of a global variable "openpic_be" which can be set
to 0 or 1. And "openpic_read" and "openpic_write" methods
will check it.

And then rename the 2nd parameter of "setup_openpic" to "flags"
and define 2 flags:

OPENPIC_FLAG_PASSTHROUGH and OPENPIC_FLAG_BIGENDIAN

What do you think ?

Regards


Global variable is probably not what you want. U3 systems have an I2C controller on the northbridge which uses the internal PIC which is cascaded on such machines to the OpenPIC in the macio device on the PCI bus. The result is that they have a big-endian PIC on the northbridge and a little-endian PIC in MacIO on the same machine.
-Nathan


Home | Main Index | Thread Index | Old Index