mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:10 +00:00
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:
committed by
Peter Maydell
parent
5ecd98063e
commit
94affc307d
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user