PCI resources above 4GB
yinghai at kernel.org
Thu Apr 12 09:07:33 PDT 2012
On Thu, Apr 12, 2012 at 4:22 AM, Steven Newbury <steve at snewbury.org.uk> wrote:
> Thanks, that fixed it! :) I had a similar patch I've been working on but I had my fix in the wrong place!
> In the working case, initially the BIOS has set GMA to within the low system DRAM 0xC0000000 obviously invalid. This conflict is detected and it's relallocated to 0x12000000.
> I've attempted to modify probe.c to disable 64-bit BARs not allocated above 4G so they get reallocated above when possible later. It seemed to work, but again broke GMA despite the BAR originally containing an invalid address as mentioned above, it seems for some reason something is different when the conflict is detected and rellocated, compared to disabling it early then allocating a valid value..?
> It would be useful to preserve as much low PCI memory address space as possible for hotplug devices (like my Radeon), but the other problem is small regions get allocated at the bottom, resulting in the inability to find large aligned regions later on. I see code to default to top-down allocation was reverted, I guess I'm going to have to dig into the archive to find out why...
for hotplug case, You can work around like:
after hotplug add,
1. use lspci and /proc/iomem to find out offending device and bridge.
2. use /sys/.../unbind etc to stop driver for those devices.
3. use setpci to clear related BAR
4. use /sys/devices/pci000..../remove to remove those devices
5. echo 1 > /sys/bus/pci/rescan
then it should work...
More information about the dri-devel