[SeaBIOS] [PATCH] qemu: handle e820 ram entries

Igor Mammedov imammedo at redhat.com
Mon Oct 14 15:24:40 CEST 2013


On Mon, 14 Oct 2013 14:22:15 +0200
Gerd Hoffmann <kraxel at redhat.com> wrote:

>   Hi,
> 
> > > +                if (0x100000000LL + RamSizeOver4G < entry.address + entry.length)
> > > +                    RamSizeOver4G = entry.address + entry.length - 0x100000000LL;
> > it's all based on assumption that there is only one highmem entry,
> > why don't take just entry.length then?
> 
> Would work today as entry.address will be 0x100000000LL at this point no
> matter what.  But if that ever changes -- say due to qemu gaining
> support for non-contigous memory -- things will break.  So we better
> should do the math to be on the safe side for the future.

providing we won't use RamSizeOver4G for 64-bit PCI window placement, the only
dependency on it left is SMBIOS which will silently break if non-contigous
memory are to be used regardless of how we count RamSizeOver4G.

There might be fair chance of that happening if system is rebooted after
memory hotplug. We don't have to update e820 table with a hotplugged regions
since they are described as ACPI devices but a real hardware does so since
not every OS supports onlinig ACPI memory devices on startup (I'd say it's
OS's bug though).


> cheers,
>   Gerd
> 
> 
> 




More information about the SeaBIOS mailing list