kern/ieee1275/init/ppc64: Decide by request whether to initialize region

Let the regions_claim() request structure's init_region determine whether
to call grub_mm_init_region() on it. This allows for adding memory to
GRUB's memory heap if init_region is set to true, or direct usage of the
memory otherwise. Set all current callers' init_region to true since they
want to add memory regions to GRUB's heap.

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>
This commit is contained in:
Stefan Berger authored and Daniel Kiper committed 2023-12-05 14:18:44 +01:00
1 parent 0bb59fa9a3
commit ea2c934849
2 files changed
+7 -1

No files matched your search

+3
View File
@@ -21,11 +21,14 @@
#ifndef GRUB_IEEE1275_ALLOC_HEADER
#define GRUB_IEEE1275_ALLOC_HEADER 1
#include <stdbool.h>
#include <grub/memory.h>
struct regions_claim_request {
unsigned int flags; /* GRUB_MM_ADD_REGION_(NONE|CONSECUTIVE) */
grub_uint32_t total; /* number of requested bytes */
bool init_region; /* whether to add memory to the heap using grub_mm_init_region() */
};
#endif /* GRUB_IEEE1275_ALLOC_HEADER */