You can save yourself the trouble of recalculating PCI bridge resource windows if you either use a recent Linux kernel or Windows Vista. According tonando4 wrote: There is no DOS tool that I've been able to find to change the extended pci config registers prior to boot which may give a more positive result here. So another way would be to write a grub2 module as instructed by Uncle Joe [...] to change both PCI bridge memory ranges and PCI configuration registers. Source code here [...]. Just look at 4gb.c in the function SetBridgeMemoryRange() could be used as a basis.
http:// tjworld. net/wiki/Linux/PCIDynamicResourceAllocationManagement (remove the spaces)
Vista (and probably Win 7) does fix bridge resources, so you can restrict yourself to just finding a free range for the PCI card resources which is hard enough to do generically, but pretty easy if the system doesn't change (no BIOS updates, no new/changed PCI devices). You can determine the resource size by booting Linux (maybe the R/W utility will tell you as well, not sure) and if you have a Linux kernel version which does not perform resource reallocation, you even know where the holes in the address space are.
Believe me, writing a full-blown resource allocator (with bridge support and chipset quirk support) is extremely painful and only a few people in the world can do it correctly. I do quite some x86 firmware development, but even I don't touch the resource allocator there (well, unless I get reviews from the person who wrote the allocator in the first place).
The GRUB module looks like a neat way to fix card resources before the OS (Windows/Linux/OSX) runs.