multiboot2: Do not pass memory maps to image if EFI boot services are enabled
authorDaniel Kiper <daniel.kiper@oracle.com>
Fri, 17 Jul 2015 22:09:31 +0000 (00:09 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 27 Oct 2016 13:55:00 +0000 (15:55 +0200)
commitf2b6c20a258b328ae8717cd5624d7b039328bcc0
tree9b4d4de0c223ea0b263c10a04e2e97e15943fd31
parentba89c19f4995e01e3b84c6680f12f14bf0f6a38b
multiboot2: Do not pass memory maps to image if EFI boot services are enabled

If image requested EFI boot services then skip multiboot2 memory maps.
Main reason for not providing maps is because they will likely be
invalid. We do a few allocations after filling them, e.g. for relocator
needs. Usually we do not care as we would have finished boot services.
If we keep boot services then it is easier/safer to not provide maps.
However, if image needs memory maps and they are not provided by bootloader
then it should get itself just before ExitBootServices() call.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Vladimir Serbinenko <phcoder@gmail.com>
grub-core/loader/multiboot_mbi2.c