here are my experiences with PCI Express cards on my Sam460EX motherboard:
Picture 1: StarTec PEX1PCI1 Pericom bridge card - This card works with my Linux box and allows me to use any PCI card through it without error. On the Sam, however, it is not so friendly...
Picture 2: Regular PCI C-Media Card through Pericom bridge card - The system seems to be able to see the C-Media card through this Pericom bridge card. Any program that tries to play sound through this device stops responding.
Picture 3: 3Com Prism2 wifi card through Pericom bridge card - When WIFI analyzer runs and this driver is in place, the system hard locks.
Picture 4: ASMedia bridge built-on to the Envy24DT PCIe sound card - This one seems to work much better, see below...
Picture 5: Envy24DT chip through its onboard ASMedia bridge - The driver shows up as ENVY24HT in AHI and I can select and configure it. Programs go through the motion of playing music, levelmeters bounce, programs do not stop responding, etc.. but sadly nothing comes from the output. I believe this may be an incompatibility with the driver though, since this chip is not the exact chip that the driver is described to control. It is in the same family however.
Forthcoming: My friend has ordered a PCI Express ESI Juli@ card and is told that delivery will be 45 days. He will report his finding when the card arrives. The PCI version of this card is directly supported by the Envy24HT AHI driver.
Picture 3: 3Com Prism2 wifi card through Pericom bridge card - When WIFI analyzer runs and this driver is in place, the system hard locks.
Just a quick check, have you tried this card directly plugged into the PCI slot? I'd just like to know if it is known to work with the Prism2 driver when the PCI-to-PCIe bridge isn't in between.
I still have to look through the details in a bit more detail...
Not directly on the SAM, but it worked fine on my old MicroA1 system.
That's good enough for me.
I don't see anything wrong with the ranger screenshots that you posted. Well, the size of the Envy24DT's I/O range is bogus, but that shouldn't be a problem.
I have uploaded a small program called BridgeDump to my website (link). It dumps information about all PCI bridges in the system, including info that Ranger currently doesn't show. Of great interest is the memory and IO ranges that the bridges are programmed to pass through to the other side. Please download it, and post the dumped information.
I just remembered that the PCIe 1x port and the Sata2 slot are mutually exclusive. Have you removed te J16 jumper annd set the PCI-E 1x/SATA-2 option in UBoot to PCI-E? You need to do both. You will find the details on page 8 of the Sam460ex manual.
The bridges appear to be correctly configured. All of the Mem and IO ranges are what they need to be for the CPU to communicate with the card behind the bridges.
However, I have noticed some things that are wrong in your ranger screenshots:
Picture 2: The PCI C-Media Card's interrupt line is 0xFF. That is an illegal value which does *not* match the interrupt line that is physically connected to that PCIe slot. The RadeonHD driver specifically checks for this and disables VBlank interrupts, because this misconfiguration can instantly lockup the machine when an interrupt occurs.** In your case it seems to freeze just the program attempting to use the card.
Picture 3: The Prism2 wifi card's interrupt line is set to 0x00. In fact, its interrupt settings are the same as for the PCI bridges. AFAIK, this is either an illegal value, or indicates that interrupts aren't supported. Hence, the first attempt to use interrupts with this device will lock up the machine (as you observed).
Spectre660 sent me a screenshot of a true PCIe device plugged into that slot, and it had the following interrupt settings: Line: 0x60, Pin: A, Number: 112 Anything plugged into this PCIe port must be configured to use line 0x60.** This is also the settings that your Envy24DT is given, and that's the one that almost works. Maybe this one's problems really are caused by the Envy24HT driver not supporting the *HT chip.
So, we do have a configuration problem when a device is attached via a bridge. This is something that needs to be fixed in UBoot. It may or may not fix all of the issues, but we have enough details here to pass on to Max (a.k.a. m3x) at ACube.
Hans
** When I started working on the RadeonHD driver, I used an A1-XE and it also set the RadeonHD card's interrupt line to 0xFF, resulting in lockups when interrupts were used. I managed to temporarily work around the problem by plugging a different card into that slot to discover the correct interrupt line and pin, and then manually reprogramming the device with the correct values. That enabled me to get the interrupts working despite the UBoot bug.
Thanks to graffias79 for the experiments and thanks to Hans for the detailed analysis. What puzzles me is why the Envy24DT has the right IRQ assigned and not on the others PCIE cards, I'll investigate the problem. In the meantime a little external executable which assign the IRQ to the PCIE card may help to check if there is any other problem to correct, hope to find time in the next days to develop this little patch...
The Envy24DT card has its own ASMedia ASM1083 bridge mounted on the card. I have to assume that the ASMedia chip is getting the correct IRQ.
The other devices (C-Media and Wifi) required the StarTech PCIe to PCI adapter card which has the Pericom chip. That's the one that seems to collect the bad IRQs.
m3x wrote: What puzzles me is why the Envy24DT has the right IRQ assigned and not on the others PCIE cards, I'll investigate the problem.
Yes, that is puzzling. It's inconsistent. Added to this, Spectre660 reports that the PCI devices behind his PEX8112 PCIe-to-PCI bridge don't even get detected. Maybe he can comment on that a bit further...
Good luck with fixing whatever is causing this behaviour. Hopefully it's easy to track down and fix.