summaryrefslogtreecommitdiff
path: root/cmd/blkmap.c
diff options
context:
space:
mode:
authorIlias Apalodimas <ilias.apalodimas@linaro.org>2025-03-17 14:03:59 +0530
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2025-03-26 13:28:08 +0200
commitfc82cf66d05f61339abb5f8e5bfc83647dbf96cf (patch)
tree3dea958f67f1cee1c37f8f966716348c1b08d75b /cmd/blkmap.c
parentc5f6542aa8ae93b7705e27103a9fdaf8445e2915 (diff)
efi_loader: remove memory occupied by a ramdisk from EFI memory map
ACPI has NFIT and NVDIMM support to provide ramdisks to the OS. Linux and device trees have support for persistent memory(pmem) devices. The firmware can then add a pmem node for the region of memory occupied by the ramdisk when passing the device-tree to the OS. It's worth noting that for linux to instantiate the /dev/pmemX device, the memory described in the pmem node has to be omitted from the EFI memory map we hand over to the OS if ZONE_DEVICES and SPARSEMEM is enabled. With those enabled the pmem driver ends up calling devm_memremap_pages() instead of devm_memremap(). The latter works whether the memory is omitted or marked as reserved, but mapping pages only works if the memory is omitted. On top of that, depending on how the kernel is configured, that memory area must be page aligned or 2MiB aligned. PowerPC is an exception here and requires 16MiB alignment, but since we don't have EFI support for it, limit the alignment to 2MiB. Ensure that the ISO image is 2MiB aligned and remove the region occupied by the image from the EFI memory map. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'cmd/blkmap.c')
0 files changed, 0 insertions, 0 deletions