qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 32/38] sparc: leon3: use generic cpu_model parsi


From: Philippe Mathieu-Daudé
Subject: Re: [Qemu-devel] [PATCH 32/38] sparc: leon3: use generic cpu_model parsing
Date: Mon, 2 Oct 2017 12:54:29 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 10/02/2017 06:08 AM, Igor Mammedov wrote:
Signed-off-by: Igor Mammedov <address@hidden>

Reviewed-by: Philippe Mathieu-Daudé <address@hidden>

not easy to boot this one, I wonder who still uses it...

building u-boot with:
http://git.denx.de/?p=u-boot.git;a=commit;h=9eed48c8bec98425dbd995dd72c40e9ad7a8c26b

I can't get further than:
https://lists.gnu.org/archive/html/qemu-discuss/2016-05/msg00025.html

Anyway:
Tested-by: Philippe Mathieu-Daudé <address@hidden>

---
CC: address@hidden
CC: address@hidden
CC: address@hidden
---
  hw/sparc/leon3.c | 8 ++------
  1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
index ec2816b..8c66d5a 100644
--- a/hw/sparc/leon3.c
+++ b/hw/sparc/leon3.c
@@ -107,7 +107,6 @@ static void leon3_set_pil_in(void *opaque, uint32_t pil_in)
  static void leon3_generic_hw_init(MachineState *machine)
  {
      ram_addr_t ram_size = machine->ram_size;
-    const char *cpu_model = machine->cpu_model;
      const char *kernel_filename = machine->kernel_filename;
      SPARCCPU *cpu;
      CPUSPARCState   *env;
@@ -122,11 +121,7 @@ static void leon3_generic_hw_init(MachineState *machine)
      ResetData  *reset_info;
/* Init CPU */
-    if (!cpu_model) {
-        cpu_model = "LEON3";
-    }
-
-    cpu = SPARC_CPU(cpu_generic_init(TYPE_SPARC_CPU, cpu_model));
+    cpu = SPARC_CPU(cpu_create(machine->cpu_type));
      env = &cpu->env;
cpu_sparc_set_id(env, 0);
@@ -222,6 +217,7 @@ static void leon3_generic_machine_init(MachineClass *mc)
  {
      mc->desc = "Leon-3 generic";
      mc->init = leon3_generic_hw_init;
+    mc->default_cpu_type = SPARC_CPU_TYPE_NAME("LEON3");
  }
DEFINE_MACHINE("leon3_generic", leon3_generic_machine_init)




reply via email to

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