aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2024-01-29 16:18:28 +0100
committerPeter Maydell <peter.maydell@linaro.org>2024-02-02 13:51:58 +0000
commit12af201a59e4cfc55381aae4ccb8cd071f026b0d (patch)
tree7be1855784411e1cd5630044d568b71d39d919c7
parentde71271a2d94f16f873c333c5962fcf8568580c6 (diff)
downloadqemu-12af201a59e4cfc55381aae4ccb8cd071f026b0d.zip
qemu-12af201a59e4cfc55381aae4ccb8cd071f026b0d.tar.gz
qemu-12af201a59e4cfc55381aae4ccb8cd071f026b0d.tar.bz2
hw/arm/zynq: Check for CPU types in machine_run_board_init()
Leverage the common code introduced in commit c9cf636d48 ("machine: Add a valid_cpu_types property") to check for the single valid CPU type. Remove the now unused MachineClass::default_cpu_type field. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Gavin Shan <gshan@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20240129151828.59544-10-philmd@linaro.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--hw/arm/xilinx_zynq.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
index 66d0de1..c57bbcc 100644
--- a/hw/arm/xilinx_zynq.c
+++ b/hw/arm/xilinx_zynq.c
@@ -355,13 +355,17 @@ static void zynq_init(MachineState *machine)
static void zynq_machine_class_init(ObjectClass *oc, void *data)
{
+ static const char * const valid_cpu_types[] = {
+ ARM_CPU_TYPE_NAME("cortex-a9"),
+ NULL
+ };
MachineClass *mc = MACHINE_CLASS(oc);
mc->desc = "Xilinx Zynq Platform Baseboard for Cortex-A9";
mc->init = zynq_init;
mc->max_cpus = 1;
mc->no_sdcard = 1;
mc->ignore_memory_transaction_failures = true;
- mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a9");
+ mc->valid_cpu_types = valid_cpu_types;
mc->default_ram_id = "zynq.ext_ram";
}