Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (45 user(s) are browsing Forums)

Members: 2
Guests: 83

VooDoo, flash, more...

Headlines

 
  Register To Post  

Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
Hello people,

Quick Question....

as some of you may know I have partially working TV card drives, but the main problem (apart from endian-ness issues) is the lack of interrupt.

On my Bt8x8 boards, the interrupts fire just fine. Actually, too fine - if the picture becomes unstable it fires off too many and crashes the VIA southbridge on my A1.

On my Cx2388x boards, I get nothing.
I think that this is because the C2388x board uses a PCI bridge, as it's a multi-function card. My understanding is that the interrupt for the CX2388x chip may be INTA# as normal, but by the time it's crossed the bridge, it could be any interrupt.

Hence my question - how can I respond to an interrupt on the other INTx# channels? The interrupt is raised correctly, but my interrupt just never gets called. Code works fine for the bt8x8.
I'm just using MapInterrupt and adding an interrupt vector from that at the moment.

Can anyone help?

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Interrupts across a PCI Bridge
Just popping in
Just popping in


See User information
Hi,

I found this link which might be helpful, though probably covering some x86-specific rules.
At the beginning of the article, there seems to be a mapping applicable to PCI boards with an integrated bridge.

Go to top
Re: Interrupts across a PCI Bridge
Home away from home
Home away from home


See User information
@spirantho

What does Ranger say that the Cx2388x's IRQ number is? With Radeon HD PCI cards, the IRQ address of the graphics chipset behind the PCI-to-PCIe bridge is never set, and so is unusable. It's a UBoot bug. As a result, the RadeonHD driver checks for this and disables interrupts if it happens.

If you want to test the interrupt code despite this, then get your TV card driver to manually set the IRQ line to the correct line for that PCI slot.** This is done by writing the value to the appropriate location in the card's PCI configuration space.

I still hope that someone will correct this UBoot bug (amongst others) some day.

Hans

** Warning: This is for testing purposes only! Your driver doesn't know everything that UBoot does about the hardware's setup, and so won't be able to get the IRQ address correct every time. In fact, it will be hard-coded for your test system.

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
Thanks to both of your for your replies!

@Centaurz

I've not seen that page before, thanks for pointing me to it!

@Hans

(This is on my Sam 440ep)
The IRQ number is 66. The IRQ lane is 0x32.
How can I find out what the correct IRQ line is for the PCI slot? There's only one slot. I noticed the IRQ lines for the onboard bits are 0x1B and 0x1D - I tried setting the IRQ line to 0x1C and 0x1F in the PCI Config space but still didn't trigger any interrupts. I set it by using WriteConfigByte to 0x3C.

Thanks again for your help - I hope I can get this working! At the moment I have to use a busy loop to detect when the interrupt is raised manually... but it'd be very cool to have it all running at max speed.


--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Interrupts across a PCI Bridge
Just popping in
Just popping in


See User information
Quote:
Spirantho wrote:

How can I find out what the correct IRQ line is for the PCI slot? There's only one slot. I noticed the IRQ lines for the onboard bits are 0x1B and 0x1D - I tried setting the IRQ line to 0x1C and 0x1F in the PCI Config space but still didn't trigger any interrupts. I set it by using WriteConfigByte to 0x3C.

A PCI slot provides 4 IRQ pins (INTA, INTB, INTC, INTD). The interrupt lines connected to these pins are normally rotated by one line for each slot. This is also done on a PCI card that contains more than one PCI device. So maybe you have to take this into account?

See here for how interrupts are alternated on PCI addon cards (the big table).

Go to top
Re: Interrupts across a PCI Bridge
Just popping in
Just popping in


See User information
Quote:
On my Cx2388x boards, I get nothing.
I think that this is because the C2388x board uses a PCI bridge, as it's a multi-function card. My understanding is that the interrupt for the CX2388x chip may be INTA# as normal, but by the time it's crossed the bridge, it could be any interrupt.

Are you sure the board use a PCI bridge ?
Could you provvide a Ranger screenshot showing the PCI devices tree on your Sam440ep ?

Max Tretene, ACube Systems Srl, Soft3
Go to top
Re: Interrupts across a PCI Bridge
Home away from home
Home away from home


See User information
Quote:


@Hans

(This is on my Sam 440ep)
The IRQ number is 66. The IRQ lane is 0x32.
How can I find out what the correct IRQ line is for the PCI slot? There's only one slot. I noticed the IRQ lines for the onboard bits are 0x1B and 0x1D - I tried setting the IRQ line to 0x1C and 0x1F in the PCI Config space but still didn't trigger any interrupts. I set it by using WriteConfigByte to 0x3C.


If the IRQ were unset, then it would be 0xFF, so it looks like it's being set up properly. Which IRQ pin is it set to? Ranger usually lists: Line, Pin and Number (the line and pin being the most important). Anyway, UBoot is setting up the IRQ details, so it doesn't really matter.

Maybe there is a flag in a register somewhere on the C2388x that affects IRQs, and hasn't been set properly yet.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
Hmmm... maybe it doesn't use a PCI bridge as such then. It's a multifunction device but the tree doesn't show a bridge in ranger.

But then why does the interrupt never trigger? Looking at the linux source, they just enable interrupts using the IRQ and it works - but I get nothing.

The two other devices have much lower IRQ numbers, in the 40s, I think it was - the 23882 has 66!

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Interrupts across a PCI Bridge
Just popping in
Just popping in


See User information
Quote:
The two other devices have much lower IRQ numbers, in the 40s, I think it was - the 23882 has 66!

66 is the right value for the PCI slot IRQ on a Sam440ep (INTA)
The C2388x use edge or level triggered IRQ ?

Max Tretene, ACube Systems Srl, Soft3
Go to top
Re: Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
Not sure but I'm pretty sure I tried both...

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Interrupts across a PCI Bridge
Home away from home
Home away from home


See User information
Which interrupt pin is it set to use (check in Ranger)? A, B, C, or D? M3x says that it should be A, but multi-function devices can use other IRQ pins too.

There may still be some initialisation that UBoot doesn't handle properly which the Linux drivers rely on. You may also have to enable multiple IRQ enable bits. For example, on graphics cards there's the master IRQ enable, and then individual IRQ enable and config flags for each different IRQ (e.g., VBlank, command processor done, etc.).

I hope that you manage to find whatever it is that is preventing IRQs from happening.

Hans

http://hdrlab.org.nz/ - Amiga OS 4 projects, programming articles and more.
https://keasigmadelta.com/ - more of my work
Go to top
Re: Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
It's pin A, as it should be.

I think I've tried everything I can think of now, I really don't know what to do to be honest. It just never raises the interrupt!
A shame, as I can't get this working properly without interrupts, and this card has the MPEG encoder and DVB-T decoder too...

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top
Re: Interrupts across a PCI Bridge
Just popping in
Just popping in


See User information
I'm probably way off track but when looking at Linux driver discussions I see mentions of the kernel needing some kind of firmware to drive the cards. Perhaps this firmware is doing some magic card initialization that you need?


Go to top
Re: Interrupts across a PCI Bridge
Quite a regular
Quite a regular


See User information
I've not heard of a firmware on a TV card like this... I don't believe there is one here anyway.

Must be something I'm missing though. Most confusing...

--
Ian Gledhill
ian.gledhill@btinternit.com (except it should be internEt of course...!)
Check out my company's shop: http://www.mutant-caterpillar.co.uk/shop/ - specialising in Sinclair Spectrums but will be adding Amigas!
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project