hw/arm: add support for shim loading

Add support for direct kernel boot with
shim to the arm platform.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20260521112806.504961-4-kraxel@redhat.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
Gerd Hoffmann
2026-05-21 13:28:06 +02:00
committed by Peter Maydell
parent 5ecd98063e
commit 94affc307d
2 changed files with 7 additions and 0 deletions

View File

@@ -1161,6 +1161,11 @@ static void arm_setup_firmware_boot(ARMCPU *cpu, struct arm_boot_info *info)
fw_cfg_add_string(fw_cfg, FW_CFG_CMDLINE_DATA,
info->kernel_cmdline);
}
if (info->shim_filename) {
load_image_to_fw_cfg_file(fw_cfg, "etc/boot/shim",
info->shim_filename);
}
}
/*
@@ -1195,6 +1200,7 @@ void arm_load_kernel(ARMCPU *cpu, MachineState *ms, struct arm_boot_info *info)
* doesn't support secure.
*/
assert(!(info->secure_board_setup && kvm_enabled()));
info->shim_filename = ms->shim_filename;
info->kernel_filename = ms->kernel_filename;
info->kernel_cmdline = ms->kernel_cmdline;
info->initrd_filename = ms->initrd_filename;

View File

@@ -39,6 +39,7 @@ void armv7m_load_kernel(ARMCPU *cpu, const char *kernel_filename,
/* arm_boot.c */
struct arm_boot_info {
uint64_t ram_size;
const char *shim_filename;
const char *kernel_filename;
const char *kernel_cmdline;
const char *initrd_filename;