qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH-for-8.2? v2 4/4] hw/arm/stm32f100: Report error when incorrec


From: Gavin Shan
Subject: Re: [PATCH-for-8.2? v2 4/4] hw/arm/stm32f100: Report error when incorrect CPU is used
Date: Mon, 20 Nov 2023 17:17:43 +1000
User-agent: Mozilla Thunderbird

On 11/17/23 17:17, Philippe Mathieu-Daudé wrote:
The 'stm32vldiscovery' machine ignores the CPU type requested by
the command line. This might confuse users, since the following
will create a machine with a Cortex-M3 CPU:

   $ qemu-system-aarch64 -M stm32vldiscovery -cpu neoverse-n1

Set the MachineClass::valid_cpu_types field (introduced in commit
c9cf636d48 "machine: Add a valid_cpu_types property").
Remove the now unused MachineClass::default_cpu_type field.

We now get:

   $ qemu-system-aarch64 -M stm32vldiscovery -cpu neoverse-n1
   qemu-system-aarch64: Invalid CPU type: neoverse-n1-arm-cpu
   The valid types are: cortex-m3-arm-cpu

Since the SoC family can only use Cortex-M3 CPUs, hard-code the
CPU type name at the SoC level, removing the QOM property
entirely.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  include/hw/arm/stm32f100_soc.h | 4 ----
  hw/arm/stm32f100_soc.c         | 9 ++-------
  hw/arm/stm32vldiscovery.c      | 7 ++++++-
  3 files changed, 8 insertions(+), 12 deletions(-)


Reviewed-by: Gavin Shan <gshan@redhat.com>




reply via email to

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