From: Song Gao Date: Wed, 30 Oct 2024 01:23:59 +0000 (+0800) Subject: hw/loongarch/boot: Use warn_report when no kernel filename X-Git-Tag: v9.2.0-rc0~25^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6495c577bd7edf53bd89e9f26c1f6263fcf7e71a;p=thirdparty%2Fqemu.git hw/loongarch/boot: Use warn_report when no kernel filename When we run “qemu-system-loongarch64 -qmp stdio -vnc none -S”, we get an error message “Need kernel filename” and then we can't use qmp cmd to query some information. So, we just throw a warning and then the cpus starts running from address VIRT_FLASH0_BASE. Signed-off-by: Song Gao Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20241030012359.4040817-1-gaosong@loongson.cn> --- diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c index cb668703bdd..f258eefe9ac 100644 --- a/hw/loongarch/boot.c +++ b/hw/loongarch/boot.c @@ -278,7 +278,7 @@ static void init_boot_rom(struct loongarch_boot_info *info, void *p) static void loongarch_direct_kernel_boot(struct loongarch_boot_info *info) { void *p, *bp; - int64_t kernel_addr = 0; + int64_t kernel_addr = VIRT_FLASH0_BASE; LoongArchCPU *lacpu; CPUState *cs; @@ -286,8 +286,7 @@ static void loongarch_direct_kernel_boot(struct loongarch_boot_info *info) kernel_addr = load_kernel_info(info); } else { if(!qtest_enabled()) { - error_report("Need kernel filename\n"); - exit(1); + warn_report("No kernel provided, booting from flash drive."); } }