From nobody Sat Nov 28 01:30:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1795752480; cv=none; d=zohomail.com; s=zohoarc; b=JxATniZyM0H+ArqdkzqsmslDPLxQLMJ8tezcAlaBVCLpnH9njk89H89QQOc9fTYrilNLk2O54M8MZwlJKoBG/kjhp28j9BRwzENxzMx/wI/QS+BvmWeqaLy2xGZUYjTDoo8OD1ctR/eCjtgoloKHXx0UZnlg6xy1cNgCbt8GyIk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795752480; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/SGutH2RseqW5+M/W6vxJyraVmCuqdYfHzw8URkfsTo=; b=floxIHzC16MmZn8tishk3W3b2jY2UKKo3ruKEeIv9DKNXcJgYHSjmYKz7pe9SyzO91z1CXfVhcC6tvxrvyL/JvQI6hXwskuiGheV4/dxo14kMkpeApEIfPtJJpUe9CWlB6WR2gXU5bOqspXswXUpgKJ+7LiC4IhNQrCXO21Cq+o= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1795752480940668.1214032165653; Thu, 26 Nov 2026 20:08:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWnFI-0002Xo-Gw; Thu, 26 Nov 2026 23:07:36 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xWlTW-0001pf-RP for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:11 -0500 Received: from mail-pj1-x1033.google.com ([2607:f8b0:4864:20::1033]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xWlTU-0001HG-LX for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:10 -0500 Received: by mail-pj1-x1033.google.com with SMTP id 98e67ed59e1d1-3b3a42a4bcdso3194487a91.0 for ; Thu, 26 Nov 2026 18:14:08 -0800 (PST) Received: from [127.0.0.2] (182-166-200-88f1.hyg1.eonet.ne.jp. [182.166.200.88]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b53479b149sm1368372a91.6.2026.11.26.18.14.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2026 18:14:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spacecubics-com.20260707.gappssmtp.com; s=20260707; t=1795745647; x=1796350447; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=/SGutH2RseqW5+M/W6vxJyraVmCuqdYfHzw8URkfsTo=; b=TpjfwvoWeH2O/YN6FHsI0J+q4lezW/LTN5Zg2EwuG3lskjpu652Zgp/wIqanza15LX NcE/A/hJxnOH1DMksHS0liOM/JTkyv0iRUs/lURcNNbV7bn2Cv25tV0PSpgxtG8CAWrX h6kRfupexckuGjSXjmxulclvQEzNp6BTY+M1uKW2ZxQfSTPoiGG/RZi5OeEzFg7MnLUL UaUAZIgW7bj37c6eWi2wrWAXvwkEFjemnc2+tmjswm+3N/jGJV34YYZRcG0SCJJhK6ZS IwgzFBpZU8KksJKBnxZQOp+dVeJymTya7ZrVM4m+B9oGXAcWNWO94Z+d0q15LnPC4CLJ p5cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795745647; x=1796350447; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=/SGutH2RseqW5+M/W6vxJyraVmCuqdYfHzw8URkfsTo=; b=GGG6vcznZS+/dD/ad7juhl3umf5GZK21rz7czg7jdw9cCuKgXyFmUiSZwgreXyA+5D cU6T85qU2ngiosw7RhfhvGLqoEnNA70rESv9rdn9G8FXGL74GvQESdmanvTfiHEDskVH 9l3He0iK2q+rIka5zCZjLGzlregdqAuF/KfpcdKmSp75gjh377solR54WAJuI0zYf1vs WXE3u3RLtjtNdnL8ORTGMRkFg+8EPq9ks9YRfkE1Ao2RlJsBSDolQTfQcYE8vUFrTTRM 2am4yyEWuzUzQR7J+A1cj58dZCLQCDySU9vYqhEudwz5bYPLRCRGAPnwfgul3uS38UgA Sv+g== X-Gm-Message-State: APuU4Z9EFBkR/fl+5D22CgF3seoepnyM6GVFT5o7kSejhOpLL6C8sXy+ uaqHS38ysmQrfIf4qhX5hFa5IlgdY2yji/qli1xX66rHQItQhZ/5eL7yqMaseZPujt8= X-Gm-Gg: AZFdTZf0gWiwD7471UgI6tw22uspkDusxzniJcnQdE3V0n7yGQTBjzf5y2Z63Kkp9Ea U+MCwf9LgjKbsedGZkfG7u4yhwnaGFdSP7z/0dpcIpUroR7FKMRb8z3vpCezO/fJBtMbRgsGOQ2 ULgLOOC2FsSz1bVnYNAnYiscqN7Su+jGkbNFOZp2qYRZfp9iQ635MuTPBhg/bpiuk68FXuEl/iz U+/ZLnkRuHlW2W3WFVmbU1I4texDRqYZrU8xmToHuOI1tMs65ck22+904ggwbtOD3nDxlBdz/vX ck3glWXrEau3neumsD/mFMWl5mN4h5fy/m80heaj74lFb5uY8LHYDasucVY3v5yzxW5STk6wESn Bh+0f2OmWg02Gsde/ahDp5GH+UPsSOzVk9QjIuPF/9V752q3/9EYrdmbCVgx37Wx2mSyUQ6rA9s kgAZSCxe1zxFLKyk2C+QKh7d29pQF+pW+b09SlS7K4FmHTB/nRPXR0d+HHaWDCkoOgzaCVtkcwr 2slbtHDm7h7QMySkUqfzXeFDtPSg1/MjBnfbRSGgymM0pzJ6nmwO68BuIe9dUc2aeoRvCKzqStl z3Rb3NuiXovP9Crtr1Kt+PKzUoUmFnftbn2WaC93Tz98OyD+EKFpEIPOpxI+IjAdqQ== X-Received: by 2002:a17:90b:2516:b0:3b4:c9f8:abce with SMTP id 98e67ed59e1d1-3b4c9f8abe0mr8342561a91.35.1795745647215; Thu, 26 Nov 2026 18:14:07 -0800 (PST) From: Maximilian Zimmermann Date: Fri, 27 Nov 2026 11:13:34 +0900 Subject: [PATCH 1/3] hw/arm: Add Space Cubics SC-OBC Module A1 board MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261127-add-scobc-a1-board-v1-1-b572280dcde1@spacecubics.com> References: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> In-Reply-To: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Maximilian Zimmermann X-Mailer: b4 0.15.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::1033; envelope-from=maxz@spacecubics.com; helo=mail-pj1-x1033.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 26 Nov 2026 23:07:08 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @spacecubics-com.20260707.gappssmtp.com) X-ZM-MESSAGEID: 1795752483753158500 The SC-OBC Module A1 is an on-board computer module for CubeSats. Its processing system is implemented in an Artix-7 FPGA, which hosts a Cortex-M3 with 4 MiB of main memory (HRMEM) and a set of peripherals. Modelling it allows firmware for the module to be developed and tested without hardware. Add the module as the scobc-a1 machine. It models the default FPGA image provided by Space Cubics, which defines the system peripherals as well as the user customizable mission bus between 0x5000_0000 and 0x6000_0000. The HRMEM is mirrored at 0x6000_0000. Apart from the console UART, all devices are currently left unimplemented. Signed-off-by: Maximilian Zimmermann --- MAINTAINERS | 7 +++ docs/system/arm/scobc-a1.rst | 49 ++++++++++++++++ docs/system/target-arm.rst | 1 + hw/arm/Kconfig | 8 +++ hw/arm/meson.build | 1 + hw/arm/scobc_a1.c | 137 +++++++++++++++++++++++++++++++++++++++= ++++ 6 files changed, 203 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 40bf63651c..bc02f6e1be 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1098,6 +1098,13 @@ F: hw/gpio/zaurus.c F: docs/system/arm/collie.rst F: tests/functional/arm/test_collie.py =20 +Space Cubics SC-OBC Module A1 +M: Maximilian Zimmermann +L: qemu-arm@nongnu.org +S: Maintained +F: hw/arm/scobc_a1.c +F: docs/system/arm/scobc-a1.rst + Stellaris M: Peter Maydell L: qemu-arm@nongnu.org diff --git a/docs/system/arm/scobc-a1.rst b/docs/system/arm/scobc-a1.rst new file mode 100644 index 0000000000..0f4f3a757a --- /dev/null +++ b/docs/system/arm/scobc-a1.rst @@ -0,0 +1,49 @@ +.. SPDX-License-Identifier: GPL-2.0-or-later + +Space Cubics SC-OBC Module A1 (``scobc-a1``) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +The Space Cubics OBC Module A1 (SC-OBC Module A1) is an on-board computer +module for spacecraft, particularly 3U CubeSats. It is based on a Xilinx +Artix-7 FPGA, which implements an Arm Cortex-M3 as the main CPU. + +The module must be mounted on a base I/O board. The ``scobc-a1`` machine +models only the module running the default FPGA image provided by Space +Cubics. The base board and its devices are not modelled. + +The peripherals between ``0x5000_0000`` and ``0x6000_0000`` form the missi= on +bus, which users can customize by building their own FPGA image. + +Supported devices +""""""""""""""""" + +- Cortex-M3 CPU core +- 4 MiB HRMEM main memory +- HRMEM mirror (``0x6000_0000``) +- Xilinx UART Lite console UART (``0x4f01_0000``) + +Missing devices +""""""""""""""" + +The following devices are present in the memory map but not implemented: + +- QSPI controllers for configuration flash, data flash and FRAM +- CAN controller +- HRMEM ECC and scrubbing registers +- System registers +- I2C controllers +- System monitor (FPGA watchdog, SEM controller, XADC and board health + monitor) +- General purpose timer +- Mission bus UARTs, I2C, SPI and GPIO controllers + +Boot options +"""""""""""" + +The machine only supports direct boot into HRMEM. A firmware image +can be loaded with the ``-kernel`` option, for example a Zephyr application +built for the ``scobc_a1`` board: + +.. code-block:: bash + + $ qemu-system-arm -M scobc-a1 -nographic -kernel zephyr.elf diff --git a/docs/system/target-arm.rst b/docs/system/target-arm.rst index 260cd7e4d6..71f9e1a3cb 100644 --- a/docs/system/target-arm.rst +++ b/docs/system/target-arm.rst @@ -98,6 +98,7 @@ Board-specific documentation arm/raspi arm/collie arm/sx1 + arm/scobc-a1 arm/stellaris arm/stm32 arm/virt diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index e9f796f718..0bef724a47 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -183,6 +183,14 @@ config SABRELITE select FSL_IMX6 select SSI_M25P80 =20 +config SCOBC_A1 + bool + default y + depends on TCG && ARM + select ARM_V7M + select UNIMP + select XILINX # UART Lite + config STELLARIS bool default y diff --git a/hw/arm/meson.build b/hw/arm/meson.build index f3c1b0e00f..2401c7811d 100644 --- a/hw/arm/meson.build +++ b/hw/arm/meson.build @@ -16,6 +16,7 @@ arm_common_ss.add(when: 'CONFIG_STELLARIS', if_true: file= s('stellaris.c')) arm_common_ss.add(when: 'CONFIG_STM32VLDISCOVERY', if_true: files('stm32vl= discovery.c')) arm_common_ss.add(when: 'CONFIG_ZYNQ', if_true: files('xilinx_zynq.c')) arm_common_ss.add(when: 'CONFIG_SABRELITE', if_true: files('sabrelite.c')) +arm_common_ss.add(when: 'CONFIG_SCOBC_A1', if_true: files('scobc_a1.c')) =20 arm_common_ss.add(when: 'CONFIG_ARM_V7M', if_true: files('armv7m.c')) arm_common_ss.add(when: 'CONFIG_EXYNOS4', if_true: files('exynos4210.c')) diff --git a/hw/arm/scobc_a1.c b/hw/arm/scobc_a1.c new file mode 100644 index 0000000000..877bc2e41f --- /dev/null +++ b/hw/arm/scobc_a1.c @@ -0,0 +1,137 @@ +/* + * Space Cubics SC-OBC Module A1 board + * + * Copyright (c) 2026 Space Cubics Inc. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "qemu/cutils.h" +#include "qemu/units.h" +#include "qemu/error-report.h" +#include "system/address-spaces.h" +#include "system/system.h" +#include "hw/core/boards.h" +#include "hw/core/qdev-clock.h" +#include "hw/core/qdev-properties.h" +#include "hw/core/sysbus.h" +#include "hw/arm/armv7m.h" +#include "hw/arm/boot.h" +#include "hw/char/xilinx_uartlite.h" +#include "hw/misc/unimp.h" + +struct SCOBCA1MachineState { + MachineState parent_obj; + + ARMv7MState armv7m; + Clock *cpuclk; + MemoryRegion hrmem_mirror; +}; + +#define TYPE_SCOBC_A1_MACHINE MACHINE_TYPE_NAME("scobc-a1") +OBJECT_DECLARE_SIMPLE_TYPE(SCOBCA1MachineState, SCOBC_A1_MACHINE) + +/* CPU clock frequency in Hz */ +#define CPUCLK_FRQ 48000000 + +#define SCOBC_A1_NUM_IRQ 32 + +#define SCOBC_A1_HRMEM_BASE 0x00000000 +#define SCOBC_A1_HRMEM_MIRROR 0x60000000 +#define SCOBC_A1_UART_BASE 0x4f010000 +#define SCOBC_A1_UART_IRQ 0 + +static void scobc_a1_init(MachineState *machine) +{ + MachineClass *mc =3D MACHINE_GET_CLASS(machine); + SCOBCA1MachineState *s =3D SCOBC_A1_MACHINE(machine); + DeviceState *uart; + + /* Check the amount of memory is compatible with the board */ + if (machine->ram_size !=3D mc->default_ram_size) { + g_autofree char *sz =3D size_to_str(mc->default_ram_size); + error_report("Invalid RAM size, should be %s", sz); + exit(EXIT_FAILURE); + } + + /* Only direct boot into HRMEM is currently supported */ + memory_region_add_subregion(get_system_memory(), SCOBC_A1_HRMEM_BASE, + machine->ram); + + /* HRMEM is mirrored at 0x6000_0000 */ + memory_region_init_alias(&s->hrmem_mirror, OBJECT(s), + "scobc-a1.hrmem-mirror", machine->ram, + 0, mc->default_ram_size); + memory_region_add_subregion(get_system_memory(), SCOBC_A1_HRMEM_MIRROR, + &s->hrmem_mirror); + + s->cpuclk =3D clock_new(OBJECT(machine), "cpuclk"); + clock_set_hz(s->cpuclk, CPUCLK_FRQ); + + object_initialize_child(OBJECT(s), "armv7m", &s->armv7m, TYPE_ARMV7M); + qdev_prop_set_string(DEVICE(&s->armv7m), "cpu-type", machine->cpu_type= ); + qdev_prop_set_uint32(DEVICE(&s->armv7m), "num-irq", SCOBC_A1_NUM_IRQ); + qdev_prop_set_uint8(DEVICE(&s->armv7m), "num-prio-bits", 3); + qdev_connect_clock_in(DEVICE(&s->armv7m), "cpuclk", s->cpuclk); + object_property_set_link(OBJECT(&s->armv7m), "memory", + OBJECT(get_system_memory()), &error_abort); + sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &error_fatal); + + uart =3D qdev_new(TYPE_XILINX_UARTLITE); + qdev_prop_set_enum(uart, "endianness", ENDIAN_MODE_LITTLE); + qdev_prop_set_chr(uart, "chardev", serial_hd(0)); + sysbus_realize_and_unref(SYS_BUS_DEVICE(uart), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(uart), 0, SCOBC_A1_UART_BASE); + sysbus_connect_irq(SYS_BUS_DEVICE(uart), 0, + qdev_get_gpio_in(DEVICE(&s->armv7m), SCOBC_A1_UART_= IRQ)); + + /* System peripherals */ + create_unimplemented_device("scobc-a1.qspi-config", 0x40000000, 0x1000= 0); + create_unimplemented_device("scobc-a1.qspi-data", 0x40100000, 0x10000); + create_unimplemented_device("scobc-a1.qspi-fram", 0x40200000, 0x10000); + create_unimplemented_device("scobc-a1.can", 0x40400000, 0x10000); + create_unimplemented_device("scobc-a1.hrmem-regs", 0x40500000, 0x10000= ); + create_unimplemented_device("scobc-a1.sysreg", 0x4f000000, 0x10000); + create_unimplemented_device("scobc-a1.i2c0", 0x4f030000, 0x10000); + create_unimplemented_device("scobc-a1.sysmon", 0x4f040000, 0x10000); + create_unimplemented_device("scobc-a1.timer", 0x4f050000, 0x10000); + + /* Mission AXI bus peripherals (as defined in standard FPGA image) */ + create_unimplemented_device("scobc-a1.uartlite1", 0x50000000, 0x10000); + create_unimplemented_device("scobc-a1.uartlite2", 0x50010000, 0x10000); + create_unimplemented_device("scobc-a1.uartlite3", 0x50020000, 0x10000); + create_unimplemented_device("scobc-a1.uartlite4", 0x50030000, 0x10000); + create_unimplemented_device("scobc-a1.uartlite5", 0x50040000, 0x10000); + create_unimplemented_device("scobc-a1.uartlite6", 0x50050000, 0x10000); + create_unimplemented_device("scobc-a1.i2c1", 0x50060000, 0x10000); + create_unimplemented_device("scobc-a1.i2c2", 0x50070000, 0x10000); + create_unimplemented_device("scobc-a1.qspi", 0x50080000, 0x10000); + create_unimplemented_device("scobc-a1.gpio", 0x50090000, 0x10000); + + armv7m_load_kernel(s->armv7m.cpu, machine->kernel_filename, + SCOBC_A1_HRMEM_BASE, machine->ram_size); +} + +static void scobc_a1_machine_init(MachineClass *mc) +{ + static const char * const valid_cpu_types[] =3D { + ARM_CPU_TYPE_NAME("cortex-m3"), + NULL + }; + + mc->desc =3D "Space Cubics SC-OBC Module A1 (Cortex-M3)"; + mc->init =3D scobc_a1_init; + mc->default_cpu_type =3D ARM_CPU_TYPE_NAME("cortex-m3"); + mc->valid_cpu_types =3D valid_cpu_types; + mc->max_cpus =3D 1; + mc->default_ram_size =3D 4 * MiB; + mc->default_ram_id =3D "scobc-a1.hrmem"; + mc->no_parallel =3D true; + mc->no_floppy =3D true; + mc->no_cdrom =3D true; +} + +DEFINE_MACHINE_EXTENDED("scobc-a1", MACHINE, SCOBCA1MachineState, + scobc_a1_machine_init, false, false, NULL) --=20 2.55.0 From nobody Sat Nov 28 01:30:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1795752480; cv=none; d=zohomail.com; s=zohoarc; b=KVKw4xXaBk3cPE7Do8LDAQ0FSmy1Z7Uu9sGS7sqaFXuXaTQAI5bfxrGOjrZSbGgOLdmtXQg5Xh1F0sCBDgpj1GdkZmvAJGRwbyW8hDtSvZWlrKb1nUVts+A2TlPntLwa1ns0Q44W7SRPdf3u2zhi2nnm21Md2eMAw4LJ1MChZsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795752480; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=arc4fQYrPi85JZTY7m7ZVwa59Sx4cfTLrYOonvv8yNY=; b=Ehpf+ecDHn1U5zVL53MXG5Hn3n5kpJt5p2xzjnRVNVs+FmEYdXHv1q59BC//NZVCLYnTIo59Dh1qqBxAGc+9M1cTFI4697Ng19E4ur+uMOTv8l6CMEKjEAGMOT6+RcCQu8ETgpyJuGzdt+5zucILw+i6Gi3K68b/SRZTd3qYfO4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1795752480723804.9120853440199; Thu, 26 Nov 2026 20:08:00 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWnF5-0002Rk-Mq; Thu, 26 Nov 2026 23:07:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xWlTZ-0001qC-Rl for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:15 -0500 Received: from mail-pj1-x102c.google.com ([2607:f8b0:4864:20::102c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xWlTX-0001Hp-Lu for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:13 -0500 Received: by mail-pj1-x102c.google.com with SMTP id 98e67ed59e1d1-3b532e633e1so124394a91.0 for ; Thu, 26 Nov 2026 18:14:11 -0800 (PST) Received: from [127.0.0.2] (182-166-200-88f1.hyg1.eonet.ne.jp. [182.166.200.88]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b53479b149sm1368372a91.6.2026.11.26.18.14.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2026 18:14:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spacecubics-com.20260707.gappssmtp.com; s=20260707; t=1795745650; x=1796350450; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=arc4fQYrPi85JZTY7m7ZVwa59Sx4cfTLrYOonvv8yNY=; b=NINi8ODWEPANOXDQ11Im8ZxUYo4Kfea3gTWSVyol/2aHrisWIXLdNTEDdeIxyoifmr WoceGtBOLuXK2qM7Yiglz7DcehITo1NI+fUhQpBLUehiuVg59vs0oajsl1eyDIgIAx1h 6dXwLQKdYAT8QUcHVLHEcrtS+NYxzSy5ZxzntKPKsk0paYY4pRhZimyXbLK+bxyVwTfS My7uSQr2S8e5WxQQzNnHFnJH5AVejtxSjpiv80lDxhFRZAoRYTMTSUtrkes5swvWC845 RH1w+19DQZjPUifvgqnVeyfQI1SRV9L1oiHb7zJ/w71Ju0vIdlU+4ZycRTaoWOjAR/uY aT0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795745650; x=1796350450; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=arc4fQYrPi85JZTY7m7ZVwa59Sx4cfTLrYOonvv8yNY=; b=NkGv7q14DqBLSAeaN53GEo2rPrWfnBC5pWuDXH/kDQVZQO5CPL//BBnPuOFHu2Va88 IgXT3GCd4jYPUaeEkqbSdfsC6SroXZxvDVgkMCeMH3aES09G2QdwbXii8X1AIaads7cl kR4OZAP0orbhQ85xbjSOUpfzzyZfj/TaKwAnbtlpI7oXSHQZK/jbZlov0prirQ6ouUzf s85HF2UFEitcyncwqoccuhq+Ii+d8Ytmvqr+C/N/asMEzYMcJnHnDsAf0NfAUSiG2nL9 9HdOL+G8+IMmVjkbkV4iWVNfTjli8JljKiMpVv43rAJmtc88pUc5Q9PANJkFgBMq4gB4 orig== X-Gm-Message-State: APuU4Z83PZK6iU0BfpJ7MUxMHcndu8Doivi20DRvuBCit0SnackDRMQl HaRWgrKQMuZPXx9y9UJHbmfyKMdBVq8+ri5BpjCIcc6d+QRk1rrbFf4wpsh2CmGqdVE= X-Gm-Gg: AZFdTZdaJuhW2RtGQ5sS9JoHZDPaHI31w91gr3it09rl9rTdpQQL2k++RHsh3sccarS v+fAp5C0/fw3GhHsJzT9UajqEmg09t2nHxUk7quP9P4O3HObTuJAN72KupGJUpnYWlQxprxcsZn j4kqs2DpZ/U/2LgSM6/Xtgiwa9rXSNjlA6heHuoLc+Q5Whw/rZLQYPFw+qgIEhOIfRzo19OH6OD EyQl22hwqclgXvov46/ZaV5PxFUhAXLhSxVF7Nl5zjuJU8c4+36D7HiDAIHb7V62RAfIVUh3TAo Ep/XOwEt6KwwsX8Izr5gE+iuIOiMVlV6ML21iIdQjuJvqBEhR5ANXG6NYv5Z9odYl8KuMCGYu2j tDZ7d0zNpHP6CO44hUEt6WbKLlCHmR7fVR5GK8d9uliY+Nv77zFv57DnJV9QNlkmXvIari1NgyY 2MyBb5M2CmTRBGh5GE/RcK+ryvKZYnDp1X6ZVkyQrgZF48FbUnaIXJrIj1Q1PSkDrV/2sIePAeL M1i0X1FbL98p9/K3/T2it1MjXLvjXD+6MEr4lFiO0WrdHX9vrbVP+0t3xEZcnjgHmPuoW8qz2Ry EdPf9PFwTdurYYRYU18vg0rs59Jd0UCnAQQ4A0t9P05pLtDF+ZEN0d03oJyt4ferqA== X-Received: by 2002:a17:90b:4a06:b0:3a4:9dd7:296f with SMTP id 98e67ed59e1d1-3b41caec8a1mr21263215a91.40.1795745650002; Thu, 26 Nov 2026 18:14:10 -0800 (PST) From: Maximilian Zimmermann Date: Fri, 27 Nov 2026 11:13:35 +0900 Subject: [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261127-add-scobc-a1-board-v1-2-b572280dcde1@spacecubics.com> References: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> In-Reply-To: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Maximilian Zimmermann X-Mailer: b4 0.15.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::102c; envelope-from=maxz@spacecubics.com; helo=mail-pj1-x102c.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, WEIRD_QUOTING=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 26 Nov 2026 23:07:08 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @spacecubics-com.20260707.gappssmtp.com) X-ZM-MESSAGEID: 1795752483444158500 The default FPGA image provides six Xilinx UART Lite instances on the mission bus, which firmware uses to talk to devices on the base I/O board and the rest of the spacecraft. Replace the unimplemented devices with UART Lite models at 0x5000_0000 to 0x5005_0000, connected to IRQ 16 to 21. Factor out the UART creation into a helper shared with the console UART. The mission UARTs are connected to serial1 to serial6, after the console UART on serial0. Signed-off-by: Maximilian Zimmermann Reviewed-by: Alex Benn=C3=A9e --- docs/system/arm/scobc-a1.rst | 12 +++++++++++- hw/arm/scobc_a1.c | 42 ++++++++++++++++++++++++++++------------= -- 2 files changed, 39 insertions(+), 15 deletions(-) diff --git a/docs/system/arm/scobc-a1.rst b/docs/system/arm/scobc-a1.rst index 0f4f3a757a..68c46af05e 100644 --- a/docs/system/arm/scobc-a1.rst +++ b/docs/system/arm/scobc-a1.rst @@ -21,6 +21,7 @@ Supported devices - 4 MiB HRMEM main memory - HRMEM mirror (``0x6000_0000``) - Xilinx UART Lite console UART (``0x4f01_0000``) +- 6 Xilinx UART Lite mission bus UARTs (``0x5000_0000`` - ``0x5005_0000``) =20 Missing devices """"""""""""""" @@ -35,7 +36,16 @@ The following devices are present in the memory map but = not implemented: - System monitor (FPGA watchdog, SEM controller, XADC and board health monitor) - General purpose timer -- Mission bus UARTs, I2C, SPI and GPIO controllers +- Mission bus I2C, SPI and GPIO controllers + +Serial ports +"""""""""""" + +The UARTs are connected to the ``-serial`` options in the following order: + +- ``serial0``: console UART (``0x4f01_0000``) +- ``serial1`` - ``serial6``: mission bus UART 1 - 6 (``0x5000_0000`` - + ``0x5005_0000``) =20 Boot options """""""""""" diff --git a/hw/arm/scobc_a1.c b/hw/arm/scobc_a1.c index 877bc2e41f..e7bec640a4 100644 --- a/hw/arm/scobc_a1.c +++ b/hw/arm/scobc_a1.c @@ -43,11 +43,29 @@ OBJECT_DECLARE_SIMPLE_TYPE(SCOBCA1MachineState, SCOBC_A= 1_MACHINE) #define SCOBC_A1_UART_BASE 0x4f010000 #define SCOBC_A1_UART_IRQ 0 =20 +/* Mission bus UARTs of the default FPGA image */ +#define SCOBC_A1_NUM_MISSION_UARTS 6 +#define SCOBC_A1_MISSION_UART_BASE 0x50000000 +#define SCOBC_A1_MISSION_UART_IRQ 16 + +static void scobc_a1_create_uart(DeviceState *armv7m, hwaddr base, int irq, + Chardev *chr) +{ + DeviceState *uart; + + uart =3D qdev_new(TYPE_XILINX_UARTLITE); + qdev_prop_set_enum(uart, "endianness", ENDIAN_MODE_LITTLE); + qdev_prop_set_chr(uart, "chardev", chr); + sysbus_realize_and_unref(SYS_BUS_DEVICE(uart), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(uart), 0, base); + sysbus_connect_irq(SYS_BUS_DEVICE(uart), 0, + qdev_get_gpio_in(armv7m, irq)); +} + static void scobc_a1_init(MachineState *machine) { MachineClass *mc =3D MACHINE_GET_CLASS(machine); SCOBCA1MachineState *s =3D SCOBC_A1_MACHINE(machine); - DeviceState *uart; =20 /* Check the amount of memory is compatible with the board */ if (machine->ram_size !=3D mc->default_ram_size) { @@ -79,13 +97,9 @@ static void scobc_a1_init(MachineState *machine) OBJECT(get_system_memory()), &error_abort); sysbus_realize(SYS_BUS_DEVICE(&s->armv7m), &error_fatal); =20 - uart =3D qdev_new(TYPE_XILINX_UARTLITE); - qdev_prop_set_enum(uart, "endianness", ENDIAN_MODE_LITTLE); - qdev_prop_set_chr(uart, "chardev", serial_hd(0)); - sysbus_realize_and_unref(SYS_BUS_DEVICE(uart), &error_fatal); - sysbus_mmio_map(SYS_BUS_DEVICE(uart), 0, SCOBC_A1_UART_BASE); - sysbus_connect_irq(SYS_BUS_DEVICE(uart), 0, - qdev_get_gpio_in(DEVICE(&s->armv7m), SCOBC_A1_UART_= IRQ)); + /* Console UART */ + scobc_a1_create_uart(DEVICE(&s->armv7m), SCOBC_A1_UART_BASE, + SCOBC_A1_UART_IRQ, serial_hd(0)); =20 /* System peripherals */ create_unimplemented_device("scobc-a1.qspi-config", 0x40000000, 0x1000= 0); @@ -99,12 +113,12 @@ static void scobc_a1_init(MachineState *machine) create_unimplemented_device("scobc-a1.timer", 0x4f050000, 0x10000); =20 /* Mission AXI bus peripherals (as defined in standard FPGA image) */ - create_unimplemented_device("scobc-a1.uartlite1", 0x50000000, 0x10000); - create_unimplemented_device("scobc-a1.uartlite2", 0x50010000, 0x10000); - create_unimplemented_device("scobc-a1.uartlite3", 0x50020000, 0x10000); - create_unimplemented_device("scobc-a1.uartlite4", 0x50030000, 0x10000); - create_unimplemented_device("scobc-a1.uartlite5", 0x50040000, 0x10000); - create_unimplemented_device("scobc-a1.uartlite6", 0x50050000, 0x10000); + for (int i =3D 0; i < SCOBC_A1_NUM_MISSION_UARTS; i++) { + scobc_a1_create_uart(DEVICE(&s->armv7m), + SCOBC_A1_MISSION_UART_BASE + i * 0x10000, + SCOBC_A1_MISSION_UART_IRQ + i, + serial_hd(1 + i)); + } create_unimplemented_device("scobc-a1.i2c1", 0x50060000, 0x10000); create_unimplemented_device("scobc-a1.i2c2", 0x50070000, 0x10000); create_unimplemented_device("scobc-a1.qspi", 0x50080000, 0x10000); --=20 2.55.0 From nobody Sat Nov 28 01:30:21 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1795752481; cv=none; d=zohomail.com; s=zohoarc; b=VKtw3EZTrGyHeXsv+N1D+tKFr+oCyM9WARKvo5fXeyYCRnpSBFAanwFH3hNkSVzN0QnF6NlracWWD7/QNhpO/m352MwHumTix2lZmu5PIJrnJpFYwrhVooCpxycnFZhTV4BB+q8bntpLTFCXk6e3mFdWLG2wZFfIzMGqJG6ophc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1795752481; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5aDdp7tVxVsin29xlNHo3SxIMh3/Gnj6XKXn/kVM3sI=; b=Hlwf4lrqIlWq0MyxexZa8+5pZkd3dunuAMCuOoRysz6xCfCsU8Eo4NmBFgJGNLIF/cjjgJuhgF/o7tAi8DZlVsHdWGjI+bJxH0Y7YSnaalJmihzgxGhCERdBeoKvY0ngJzbl4shc/mxi2tL+6iul6pdyhU/4fPPBY0ntAZl59kE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1795752481688759.4897447885704; Thu, 26 Nov 2026 20:08:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xWnFC-0002TY-Ms; Thu, 26 Nov 2026 23:07:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xWlTb-0001qK-0c for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:16 -0500 Received: from mail-pg1-x532.google.com ([2607:f8b0:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1xWlTZ-0001I9-32 for qemu-devel@nongnu.org; Thu, 26 Nov 2026 21:14:14 -0500 Received: by mail-pg1-x532.google.com with SMTP id 41be03b00d2f7-cd61cef87f1so3481189a12.0 for ; Thu, 26 Nov 2026 18:14:12 -0800 (PST) Received: from [127.0.0.2] (182-166-200-88f1.hyg1.eonet.ne.jp. [182.166.200.88]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b53479b149sm1368372a91.6.2026.11.26.18.14.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Nov 2026 18:14:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spacecubics-com.20260707.gappssmtp.com; s=20260707; t=1795745652; x=1796350452; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5aDdp7tVxVsin29xlNHo3SxIMh3/Gnj6XKXn/kVM3sI=; b=IpgL6uiUR0/JeRGTZpMi/Qik7sOaOR55T47eWHN2fNOwWZ4PSCT33wL9dL/YYnge/v Cinv3THnEcuU+8PIUE+h7PI9WkB7301J9LKU6XiVCIl1/gvYA48K2dJjCHYuYQOkSfZN XfdPTsd5YLnEH7llvdZigByF5QVtkGRJnHbAjEz7kwzNWFwn8ZEOPeT6FlXb4Jy3f+34 x+zJdwfPkK5bQ6GHxxP6T//ySonG1CQKL9E/Lo9j34Zwxuyd+thumjRfL1unnJBAFWMt dZzrzhOib5pfT68gSlzXpEJpasDf8gz9jMOet8bZYsCvvOegD2GECesm4O5uI2Ho410v iPYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795745652; x=1796350452; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=5aDdp7tVxVsin29xlNHo3SxIMh3/Gnj6XKXn/kVM3sI=; b=M371DQKMZuYyI/Wz1HfBG8rxdbxKJnzoQfnpipRzU42jawo06/NwwwSZ4l8NwEgQ3m fXPJFilMRlgnKU5PwxAtkmLnJZBRm/CmIsoA41SXmxj00es+yRs6W9uwnmhMCVjqTuX7 UFJZAwcaacpUFSXqX1pSl5u1tFeKHgG/2g1LTAYRSmeil2yaxOnn2Q0b6h8/+lMlIJHb s7oI+TDNwcZTbVnQCPQ3yWVf4+jQKmBXM8mPnejeLval7G71jkU9IyYI6YjVbaG/E/GI DPTOF8Xku1DkEekX4++GFk0xmdPyPdVbOMXsMmmUy5YQZ67n7Ph+CaNaBh8SCVl5UTWh 9bGQ== X-Gm-Message-State: APuU4Z9XBbq53+ajffbp0ZUJLPv784tgbiOZghGjVaPovTTePCfg9dI4 b4mVvp0ZZKQgfmbj1GKGICjdQgF3hsPBDu2MJJgdayCB+XpXjQFGdP2t2rNJseu5DWQ= X-Gm-Gg: AZFdTZcYgHHThMwZ9mKeZUBoKhma0zE/k1+Ms+5/FjxFE5uWKANMauGkVreGXdVzhrZ JQ5Xx7dgMbixS5jGc2/crScwbER0W2AY0fKb13NFTMvUAmpo2YbKntJyD2Wzvb0LzemU9v/F0Ni 4EsdYMGrsPHsHXcRS5EEyG4uuQXGNAo3X4Uy8t5/v7WV+Ok6b/gDCYsSYJTtNiy4LIZJzmfXV3J qoQQin75iQ8FeaMhE0Yt0UJ/Oobzl3HAUZdwHFGqaN2LNyLpshKwTlDRQVEcphYvP3Puku0b4C5 PqMUAH+adhL+S9fp5CTdMuwIGP795xfiE7MUKCyhJxkQ8fbAU7jqBPmoEJoWAKQE8cVGW8twvrk MwdrG9uqsvRv30qJtFkXWz8xx2X64f5Bll5P1ip1D016tsFyWLalQ6O9dlaiR8X1tzQ7dKeZQRM dWXwyqaiL7S61udFiw2x1leX/a56xNRGTMo8i73KzmAHAdCf0/gSFreoG0zedB1ow0l73JLtoHm KH0Wgl8JPmZwbDAaatNYVr7dj/167rM8OJUg5/ncl26OPfOQcXZQ5T50dn2ssoHk1s/Kn2Cnr2R eOLSRrw79ovrxSheprkI0fpe3nzrkfRNEW7vuQSbz+XoQvnH3Z091iWS4l3xeEVQ6w== X-Received: by 2002:a17:90b:3b8f:b0:3b3:b36e:8c3d with SMTP id 98e67ed59e1d1-3b41cb466f4mr20517311a91.62.1795745651737; Thu, 26 Nov 2026 18:14:11 -0800 (PST) From: Maximilian Zimmermann Date: Fri, 27 Nov 2026 11:13:36 +0900 Subject: [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20261127-add-scobc-a1-board-v1-3-b572280dcde1@spacecubics.com> References: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> In-Reply-To: <20261127-add-scobc-a1-board-v1-0-b572280dcde1@spacecubics.com> To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , Peter Maydell , Paolo Bonzini , qemu-arm@nongnu.org, Maximilian Zimmermann X-Mailer: b4 0.15.2 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists1p.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::532; envelope-from=maxz@spacecubics.com; helo=mail-pg1-x532.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 26 Nov 2026 23:07:08 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @spacecubics-com.20260707.gappssmtp.com) X-ZM-MESSAGEID: 1795752483531158500 Add a functional test for the scobc-a1 machine, so that regressions in the board or its console UART are caught. The test boots the Zephyr v4.5.0 hello_world sample built for the scobc_a1 board directly into HRMEM and waits for the boot banner and the greeting on the console UART. Signed-off-by: Maximilian Zimmermann Reviewed-by: Alex Benn=C3=A9e --- MAINTAINERS | 1 + tests/functional/arm/meson.build | 1 + tests/functional/arm/test_scobc_a1.py | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index bc02f6e1be..3bea382cf4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1104,6 +1104,7 @@ L: qemu-arm@nongnu.org S: Maintained F: hw/arm/scobc_a1.c F: docs/system/arm/scobc-a1.rst +F: tests/functional/arm/test_scobc_a1.py =20 Stellaris M: Peter Maydell diff --git a/tests/functional/arm/meson.build b/tests/functional/arm/meson.= build index 72c7afc84a..88e567e90e 100644 --- a/tests/functional/arm/meson.build +++ b/tests/functional/arm/meson.build @@ -70,6 +70,7 @@ tests_arm_system_thorough =3D [ 'realview', 'replay', 'sabrelite', + 'scobc_a1', 'smdkc210', 'stellaris', 'sx1', diff --git a/tests/functional/arm/test_scobc_a1.py b/tests/functional/arm/t= est_scobc_a1.py new file mode 100755 index 0000000000..41d18cfef0 --- /dev/null +++ b/tests/functional/arm/test_scobc_a1.py @@ -0,0 +1,30 @@ +#!/usr/bin/env python3 +# +# Functional test that boots Zephyr on the Space Cubics SC-OBC Module A1 +# +# Copyright (c) 2026 Space Cubics Inc. +# +# SPDX-License-Identifier: GPL-2.0-or-later + +from qemu_test import QemuSystemTest, Asset, wait_for_console_pattern + + +class ScobcA1Machine(QemuSystemTest): + + ASSET_HELLO_WORLD =3D Asset( + 'https://downloads.spacecubics.com/development/scobc-a1/qemu/' + 'zephyr-v4.5.0-hello_world.elf', + '1578aebe742e4b3fc10af22994de4cd7feda3b54be19486a2efe42c099734c60') + + def test_scobc_a1_hello_world(self): + self.set_machine('scobc-a1') + kernel_path =3D self.ASSET_HELLO_WORLD.fetch() + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path) + self.vm.launch() + wait_for_console_pattern(self, '*** Booting Zephyr OS build v4.5.0= ***') + wait_for_console_pattern(self, 'Hello World! scobc_a1') + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.55.0