qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 39/43] hw/loongarch: Add LoongArch load elf function.


From: Richard Henderson
Subject: Re: [PATCH v2 39/43] hw/loongarch: Add LoongArch load elf function.
Date: Tue, 26 Apr 2022 19:23:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]