On 11/9/22 00:02, Song Gao wrote:
Fix LoongArch check-tcg error:
   TEST    hello on loongarch64
qemu-system-loongarch64: Some ROM regions are overlapping
These ROM regions might have been loaded by direct user request or by default.
They could be BIOS/firmware images, a guest kernel, initrd or some other file 
loaded into guest memory.
Check whether you intended to load all this guest code, and whether it has been 
built to load to the correct addresses.

The following two regions overlap (in the memory address space):
   hello ELF program header segment 0 (addresses 0x0000000000200000 - 
0x0000000000242000)
   fdt (addresses 0x0000000000200000 - 0x0000000000300000)
make[1]: *** [Makefile:177: run-hello] Error 1

Reported-by: Richard Henderson <richard.hender...@linaro.org>
Signed-off-by: Song Gao <gaos...@loongson.cn>
---
  tests/tcg/loongarch64/system/kernel.ld |  7 +++++--
  1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/tcg/loongarch64/system/kernel.ld 
b/tests/tcg/loongarch64/system/kernel.ld
index f1a7c0168c..2110cfe8be 100644
--- a/tests/tcg/loongarch64/system/kernel.ld
+++ b/tests/tcg/loongarch64/system/kernel.ld
@@ -2,8 +2,11 @@ ENTRY(_start)
SECTIONS
  {
-    /* Linux kernel legacy start address.  */
-    . = 0x9000000000200000;
+    /*
+     * Linux kernel legacy start address.
+     * FDT is load at 0x200000, kernel image size must be smaller than 1M
+     */
+    . = 0x100000;

Or start above the fdt at 3M, to avoid that limitation?
The comment about the Linux kernel start address no longer applies.

Either way,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>

r~

Reply via email to