Le 31/05/2023 à 19:43, Philippe Mathieu-Daudé a écrit :
On 31/5/23 14:53, Mark Cave-Ayland wrote:
Also change the instantiation of the CPU to use object_initialize_child()
followed by a separate realisation.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayl...@ilande.co.uk>
---
  hw/m68k/q800.c         | 13 ++++++++-----
  include/hw/m68k/q800.h |  2 ++
  2 files changed, 10 insertions(+), 5 deletions(-)


@@ -407,8 +407,10 @@ static void q800_machine_init(MachineState *machine)
      }
      /* init CPUs */
-    cpu = M68K_CPU(cpu_create(machine->cpu_type));
-    qemu_register_reset(main_cpu_reset, cpu);
+    object_initialize_child(OBJECT(machine), "cpu", &m->cpu,
+                            M68K_CPU_TYPE_NAME("m68040"));

Shouldn't we keep using machine->cpu_type?

If the m68040 is the single CPU usable, we should set
MachineClass::valid_cpu_types[] in q800_machine_class_init().


You're right. Quadra 800 only exists with 68040 processor.

Originally I didn't want to stick to the processor and memory limit to be able to experiment, but as the work of Mark makes the machine converging to the real hardware specs, I think we can force to use only 68040. The "virt" machine is a better vehicule to experiment now.

Thanks,
Laurent

Reply via email to