Subject: Re: SmartFirmware interrupts
To: Frank Wille <frank@phoenix.owl.de>
From: Matt Sealey <matt@genesi-usa.com>
List: port-ofppc
Date: 10/20/2007 05:40:01
Frank Wille wrote:
> Matt Sealey wrote:
> 
>>> How does an address of 0xf1000cb4 help me now? Is it the memory-mapped
>>> base address of the first PIC? But where are the registers for the 
>>> second
>>> one? 0x80 bytes from there?
>>
>> Usually. One thing you can assume is that everything on the PCI bus is 
>> mapped to IRQ 9 anyway - because, it really is.
> 
> Er... you didn't reply to my question? AFAIK a 8259 has two
> 8-bit registers. Where would I find them? Especially from the
> second, cascaded 8259?
> 
> But interesting to know the IRQ. So we will hardcode this into
> the kernel? :P
> 
> And is it really desirable that all PCI devices have to share
> the same interrupt?

*bashes my head on the desk*

PCI devices have to share IRQ9, it's the law. They do this on ACPI systems
too.

Any device in the southbridge has a bunch of IRQs (IDE is still IRQ 14)
and these are gainable via the PCI interrupt pin value in config space.

Any other interrupt values are in the VT8231 somewhere.

If they are not in the device tree, check the VT8231 datasheet. I dare
say that the VT8231 and the PC i8259 controller driver which probably
already exist, are good to go here. I don't really understand why this
is such a big deal. It never was for Linux..

>> Everything else, you can assume a
>> standard PCI interrupt number (14/15 for IDE) as these are handled by 
>> the ISA bridge and trapped and transparently routed to IRQ 9.
> 
> This means that IRQ14 and 15, and some others, are never
> used on the 8259? Anything shares IRQ 9?

Everything goes through the same interrupt line eventually, there is
only one interrupt. IRQ9 for PCI slots, IRQ-whatever-Interrupt-Pin-says
for the rest. Ignore the device tree if you have to.

>> because Linux patches them.  The IDE controller has
>> 0x14 and 0x15 instead of decimal 14 and 15, for example..
> 
> Hmm... but it is irrelevant, because IDE uses IRQ 9 anyway?
> So I don't understand the effort.

No. It uses IRQ 14. For the purpose of legacy IDE crap on PCs, this has
to be so. However, there is no special magic mode to make it run on
IRQ9, you get a choice in the Southbridge of 14/15 or 10/11 :D

Could you guys PLEASE go get hold of a copy of the VT8231 datasheet..
you can google for it. However 99.999% of this is probably already
covered by drivers already present in NetBSD; after all this is a PC
standard, 7 year old southbridge.

And why are we even discussing this? This turned from an Efika progress
discussion on the same damn "why does the Pegasos present weird devices?!!?"
discussion I've been having with people for the past 4 years.

Seriously, there is nothing DIFFERENT here.

> Tell me where to find the interrupts for IDE or USB in the
> device tree of 1.2. Exact path and property name. Seems I'm
> not the only one who is too blind... :|

"interrupts" property.

Just try and get it to work and if you have a big problem, ask me about
it, otherwise we are wasting our time debating semantics here.

-- 
Matt Sealey <matt@genesi-usa.com>
Genesi, Manager, Developer Relations