The current model of loader copy "rom blobs" and kept in memory until a reset occurs and waste host memory.
This serial of patches uses private reset handlers to load from hard disk on reset, which could make loader framework more dynamic and reduce the memory consumption of QEMU process. Olivia Yin (3): use image_file_reset to reload initrd image use uimage_reset to reload uimage use elf_reset to reload elf image elf.h | 10 ++++++ hw/elf_ops.h | 101 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/loader.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++---------- hw/loader.h | 7 ++++ 4 files changed, 203 insertions(+), 18 deletions(-) --- v4: uImage/vmlinux/ramdisk had been verified on PowerPC platforms. Issue: It seemed that the patch 3/3 could not free the memory for phdr, and the memory map of QEMU will increase 1392K every time. If free phdr, system_reset will cause segmentation fault.