OSDN Git Service

e820: pass high memory too.
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 10 Oct 2013 08:30:27 +0000 (10:30 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 17 Oct 2013 11:06:11 +0000 (13:06 +0200)
commit0624c7f916b4d97f17726d9b295d6a6b0dc5076d
treeb5ab2845a5e344cc587b20e544403808b5923188
parent1680d485777ecf436d724631ea8722cc0c66990e
e820: pass high memory too.

We have a fw_cfg entry to pass e820 entries from qemu to the firmware.
Today it's used to pass reservations only.  This patch makes qemu pass
entries for RAM too.

This allows to pass RAM sizes larger than 1TB to the firmware and it
will also allow to pass non-contignous memory ramges should we decide
to implement that some day, say for our virtual numa nodes.

Obviously this needs some extra care to not break existing firware.

SeaBIOS loads the entries and happily adds them without looking at the
type.  Which is problematic for memory below 4g as this will overwrite
reservations added for bios memory etc.  For memory above 4g it works
just fine, seabios will merge the entry derived from cmos with the one
loaded from fw_cfg.

OVMF doesn't look at the fw_cfg e820 table.
coreboot doesn't look at the fw_cfg e820 table.

Cc: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-By: Igor Mammedov <imammedo@redhat.com>
hw/i386/pc.c