All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] hw/arm: Add Space Cubics SC-OBC Module A1 board support
@ 2026-11-27  2:13 Maximilian Zimmermann
  2026-11-27  2:13 ` [PATCH 1/3] hw/arm: Add Space Cubics SC-OBC Module A1 board Maximilian Zimmermann
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ 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 made by
Space Cubics. Its processing system is implemented in an Artix-7 FPGA,
which hosts a Cortex-M3, 4 MiB of main memory (HRMEM) and a set of
peripherals. The module must be mounted on a base I/O board. This machine
only models the module and not the base I/O board.

The default FPGA image provided by Space Cubics contains so-called
mission bus peripherals, which are user definable via an FPGA image and
live in the range 0x5000_0000 to 0x6000_0000. This is the only image this
machine models.

The board is already commercially available and in upstream Zephyr
as scobc_a1. To make development and CI easier we want to add it to
upstream QEMU as well.

Currently only a small subset of hardware is modelled, mainly the CPU,
memory map + mirror, console UART and 6 mission bus UARTs. They are
register compatible with Xilinx UART Lite, hence the existing device
implementation is reused. Other devices are mapped as unimplemented
devices and are planned to be implemented in further patches.

The hardware is publicly documented and can be accessed via the
following links. The memory map and interrupt page are partly
in Japanese only at the moment, but should be understandable to English
speakers as well:
- https://docs.zephyrproject.org/4.5.0/boards/sc/scobc_a1/doc/index.html
- https://docs.spacecubics.com/scobc-a1/latest/key-specs
- https://docs.spacecubics.com/scobc-a1-ja/latest/fpga/memory_map
- https://docs.spacecubics.com/scobc-a1-ja/latest/fpga/interrupt
- https://spacecubics.com/en/products/scobc_a1/

I added a small functional test, checking that the provided Zephyr ELF
boots and "hello world" is printed. The ELF is an unmodified
samples/hello_world from Zephyr v4.5.0 and hosted on
downloads.spacecubics.com.

The board and possible future additions will be maintained by me.

Signed-off-by: Maximilian Zimmermann <maxz@spacecubics.com>
---
Maximilian Zimmermann (3):
      hw/arm: Add Space Cubics SC-OBC Module A1 board
      hw/arm/scobc_a1: Add mission bus UARTs
      tests/functional/arm: Add SC-OBC Module A1 test

 MAINTAINERS                           |   8 ++
 docs/system/arm/scobc-a1.rst          |  59 +++++++++++++
 docs/system/target-arm.rst            |   1 +
 hw/arm/Kconfig                        |   8 ++
 hw/arm/meson.build                    |   1 +
 hw/arm/scobc_a1.c                     | 151 ++++++++++++++++++++++++++++++++++
 tests/functional/arm/meson.build      |   1 +
 tests/functional/arm/test_scobc_a1.py |  30 +++++++
 8 files changed, 259 insertions(+)
---
base-commit: 6bf90d4fc5027567cb704d7888f5ec792b4ed75a
change-id: 20261126-add-scobc-a1-board-af331e0f1c48

Best regards,
--  
Maximilian Zimmermann <maxz@spacecubics.com>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [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
  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, 0 replies; 6+ 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] 6+ 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; 6+ 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] 6+ messages in thread

* [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test
  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 ` [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs Maximilian Zimmermann
@ 2026-11-27  2:13 ` Maximilian Zimmermann
  2026-11-27 17:21   ` Alex Bennée
  2 siblings, 1 reply; 6+ 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

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 <maxz@spacecubics.com>
---
 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
 
 Stellaris
 M: Peter Maydell <peter.maydell@linaro.org>
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 = [
   'realview',
   'replay',
   'sabrelite',
+  'scobc_a1',
   'smdkc210',
   'stellaris',
   'sx1',
diff --git a/tests/functional/arm/test_scobc_a1.py b/tests/functional/arm/test_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 = 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 = 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__ == '__main__':
+    QemuSystemTest.main()

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test
  2026-11-27  2:13 ` [PATCH 3/3] tests/functional/arm: Add SC-OBC Module A1 test Maximilian Zimmermann
@ 2026-11-27 17:21   ` Alex Bennée
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2026-11-27 17:21 UTC (permalink / raw)
  To: Maximilian Zimmermann
  Cc: qemu-devel, Pierrick Bouvier, Peter Maydell, Paolo Bonzini,
	qemu-arm

Maximilian Zimmermann <maxz@spacecubics.com> writes:

> 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 <maxz@spacecubics.com>
> ---
>  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
>  
>  Stellaris
>  M: Peter Maydell <peter.maydell@linaro.org>
> 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 = [
>    'realview',
>    'replay',
>    'sabrelite',
> +  'scobc_a1',
>    'smdkc210',
>    'stellaris',
>    'sx1',
> diff --git a/tests/functional/arm/test_scobc_a1.py b/tests/functional/arm/test_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 = Asset(
> +        'https://downloads.spacecubics.com/development/scobc-a1/qemu/'
> +        'zephyr-v4.5.0-hello_world.elf',
> +        '1578aebe742e4b3fc10af22994de4cd7feda3b54be19486a2efe42c099734c60')

It would be useful to include a manifest/config in the directory and the
reference hash of the zephyr checkout in case people want to
re-create/expand the binary.

But otherwise thanks for providing an image for the board model :-)

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

> +
> +    def test_scobc_a1_hello_world(self):
> +        self.set_machine('scobc-a1')
> +        kernel_path = 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__ == '__main__':
> +    QemuSystemTest.main()

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs
  2026-11-27  2:13 ` [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs Maximilian Zimmermann
@ 2026-11-27 17:31   ` Alex Bennée
  0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2026-11-27 17:31 UTC (permalink / raw)
  To: Maximilian Zimmermann
  Cc: qemu-devel, Pierrick Bouvier, Peter Maydell, Paolo Bonzini,
	qemu-arm

Maximilian Zimmermann <maxz@spacecubics.com> writes:

> 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>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-11-27 17:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/3] hw/arm/scobc_a1: Add mission bus UARTs 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
2026-11-27 17:21   ` Alex Bennée

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.