Andy Walls wrote: > > OK. Here's the deal: > > The NVIDIA device needs two swaths of physical addresses to map on-card > resources into physical address space: > > 16 M non-prefetchable (likely register space) > 256 M(!) prefetchable (likely video memory) > > The CX23418 devices need one swath of physical addresses to map on-card > resources into physical memory: > > 64 M non-prefetchable (for both registers and memory) > > Normally what happens is that when you add or remove a card, the BIOS > notices and recomutes where it should allocate resources for every PCI > device and stores it in the BIOS ESCD. Then when the Linux kernel > boots, it is free to ignore the BIOS' decisions and set up all the > resources itself. > > Here's the problem: the BIOS or the Linux kernel is screwing up when the > HVR-1600 is installed an can't find a 265M, aligned, contiguous window > for the NVidia device's prefetchable memory and any other devies behind > the PCI-AGP bridge (of which there are none). > > Notice from lspci or /proc/iomem, that when the NVidia allocations are > OK, the 256 M swath is located at e0000000-efffffff in physical address > space. When things fail it is not allocated. But look, at the PCI-AGP > bridge memory allocations when things fail: > > (pasted from the other email) > >> 00:01.0 PCI bridge [0604]: Intel Corporation 82865G/PE/P PCI to AGP >> Controller [8086:2571] (rev 02) (prog-if 00 [Normal decode]) >> Latency: 64 >> Bus: primary=00, secondary=01, subordinate=01, sec-latency=32 >> Memory behind bridge: f8000000-f9ffffff >> Prefetchable memory behind bridge: d8000000-e7ffffff > > A 256 M window is set up, but the BIOS or Linux has decided to align it on a > 128 M boundary. This is essentially useless for a device behind this > bridge that has a 256 M window. From the PCI spec, the windows must be > naturally aligned by size. > > And, to add insult to injury, if you look at the /proc/iomem for both > cases and the e820 data, a properly aligned 256M window should be > available at 0xd0000000-0xdfffffff. > > So all that's nice, but what to do? > > 1. With the HVR-1600 installed, you could try: > > a. unload the nvidia module(s) > b. manually fixup the PCI-AGP bridge and Nvidia device BARs > with setpci > c. reload the nvidia module > > or > > 2. When you install both cards in the machine, enter the BIOS and clear > the ESCD data (it should be an option somewhere) to force the BIOS to > recompute things. Then when you boot linux make sure the kernel command > line has: pci=use_crs (or pci=use_crs,earlydump) to have the PCI current > resources extracted from the BIOS by the ACPI subsystem. (At least > that's what I think happens!) This will hopefully let you know whether > it's linux or the BIOS screwing things up. > > or > > 3. When you install both cards, clear the ESCD data, and add pci=bfsort > to the kernel command line. This (or pci=nobfsort) should change the > order of PCI devices and may change the way linux allocates resources to > the devices. > > > > Also the kernel commandline parameters: loglevel=7 and pci=earlydump > will dump alot about what the kernel is doing during early init and the > earlydump will dump out the PCI device config registers in the state the > BIOS left them in. > > > Good luck. > > Andy >
I can't tell you how much I appreciate you taking the time to delve that deeply into the issue. It is really greatly appreciated. I was able to spend 2-3 hours on this issue today between the kids naps. Good news and bad news. The good news is I now have everything working. The bad news is it had nothing to do with any of the suggestions above ;) I started with #3, found the option in the bios to clear the ESCD data, and tried different combos of the kernel command line all with no joy. Then I moved on to #2 and tried various combos of that. Then I tried combos of #2 and #3. After some more research I found some others having similar issues on the nvidia site and tried some combos of pci=routeirq, noapic, irqpoll and a few others I can't remember at the moment. If you can't tell I was avoiding #1 as I've never done that before I figured it would take a long time to learn. I had also read that some people with similar issues had them magically go away with a bios upgrade, so I also started down that path. That turned into a whole other nightmare as the only bios update utility for this board is for windows and this machine has linux. Also, since it is older they kinda expect a floppy drive, which I don't have. So the bios upgrade idea was dropped. So spent 30 minutes digging out the manual from the moving boxes and started reading through and happened to notice "AGP aperture size" in the bios. Hmmmmm I said. I check the current setting and it was at 128M. I boosted up to 256M and rebooted and now everything works great without and extra kernel command like options. Again, Andy, I can't tell you how much I appreciate you spending the time on such minute details. I really do appreciate it. Scott _______________________________________________ ivtv-users mailing list [email protected] http://ivtvdriver.org/mailman/listinfo/ivtv-users
