Skip to content

Commit 23eb8dd

Browse files
committed
efi: payload: bootm: remove redundant reallocations in image loader
The EFI payload loader used to copy OS images, initrds and FDTs into freshly allocated EFI pages before handing them to LoadImage() or installing configuration tables. This resulted in unnecessary memory moves, extra allocations and longer boot times. Rework the loader to: - pass buffers from read_file() or FIT images directly to BS->load_image() without intermediate memcpy - drop efi_allocate_pages()/efi_free_pages() wrappers where not needed - avoid duplicate allocations for initrd and FDT data - free only the original buffer after execution/unload This eliminates redundant reallocations, simplifies the code, and reduces boot overhead. Boot flow is now more deterministic with fewer allocation failures possible on memory-constrained systems. Signed-off-by: Chali Anis <chalianis1@gmail.com>
1 parent e228e37 commit 23eb8dd

1 file changed

Lines changed: 136 additions & 208 deletions

File tree

0 commit comments

Comments
 (0)