blkmap: pass information on ISO image to the OS
authorSughosh Ganu <sughosh.ganu@linaro.org>
Mon, 17 Mar 2025 08:34:02 +0000 (14:04 +0530)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 26 Mar 2025 11:28:08 +0000 (13:28 +0200)
commit61e0a20aecf4af6cdc223bd8cd1bd82fe5e3d9f6
tree941665a95d85cfed88c16851dc464fd7c9d3e816
parent54c39bf104017e3a0b30fdff6104141b719af9ef
blkmap: pass information on ISO image to the OS

The EFI HTTP boot puts the ISO installer image at some location in
memory. Information about this image has to be passed on to the OS
kernel, which is done by adding a persistent memory(pmem) node to the
devicetree(DT) that is passed to the OS. The OS kernel then gets
information about the presence of this ISO image and proceeds with the
installation.

In U-Boot, this ISO image gets mounted as a memory mapped blkmap
device slice, with the 'preserve' attribute. Add a helper function
which iterates through all such slices, and invokes a callback. The
callback adds the pmem node to the DT and removes the corresponding
memory region from the EFI memory map. Invoke this helper function as
part of the DT fixup which happens before booting the OS.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Tobias Waldekranz <tobias@waldekranz.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
boot/image-fdt.c
drivers/block/blkmap.c
include/blkmap.h
include/efi.h
lib/efi_loader/efi_helper.c