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 03/31/13 02:56, Phileas Fogg wrote:
> On 03/31/2013 03:12 AM, Michael wrote:
>> Patches please! ;)
> Will do, first i wanted to get interrupts working else the system is
> pretty unusable. At least Ethernet should work properly and then we
> could SSH to it :)
>> Just pointing openpic_init() at it doesn't work?
> Yeah, i reused openpic code, just changed the base address of the PIC.
> The kernel configures it properly and everything seems to work fine,
> interrupts get configured and enabled.
> But i have very odd issues with it. For now only Ethernet and USB
> interrupts are enabled at boot, IRQs 66, 67 and 70. I checked and
> IRQ lines are correct, the same lines are used on Linux and FreeBSD too.
> As soon as the kernel enables external interrupts and drivers
> establish their interrupts, i'm getting spurious interrupt storms for
> IRQ 66, 67 and 70. OpenPIC acks it but i still get them again.
> Currently i'm taking a look at Linux and FreeBSD kernel code and
> trying to figure out what i'm doing wrong.
> I noticed that the Linux kernel has a lot of ugly workarounds for G5's
> PIC :(
> regards

A the author of the FreeBSD code, there are two main hazards with the U4
PIC. One is that you have to use big-endian accessors for it, which it
seems like you are doing. The other, which I think you have just run
into, is that there is a hidden IO APIC attached to the Hypertransport
bus that needs to be manually coordinated with the U4 OpenPIC. You can
find how this works in the "htpic" driver at the bottom of
(starts around line 530).

I should also mention that we don't have any trouble with colors on the
6600 LE in FreeBSD, so I don't think there's a firmware bug (or at least
not one that is impossible to work around by accident...).

Home | Main Index | Thread Index | Old Index