grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v5 00/10] ppc64: Restrict memory allocations for kernel and initr


From: Stefan Berger
Subject: [PATCH v5 00/10] ppc64: Restrict memory allocations for kernel and initrd
Date: Wed, 15 Nov 2023 10:59:31 -0500

This series of patches converts the PowerPC ieee1275 memory allocator
for kernel and initrd to use the (PowerPC) regions_claim memory allocator
that takes into account memory regions that are not allowed to be used,
such as the gap between 640MB and 768MB as well as memory regions beyond
an address in case an fadump is present. Otherwise those two could be
loaded into restricted memory regions and either cause a crash or
corruption of the fadump.

I adjusted the kernel and initrd load in loader/powerpc/ieee1275 to use the
new memory allocator only on PowerVM and PowerKVM since this code is shared
with other platforms, such as old PowerMACs.

Regards,
   Stefan

v5:
  - Replaced grub with GRUB in commit messages
  - Fixed copyright holders in alloc.h

v4:
  - Fixed typos in commit messages found by Hari
  - Exporting grub_regions_claim() as suggested by Hari

v3:
  - Addressed issues raised by Daniel and added his R-B tags
  - Added one comment fix patch and one for debugging output
  - Removed len return parameter from request struct since unused


Stefan Berger (10):
  kern/ieee1275/init: ppc64: Introduce a request for regions_claim
  kern/ieee1275/init: ppc64: Decide by request whether to initialize
    region
  kern/ieee1275/init: ppc64: Return allocated address using context
  kern/ieee1275/init: ppc64: Add support for alignment requirements
  kern/ieee1275/init: ppc64: Rename regions_claim to grub_regions_claim
  kern/ieee1275/cmain: ppc64: Introduce flags to identify KVM and Power
    VM
  loader/powerpc/ieee1275: Use new allocation function for kernel and
    initrd
  kern/ieee1275/ieee1275: debug: Display successful memory claims
  kern/ieee1275/init: ppc64: Fix a comment
  kern/ieee1275/init: ppc64: Display upper_mem_limit for debugging

 grub-core/Makefile.am                     |  1 +
 grub-core/kern/ieee1275/cmain.c           |  6 +-
 grub-core/kern/ieee1275/ieee1275.c        |  2 +
 grub-core/kern/ieee1275/init.c            | 73 ++++++++++++++++++-----
 grub-core/loader/powerpc/ieee1275/linux.c | 50 +++++++++++++---
 include/grub/ieee1275/ieee1275.h          |  4 ++
 include/grub/powerpc/ieee1275/alloc.h     | 39 ++++++++++++
 7 files changed, 152 insertions(+), 23 deletions(-)
 create mode 100644 include/grub/powerpc/ieee1275/alloc.h

-- 
2.25.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]