On 4/25/22 02:10, Xiaojuan Yang wrote:
--- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -525,8 +525,12 @@ static const MemoryRegionOps loongarch_qemu_ops = { static void do_cpu_reset(void *opaque) { LoongArchCPU *cpu = opaque; + CPULoongArchState *env = &cpu->env;cpu_reset(CPU(cpu));+ if (env->load_elf) { + cpu_set_pc(CPU(cpu), env->elf_address); + }
I guess this is one way to do it, but I did show you a way completely within the board code. r~