]> git.ipfire.org Git - thirdparty/grub.git/commit
loader/powerpc/ieee1275: Use new allocation function for kernel and initrd
authorStefan Berger <stefanb@linux.ibm.com>
Thu, 30 Nov 2023 14:17:21 +0000 (09:17 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 5 Dec 2023 13:39:33 +0000 (14:39 +0100)
commit0ac3d938a318231b0302df3e955efe0bf5053717
tree2c984690e07a0a4c9a36ca4db76d38a3c1d3384c
parent2a9a8518e9df5cb308b3d17bc52ef85ff7be0591
loader/powerpc/ieee1275: Use new allocation function for kernel and initrd

On PowerVM and KVM on Power use the new memory allocation function that
honors restrictions on which memory GRUB can actually use. In the request
structure indicate the request for a single memory block along with
address alignment restrictions. Request direct usage of the memory block
by setting init_region to false (prevent it from being added to GRUB's
heap). Initialize the found addr to -1, so that -1 will be returned
to the loader in case no memory could be allocated.

Report an out-of-memory error in case the initrd could not be loaded.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Hari Bathini <hbathini@linux.ibm.com>
Cc: Pavithra Prakash <pavrampu@in.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Carolyn Scherrer <cpscherr@us.ibm.com>
Cc: Mahesh Salgaonkar <mahesh@linux.ibm.com>
Cc: Sourabh Jain <sourabhjain@linux.ibm.com>
grub-core/loader/powerpc/ieee1275/linux.c