* [PATCH 1/3] hw/arm: Add Space Cubics SC-OBC Module A1 board
2026-11-27 2:13 [PATCH 0/3] hw/arm: Add Space Cubics SC-OBC Module A1 board support Maximilian Zimmermann
@ 2026-11-27 2:13 ` Maximilian Zimmermann
[not found] ` <874id2tc9y.fsf@draig.linaro.org>
2026-11-27 2:13 ` [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs Maximilian Zimmermann
2026-11-27 2:13 ` [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test Maximilian Zimmermann
2 siblings, 1 reply; 7+ messages in thread
From: Maximilian Zimmermann @ 2026-11-27 2:13 UTC (permalink / raw)
To: qemu-devel
Cc: Pierrick Bouvier, Peter Maydell, Paolo Bonzini, qemu-arm,
Maximilian Zimmermann
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 <maxz@spacecubics.com>
---
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
+Space Cubics SC-OBC Module A1
+M: Maximilian Zimmermann <maxz@spacecubics.com>
+L: qemu-arm@nongnu.org
+S: Maintained
+F: hw/arm/scobc_a1.c
+F: docs/system/arm/scobc-a1.rst
+
Stellaris
M: Peter Maydell <peter.maydell@linaro.org>
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``)
+============================================
+
+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 mission
+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
+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: files('stellaris.c'))
arm_common_ss.add(when: 'CONFIG_STM32VLDISCOVERY', if_true: files('stm32vldiscovery.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'))
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 = MACHINE_GET_CLASS(machine);
+ SCOBCA1MachineState *s = SCOBC_A1_MACHINE(machine);
+ DeviceState *uart;
+
+ /* Check the amount of memory is compatible with the board */
+ if (machine->ram_size != mc->default_ram_size) {
+ g_autofree char *sz = 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 = 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 = 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, 0x10000);
+ 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[] = {
+ ARM_CPU_TYPE_NAME("cortex-m3"),
+ NULL
+ };
+
+ mc->desc = "Space Cubics SC-OBC Module A1 (Cortex-M3)";
+ mc->init = scobc_a1_init;
+ mc->default_cpu_type = ARM_CPU_TYPE_NAME("cortex-m3");
+ mc->valid_cpu_types = valid_cpu_types;
+ mc->max_cpus = 1;
+ mc->default_ram_size = 4 * MiB;
+ mc->default_ram_id = "scobc-a1.hrmem";
+ mc->no_parallel = true;
+ mc->no_floppy = true;
+ mc->no_cdrom = true;
+}
+
+DEFINE_MACHINE_EXTENDED("scobc-a1", MACHINE, SCOBCA1MachineState,
+ scobc_a1_machine_init, false, false, NULL)
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs
2026-11-27 2:13 [PATCH 0/3] hw/arm: Add Space Cubics SC-OBC Module A1 board support Maximilian Zimmermann
2026-11-27 2:13 ` [PATCH 1/3] hw/arm: Add Space Cubics SC-OBC Module A1 board Maximilian Zimmermann
@ 2026-11-27 2:13 ` Maximilian Zimmermann
2026-11-27 17:31 ` Alex Bennée
2026-11-27 2:13 ` [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test Maximilian Zimmermann
2 siblings, 1 reply; 7+ messages in thread
From: Maximilian Zimmermann @ 2026-11-27 2:13 UTC (permalink / raw)
To: qemu-devel
Cc: Pierrick Bouvier, Peter Maydell, Paolo Bonzini, qemu-arm,
Maximilian Zimmermann
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 <maxz@spacecubics.com>
---
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``)
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``)
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_A1_MACHINE)
#define SCOBC_A1_UART_BASE 0x4f010000
#define SCOBC_A1_UART_IRQ 0
+/* 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 = 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 = MACHINE_GET_CLASS(machine);
SCOBCA1MachineState *s = SCOBC_A1_MACHINE(machine);
- DeviceState *uart;
/* Check the amount of memory is compatible with the board */
if (machine->ram_size != 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);
- uart = 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));
/* System peripherals */
create_unimplemented_device("scobc-a1.qspi-config", 0x40000000, 0x10000);
@@ -99,12 +113,12 @@ static void scobc_a1_init(MachineState *machine)
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);
+ for (int i = 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);
--
2.55.0
^ permalink raw reply related [flat|nested] 7+ messages in thread