Skip to content

m68k: Add support for QEMU virt machine

Kuan-Wei Chiu u-boot 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest8 patches 7 repliesIn review
  2. v57 patches 18 repliesSuperseded
  3. v46 patches 10 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v36 patches11 repliesSuperseded
v24 patches14 repliesSuperseded
v13 patches18 repliesSuperseded

Changes in v6 from the cover letter

- Refactor Goldfish drivers (TTY, Timer, RTC) to strictly separate of_to_plat (parsing) and probe (mapping), supporting both device tree and explicit platform data.
- Introduce a new sysreset driver for the QEMU virtual system controller, replacing the previous board-file implementation.
- Refactor m68k Kconfig/Makefile to use a hidden CONFIG_ARCH_COLDFIRE symbol for cleaner file grouping.
- Improve board initialization: move bootinfo parsing to board_early_init_f and remove all hardcoded MMIO addresses.
- Update MAINTAINERS to reflect the removal of inactive maintainers.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8serial: Add Goldfish TTY driverMAINTAINERS drivers/serial/Kconfig drivers/serial/Makefile +2 more+150 -00 replies
2/8timer: Add Goldfish timer driverMAINTAINERS drivers/timer/Kconfig drivers/timer/Makefile +2 more+117 -00 replies
3/8rtc: goldfish: Support platform data for non-DT probingdrivers/rtc/goldfish_rtc.c include/goldfish_rtc.h+34 -40 replies
4/8sysreset: Add QEMU virtual system controller driverMAINTAINERS drivers/sysreset/Kconfig drivers/sysreset/Makefile +2 more+83 -03 replies
5/8m68k: Add support for M68040 CPUMAINTAINERS arch/m68k/Kconfig arch/m68k/Makefile +7 more+284 -82 replies
6/8board: Add QEMU m68k virt board supportarch/m68k/Kconfig board/emulation/qemu-m68k/Kconfig board/emulation/qemu-m68k/MAINTAINERS +6 more+229 -01 reply
7/8CI: Add test jobs for QEMU m68k virt machine.azure-pipelines.yml .gitlab-ci.yml+9 -00 replies
8/8MAINTAINERS: Update m68k entryMAINTAINERS+2 -20 replies

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by.

PatchYao ZiDaniel PalmerHeinrich SchuchardtSimon GlassAngelo DureghelloTom Rini
1/8R-b T-b A-b R-b A-b
2/8R-b T-b R-b R-b
3/8R-b
4/8R-b
5/8R-b A-b
6/8T-b R-b
7/8R-b R-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 6 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/8] m68k: Add support for QEMU virt machine

Add support for the QEMU 'virt' machine on the m68k architecture. The QEMU virt machine models a generic system utilizing Goldfish virtual peripherals and is capable of emulating various classic 68k CPUs.

Currently, U-Boot's m68k architecture support focuses on ColdFire variants. This series expands support to include the classic M680x0 architecture, implementing the necessary exception vectors, startup code, and a bootinfo parser compatible with the QEMU interface.

Drivers for Goldfish peripherals (TTY, Timer, RTC) and the QEMU Virtual System Controller (sysreset) are also added to enable serial console, timekeeping, and system reset functionality.

The implementation has been verified on QEMU targeting the M68040 CPU, confirming successful hardware initialization and boot to the U-Boot command shell. Additionally, the CI configuration was verified locally using gitlab-ci-local "qemu_m68k_virt test.py", resulting in PASS qemu_m68k_virt test.py.
---
Changes in v6:
- Refactor Goldfish drivers (TTY, Timer, RTC) to strictly separate of_to_plat (parsing) and probe (mapping), supporting both device tree and explicit platform data.
- Introduce a new sysreset driver for the QEMU virtual system controller, replacing the previous board-file implementation.
- Refactor m68k Kconfig/Makefile to use a hidden CONFIG_ARCH_COLDFIRE symbol for cleaner file grouping.
- Improve board initialization: move bootinfo parsing to board_early_init_f and remove all hardcoded MMIO addresses.
- Update MAINTAINERS to reflect the removal of inactive maintainers.

Changes in v5:
- Rebase on u-boot/next branch.
- Add 'imply CMD_DM' to TARGET_QEMU_M68K in Kconfig.
- Add a new patch to update the M68K entry in MAINTAINERS and add myself as a co-maintainer.

Changes in v4:
- Support DT probing with platform data as a fallback. (serial & timer)
- Fix sandbox build warnings by removing incorrect type casting.
- Add comment explaining read latching behavior in the timer driver.
- Sort headers alphabetically in the timer driver.

Changes in v3:
- Add Goldfish timer driver.
- Update Goldfish RTC driver to support non-DT probing.
- Enable Goldfish RTC and Timer support in board configuration.
- Add safety loop limit to bootinfo parsing in dram_init.
- Remove dummy timer functions from architecture code.
- Remove unnecessary type casts in Goldfish TTY driver.
- Remove TEST_PY_ID from CI job definitions.
- Update documentation to include new RTC support.

Changes in v2:
- Refactor Goldfish TTY driver to use priv data for the RX buffer and ensure single-byte reads.
- Rename arch/m68k/cpu/m68040 to arch/m68k/cpu/m680x0 to separate the architecture family from the specific CPU model.
- Introduce M680x0 Kconfig symbol and separate MAINTAINERS entries for the architecture and the board.
- Regenerate qemu-m68k_defconfig using make savedefconfig and add the board to the documentation index.
- Add a new patch to enable CI testing on GitLab and Azure Pipelines.
- Update SPDX identifiers to GPL-2.0-or-later.
- Sort headers alphabetically.
- Fix tabs vs spaces.

v5: https://lore.kernel.org/u-boot/[email protected]/
v4: https://lore.kernel.org/u-boot/[email protected]/
v3: https://lore.kernel.org/u-boot/[email protected]/
v2: https://lore.kernel.org/u-boot/[email protected]/
v1: https://lore.kernel.org/u-boot/[email protected]/

Kuan-Wei Chiu (8):
serial: Add Goldfish TTY driver
timer: Add Goldfish timer driver
rtc: goldfish: Support platform data for non-DT probing
sysreset: Add QEMU virtual system controller driver
m68k: Add support for M68040 CPU
board: Add QEMU m68k virt board support
CI: Add test jobs for QEMU m68k virt machine
MAINTAINERS: Update m68k entry

 .azure-pipelines.yml                       |   3 +
 .gitlab-ci.yml                             |   6 ++
 MAINTAINERS                                |  28 ++++-
 arch/m68k/Kconfig                          |  39 +++++++
 arch/m68k/Makefile                         |   1 +
 arch/m68k/config.mk                        |  10 +-
 arch/m68k/cpu/m680x0/Makefile              |   6 ++
 arch/m68k/cpu/m680x0/cpu.c                 |  73 +++++++++++++
 arch/m68k/cpu/m680x0/start.S               |  73 +++++++++++++
 arch/m68k/cpu/m680x0/u-boot.lds            |  47 +++++++++
 arch/m68k/include/asm/bootinfo.h           |  39 +++++++
 arch/m68k/lib/Makefile                     |   7 +-
 board/emulation/qemu-m68k/Kconfig          |  12 +++
 board/emulation/qemu-m68k/MAINTAINERS      |   8 ++
 board/emulation/qemu-m68k/Makefile         |   5 +
 board/emulation/qemu-m68k/qemu-m68k.c      | 117 +++++++++++++++++++++
 configs/qemu-m68k_defconfig                |  20 ++++
 doc/board/emulation/index.rst              |   1 +
 doc/board/emulation/qemu-m68k.rst          |  39 +++++++
 drivers/rtc/goldfish_rtc.c                 |  23 +++-
 drivers/serial/Kconfig                     |   8 ++
 drivers/serial/Makefile                    |   1 +
 drivers/serial/serial_goldfish.c           | 117 +++++++++++++++++++++
 drivers/sysreset/Kconfig                   |   8 ++
 drivers/sysreset/Makefile                  |   1 +
 drivers/sysreset/sysreset_qemu_virt_ctrl.c |  55 ++++++++++
 drivers/timer/Kconfig                      |   8 ++
 drivers/timer/Makefile                     |   1 +
 drivers/timer/goldfish_timer.c             |  89 ++++++++++++++++
 include/configs/qemu-m68k.h                |  18 ++++
 include/goldfish_rtc.h                     |  15 +++
 include/goldfish_timer.h                   |  13 +++
 include/goldfish_tty.h                     |  18 ++++
 include/qemu_virt_ctrl.h                   |  13 +++
 34 files changed, 908 insertions(+), 14 deletions(-)
 create mode 100644 arch/m68k/cpu/m680x0/Makefile
 create mode 100644 arch/m68k/cpu/m680x0/cpu.c
 create mode 100644 arch/m68k/cpu/m680x0/start.S
 create mode 100644 arch/m68k/cpu/m680x0/u-boot.lds
 create mode 100644 arch/m68k/include/asm/bootinfo.h
 create mode 100644 board/emulation/qemu-m68k/Kconfig
 create mode 100644 board/emulation/qemu-m68k/MAINTAINERS
 create mode 100644 board/emulation/qemu-m68k/Makefile
 create mode 100644 board/emulation/qemu-m68k/qemu-m68k.c
 create mode 100644 configs/qemu-m68k_defconfig
 create mode 100644 doc/board/emulation/qemu-m68k.rst
 create mode 100644 drivers/serial/serial_goldfish.c
 create mode 100644 drivers/sysreset/sysreset_qemu_virt_ctrl.c
 create mode 100644 drivers/timer/goldfish_timer.c
 create mode 100644 include/configs/qemu-m68k.h
 create mode 100644 include/goldfish_rtc.h
 create mode 100644 include/goldfish_timer.h
 create mode 100644 include/goldfish_tty.h
 create mode 100644 include/qemu_virt_ctrl.h
Signature · 1 line
2.52.0.457.g6b5491de43-goog