48 lines
1.7 KiB
Diff
48 lines
1.7 KiB
Diff
|
|
From b7217c8f9b3f1d611485bad1263e109484a743e3 Mon Sep 17 00:00:00 2001
|
||
|
|
From: Song Gao <gaosong@loongson.cn>
|
||
|
|
Date: Wed, 30 Oct 2024 09:23:59 +0800
|
||
|
|
Subject: [PATCH 77/78] hw/loongarch/boot: Use warn_report when no kernel
|
||
|
|
filename
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
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 <gaosong@loongson.cn>
|
||
|
|
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
|
||
|
|
Message-ID: <20241030012359.4040817-1-gaosong@loongson.cn>
|
||
|
|
Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
|
||
|
|
---
|
||
|
|
hw/loongarch/boot.c | 5 ++---
|
||
|
|
1 file changed, 2 insertions(+), 3 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/hw/loongarch/boot.c b/hw/loongarch/boot.c
|
||
|
|
index cb668703bd..f258eefe9a 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.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
--
|
||
|
|
2.39.1
|
||
|
|
|