]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[initrd] Squash and shuffle only initrds within the external heap
authorMichael Brown <mcb30@ipxe.org>
Thu, 22 May 2025 13:57:22 +0000 (14:57 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 23 May 2025 13:39:17 +0000 (14:39 +0100)
commitc713ce5c7bb1cf5a1c6ea75a67a8ee8c8d118c10
tree585f61266efa4561f269095ee3a85f885b42411a
parent4a39b877dd165cc903da2e15cb1c42d1d115cc80
[initrd] Squash and shuffle only initrds within the external heap

Any initrd images that are not within the external heap (e.g. embedded
images) do not need to be copied to the external heap for reshuffling,
and can just be left in their original locations.

Ignore any images that are not already within the external heap (or,
more precisely, that are wholly outside of the reshuffle region within
the external heap) when squashing and swapping images.

This reduces the maximum additional storage required by squashing and
swapping to zero, and so ensures that the reshuffling step is
guaranteed to succeed under all circumstances.  (This is unrelated to
the post-reshuffle load region check, which is still required.)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/image/initrd.c