@samitouri / QOSamiQemu / commits / 4e5205339f

hw/arm: Add Axiado EVK SCM3003

Add EVK axiado-scm3003 built with AX3000 SoC Signed-off-by: Kuan-Jui Chiu <kchiu@axiado.com> Message-id: 20260713073033.3883619-7-kchiu@axiado.com Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: KConfig for the board has to depend on TCG && ARM] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Kuan-Jui Chiu committed Aug 11, 2026 at 20:14 UTC 4e5205339fc4b5e56ed4d97d4a504bdee779fb8f
5 files changed +120
hw/arm/Kconfig
+6
@@ -733,3 +733,9 @@ config AXIADO_SOC
733 select AXIADO_CLK
734 select AXIADO_SDHCI
735 select UNIMP
736 +
737 +config AXIADO_EVK
738 + bool
739 + default y
740 + depends on TCG && ARM
741 + select AXIADO_SOC
hw/arm/ax3000-boards.c new
+56
@@ -0,0 +1,56 @@
1 +/*
2 + * Axiado Boards
3 + *
4 + * Author: Kuan-Jui Chiu <kchiu@axiado.com>
5 + *
6 + * SPDX-License-Identifier: GPL-2.0-or-later
7 + */
8 +
9 +#include "qemu/osdep.h"
10 +#include "hw/arm/ax3000-boards.h"
11 +#include "hw/arm/boot.h"
12 +#include "hw/arm/machines-qom.h"
13 +#include "qemu/error-report.h"
14 +#include "qom/object.h"
15 +
16 +static struct arm_boot_info ax3000_binfo = {
17 + .loader_start = AX3000_DRAM0_BASE,
18 + .board_id = -1,
19 +};
20 +
21 +static void ax3000_machine_init(MachineState *machine)
22 +{
23 + Ax3000MachineState *ams = AX3000_MACHINE(machine);
24 +
25 + ams->soc = AX3000_SOC(object_new(TYPE_AX3000_SOC));
26 + object_property_add_child(OBJECT(machine), "soc", OBJECT(ams->soc));
27 + sysbus_realize_and_unref(SYS_BUS_DEVICE(ams->soc), &error_fatal);
28 +
29 + ax3000_binfo.ram_size = machine->ram_size;
30 + arm_load_kernel(&ams->soc->cpu[0], machine, &ax3000_binfo);
31 +}
32 +
33 +static void ax3000_machine_class_init(ObjectClass *oc, const void *data)
34 +{
35 + MachineClass *mc = MACHINE_CLASS(oc);
36 +
37 + mc->init = ax3000_machine_init;
38 + mc->default_cpus = AX3000_NUM_CPUS;
39 + mc->min_cpus = AX3000_NUM_CPUS;
40 + mc->max_cpus = AX3000_NUM_CPUS;
41 + mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-a53");
42 +}
43 +
44 +static const TypeInfo ax3000_machine_types[] = {
45 + {
46 + .name = TYPE_AX3000_MACHINE,
47 + .parent = TYPE_MACHINE,
48 + .instance_size = sizeof(Ax3000MachineState),
49 + .class_size = sizeof(Ax3000MachineClass),
50 + .class_init = ax3000_machine_class_init,
51 + .interfaces = aarch64_machine_interfaces,
52 + .abstract = true,
53 + }
54 +};
55 +
56 +DEFINE_TYPES(ax3000_machine_types)
hw/arm/ax3000-evk.c new
+27
@@ -0,0 +1,27 @@
1 +/*
2 + * Axiado Evaluation Kit Emulation
3 + *
4 + * Author: Kuan-Jui Chiu <kchiu@axiado.com>
5 + *
6 + * SPDX-License-Identifier: GPL-2.0-or-later
7 + */
8 +
9 +#include "qemu/osdep.h"
10 +#include "hw/arm/ax3000-boards.h"
11 +
12 +static void axiado_scm3003_class_init(ObjectClass *oc, const void *data)
13 +{
14 + MachineClass *mc = MACHINE_CLASS(oc);
15 +
16 + mc->desc = "Axiado SCM3003 EVK Board";
17 +}
18 +
19 +static const TypeInfo ax3000_evk_types[] = {
20 + {
21 + .name = MACHINE_TYPE_NAME("axiado-scm3003"),
22 + .parent = TYPE_AX3000_MACHINE,
23 + .class_init = axiado_scm3003_class_init,
24 + }
25 +};
26 +
27 +DEFINE_TYPES(ax3000_evk_types)
hw/arm/meson.build
+3
@@ -112,6 +112,9 @@ arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c'))
112
113 arm_common_ss.add(when: ['CONFIG_AXIADO_SOC', 'TARGET_AARCH64'], if_true: files(
114 'ax3000-soc.c'))
115 +arm_common_ss.add(when: ['CONFIG_AXIADO_EVK', 'TARGET_AARCH64'], if_true: files(
116 + 'ax3000-boards.c',
117 + 'ax3000-evk.c'))
118
119 arm_common_ss.add(files('boot.c'))
120
include/hw/arm/ax3000-boards.h new
+28
@@ -0,0 +1,28 @@
1 +/*
2 + * Axiado Boards
3 + *
4 + * Author: Kuan-Jui Chiu <kchiu@axiado.com>
5 + *
6 + * SPDX-License-Identifier: GPL-2.0-or-later
7 + */
8 +
9 +#ifndef AXIADO_BOARD_H
10 +#define AXIADO_BOARD_H
11 +
12 +#include "hw/core/boards.h"
13 +#include "hw/arm/ax3000-soc.h"
14 +
15 +#define TYPE_AX3000_MACHINE MACHINE_TYPE_NAME("ax3000")
16 +OBJECT_DECLARE_TYPE(Ax3000MachineState, Ax3000MachineClass, AX3000_MACHINE)
17 +
18 +typedef struct Ax3000MachineState {
19 + MachineState parent;
20 +
21 + Ax3000SoCState *soc;
22 +} Ax3000MachineState;
23 +
24 +typedef struct Ax3000MachineClass {
25 + MachineClass parent;
26 +
27 +} Ax3000MachineClass;
28 +#endif