]> git.ipfire.org Git - thirdparty/grub.git/commit
kern/efi/mm: Always request a fixed number of pages on init
authorPatrick Steinhardt <ps@pks.im>
Thu, 21 Apr 2022 05:24:19 +0000 (15:24 +1000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 4 Jul 2022 12:25:41 +0000 (14:25 +0200)
commit938c3760b8c0fca759140be48307179b50107ff6
treecf7d19fbc893b476e958894c2f2b8225d1067f74
parent887f98f0db43e33fba4ec1f85e42fae1185700bc
kern/efi/mm: Always request a fixed number of pages on init

When initializing the EFI memory subsystem, we will by default request
a quarter of the available memory, bounded by a minimum/maximum value.
Given that we're about to extend the EFI memory system to dynamically
request additional pages from the firmware as required, this scaling of
requested memory based on available memory will not make a lot of sense
anymore.

Remove this logic as a preparatory patch such that we'll instead defer
to the runtime memory allocator. Note that ideally, we'd want to change
this after dynamic requesting of pages has been implemented for the EFI
platform. But because we'll need to split up initialization of the
memory subsystem and the request of pages from the firmware, we'd have
to duplicate quite some logic at first only to remove it afterwards
again. This seems quite pointless, so we instead have patches slightly
out of order.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Patrick Steinhardt <ps@pks.im>
grub-core/kern/efi/mm.c