All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/6] Add pmem node for preserving distro ISO's
@ 2025-02-27 11:15 Sughosh Ganu
  2025-02-27 11:15 ` [PATCH v5 1/6] fdt: add support for adding pmem nodes Sughosh Ganu
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Sughosh Ganu @ 2025-02-27 11:15 UTC (permalink / raw)
  To: u-boot
  Cc: Ilias Apalodimas, Simon Glass, Tom Rini, Heinrich Schuchardt,
	Anton Antonov, Tobias Waldekranz, Bin Meng


When installing a distro via EFI HTTP boot some OS installers expect
the .iso image to be preserved and treat it as a "CDROM" to install
packages.

This is problematic in EFI, since U-Boot mounts the image, starts the
installer, and eventually calls ExitBootServices. At that point the
image U-Boot mounted disappears. Some distros don't care and download
the missing packages from a web archive, while others halt the
installation complaining they can't find certain packages.

If the firmware uses ACPI, this is supported by using NFIT which
provides NVDIMM ramdisks to the OS and preserves the image.
We don't have anything in place for Device Trees though. Since DT
supports persistent memory nodes (pmem) use those and preserve the
.iso for installers.

The issue can be reproduced by attempting an EFI HTTP boot with Ubuntu
live server ISO, or a Rocky Linux ISO. The installation would fail
with the failure to locate certain packages.

The patches are adding support for adding the pmem node to the DT that
is being passed to the OS, along with removing the memory region
containing the ISO image from the EFI memory map. This is being done
through a helper function in the blkmap driver which scans for all
blkmap mappings and does the above configurations for the relevant
mappings.

Changes since V4:
* Rebase patch(2) changes on top of the next branch
* Use BIT() based macros instead of enum
* Change the name of the field from type to attr as it would contain
  attributes other than the type of the slice
* Reword the commit message(patch 6)
* Add a helper function blkmap_get_preserved_pmem_slice()
* Add a function pmem_node_efi_memmap_setup() for pmem node and EFI
  memmap related setup




Ilias Apalodimas (2):
  efi_loader: add a function to remove memory from the EFI map
  efi_loader: preserve installer images in pmem

Masahisa Kojima (1):
  fdt: add support for adding pmem nodes

Sughosh Ganu (3):
  blkmap: store type of blkmap slice in corresponding structure
  blkmap: add an attribute to preserve the mem mapping
  blkmap: pass information on ISO image to the OS

 boot/fdt_support.c            | 41 ++++++++++++++++++++++-
 boot/image-fdt.c              |  7 ++++
 cmd/blkmap.c                  |  9 +++--
 drivers/block/blkmap.c        | 63 ++++++++++++++++++++++++++++++++---
 drivers/block/blkmap_helper.c |  2 +-
 include/blkmap.h              | 21 +++++++++++-
 include/efi.h                 | 13 ++++++++
 include/efi_loader.h          | 18 ++++++++++
 include/fdt_support.h         | 14 ++++++++
 lib/efi_loader/efi_bootmgr.c  | 22 +++++++++---
 lib/efi_loader/efi_helper.c   | 37 ++++++++++++++++++++
 lib/efi_loader/efi_memory.c   | 56 ++++++++++++++++++++++---------
 12 files changed, 273 insertions(+), 30 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-02-28  6:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-27 11:15 [PATCH v5 0/6] Add pmem node for preserving distro ISO's Sughosh Ganu
2025-02-27 11:15 ` [PATCH v5 1/6] fdt: add support for adding pmem nodes Sughosh Ganu
2025-02-27 11:15 ` [PATCH v5 2/6] efi_loader: add a function to remove memory from the EFI map Sughosh Ganu
2025-02-27 11:15 ` [PATCH v5 3/6] efi_loader: preserve installer images in pmem Sughosh Ganu
2025-02-27 11:15 ` [PATCH v5 4/6] blkmap: store type of blkmap slice in corresponding structure Sughosh Ganu
2025-02-27 19:49   ` Tobias Waldekranz
2025-02-28  6:08   ` Ilias Apalodimas
2025-02-27 11:15 ` [PATCH v5 5/6] blkmap: add an attribute to preserve the mem mapping Sughosh Ganu
2025-02-27 19:51   ` Tobias Waldekranz
2025-02-28  6:24   ` Ilias Apalodimas
2025-02-27 11:15 ` [PATCH v5 6/6] blkmap: pass information on ISO image to the OS Sughosh Ganu
2025-02-27 12:26   ` Sughosh Ganu
2025-02-27 20:00   ` Tobias Waldekranz
2025-02-28  6:54     ` Sughosh Ganu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.