qemu-arm
[Top][All Lists]
Advanced

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

Re: [PATCH-for-8.2? 3/6] hw/arm/stm32f100: Report error when incorrect C


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH-for-8.2? 3/6] hw/arm/stm32f100: Report error when incorrect CPU is used
Date: Thu, 16 Nov 2023 08:25:06 +0100
User-agent: Mozilla Thunderbird

On 16/11/23 00:21, 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

With [2] from cover applied, this becomes:

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

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.

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(-)

[2] 20231114235628.534334-1-gshan@redhat.com/">https://lore.kernel.org/qemu-devel/20231114235628.534334-1-gshan@redhat.com/



reply via email to

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