On Fr, 2013-10-11 at 12:19 +0200, Igor Mammedov wrote:
Currently 64-bit PCI BARs are unconditionally mapped by BIOS right over 4G + RamSizeOver4G location, which doesn't allow to reserve extra space before 64-bit PCI window. For memory hotplug an extra RAM space might be reserved after present 64-bit RAM end and BIOS should map 64-bit PCI BARs after it.
Introduce "etc/pcimem64-start" romfile to provide BIOS a hint where it should start mapping of 64-bit PCI BARs. If romfile is missing BIOS reverts to legacy behavior and starts mapping right after high memory.
Looks good overall.
struct pci_region r64_mem, r64_pref;
u64 base64 = le64_to_cpu(romfile_loadint("etc/pcimem64-start",
0x100000000ULL + RamSizeOver4G));
Should we sanity-check base64 maybe? Make sure it isn't smaller than 0x100000000ULL + RamSizeOver4G?
cheers, Gerd