qemu-arm
[Top][All Lists]
Advanced

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

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


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

On 11/17/23 17:17, Philippe Mathieu-Daudé wrote:
Both 'netduinoplus2' and 'olimex-stm32-h405' machines ignore the
CPU type requested by the command line. This might confuse users,
since the following will create a machine with a Cortex-M4 CPU:

   $ qemu-system-aarch64 -M netduinoplus2 -cpu cortex-r5f

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 netduinoplus2 -cpu cortex-r5f
   qemu-system-aarch64: Invalid CPU type: cortex-r5f-arm-cpu
   The valid types are: cortex-m4-arm-cpu

Since the SoC family can only use Cortex-M4 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/stm32f405_soc.h | 4 ----
  hw/arm/netduinoplus2.c         | 7 ++++++-
  hw/arm/olimex-stm32-h405.c     | 8 ++++++--
  hw/arm/stm32f405_soc.c         | 8 +-------
  4 files changed, 13 insertions(+), 14 deletions(-)


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




reply via email to

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