Add Axiado SoC AX3005 and EVB
Subsystems (2)
v4 cover Add Axiado SoC AX3005 and EVB
This patchset introduces Axiado SoC AX3005 and evaluation board for emulation The model for Axiado SoC AX3005 supports
4 Cortex-A53 CPUs
Arm Generic Interrupt Controller v3
9 Cadence UARTs
1 SDHCI controller with PHY
8 Cadence GPIOs
Refer Axiado website for more product information
https://axiado.com/products/
and minor changes for the compatibility with existing AX3000 SoC model
Test plan:
1. Verified the machine "ax3005-evb" with following command
qemu-system-aarch64 \
-m 2G \
-machine ax3005-evb \
-device loader,file=bl31.bin,addr=0x88300000 \
-device loader,file=tee-raw.bin,addr=0x88400000 \
-device loader,file=u-boot.bin,addr=0x80000000 \
-device loader,file=fitImage,addr=0x80100000 \
-device loader,file=obmc-phosphor-image-evk-ax3005-qemu.squashfs-xz,addr=0x80B00000 \
-device loader,cpu-num=0,addr=0x88300000 \
-device loader,cpu-num=1,addr=0x88300000 \
-device loader,cpu-num=2,addr=0x88300000 \
-device loader,cpu-num=3,addr=0x88300000 \
-nographic \
-serial null \
-serial null \
-serial null \
-serial mon:stdio \
-drive if=sd,file=obmc-phosphor-image-evk-ax3005-qemu.wic,format=raw2. Run QEMU test suite
make check
Ok: 331 Fail: 0 Skipped: 17
make check-functional
Ok: 28 Fail: 0 Skipped: 7
Changes in v4:
1. Add patch ("hw/char/cadence_uart: Reserve MMIO with dynamic size") which allow other models to revise the MMIO size of Cadence UART
2. Change the MMIO size of Cadence UART to 512 KiB in Ax3000/Ax3005 SoC to resolve the overlapping region issue
3. Add memory guard in Ax3000/Ax3005 EVK to check the memory size specified by -m option and set the default_ram_size to the RAM size supported by Axiado SoC
Changes in v3:
1. Remove patch "hw/arm/ax3000-soc: Add missing class_size to TypeInfo" because it was fixed by commit 4f50d637e2 ("hw/arm/ax3000-soc: fix heap overflow from missing class_size")
Changes in v2:
1. Add patch "hw/arm/ax3000-soc: Add missing class_size to TypeInfo" to fix incorrect class size
2. Add missing class_size "Ax3005SoCClass" to ax3005_soc_types
Kuan-Jui Chiu (8):
hw/sd/axiado_sdhci: Add header guard
hw/arm: Rename ax3000-boards as axiado-boards hw/arm/ax3000: Specify SoC name in header and variable hw/char/cadence_uart: Reserve MMIO with dynamic size hw/arm/ax3000-soc: Reserve MMIO of UART with 512 KiB hw/arm/ax3000-boards: Add memory guard hw/arm: Add Axiado SoC AX3005
hw/arm: Add Axiado Ax3005 EVB
MAINTAINERS | 2 +
hw/arm/ax3000-boards.c | 13 +-
hw/arm/ax3000-evk.c | 4 +-
hw/arm/ax3000-soc.c | 6 +-
hw/arm/ax3005-evk.c | 64 +++++
hw/arm/ax3005-soc.c | 227 ++++++++++++++++++
hw/arm/meson.build | 6 +-
hw/char/cadence_uart.c | 8 +-
include/hw/arm/ax3000-soc.h | 2 +
include/hw/arm/ax3005-soc.h | 103 ++++++++
.../arm/{ax3000-boards.h => axiado-boards.h} | 10 +
include/hw/char/cadence_uart.h | 3 +
include/hw/sd/axiado_sdhci.h | 5 +
13 files changed, 443 insertions(+), 10 deletions(-)
create mode 100644 hw/arm/ax3005-evk.c
create mode 100644 hw/arm/ax3005-soc.c
create mode 100644 include/hw/arm/ax3005-soc.h
rename include/hw/arm/{ax3000-boards.h => axiado-boards.h} (69%)Signature · 1 line
2.34.1
PATCH v4 1/8 hw/sd/axiado_sdhci: Add header guard
--- include/hw/sd/axiado_sdhci.h | 5 +++++ 1 file changed, 5 insertions(+)
include/hw/sd/axiado_sdhci.h +5 -0
@@ -6,6 +6,9 @@* SPDX-License-Identifier: GPL-2.0-or-later */ +#ifndef AXIADO_SDHCI_H +#define AXIADO_SDHCI_H +#include "hw/sd/sdhci.h" #include "qom/object.h"
@@ -19,3 +22,5 @@ typedef struct AxiadoSDHCIState {MemoryRegion emmc_phy; BusState *sd_bus; } AxiadoSDHCIState; + +#endif /* AXIADO_SDHCI_H */
Signature · 1 line
2.34.1
Re: [PATCH v4 1/8] hw/sd/axiado_sdhci: Add header guard
Quoted 5 lines · Kuan-Jui Chiu
Signed-off-by Kuan-Jui Chiu <[email protected]>Reviewed-by Jack Wang <[email protected]>--- include/hw/sd/axiado_sdhci.h | 5 +++++ 1 file changed, 5 insertions(+)
PATCH v4 2/8 hw/arm: Rename ax3000-boards as axiado-boards
In reply to Kuan-Jui ChiuRename header file ax3000-boards.h as axiado-boards.h for sharing across different Axiado SoC series
---
hw/arm/ax3000-boards.c | 2 +-
hw/arm/ax3000-evk.c | 2 +-
include/hw/arm/{ax3000-boards.h => axiado-boards.h} | 0
3 files changed, 2 insertions(+), 2 deletions(-)
rename include/hw/arm/{ax3000-boards.h => axiado-boards.h} (100%)hw/arm/ax3000-boards.c +1 -1
@@ -7,7 +7,7 @@*/ #include "qemu/osdep.h" -#include "hw/arm/ax3000-boards.h" +#include "hw/arm/axiado-boards.h" #include "hw/arm/boot.h" #include "hw/arm/machines-qom.h" #include "qemu/error-report.h"
hw/arm/ax3000-evk.c +1 -1
@@ -7,7 +7,7 @@*/ #include "qemu/osdep.h" -#include "hw/arm/ax3000-boards.h" +#include "hw/arm/axiado-boards.h" static void axiado_scm3003_class_init (ObjectClass *oc,const void *data) {
include/hw/arm/axiado-boards.h renamed from include/hw/arm/ax3000-boards.h +0 -0
Signature · 1 line
2.34.1
Re: [PATCH v4 2/8] hw/arm: Rename ax3000-boards as axiado-boards
Quoted 11 lines · Kuan-Jui Chiu
Rename header file
ax3000-boards.hasaxiado-boards.hfor sharing across different Axiado SoC seriesSigned-off-by Kuan-Jui Chiu <[email protected]>Reviewed-by Jack Wang <[email protected]>--- hw/arm/ax3000-boards.c | 2 +- hw/arm/ax3000-evk.c | 2 +- include/hw/arm/{ax3000-boards.h => axiado-boards.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-)rename
include/hw/arm/{ax3000-boards.h=>axiado-boards.h} (100%)
PATCH v4 3/8 hw/arm/ax3000: Specify SoC name in header and variable
In reply to Kuan-Jui Chiu--- hw/arm/ax3000-boards.c | 2 +- hw/arm/ax3000-evk.c | 2 +- hw/arm/ax3000-soc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
hw/arm/ax3000-boards.c +1 -1
@@ -1,5 +1,5 @@/* -* Axiado Boards +* Axiado Ax3000 Boards * * Author: Kuan-Jui Chiu <[email protected]> *
hw/arm/ax3000-evk.c +1 -1
@@ -1,5 +1,5 @@/* -* Axiado Evaluation Kit Emulation +* Axiado Ax3000 Evaluation Kit Emulation * * Author: Kuan-Jui Chiu <[email protected]> *
hw/arm/ax3000-soc.c +2 -2
@@ -229,7 +229,7 @@ static void ax3000_class_init(ObjectClass *oc, const void *data) sc->num_cpus =AX3000_NUM_CPUS ; } -static const TypeInfo axiado_soc_types[] = { +static const TypeInfo ax3000_soc_types[] = { { .name =TYPE_AX3000_SOC , .parent =TYPE_SYS_BUS_DEVICE ,
@@ -240,4 +240,4 @@ static const TypeInfo axiado_soc_types[] = { } }; -DEFINE_TYPES (axiado_soc_types) +DEFINE_TYPES (ax3000_soc_types)
Signature · 1 line
2.34.1
Re: [PATCH v4 3/8] hw/arm/ax3000: Specify SoC name in header and variable
Quoted 6 lines · Kuan-Jui Chiu
Signed-off-by Kuan-Jui Chiu <[email protected]>--- hw/arm/ax3000-boards.c | 2 +- hw/arm/ax3000-evk.c | 2 +- hw/arm/ax3000-soc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
PATCH v4 4/8 hw/char/cadence_uart: Reserve MMIO with dynamic size
In reply to Kuan-Jui ChiuCandence UART model is reserving 4 KiB for registers statically For other SoC models, the MMIO size may be not 4 KiB which would have overlapping sysbus regions in QEMU
This patch adds a property which allows other models to revise the MMIO size and it is 4 KiB by default
--- hw/char/cadence_uart.c | 8 ++++++-- include/hw/char/cadence_uart.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-)
hw/char/cadence_uart.c +6 -2
@@ -541,6 +541,10 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) {CadenceUARTState *s =CADENCE_UART (dev); +memory_region_init_io (&s->iomem,OBJECT (dev), &uart_ops, s,"uart" , + s->mmio_size); +sysbus_init_mmio (SYS_BUS_DEVICE (dev), &s->iomem); + s->fifo_trigger_handle =timer_new_ns (QEMU_CLOCK_VIRTUAL , fifo_trigger_update, s);
@@ -561,8 +565,6 @@ static void cadence_uart_init(Object *obj)SysBusDevice *sbd =SYS_BUS_DEVICE (obj);CadenceUARTState *s =CADENCE_UART (obj); -memory_region_init_io (&s->iomem, obj, &uart_ops, s,"uart" ,0x1000 ); -sysbus_init_mmio (sbd, &s->iomem);sysbus_init_irq (sbd, &s->irq); s->refclk = qdev_init_clock_in(DEVICE(obj), "refclk",
@@ -621,6 +623,8 @@ static const VMStateDescription vmstate_cadence_uart = {static const Property cadence_uart_properties[] = {DEFINE_PROP_CHR ("chardev" , CadenceUARTState, chr), +DEFINE_PROP_SIZE ("mmio-size" , CadenceUARTState, mmio_size, +CADENCE_UART_MMIO_SIZE ), };static void cadence_uart_class_init (ObjectClass *klass,const void *data)
include/hw/char/cadence_uart.h +3 -0
@@ -31,6 +31,8 @@#define CADENCE_UART_R_MAX (0x4C/4) +#define CADENCE_UART_MMIO_SIZE 0x1000 +#define TYPE_CADENCE_UART "cadence_uart"OBJECT_DECLARE_SIMPLE_TYPE (CadenceUARTState,CADENCE_UART )
@@ -51,6 +53,7 @@ struct CadenceUARTState {qemu_irq irq;QEMUTimer *fifo_trigger_handle;Clock *refclk; + uint64_t mmio_size; };#endif
Signature · 1 line
2.34.1
Re: [PATCH v4 4/8] hw/char/cadence_uart: Reserve MMIO with dynamic size
Hi,
Quoted 29 lines · Kuan-Jui Chiu
Candence UART model is reserving 4 KiB for registers statically For other SoC models, the MMIO size may be not 4 KiB which would have overlapping sysbus regions in QEMU
This patch adds a property which allows other models to revise the MMIO size and it is 4 KiB by default
Signed-off-by Kuan-Jui Chiu <[email protected]>--- hw/char/cadence_uart.c | 8 ++++++-- include/hw/char/cadence_uart.h | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-)hw/char/cadence_uart.c +4
-0@@ -541,6 +541,10 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) {CadenceUARTState *s =CADENCE_UART (dev); +memory_region_init_io (&s->iomem,OBJECT (dev), &uart_ops, s,"uart" , + s->mmio_size); +sysbus_init_mmio (SYS_BUS_DEVICE (dev), &s->iomem); + s->fifo_trigger_handle =timer_new_ns (QEMU_CLOCK_VIRTUAL , fifo_trigger_update, s);
hw/char/cadence_uart.c static void cadence_uart_init(Object *obj) · line 564
Quoted 4 lines
hw/char/cadence_uart.c +0
-1@@ -561,8 +565,6 @@ static void cadence_uart_init(Object *obj)SysBusDevice *sbd =SYS_BUS_DEVICE (obj);CadenceUARTState *s =CADENCE_UART (obj); -memory_region_init_io (&s->iomem, obj, &uart_ops, s,"uart" ,0x1000 );
Are we sure this size is even correct and not a copy/paste error? We can clearly reduce it up to 0x80 (so far the last register implemented is R_TTRIG at address 0x44).
Quoted 11 lines
hw/char/cadence_uart.c +2
-1-sysbus_init_mmio (sbd, &s->iomem);sysbus_init_irq (sbd, &s->irq); s->refclk = qdev_init_clock_in(DEVICE(obj), "refclk",@@ -621,6 +623,8 @@ static const VMStateDescription vmstate_cadence_uart = {static const Property cadence_uart_properties[] = {DEFINE_PROP_CHR ("chardev" , CadenceUARTState, chr), +DEFINE_PROP_SIZE ("mmio-size" , CadenceUARTState, mmio_size, +CADENCE_UART_MMIO_SIZE ), };
Re: [PATCH v4 4/8] hw/char/cadence_uart: Reserve MMIO with dynamic size
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:11 寫道:
Quoted 39 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
Quoted 33 lines · Kuan-Jui Chiu
Candence UART model is reserving 4 KiB for registers statically For other SoC models, the MMIO size may be not 4 KiB which would have overlapping sysbus regions in QEMU
This patch adds a property which allows other models to revise the MMIO size and it is 4 KiB by default
Signed-off-by Kuan-Jui Chiu <[email protected]>---
hw/char/cadence_uart.c | 8 ++++++--
include/hw/char/cadence_uart.h| 3 +++2 files changed, 9 insertions(+), 2 deletions(-)hw/char/cadence_uart.c +4
-0@@ -541,6 +541,10 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) { CadenceUARTState *s = CADENCE_UART(dev); + memory_region_init_io(&s->iomem, OBJECT(dev), &uart_ops, s, "uart", + s->mmio_size); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); + s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL, fifo_trigger_update, s);@@ -561,8 +565,6 @@ static void cadence_uart_init(Object *obj) SysBusDevice *sbd = SYS_BUS_DEVICE(obj); CadenceUARTState *s = CADENCE_UART(obj);
Quoted 7 lines
hw/char/cadence_uart.c static void cadence_uart_init(Object *obj) · line 568
Quoted 2 lines
hw/char/cadence_uart.c +0
-1- memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000);Are we sure this size is even correct and not a copy/paste error? We can clearly reduce it up to
0x80(so far the last register implemented isR_TTRIGat address0x44).
No
It is 0x1000 since the first release of this model
Sure, I will change it to 0x80. It would be a simpler fix
Quoted 13 lines
Quoted 12 lines
hw/char/cadence_uart.c +0
-1- sysbus_init_mmio(sbd, &s->iomem); sysbus_init_irq(sbd, &s->irq);
s->refclk= qdev_init_clock_in(DEVICE(obj), "refclk",hw/char/cadence_uart.c +2
-0@@ -621,6 +623,8 @@ static const VMStateDescription vmstate_cadence_uart = { static const Property cadence_uart_properties[] = { DEFINE_PROP_CHR("chardev", CadenceUARTState, chr), + DEFINE_PROP_SIZE("mmio-size", CadenceUARTState, mmio_size, + CADENCE_UART_MMIO_SIZE), };
Re: [PATCH v4 4/8] hw/char/cadence_uart: Reserve MMIO with dynamic size
Quoted 49 lines · Kuan-Jui Chiu
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:11 寫道:
Quoted 39 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
Quoted 33 lines · Kuan-Jui Chiu
Candence UART model is reserving 4 KiB for registers statically For other SoC models, the MMIO size may be not 4 KiB which would have overlapping sysbus regions in QEMU
This patch adds a property which allows other models to revise the MMIO size and it is 4 KiB by default
Signed-off-by Kuan-Jui Chiu <[email protected]>---
hw/char/cadence_uart.c | 8 ++++++--
include/hw/char/cadence_uart.h| 3 +++2 files changed, 9 insertions(+), 2 deletions(-)hw/char/cadence_uart.c +4
-0@@ -541,6 +541,10 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) { CadenceUARTState *s = CADENCE_UART(dev); + memory_region_init_io(&s->iomem, OBJECT(dev), &uart_ops, s, "uart", + s->mmio_size); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); + s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL, fifo_trigger_update, s);@@ -561,8 +565,6 @@ static void cadence_uart_init(Object *obj) SysBusDevice *sbd = SYS_BUS_DEVICE(obj); CadenceUARTState *s = CADENCE_UART(obj);Quoted 7 lines
hw/char/cadence_uart.c static void cadence_uart_init(Object *obj) · line 568
Quoted 2 lines
hw/char/cadence_uart.c +0
-1- memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000);Are we sure this size is even correct and not a copy/paste error? We can clearly reduce it up to
0x80(so far the last register implemented isR_TTRIGat address0x44).
Quoted 3 lines
No
It is
0x1000since the first release of this model
QEMU model use 0x1000, but what the datasheet says? I'm suspicious using 0x1000 for the current model is correct. Can you point me to the datasheet please?
Quoted 17 lines
Sure, I will change it to
0x80. It would be a simpler fixQuoted 13 lines
Quoted 12 lines
hw/char/cadence_uart.c +0
-1- sysbus_init_mmio(sbd, &s->iomem); sysbus_init_irq(sbd, &s->irq);
s->refclk= qdev_init_clock_in(DEVICE(obj), "refclk",hw/char/cadence_uart.c +2
-0@@ -621,6 +623,8 @@ static const VMStateDescription vmstate_cadence_uart = { static const Property cadence_uart_properties[] = { DEFINE_PROP_CHR("chardev", CadenceUARTState, chr), + DEFINE_PROP_SIZE("mmio-size", CadenceUARTState, mmio_size, + CADENCE_UART_MMIO_SIZE), };
Re: [PATCH v4 4/8] hw/char/cadence_uart: Reserve MMIO with dynamic size
Hi
Philippe Mathieu-Daudé 於 2026/8/27 下午 04:50 寫道:
Quoted 56 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 52 lines · Kuan-Jui Chiu
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:11 寫道:
Quoted 49 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Hi,
Quoted 31 lines · Kuan-Jui Chiu
Candence UART model is reserving 4 KiB for registers statically For other SoC models, the MMIO size may be not 4 KiB which would have overlapping sysbus regions in QEMU
This patch adds a property which allows other models to revise the MMIO size and it is 4 KiB by default
Signed-off-by Kuan-Jui Chiu <[email protected]>---
hw/char/cadence_uart.c | 8 ++++++--
include/hw/char/cadence_uart.h| 3 +++2 files changed, 9 insertions(+), 2 deletions(-)hw/char/cadence_uart.c +4
-0@@ -541,6 +541,10 @@ static void cadence_uart_realize(DeviceState *dev, Error **errp) { CadenceUARTState *s = CADENCE_UART(dev); + memory_region_init_io(&s->iomem, OBJECT(dev), &uart_ops, s,"uart" , + s->mmio_size); + sysbus_init_mmio(SYS_BUS_DEVICE(dev), &s->iomem); + s->fifo_trigger_handle = timer_new_ns(QEMU_CLOCK_VIRTUAL,
fifo_trigger_update, s);hw/char/cadence_uart.c static void cadence_uart_init(Object *obj) · line 568
Quoted 5 lines
hw/char/cadence_uart.c +0
-1@@ -561,8 +565,6 @@ static void cadence_uart_init(Object *obj) SysBusDevice *sbd = SYS_BUS_DEVICE(obj); CadenceUARTState *s = CADENCE_UART(obj); - memory_region_init_io(&s->iomem, obj, &uart_ops, s, "uart", 0x1000);Are we sure this size is even correct and not a copy/paste error? We can clearly reduce it up to
0x80(so far the last register implemented isR_TTRIGat address0x44).
Quoted 8 lines
Quoted 3 lines
No
It is
0x1000since the first release of this modelQEMU model use
0x1000, but what the datasheet says? I'm suspicious using0x1000for the current model is correct. Can you point me to the datasheet please?
This is the datasheet provided by Edgar previously
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/UART-Module
Quoted 18 lines
Quoted 17 lines
Sure, I will change it to
0x80. It would be a simpler fixQuoted 13 lines
Quoted 12 lines
hw/char/cadence_uart.c +0
-1- sysbus_init_mmio(sbd, &s->iomem); sysbus_init_irq(sbd, &s->irq);
s->refclk= qdev_init_clock_in(DEVICE(obj), "refclk",hw/char/cadence_uart.c +2
-0@@ -621,6 +623,8 @@ static const VMStateDescription vmstate_cadence_uart = { static const Property cadence_uart_properties[] = { DEFINE_PROP_CHR("chardev", CadenceUARTState, chr), + DEFINE_PROP_SIZE("mmio-size", CadenceUARTState, mmio_size, + CADENCE_UART_MMIO_SIZE), };
PATCH v4 5/8 hw/arm/ax3000-soc: Reserve MMIO of UART with 512 KiB
In reply to Kuan-Jui ChiuAx3000 SoC reserves 512 KiB for MMIO of Cadence UART Set the mmio-size of Cadence UART to 512 KiB from 4 KiB which will resolve overlapping issue between UART0 and UART3 in QEMU
--- hw/arm/ax3000-soc.c | 2 ++ include/hw/arm/ax3000-soc.h | 1 + 2 files changed, 3 insertions(+)
hw/arm/ax3000-soc.c +2 -0
@@ -155,6 +155,8 @@ static void ax3000_realize(DeviceState *dev, Error **errp)for (int i =0 ; i <AX3000_NUM_UARTS ; i++) {qdev_prop_set_chr (DEVICE (&s->uart[i]),"chardev" ,serial_hd (i)); +qdev_prop_set_uint64 (DEVICE (&s->uart[i]),"mmio-size" , +AX3000_UART_SIZE );if (!sysbus_realize (SYS_BUS_DEVICE (&s->uart[i]), errp)) {return ; }
include/hw/arm/ax3000-soc.h +1 -0
@@ -35,6 +35,7 @@ OBJECT_DECLARE_TYPE(Ax3000SoCState, Ax3000SoCClass, AX3000_SOC)#define AX3000_UART1_BASE 0x805a0000#define AX3000_UART2_BASE 0x80620000#define AX3000_UART3_BASE 0x80520800 +#define AX3000_UART_SIZE 0x100#define AX3000_SDHCI0_BASE 0x86000000#define AX3000_EMMC_PHY_BASE 0x80801C00
Signature · 1 line
2.34.1
PATCH v4 6/8 hw/arm/ax3000-boards: Add memory guard
In reply to Kuan-Jui ChiuAx3000 SoC reserves 3136 MiB memory for access totally QEMU allows -m option to set the ram_size which would cause the inconsistent size issue while running in QMP
This patch adds a guard to check if ram_size is different from RAM size of SoC and setup the default_ram_size
--- hw/arm/ax3000-boards.c | 9 +++++++++ include/hw/arm/ax3000-soc.h | 1 + 2 files changed, 10 insertions(+)
hw/arm/ax3000-boards.c +9 -0
@@ -10,6 +10,7 @@#include "hw/arm/axiado-boards.h" #include "hw/arm/boot.h" #include "hw/arm/machines-qom.h" +#include "qemu/cutils.h" #include "qemu/error-report.h" #include "qom/object.h"
@@ -22,6 +23,13 @@ static void ax3000_machine_init(MachineState *machine) {Ax3000MachineState *ams =AX3000_MACHINE (machine); +if (machine->ram_size !=AX3000_DRAM_SIZE ) { + g_autofree char *size_str = size_to_str(AX3000_DRAM_SIZE); + +error_report ("Invalid RAM size, should be %s" , size_str); +exit (1 ); + } + ams->soc =AX3000_SOC (object_new (TYPE_AX3000_SOC ));object_property_add_child (OBJECT (machine),"soc" ,OBJECT (ams->soc));sysbus_realize_and_unref (SYS_BUS_DEVICE (ams->soc), &error_fatal);
@@ -39,6 +47,7 @@ static void ax3000_machine_class_init(ObjectClass *oc, const void *data) mc->min_cpus =AX3000_NUM_CPUS ; mc->max_cpus =AX3000_NUM_CPUS ; mc->default_cpu_type =ARM_CPU_TYPE_NAME ("cortex-a53" ); + mc->default_ram_size =AX3000_DRAM_SIZE ; }static const TypeInfo ax3000_machine_types[] = {
include/hw/arm/ax3000-soc.h +1 -0
@@ -25,6 +25,7 @@ OBJECT_DECLARE_TYPE(Ax3000SoCState, Ax3000SoCClass, AX3000_SOC)#define AX3000_DRAM0_SIZE (1088 * MiB)#define AX3000_DRAM1_BASE 0x400000000#define AX3000_DRAM1_SIZE (2 * GiB) +#define AX3000_DRAM_SIZE (AX3000_DRAM0_SIZE + AX3000_DRAM1_SIZE)#define AX3000_GIC_DIST_BASE 0x80300000#define AX3000_GIC_DIST_SIZE (64 * KiB)
Signature · 1 line
2.34.1
PATCH v4 7/8 hw/arm: Add Axiado SoC AX3005
In reply to Kuan-Jui ChiuThis patch adds new model for Axiado SoC AX3005 which supports
4 Cortex-A53 ARM64 CPUs
Arm Generic Interrupt Controller v3
9 Cadence UARTs
1 SDHCI controller with PHY
8 Cadence GPIOs
--- MAINTAINERS | 2 + hw/arm/ax3005-soc.c | 227 ++++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- include/hw/arm/ax3005-soc.h | 103 ++++++++++++++++ 4 files changed, 334 insertions(+), 1 deletion(-) create mode 100644 hw/arm/ax3005-soc.c create mode 100644 include/hw/arm/ax3005-soc.h
MAINTAINERS +2 -0
@@ -1314,8 +1314,10 @@ M: Kuan-Jui Chiu <[email protected]> L: [email protected] S: Maintained F: hw/arm/ax3000*.c +F: hw/arm/ax3005*.c F: hw/*/axiado*.c F: include/hw/arm/ax3000*.h +F: include/hw/arm/ax3005*.h F: include/hw/*/axiado*.h AVR Machines
hw/arm/ax3005-soc.c new file +227 -0
227 lines not on this page · raw message
hw/arm/meson.build +2 -1
@@ -111,7 +111,8 @@ arm_common_ss.add(when: 'CONFIG_VERSATILE', if_true: files('versatilepb.c')) arm_common_ss.add(when: 'CONFIG_VEXPRESS', if_true: files('vexpress.c')) arm_common_ss.add(when: ['CONFIG_AXIADO_SOC', 'TARGET_AARCH64'], if_true: files( - 'ax3000-soc.c')) + 'ax3000-soc.c', + 'ax3005-soc.c')) arm_common_ss.add(when: ['CONFIG_AXIADO_EVK', 'TARGET_AARCH64'], if_true: files( 'ax3000-boards.c', 'ax3000-evk.c'))
include/hw/arm/ax3005-soc.h new file +103 -0
103 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH v4 8/8 hw/arm: Add Axiado Ax3005 EVB
In reply to Kuan-Jui ChiuAdd EVK ax3005-evb built with AX3005 SoC
--- hw/arm/ax3005-evk.c | 64 ++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- include/hw/arm/axiado-boards.h | 10 ++++++ 3 files changed, 76 insertions(+), 1 deletion(-) create mode 100644 hw/arm/ax3005-evk.c
hw/arm/ax3005-evk.c new file +64 -0
@@ -0,0 +1,64 @@ +/* +* Axiado Ax3005 Evaluation Kit Emulation +* +* Author: Kuan-Jui Chiu <[email protected]> +* +* SPDX-License-Identifier: GPL-2.0-or-later +*/ + +#include "qemu/osdep.h" +#include "hw/arm/axiado-boards.h" +#include "hw/arm/boot.h" +#include "hw/arm/machines-qom.h" +#include "qemu/cutils.h" +#include "qemu/error-report.h" +#include "qom/object.h" + +static struct arm_boot_info ax3005_binfo = { + .loader_start =AX3005_DRAM_BASE , + .board_id =-1 , +}; + +static void ax3005_evb_machine_init (MachineState *machine) +{ +Ax3005MachineState *ams =AX3005_MACHINE (machine); + +if (machine->ram_size !=AX3005_DRAM_SIZE ) { + g_autofree char *size_str = size_to_str(AX3005_DRAM_SIZE); + +error_report ("Invalid RAM size, should be %s" , size_str); +exit (1 ); + } + + ams->soc =AX3005_SOC (object_new (TYPE_AX3005_SOC )); +object_property_add_child (OBJECT (machine),"soc" ,OBJECT (ams->soc)); +sysbus_realize_and_unref (SYS_BUS_DEVICE (ams->soc), &error_fatal); + + ax3005_binfo.ram_size = machine->ram_size; +arm_load_kernel (&ams->soc->cpu[0 ], machine, &ax3005_binfo); +} + +static void ax3005_evb_class_init (ObjectClass *oc,const void *data) +{ +MachineClass *mc =MACHINE_CLASS (oc); + + mc->desc ="Axiado AX3005 Evaluation Board" ; + mc->init = ax3005_evb_machine_init; + mc->default_cpus =AX3005_NUM_CPUS ; + mc->min_cpus =AX3005_NUM_CPUS ; + mc->max_cpus =AX3005_NUM_CPUS ; + mc->default_cpu_type =ARM_CPU_TYPE_NAME ("cortex-a53" ); + mc->default_ram_size =AX3005_DRAM_SIZE ; +} + +static const TypeInfo ax3005_evk_types[] = { + { + .name =TYPE_AX3005_MACHINE , + .parent =TYPE_MACHINE , + .instance_size =sizeof (Ax3005MachineState), + .class_init = ax3005_evb_class_init, + .interfaces = aarch64_machine_interfaces, + } +}; + +DEFINE_TYPES (ax3005_evk_types)
hw/arm/meson.build +2 -1
@@ -115,7 +115,8 @@ arm_common_ss.add(when: ['CONFIG_AXIADO_SOC', 'TARGET_AARCH64'], if_true: files( 'ax3005-soc.c')) arm_common_ss.add(when: ['CONFIG_AXIADO_EVK', 'TARGET_AARCH64'], if_true: files( 'ax3000-boards.c', - 'ax3000-evk.c')) + 'ax3000-evk.c', + 'ax3005-evk.c')) arm_common_ss.add(files('boot.c'))
include/hw/arm/axiado-boards.h +10 -0
@@ -11,6 +11,7 @@#include "hw/core/boards.h" #include "hw/arm/ax3000-soc.h" +#include "hw/arm/ax3005-soc.h" #define TYPE_AX3000_MACHINE MACHINE_TYPE_NAME("ax3000")OBJECT_DECLARE_TYPE (Ax3000MachineState, Ax3000MachineClass,AX3000_MACHINE )
@@ -25,4 +26,13 @@ typedef struct Ax3000MachineClass {MachineClass parent; } Ax3000MachineClass; + +#define TYPE_AX3005_MACHINE MACHINE_TYPE_NAME("ax3005-evb") +OBJECT_DECLARE_SIMPLE_TYPE(Ax3005MachineState, AX3005_MACHINE) + +struct Ax3005MachineState { +MachineState parent; + +Ax3005SoCState *soc; +};#endif
Signature · 1 line
2.34.1
Re: [PATCH v4 8/8] hw/arm: Add Axiado Ax3005 EVB
Quoted 9 lines · Kuan-Jui Chiu
Add EVK ax3005-evb built with AX3005 SoC
Signed-off-by Kuan-Jui Chiu <[email protected]>--- hw/arm/ax3005-evk.c | 64 ++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +- include/hw/arm/axiado-boards.h | 10 ++++++ 3 files changed, 76 insertions(+), 1 deletion(-)create mode 100644
hw/arm/ax3005-evk.c
Missing some description in docs/system/arm/.
Quoted 14 lines
include/hw/arm/axiado-boards.h +1
-0@@ -11,6 +11,7 @@#include "hw/core/boards.h" #include "hw/arm/ax3000-soc.h" +#include "hw/arm/ax3005-soc.h" #define TYPE_AX3000_MACHINE MACHINE_TYPE_NAME("ax3000")OBJECT_DECLARE_TYPE (Ax3000MachineState, Ax3000MachineClass,AX3000_MACHINE )@@ -25,4 +26,13 @@ typedef struct Ax3000MachineClass {MachineClass parent;
include/hw/arm/axiado-boards.h typedef struct Ax3000MachineClass { · line 36
Quoted 10 lines
include/hw/arm/axiado-boards.h +8
-0} Ax3000MachineClass; + +#define TYPE_AX3005_MACHINE MACHINE_TYPE_NAME("ax3005-evb") +OBJECT_DECLARE_SIMPLE_TYPE(Ax3005MachineState, AX3005_MACHINE) + +struct Ax3005MachineState { +MachineState parent; + +Ax3005SoCState *soc;
When a component is not optional, our style is to allocate it in place (IOW this shouldn't be a pointer here but the plain struct).
Quoted 2 lines
include/hw/arm/axiado-boards.h +1
-0+};#endif
Re: [PATCH v4 8/8] hw/arm: Add Axiado Ax3005 EVB
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:20 寫道:
Quoted 14 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 9 lines · Kuan-Jui Chiu
Add EVK ax3005-evb built with AX3005 SoC
Signed-off-by Kuan-Jui Chiu <[email protected]>---
hw/arm/ax3005-evk.c | 64 ++++++++++++++++++++++++++++++++++ hw/arm/meson.build | 3 +-include/hw/arm/axiado-boards.h| 10 ++++++3 files changed, 76 insertions(+), 1 deletion(-)create mode 100644
hw/arm/ax3005-evk.c
Quoted 2 lines
Missing some description in docs/system/arm/.
No problem. I will add it in v5 patch set.
Quoted 15 lines
Quoted 15 lines
include/hw/arm/axiado-boards.h +1
-0@@ -11,6 +11,7 @@ #include "hw/core/boards.h" #include "hw/arm/ax3000-soc.h" +#include "hw/arm/ax3005-soc.h" #define TYPE_AX3000_MACHINE MACHINE_TYPE_NAME("ax3000") OBJECT_DECLARE_TYPE(Ax3000MachineState, Ax3000MachineClass, AX3000_MACHINE)@@ -25,4 +26,13 @@ typedef struct Ax3000MachineClass { MachineClass parent;
Quoted 13 lines
include/hw/arm/axiado-boards.h typedef struct Ax3000MachineClass { · line 36
Quoted 9 lines
include/hw/arm/axiado-boards.h +8
-0} Ax3000MachineClass; + +#define TYPE_AX3005_MACHINE MACHINE_TYPE_NAME("ax3005-evb") +OBJECT_DECLARE_SIMPLE_TYPE(Ax3005MachineState, AX3005_MACHINE) + +struct Ax3005MachineState { + MachineState parent; + + Ax3005SoCState *soc;When a component is not optional, our style is to allocate it in place (IOW this shouldn't be a pointer here but the plain struct).
There are two approaches existing in current QEMU:
1. Create SoC instance in board level then add it into machine state like NXP did
With this approach, I will remove pointer from machine state and add the following code into ax3000/ax3005 board like
Ax3005SoCState *s;
s = AX3005_SOC(object_new_with_props(TYPE_AX3005_SOC, OBJECT(machine), "soc", &error_fatal, NULL)); sysbus_realize_and_unref(SYS_BUS_DEVICE(s), &error_fatal);
2. Create a common machine state which contains a pointer for different SoC models like Aspeed did
With this approach, I will integrate Ax3000 and Ax3005 machine state into a common struct like AxiadoMachineState
Do we prefer approach 1 to approach 2?
Quoted 3 lines
Quoted 2 lines
include/hw/arm/axiado-boards.h +1
-0+}; #endif
Quoted 26 lines · Kuan-Jui Chiu
This patchset introduces Axiado SoC AX3005 and evaluation board for emulation The model for Axiado SoC AX3005 supports
4 Cortex-A53 CPUs
Arm Generic Interrupt Controller v3
9 Cadence UARTs
1 SDHCI controller with PHY
8 Cadence GPIOsRefer Axiado website for more product information
https://axiado.com/products/and minor changes for the compatibility with existing AX3000 SoC model
Test plan:
1. Verified the machine "ax3005-evb" with following commandqemu-system-aarch64 \ -m 2G \ -machine ax3005-evb \ -device loader,file=bl31.bin,addr=0x88300000 \ -device loader,file=tee-raw.bin,addr=0x88400000 \ -device loader,file=u-boot.bin,addr=0x80000000 \ -device loader,file=fitImage,addr=0x80100000 \ -device loader,file=obmc-phosphor-image-evk-ax3005-qemu.squashfs-xz,addr=0x80B00000 \ -device loader,cpu-num=0,addr=0x88300000 \ -device loader,cpu-num=1,addr=0x88300000 \
Quoted 8 lines
-device loader,cpu-num=2,addr=0x88300000 \
-device loader,cpu-num=3,addr=0x88300000 \
-nographic \
-serial null \
-serial null \
-serial null \
-serial mon:stdio \
-drive if=sd,file=obmc-phosphor-image-evk-ax3005-qemu.wic,format=rawCould you add a functional test? See:
$ git grep -l obmc tests tests/functional/arm/test_aspeed_anacapa.py tests/functional/arm/test_aspeed_ast2500_sdk.py tests/functional/arm/test_aspeed_ast2500_sdk_515.py tests/functional/arm/test_aspeed_bletchley.py tests/functional/arm/test_aspeed_catalina.py tests/functional/arm/test_aspeed_gb200nvl_bmc.py tests/functional/arm/test_aspeed_palmetto.py tests/functional/arm/test_aspeed_romulus.py tests/functional/arm/test_aspeed_witherspoon.py tests/functional/arm/test_quanta_gsj.py
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:18 寫道:
Quoted 41 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 26 lines · Kuan-Jui Chiu
This patchset introduces Axiado SoC AX3005 and evaluation board for emulation The model for Axiado SoC AX3005 supports
4 Cortex-A53 CPUs
Arm Generic Interrupt Controller v3
9 Cadence UARTs
1 SDHCI controller with PHY
8 Cadence GPIOsRefer Axiado website for more product information
https://axiado.com/products/and minor changes for the compatibility with existing AX3000 SoC model
Test plan:
1. Verified the machine "ax3005-evb" with following commandqemu-system-aarch64 \
-m 2G \
-machine ax3005-evb \
-device loader,file=bl31.bin,addr=0x88300000 \
-device loader,file=tee-raw.bin,addr=0x88400000 \
-device loader,file=u-boot.bin,addr=0x80000000 \
-device loader,file=fitImage,addr=0x80100000 \
-device loader,file=obmc-phosphor-image-evk-ax3005-qemu.squashfs-xz,addr=0x80B00000 \
-device loader,cpu-num=0,addr=0x88300000 \
-device loader,cpu-num=1,addr=0x88300000 \Quoted 8 lines
-device loader,cpu-num=2,addr=0x88300000 \
-device loader,cpu-num=3,addr=0x88300000 \
-nographic \
-serial null \
-serial null \
-serial null \
-serial mon:stdio \
-drive if=sd,file=obmc-phosphor-image-evk-ax3005-qemu.wic,format=rawCould you add a functional test? See:
Quoted 12 lines
$ git grep -l obmc tests tests/functional/arm/test_aspeed_anacapa.py tests/functional/arm/test_aspeed_ast2500_sdk.py tests/functional/arm/test_aspeed_ast2500_sdk_515.py tests/functional/arm/test_aspeed_bletchley.py tests/functional/arm/test_aspeed_catalina.py tests/functional/arm/test_aspeed_gb200nvl_bmc.py tests/functional/arm/test_aspeed_palmetto.py tests/functional/arm/test_aspeed_romulus.py tests/functional/arm/test_aspeed_witherspoon.py tests/functional/arm/test_quanta_gsj.py
Please allow me to add functional test cases in another patch set because we did not release firmware package on our Github for downloading yet
Quoted 18 lines · Kuan-Jui Chiu
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:18 寫道:
Quoted 14 lines
Could you add a functional test? See:
$ git grep -l obmc tests tests/functional/arm/test_aspeed_anacapa.py tests/functional/arm/test_aspeed_ast2500_sdk.py tests/functional/arm/test_aspeed_ast2500_sdk_515.py tests/functional/arm/test_aspeed_bletchley.py tests/functional/arm/test_aspeed_catalina.py tests/functional/arm/test_aspeed_gb200nvl_bmc.py tests/functional/arm/test_aspeed_palmetto.py tests/functional/arm/test_aspeed_romulus.py tests/functional/arm/test_aspeed_witherspoon.py tests/functional/arm/test_quanta_gsj.py
Quoted 3 lines
Please allow me to add functional test cases in another patch set because we did not release firmware package on our Github for downloading yet.
Can we get a functional test for the machine model you've already landed before we add more machines in this family, please?
-- PMM
Peter Maydell 於 2026/8/27 下午 04:43 寫道:
Quoted 21 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 17 lines · Kuan-Jui Chiu
Hi
Philippe Mathieu-Daudé 於 2026/8/26 下午 04:18 寫道:
Quoted 14 lines
Could you add a functional test? See:
$ git grep -l obmc tests tests/functional/arm/test_aspeed_anacapa.py tests/functional/arm/test_aspeed_ast2500_sdk.py tests/functional/arm/test_aspeed_ast2500_sdk_515.py tests/functional/arm/test_aspeed_bletchley.py tests/functional/arm/test_aspeed_catalina.py tests/functional/arm/test_aspeed_gb200nvl_bmc.py tests/functional/arm/test_aspeed_palmetto.py tests/functional/arm/test_aspeed_romulus.py tests/functional/arm/test_aspeed_witherspoon.py tests/functional/arm/test_quanta_gsj.py
Quoted 7 lines
Quoted 3 lines
Please allow me to add functional test cases in another patch set because we did not release firmware package on our Github for downloading yet.
Can we get a functional test for the machine model you've already landed before we add more machines in this family, please?
-- PMM
Let me try to release a firmware package for QEMU first then I can create a functional test for Ax3000/Ax3005 machines with it
B.R.
Howard