[SeaBIOS] [PATCH] map 64-bit PCI BARs at location provided by emulator
kraxel at redhat.com
Fri Oct 11 14:35:50 CEST 2013
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?
More information about the SeaBIOS